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

Unified Diff: ui/compositor/paint_recorder.h

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Update tests Created 3 years, 5 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 3785c1bbc2359c5bd590609db370a7a426baacfe..8a51b08ee06cb32b0b0f0a0decfe9f51c0cd1299 100644
--- a/ui/compositor/paint_recorder.h
+++ b/ui/compositor/paint_recorder.h
@@ -20,6 +20,7 @@ class Canvas;
namespace ui {
class PaintCache;
class PaintContext;
+class PaintInfo;
// A class to hide the complexity behind setting up a recording into a
// DisplayItem. This is meant to be short-lived within the scope of recording
@@ -29,9 +30,9 @@ class COMPOSITOR_EXPORT PaintRecorder {
public:
// The |cache| is owned by the caller and must be kept alive while
// PaintRecorder is in use. Canvas is bounded by |recording_size|.
- PaintRecorder(const PaintContext& context,
- const gfx::Size& recording_size,
- PaintCache* cache);
+ // TODO(malaykeshav): |recording_size| is now redundant and can be removed
+ // since context already has size information.
+ PaintRecorder(const PaintInfo& info, PaintCache* cache);
PaintRecorder(const PaintContext& context, const gfx::Size& recording_size);
~PaintRecorder();
@@ -44,6 +45,7 @@ class COMPOSITOR_EXPORT PaintRecorder {
gfx::Canvas canvas_;
PaintCache* cache_;
gfx::Size recording_size_;
+ bool is_pixel_canvas_;
DISALLOW_COPY_AND_ASSIGN(PaintRecorder);
};

Powered by Google App Engine
This is Rietveld 408576698