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

Unified Diff: cc/layers/layer.cc

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Rebased to resolve conflict. 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
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 23e9f79817797f7b8093827b065400d374b26ba6..b57d100c40c12e51e406b21d61ab9de7ceaa75d2 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698