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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 874613003: cc: Stop pushing properties every activation for picture layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pli-pushprops: fixscrolling Created 5 years, 11 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/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 3dbce3cb6dab0bb1327dfb34bb0811fbccc7b8b6..04aee7313d5f84df46b8d8494bb46450550d82e9 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -143,11 +143,6 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
layer_impl->low_res_raster_contents_scale_ = low_res_raster_contents_scale_;
layer_impl->SanityCheckTilingState();
-
- // We always need to push properties.
- // See http://crbug.com/303943
- // TODO(danakj): Stop always pushing properties since we don't swap tilings.
- needs_push_properties_ = true;
}
void PictureLayerImpl::AppendQuads(RenderPass* render_pass,
@@ -562,6 +557,10 @@ void PictureLayerImpl::UpdateRasterSource(
if (could_have_tilings != can_have_tilings)
layer_tree_impl()->set_needs_update_draw_properties();
+ // SetNeedsPushProperties when changing the raster source. This shouldn't
+ // imply damage but need to be synced.
+ SetNeedsPushProperties();
+
if (!can_have_tilings) {
RemoveAllTilings();
return;
@@ -656,6 +655,12 @@ bool PictureLayerImpl::RequiresHighResToDraw() const {
return layer_tree_impl()->RequiresHighResToDraw();
}
+void PictureLayerImpl::TilingLiveRectChanged() {
+ // SetNeedsPushProperties when the live rect changes, as there are new tiles
+ // on the tree. This shouldn't imply damage but need to be synced.
+ SetNeedsPushProperties();
+}
+
gfx::Size PictureLayerImpl::CalculateTileSize(
const gfx::Size& content_bounds) const {
int max_texture_size =
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698