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

Unified Diff: cc/layers/layer.cc

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Improve with comment in patch 18. 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: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index aa72c5de6806a19f3afb6e546f6de6470a84e0eb..0fbb885fc9d2ecaf7aef487351f833f68df1d751 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -90,6 +90,7 @@ Layer::Layer()
should_flatten_transform_from_property_tree_(false),
draws_content_(false),
should_check_backface_visibility_(false),
+ cache_render_surface_(false),
force_render_surface_for_testing_(false),
subtree_property_changed_(false),
may_contain_video_(false),
@@ -925,6 +926,15 @@ void Layer::SetTouchActionRegion(TouchActionRegion touch_action_region) {
SetNeedsCommit();
}
+void Layer::SetCacheRenderSurface(bool cache) {
+ DCHECK(IsPropertyChangeAllowed());
+ if (cache_render_surface_ == cache)
+ return;
+ cache_render_surface_ = cache;
+ SetPropertyTreesNeedRebuild();
+ SetNeedsCommit();
+}
+
void Layer::SetForceRenderSurfaceForTesting(bool force) {
DCHECK(IsPropertyChangeAllowed());
if (force_render_surface_for_testing_ == force)
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | cc/trees/damage_tracker_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698