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

Side by Side Diff: views/widget/widget_win.cc

Issue 6529037: Rename ProcessPaint to Paint() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/widget/root_view_win.cc ('k') | views/window/window_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "views/widget/widget_win.h" 5 #include "views/widget/widget_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 376
377 RedrawWindow(hwnd(), &update_rect.ToRECT(), NULL, 377 RedrawWindow(hwnd(), &update_rect.ToRECT(), NULL,
378 RDW_INVALIDATE | RDW_UPDATENOW | RDW_NOCHILDREN); 378 RDW_INVALIDATE | RDW_UPDATENOW | RDW_NOCHILDREN);
379 379
380 LPARAM lparam = reinterpret_cast<LPARAM>(&invalid_screen_rect); 380 LPARAM lparam = reinterpret_cast<LPARAM>(&invalid_screen_rect);
381 EnumChildWindows(hwnd(), EnumChildProcForRedraw, lparam); 381 EnumChildWindows(hwnd(), EnumChildProcForRedraw, lparam);
382 } 382 }
383 // As we were created with a style of WS_CLIPCHILDREN redraw requests may 383 // As we were created with a style of WS_CLIPCHILDREN redraw requests may
384 // result in an empty paint rect in WM_PAINT (this'll happen if a 384 // result in an empty paint rect in WM_PAINT (this'll happen if a
385 // child HWND completely contains the update _rect). In such a scenario 385 // child HWND completely contains the update _rect). In such a scenario
386 // RootView would never get a ProcessPaint and always think it needs to 386 // RootView would never get a Paint() and always think it needs to be
387 // be painted (leading to a steady stream of RedrawWindow requests on every 387 // painted (leading to a steady stream of RedrawWindow requests on every
388 // event). For this reason we tell RootView it doesn't need to paint 388 // event). For this reason we tell RootView it doesn't need to paint
389 // here. 389 // here.
390 root_view_->ClearPaintRect(); 390 root_view_->ClearPaintRect();
391 } 391 }
392 } 392 }
393 393
394 void WidgetWin::SetOpacity(unsigned char opacity) { 394 void WidgetWin::SetOpacity(unsigned char opacity) {
395 layered_alpha_ = static_cast<BYTE>(opacity); 395 layered_alpha_ = static_cast<BYTE>(opacity);
396 } 396 }
397 397
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 } 1151 }
1152 1152
1153 void WidgetWin::PaintLayeredWindow() { 1153 void WidgetWin::PaintLayeredWindow() {
1154 // Painting monkeys with our cliprect, so we need to save it so that the 1154 // Painting monkeys with our cliprect, so we need to save it so that the
1155 // call to UpdateLayeredWindow updates the entire window, not just the 1155 // call to UpdateLayeredWindow updates the entire window, not just the
1156 // cliprect. 1156 // cliprect.
1157 contents_->save(SkCanvas::kClip_SaveFlag); 1157 contents_->save(SkCanvas::kClip_SaveFlag);
1158 gfx::Rect dirty_rect = root_view_->GetScheduledPaintRect(); 1158 gfx::Rect dirty_rect = root_view_->GetScheduledPaintRect();
1159 contents_->ClipRectInt(dirty_rect.x(), dirty_rect.y(), dirty_rect.width(), 1159 contents_->ClipRectInt(dirty_rect.x(), dirty_rect.y(), dirty_rect.width(),
1160 dirty_rect.height()); 1160 dirty_rect.height());
1161 root_view_->ProcessPaint(contents_.get()); 1161 root_view_->Paint(contents_.get());
1162 contents_->restore(); 1162 contents_->restore();
1163 1163
1164 UpdateWindowFromContents(contents_->getTopPlatformDevice().getBitmapDC()); 1164 UpdateWindowFromContents(contents_->getTopPlatformDevice().getBitmapDC());
1165 } 1165 }
1166 1166
1167 void WidgetWin::UpdateWindowFromContents(HDC dib_dc) { 1167 void WidgetWin::UpdateWindowFromContents(HDC dib_dc) {
1168 DCHECK(use_layered_buffer_); 1168 DCHECK(use_layered_buffer_);
1169 if (can_update_layered_window_) { 1169 if (can_update_layered_window_) {
1170 CRect wr; 1170 CRect wr;
1171 GetWindowRect(&wr); 1171 GetWindowRect(&wr);
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) { 1396 Widget* Widget::GetWidgetFromNativeWindow(gfx::NativeWindow native_window) {
1397 return Widget::GetWidgetFromNativeView(native_window); 1397 return Widget::GetWidgetFromNativeView(native_window);
1398 } 1398 }
1399 1399
1400 // static 1400 // static
1401 void Widget::NotifyLocaleChanged() { 1401 void Widget::NotifyLocaleChanged() {
1402 NOTIMPLEMENTED(); 1402 NOTIMPLEMENTED();
1403 } 1403 }
1404 1404
1405 } // namespace views 1405 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/root_view_win.cc ('k') | views/window/window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698