diff options
author | 2015-06-15 12:49:55 -0700 | |
---|---|---|
committer | 2015-06-15 12:49:55 -0700 | |
commit | e0ef4a71570f5c7ef60004fc86adad072e1f8719 (patch) | |
tree | cd95e76c1dede95de011402adb4981ebf0b47e75 /src/views | |
parent | 256cc89c486aaa1f1398b6f99a18814e59a1b7fb (diff) |
win32: post invalidation rectangle to OS directly in SkOSWindow::onHandleInval()
Review URL: https://codereview.chromium.org/1190563002
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/win/SkOSWindow_win.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/views/win/SkOSWindow_win.cpp b/src/views/win/SkOSWindow_win.cpp index 08bbdd3a9e..91ff17ed65 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) |