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

Unified Diff: cc/layers/layer.cc

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Fix for comments in patch 4. 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/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 0b3436aee1972fa58b3d88c675f183e4da17461d..679a17d8243659bf5ca075adcd89c63897ef8fdb 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -89,6 +89,7 @@ Layer::Layer()
draws_content_(false),
use_local_transform_for_backface_visibility_(false),
should_check_backface_visibility_(false),
+ cache_render_surface_(false),
force_render_surface_for_testing_(false),
subtree_property_changed_(false),
may_contain_video_(false),
@@ -894,6 +895,15 @@ void Layer::SetTouchEventHandlerRegion(const Region& 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)

Powered by Google App Engine
This is Rietveld 408576698