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

Unified Diff: cc/layers/contents_scaling_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: Call SavePaintProps when needed in tests Created 7 years, 4 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 | « no previous file | cc/layers/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/contents_scaling_layer.cc
diff --git a/cc/layers/contents_scaling_layer.cc b/cc/layers/contents_scaling_layer.cc
index 03a790b67dd07fa44c75d2ca3ec0b895ffdcc311..44a3f372c6593ae0f5c70a1e544e1d5c42e5c178 100644
--- a/cc/layers/contents_scaling_layer.cc
+++ b/cc/layers/contents_scaling_layer.cc
@@ -38,15 +38,17 @@ void ContentsScalingLayer::CalculateContentsScale(
bool ContentsScalingLayer::Update(
ResourceUpdateQueue* queue,
const OcclusionTracker* occlusion) {
+ bool updated = Layer::Update(queue, occlusion);
+
if (draw_properties().contents_scale_x == last_update_contents_scale_x_ &&
draw_properties().contents_scale_y == last_update_contents_scale_y_)
- return false;
+ return updated;
last_update_contents_scale_x_ = draw_properties().contents_scale_x;
last_update_contents_scale_y_ = draw_properties().contents_scale_y;
// Invalidate the whole layer if scale changed.
SetNeedsDisplayRect(gfx::Rect(paint_properties().bounds));
- return false;
+ return updated;
}
} // namespace cc
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698