[aseprite] 117/250: Fix Skia port to new SkiaDisplay::flip() impl

Tobias Hansen thansen at moszumanska.debian.org
Sun Dec 20 15:27:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit f54ba2c59d0f1767b0b593b54a86b4155f556020
Author: David Capello <davidcapello at gmail.com>
Date:   Wed Sep 30 19:58:30 2015 -0300

    Fix Skia port to new SkiaDisplay::flip() impl
---
 src/she/skia/skia_display.cpp   | 4 ++--
 src/she/skia/skia_display.h     | 2 +-
 src/she/skia/skia_window_osx.h  | 2 +-
 src/she/skia/skia_window_osx.mm | 2 +-
 src/she/win/window.h            | 5 +++--
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/she/skia/skia_display.cpp b/src/she/skia/skia_display.cpp
index d3bbc6f..d9879d2 100644
--- a/src/she/skia/skia_display.cpp
+++ b/src/she/skia/skia_display.cpp
@@ -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()
diff --git a/src/she/skia/skia_display.h b/src/she/skia/skia_display.h
index 021ccac..bf7e660 100644
--- a/src/she/skia/skia_display.h
+++ b/src/she/skia/skia_display.h
@@ -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;
diff --git a/src/she/skia/skia_window_osx.h b/src/she/skia/skia_window_osx.h
index a3502aa..5d4c1a4 100644
--- a/src/she/skia/skia_window_osx.h
+++ b/src/she/skia/skia_window_osx.h
@@ -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:
diff --git a/src/she/skia/skia_window_osx.mm b/src/she/skia/skia_window_osx.mm
index 725ebe8..094e6db 100644
--- a/src/she/skia/skia_window_osx.mm
+++ b/src/she/skia/skia_window_osx.mm
@@ -113,7 +113,7 @@ void SkiaWindow::setNativeMouseCursor(NativeCursor cursor)
 {
 }
 
-void SkiaWindow::updateWindow()
+void SkiaWindow::updateWindow(const gfx::Rect& bounds)
 {
 }
 
diff --git a/src/she/win/window.h b/src/she/win/window.h
index 5d57db9..59e86c8 100644
--- a/src/she/win/window.h
+++ b/src/she/win/window.h
@@ -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);
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list