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

Unified Diff: ui/wm/core/image_grid.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/wm/core/image_grid.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/image_grid.cc
diff --git a/ui/wm/core/image_grid.cc b/ui/wm/core/image_grid.cc
index 3f90efed7f89830ee7f07c95d7eab6f535016e74..f45e8b30f8b128b857b8b4f7090bfc21f5fb1c91 100644
--- a/ui/wm/core/image_grid.cc
+++ b/ui/wm/core/image_grid.cc
@@ -9,6 +9,7 @@
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkXfermode.h"
#include "ui/compositor/dip_util.h"
+#include "ui/compositor/paint_context.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
@@ -266,10 +267,10 @@ void ImageGrid::ImagePainter::SetClipRect(const gfx::Rect& clip_rect,
}
}
-void ImageGrid::ImagePainter::OnPaintLayer(gfx::Canvas* canvas) {
+void ImageGrid::ImagePainter::OnPaintLayer(const ui::PaintContext& context) {
if (!clip_rect_.IsEmpty())
- canvas->ClipRect(clip_rect_);
- canvas->DrawImageInt(image_, 0, 0);
+ context.canvas()->ClipRect(clip_rect_);
+ context.canvas()->DrawImageInt(image_, 0, 0);
}
void ImageGrid::ImagePainter::OnDelegatedFrameDamage(
« no previous file with comments | « ui/wm/core/image_grid.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698