diff options
Diffstat (limited to 'chrome/views/widget/root_view_win.cc')
-rw-r--r-- | chrome/views/widget/root_view_win.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/views/widget/root_view_win.cc b/chrome/views/widget/root_view_win.cc index 4aa95ed7..b4641b4 100644 --- a/chrome/views/widget/root_view_win.cc +++ b/chrome/views/widget/root_view_win.cc @@ -37,15 +37,14 @@ void RootView::UpdateCursor(const MouseEvent& e) { } void RootView::OnPaint(HWND hwnd) { - gfx::Rect original_dirty_region = GetScheduledPaintRectConstrainedToSize(); - if (!original_dirty_region.empty()) { + RECT original_dirty_region = GetScheduledPaintRectConstrainedToSize(); + if (!IsRectEmpty(&original_dirty_region)) { // Invoke InvalidateRect so that the dirty region of the window includes the // region we need to paint. If we didn't do this and the region didn't // include the dirty region, ProcessPaint would incorrectly mark everything // as clean. This can happen if a WM_PAINT is generated by the system before // the InvokeLater schedule by RootView is processed. - RECT win_version = original_dirty_region.ToRECT(); - InvalidateRect(hwnd, &win_version, FALSE); + InvalidateRect(hwnd, &original_dirty_region, FALSE); } ChromeCanvasPaint canvas(hwnd); if (!canvas.isEmpty()) { |