mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-16 10:20:50 +00:00
Fix Skia port to new SkiaDisplay::flip() impl
This commit is contained in:
parent
4fbbd75599
commit
f54ba2c59d
@ -86,9 +86,9 @@ NonDisposableSurface* SkiaDisplay::getSurface()
|
||||
// Flips all graphics in the surface to the real display. Returns
|
||||
// false if the flip couldn't be done because the display was
|
||||
// resized.
|
||||
void SkiaDisplay::flip()
|
||||
void SkiaDisplay::flip(const gfx::Rect& bounds)
|
||||
{
|
||||
m_window.updateWindow();
|
||||
m_window.updateWindow(bounds);
|
||||
}
|
||||
|
||||
void SkiaDisplay::maximize()
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
NonDisposableSurface* getSurface() override;
|
||||
|
||||
// Flips all graphics in the surface to the real display.
|
||||
void flip() override;
|
||||
void flip(const gfx::Rect& bounds) override;
|
||||
void maximize() override;
|
||||
bool isMaximized() const override;
|
||||
void setTitleBar(const std::string& title) override;
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
void releaseMouse();
|
||||
void setMousePosition(const gfx::Point& position);
|
||||
void setNativeMouseCursor(NativeCursor cursor);
|
||||
void updateWindow();
|
||||
void updateWindow(const gfx::Rect& bounds);
|
||||
void* handle();
|
||||
|
||||
private:
|
||||
|
@ -113,7 +113,7 @@ void SkiaWindow::setNativeMouseCursor(NativeCursor cursor)
|
||||
{
|
||||
}
|
||||
|
||||
void SkiaWindow::updateWindow()
|
||||
void SkiaWindow::updateWindow(const gfx::Rect& bounds)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -149,8 +149,9 @@ namespace she {
|
||||
m_hcursor = hcursor;
|
||||
}
|
||||
|
||||
void updateWindow() {
|
||||
InvalidateRect(m_hwnd, NULL, FALSE);
|
||||
void updateWindow(const gfx::Rect& bounds) {
|
||||
RECT rc = { bounds.x, bounds.y, bounds.x+bounds.w, bounds.y+bounds.h };
|
||||
InvalidateRect(m_hwnd, &rc, FALSE);
|
||||
UpdateWindow(m_hwnd);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user