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

Unified Diff: ui/compositor/paint_recorder.h

Issue 1101783002: ui: Cache the output of View::OnPaint when the View isn't invalid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cache: . 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/paint_context.h ('k') | ui/compositor/paint_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/paint_recorder.h
diff --git a/ui/compositor/paint_recorder.h b/ui/compositor/paint_recorder.h
index 7c3df82b9056b71191e1c666e1db89da2a81cc0a..9cac7a86f443b6f4213ea8e0176f9ed95e2eb13f 100644
--- a/ui/compositor/paint_recorder.h
+++ b/ui/compositor/paint_recorder.h
@@ -22,6 +22,7 @@ class SkCanvas;
class SkPictureRecorder;
namespace ui {
+class PaintCache;
class PaintContext;
// A class to hide the complexity behind setting up a recording into a
@@ -30,6 +31,9 @@ class PaintContext;
// recording is complete and can be cached.
class COMPOSITOR_EXPORT PaintRecorder {
public:
+ // The |cache| is owned by the caller and must be kept alive while
+ // PaintRecorder is in use.
+ PaintRecorder(const PaintContext& context, PaintCache* cache);
explicit PaintRecorder(const PaintContext& context);
~PaintRecorder();
@@ -40,6 +44,7 @@ class COMPOSITOR_EXPORT PaintRecorder {
const PaintContext& context_;
gfx::Canvas* canvas_;
scoped_ptr<gfx::Canvas> owned_canvas_;
+ PaintCache* cache_;
DISALLOW_COPY_AND_ASSIGN(PaintRecorder);
};
« no previous file with comments | « ui/compositor/paint_context.h ('k') | ui/compositor/paint_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698