Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Unified Diff: src/views/win/SkOSWindow_win.cpp

Issue 1190563002: win32: post invalidation rectangle to OS directly in SkOSWindow::onHandleInval() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/win/SkOSWindow_win.cpp
diff --git a/src/views/win/SkOSWindow_win.cpp b/src/views/win/SkOSWindow_win.cpp
index 08bbdd3a9ef3e391111f7590f281351c942fd4e1..91ff17ed6564d03e9905e3c806ec4f2cd87b2051 100644
--- a/src/views/win/SkOSWindow_win.cpp
+++ b/src/views/win/SkOSWindow_win.cpp
@@ -32,8 +32,6 @@
#endif
-#define INVALIDATE_DELAY_MS 200
-
static SkOSWindow* gCurrOSWin;
static HWND gEventTarget;
@@ -144,14 +142,6 @@ bool SkOSWindow::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
return true;
} break;
- case WM_TIMER: {
- RECT* rect = (RECT*)wParam;
- InvalidateRect(hWnd, rect, FALSE);
- KillTimer(hWnd, (UINT_PTR)rect);
- delete rect;
- return true;
- } break;
-
case WM_LBUTTONDOWN:
this->handleClick(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam),
Click::kDown_State, NULL, getModifiers(message));
@@ -228,12 +218,12 @@ void SkOSWindow::updateSize()
#endif
void SkOSWindow::onHandleInval(const SkIRect& r) {
- RECT* rect = new RECT;
- rect->left = r.fLeft;
- rect->top = r.fTop;
- rect->right = r.fRight;
- rect->bottom = r.fBottom;
- SetTimer((HWND)fHWND, (UINT_PTR)rect, INVALIDATE_DELAY_MS, NULL);
+ RECT rect;
+ rect.left = r.fLeft;
+ rect.top = r.fTop;
+ rect.right = r.fRight;
+ rect.bottom = r.fBottom;
+ InvalidateRect((HWND)fHWND, &rect, FALSE);
}
void SkOSWindow::onAddMenu(const SkOSMenu* sk_menu)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698