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

Unified Diff: cc/layers/picture_layer.cc

Issue 389973004: cc: Give TilingData back a Size instead of a Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tilingsize: perfests Created 6 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 271f7226fceba2fee472b66dd852927165abec81..b9f265a02a4b15d29cb7ba7f85e18e56f0454b31 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -50,8 +50,7 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
// TODO(ernstm): This DCHECK is only valid as long as the pile's tiling_rect
// is identical to the layer_rect.
// If update called, then pile size must match bounds pushed to impl layer.
- DCHECK_EQ(layer_impl->bounds().ToString(),
- pile_->tiling_rect().size().ToString());
+ DCHECK_EQ(layer_impl->bounds().ToString(), pile_->tiling_size().ToString());
}
layer_impl->SetIsMask(is_mask_);
@@ -94,11 +93,10 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue,
gfx::Rect visible_layer_rect = gfx::ScaleToEnclosingRect(
visible_content_rect(), 1.f / contents_scale_x());
-
- gfx::Rect layer_rect = gfx::Rect(paint_properties().bounds);
+ gfx::Size layer_size = paint_properties().bounds;
if (last_updated_visible_content_rect_ == visible_content_rect() &&
- pile_->tiling_rect() == layer_rect && pending_invalidation_.IsEmpty()) {
+ pile_->tiling_size() == layer_size && pending_invalidation_.IsEmpty()) {
// Only early out if the visible content rect of this layer hasn't changed.
return updated;
}
@@ -117,7 +115,7 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue,
if (layer_tree_host()->settings().record_full_layer) {
// Workaround for http://crbug.com/235910 - to retain backwards compat
// the full page content must always be provided in the picture layer.
- visible_layer_rect = gfx::Rect(bounds());
+ visible_layer_rect = gfx::Rect(layer_size);
}
// UpdateAndExpandInvalidation will give us an invalidation that covers
@@ -131,7 +129,7 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue,
SafeOpaqueBackgroundColor(),
contents_opaque(),
client_->FillsBoundsCompletely(),
- layer_rect,
+ layer_size,
visible_layer_rect,
update_source_frame_number_,
RecordingMode(),

Powered by Google App Engine
This is Rietveld 408576698