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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 1013273003: cc: Force an update on tile size after viewport resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: only call if on pending tree Created 5 years, 9 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/trees/layer_tree_host_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 93d658159516549e0164c2e55790fea982a05370..08e0a6ee870539bb0ed883a6bd33d9998b7f3f27 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -390,6 +390,19 @@ bool PictureLayerImpl::UpdateTiles(bool resourceless_software_draw) {
DCHECK_EQ(1.f, contents_scale_x());
DCHECK_EQ(1.f, contents_scale_y());
+ // GPU rasterization can cause a tile size change when the viewport changes.
+ // Ensure that the tiling's texture sizes are correct after a viewport resize
+ // by tracking the last viewport rect and updating the current raster source,
+ // which will in turn update the tiling's texture size.
+ if (!last_viewport_size_.IsEmpty() &&
danakj 2015/03/18 21:46:14 This looks like it should be below the !CanHaveTil
hendrikw 2015/03/18 22:06:31 Yeah, you're right.
+ last_viewport_size_ != layer_tree_impl()->device_viewport_size() &&
+ layer_tree_impl()->IsPendingTree()) {
+ tilings_->UpdateTilingsToCurrentRasterSource(
vmpstr 2015/03/18 21:36:39 In "typical" situations where the device viewport
danakj 2015/03/18 21:46:14 What if there's no pending tree (commit to active,
hendrikw 2015/03/18 22:06:31 Yeah, my first change (https://codereview.chromium
+ raster_source_, nullptr, invalidation_, MinimumContentsScale(),
+ MaximumContentsScale());
+ }
+ last_viewport_size_ = layer_tree_impl()->device_viewport_size();
+
if (!resourceless_software_draw) {
visible_rect_for_tile_priority_ = visible_content_rect();
}
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698