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

Unified Diff: ui/compositor/paint_context.h

Issue 1053143002: Make View::Paint use ui::PaintRecorder to access PaintContext's canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: paintrecorder: rebase 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/compositor/compositor.gyp ('k') | ui/compositor/paint_recorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/paint_context.h
diff --git a/ui/compositor/paint_context.h b/ui/compositor/paint_context.h
index ceb5d258e4f212e4a0169ab26348efbb39b59116..0960ab5478f6336e32925cf1659f396c9e007de9 100644
--- a/ui/compositor/paint_context.h
+++ b/ui/compositor/paint_context.h
@@ -13,6 +13,7 @@ class Canvas;
}
namespace ui {
+class PaintRecorder;
class PaintContext {
public:
@@ -67,6 +68,11 @@ class PaintContext {
#endif
private:
+ // The PaintRecorder needs access to the internal canvas and friends, but we
+ // don't want to expose them on this class so that people must go through the
+ // recorder to access them.
+ friend class PaintRecorder;
+
// Clone a PaintContext with an additional |offset|.
PaintContext(const PaintContext& other, const gfx::Vector2d& offset)
: canvas_(other.canvas_),
« no previous file with comments | « ui/compositor/compositor.gyp ('k') | ui/compositor/paint_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698