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

Unified Diff: cc/paint/display_item_list.h

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Sync with ToT Created 3 years, 6 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: cc/paint/display_item_list.h
diff --git a/cc/paint/display_item_list.h b/cc/paint/display_item_list.h
index f74456e62909461de5aab8bccb6d424113f1f072..0152da578611af7c66d7d2b831882b66c829acde 100644
--- a/cc/paint/display_item_list.h
+++ b/cc/paint/display_item_list.h
@@ -129,6 +129,9 @@ class CC_PAINT_EXPORT DisplayItemList
// an empty state.
sk_sp<PaintRecord> ReleaseAsRecord();
+ bool pixel_canvas_enabled() const { return pixel_canvas_enabled_; }
+ void set_pixel_canvas_enabled(bool value) { pixel_canvas_enabled_ = value; }
+
private:
FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, AsValueWithNoOps);
FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, AsValueWithOps);
@@ -175,6 +178,12 @@ class CC_PAINT_EXPORT DisplayItemList
// Finalize().
bool retain_visual_rects_ = false;
+ // Set true if we are using pixel canvas. This mode allows us to records all
+ // canvas draw commands in pixel aligned measurements and scale elements using
+ // the corner points. Use compositor switch --enable-pixel-canvas-recording to
+ // enable this mode.
+ bool pixel_canvas_enabled_ = false;
+
friend class base::RefCountedThreadSafe<DisplayItemList>;
FRIEND_TEST_ALL_PREFIXES(DisplayItemListTest, BytesUsed);
DISALLOW_COPY_AND_ASSIGN(DisplayItemList);

Powered by Google App Engine
This is Rietveld 408576698