Fix Skia port to new SkiaDisplay::flip() impl

This commit is contained in:
David Capello 2015-09-30 19:58:30 -03:00
parent 4fbbd75599
commit f54ba2c59d
5 changed files with 8 additions and 7 deletions

View File

@ -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()

View File

@ -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;

View File

@ -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:

View File

@ -113,7 +113,7 @@ void SkiaWindow::setNativeMouseCursor(NativeCursor cursor)
{
}
void SkiaWindow::updateWindow()
void SkiaWindow::updateWindow(const gfx::Rect& bounds)
{
}

View File

@ -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);
}