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

Unified Diff: ui/views/view.cc

Issue 1057873004: Pass a ui::PaintContext from ui::Layer to layer delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer-paintcontext: mac Created 5 years, 9 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/view.h ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('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 443b3f4ab288bc709e55529367d42ba620d61145..da1491dd6de2e633432815af2cc363c60c4eadef 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -1447,12 +1447,12 @@ void View::UpdateChildLayerBounds(const gfx::Vector2d& offset) {
}
}
-void View::OnPaintLayer(gfx::Canvas* canvas) {
+void View::OnPaintLayer(const ui::PaintContext& context) {
if (!layer()->fills_bounds_opaquely())
- canvas->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
+ context.canvas()->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
if (!visible_)
return;
- Paint(ui::PaintContext(canvas, layer()->PaintRect()));
+ Paint(context);
}
void View::OnDelegatedFrameDamage(
« no previous file with comments | « ui/views/view.h ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698