diff options
| author | crupest <crupest@outlook.com> | 2019-06-27 17:02:58 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2019-06-27 17:02:58 +0800 |
| commit | b53527fbe50a953ad0e3225cc812eb76b8a1f82d (patch) | |
| tree | eb81cd14d0a165c47f841ad94835f8987109de7e /src/win/native/window_painter.cpp | |
| parent | 8c5b05bcfce96495b4ffc4209ab8feda12597729 (diff) | |
| download | cru-b53527fbe50a953ad0e3225cc812eb76b8a1f82d.tar.gz cru-b53527fbe50a953ad0e3225cc812eb76b8a1f82d.tar.bz2 cru-b53527fbe50a953ad0e3225cc812eb76b8a1f82d.zip | |
...
Diffstat (limited to 'src/win/native/window_painter.cpp')
| -rw-r--r-- | src/win/native/window_painter.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/win/native/window_painter.cpp b/src/win/native/window_painter.cpp deleted file mode 100644 index 463be128..00000000 --- a/src/win/native/window_painter.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "window_painter.hpp" - -#include "cru/win/exception.hpp" -#include "cru/win/graph/win_native_factory.hpp" -#include "cru/win/native/window_render_target.hpp" - -#include <cassert> - -namespace cru::win::native { -WindowPainter::WindowPainter(WinNativeWindow* window) - : WinPainter(window->GetWindowRenderTarget() - ->GetWinNativeFactory() - ->GetD2D1DeviceContext()), - window_(window) { - window->GetWindowRenderTarget()->SetAsTarget(); - window->GetWindowRenderTarget() - ->GetWinNativeFactory() - ->GetD2D1DeviceContext() - ->BeginDraw(); -} - -WindowPainter::~WindowPainter() { End(); } - -void WindowPainter::DoEndDraw() { - ThrowIfFailed(window_->GetWindowRenderTarget() - ->GetWinNativeFactory() - ->GetD2D1DeviceContext() - ->EndDraw()); - window_->GetWindowRenderTarget()->Present(); -} -} // namespace cru::win::native |
