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

Unified Diff: ui/wm/core/image_grid.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/view.cc ('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 f45e8b30f8b128b857b8b4f7090bfc21f5fb1c91..c849454412a224457be1f0c58a8b254fafb3313a 100644
--- a/ui/wm/core/image_grid.cc
+++ b/ui/wm/core/image_grid.cc
@@ -9,7 +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/compositor/paint_recorder.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_conversions.h"
@@ -268,9 +268,10 @@ void ImageGrid::ImagePainter::SetClipRect(const gfx::Rect& clip_rect,
}
void ImageGrid::ImagePainter::OnPaintLayer(const ui::PaintContext& context) {
+ ui::PaintRecorder recorder(context);
if (!clip_rect_.IsEmpty())
- context.canvas()->ClipRect(clip_rect_);
- context.canvas()->DrawImageInt(image_, 0, 0);
+ recorder.canvas()->ClipRect(clip_rect_);
+ recorder.canvas()->DrawImageInt(image_, 0, 0);
}
void ImageGrid::ImagePainter::OnDelegatedFrameDamage(
« no previous file with comments | « ui/views/view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698