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

Unified Diff: cc/layers/picture_layer.cc

Issue 21839004: cc: Push valid property values when CalcDrawProps skips layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pushpaintprops: Simpler to dcheck in TiledLayer Created 7 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/picture_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 2e7a90b9fca61f5c571e37385bb31fb2d07e47c1..ab6739a35d7aeb73fd18ca14849d30d0c9d164e2 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -69,8 +69,8 @@ void PictureLayer::SetNeedsDisplayRect(const gfx::RectF& layer_rect) {
Layer::SetNeedsDisplayRect(layer_rect);
}
-bool PictureLayer::Update(ResourceUpdateQueue*,
- const OcclusionTracker*) {
+bool PictureLayer::Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker* occlusion) {
// Do not early-out of this function so that PicturePile::Update has a chance
// to record pictures due to changing visibility of this layer.
@@ -79,6 +79,10 @@ bool PictureLayer::Update(ResourceUpdateQueue*,
benchmark_instrumentation::kSourceFrameNumber,
layer_tree_host()->source_frame_number());
+ // Note: This layer does not use ContentsScalingLayer::Update().
+ // TODO(danakj): Maybe this should not inherit from ContentsScalingLayer then.
enne (OOO) 2013/08/02 17:00:48 Agreed.
+ bool updated = Layer::Update(queue, occlusion);
+
pile_->Resize(paint_properties().bounds);
// Calling paint in WebKit can sometimes cause invalidations, so save
@@ -95,12 +99,12 @@ bool PictureLayer::Update(ResourceUpdateQueue*,
}
devtools_instrumentation::ScopedLayerTask paint_layer(
devtools_instrumentation::kPaintLayer, id());
- bool updated = pile_->Update(client_,
- SafeOpaqueBackgroundColor(),
- contents_opaque(),
- pile_invalidation_,
- visible_layer_rect,
- rendering_stats_instrumentation());
+ updated |= pile_->Update(client_,
+ SafeOpaqueBackgroundColor(),
+ contents_opaque(),
+ pile_invalidation_,
+ visible_layer_rect,
+ rendering_stats_instrumentation());
if (updated) {
SetNeedsPushProperties();
} else {

Powered by Google App Engine
This is Rietveld 408576698