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

Unified Diff: ui/compositor/paint_recorder.h

Issue 1124223010: ui: Eliminate allocating gfx::Canvas on the heap for every view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: canvasstack: fixcompile Created 5 years, 7 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
Index: ui/compositor/paint_recorder.h
diff --git a/ui/compositor/paint_recorder.h b/ui/compositor/paint_recorder.h
index 9cac7a86f443b6f4213ea8e0176f9ed95e2eb13f..bf62b44ed6d374234e5e23e9a515d1938102d2f7 100644
--- a/ui/compositor/paint_recorder.h
+++ b/ui/compositor/paint_recorder.h
@@ -9,6 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "skia/ext/refptr.h"
#include "ui/compositor/compositor_export.h"
+#include "ui/gfx/canvas.h"
namespace cc {
class DisplayItemList;
@@ -42,8 +43,8 @@ class COMPOSITOR_EXPORT PaintRecorder {
private:
const PaintContext& context_;
+ gfx::Canvas owned_canvas_;
gfx::Canvas* canvas_;
- scoped_ptr<gfx::Canvas> owned_canvas_;
PaintCache* cache_;
DISALLOW_COPY_AND_ASSIGN(PaintRecorder);

Powered by Google App Engine
This is Rietveld 408576698