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

Unified Diff: ui/views/view.cc

Issue 1064133003: ui: Use a PaintRecorder to access the Canvas for painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ui-recorder: . Created 5 years, 8 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 | « ui/views/bubble/tray_bubble_view.cc ('k') | ui/wm/core/image_grid.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 7a0fcb3fb2068d4c9c18f1c27ed8fdb07df6e0a1..78659caf418cd1b5ee47d40b98e1841a3e4f659b 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -1459,8 +1459,10 @@ void View::UpdateChildLayerBounds(const gfx::Vector2d& offset) {
}
void View::OnPaintLayer(const ui::PaintContext& context) {
- if (!layer()->fills_bounds_opaquely())
- context.canvas()->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
+ if (!layer()->fills_bounds_opaquely()) {
+ ui::PaintRecorder recorder(context);
+ recorder.canvas()->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
+ }
if (!visible_)
return;
Paint(context);
« no previous file with comments | « ui/views/bubble/tray_bubble_view.cc ('k') | ui/wm/core/image_grid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698