Skip to content

Commit

Permalink
Update the BGFX and WDDM render engines to use the new interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
j4james committed Jun 16, 2020
1 parent 1e1579a commit 6ce6bf2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
8 changes: 3 additions & 5 deletions src/interactivity/onecore/BgfxEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,11 @@ BgfxEngine::BgfxEngine(PVOID SharedViewBase, LONG DisplayHeight, LONG DisplayWid
return HRESULT_FROM_NT(Status);
}

[[nodiscard]] HRESULT BgfxEngine::UpdateDrawingBrushes(COLORREF const /*colorForeground*/,
COLORREF const /*colorBackground*/,
const WORD legacyColorAttribute,
const ExtendedAttributes /*extendedAttrs*/,
[[nodiscard]] HRESULT BgfxEngine::UpdateDrawingBrushes(const TextAttribute& textAttributes,
const gsl::not_null<IRenderData*> /*pData*/,
bool const /*isSettingDefaultBrushes*/) noexcept
{
_currentLegacyColorAttribute = legacyColorAttribute;
_currentLegacyColorAttribute = textAttributes.GetLegacyAttributes();

return S_OK;
}
Expand Down
6 changes: 2 additions & 4 deletions src/interactivity/onecore/BgfxEngine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ namespace Microsoft::Console::Render

[[nodiscard]] HRESULT PaintCursor(const CursorOptions& options) noexcept override;

[[nodiscard]] HRESULT UpdateDrawingBrushes(COLORREF const colorForeground,
COLORREF const colorBackground,
const WORD legacyColorAttribute,
const ExtendedAttributes extendedAttrs,
[[nodiscard]] HRESULT UpdateDrawingBrushes(const TextAttribute& textAttributes,
const gsl::not_null<IRenderData*> pData,
bool const isSettingDefaultBrushes) noexcept override;
[[nodiscard]] HRESULT UpdateFont(const FontInfoDesired& fiFontInfoDesired, FontInfo& fiFontInfo) noexcept override;
[[nodiscard]] HRESULT UpdateDpi(int const iDpi) noexcept override;
Expand Down
8 changes: 3 additions & 5 deletions src/renderer/wddmcon/WddmConRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,11 @@ bool WddmConEngine::IsInitialized()
return S_OK;
}

[[nodiscard]] HRESULT WddmConEngine::UpdateDrawingBrushes(COLORREF const /*colorForeground*/,
COLORREF const /*colorBackground*/,
const WORD legacyColorAttribute,
const ExtendedAttributes /*extendedAttrs*/,
[[nodiscard]] HRESULT WddmConEngine::UpdateDrawingBrushes(const TextAttribute& textAttributes,
const gsl::not_null<IRenderData*> /*pData*/,
bool const /*isSettingDefaultBrushes*/) noexcept
{
_currentLegacyColorAttribute = legacyColorAttribute;
_currentLegacyColorAttribute = textAttributes.GetLegacyAttributes();

return S_OK;
}
Expand Down
6 changes: 2 additions & 4 deletions src/renderer/wddmcon/WddmConRenderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ namespace Microsoft::Console::Render

[[nodiscard]] HRESULT PaintCursor(const CursorOptions& options) noexcept override;

[[nodiscard]] HRESULT UpdateDrawingBrushes(COLORREF const colorForeground,
COLORREF const colorBackground,
const WORD legacyColorAttribute,
const ExtendedAttributes extendedAttrs,
[[nodiscard]] HRESULT UpdateDrawingBrushes(const TextAttribute& textAttributes,
const gsl::not_null<IRenderData*> pData,
bool const isSettingDefaultBrushes) noexcept override;
[[nodiscard]] HRESULT UpdateFont(const FontInfoDesired& fiFontInfoDesired, FontInfo& fiFontInfo) noexcept override;
[[nodiscard]] HRESULT UpdateDpi(int const iDpi) noexcept override;
Expand Down

0 comments on commit 6ce6bf2

Please sign in to comment.