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

Unified Diff: cc/picture_layer_impl.cc

Issue 11467020: cc: Only create tilings for layers that draws content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't create tilings unless drawsContent() is true Created 8 years 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/picture_layer_tiling_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture_layer_impl.cc
diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc
index 4959d4213ea0bedc1b38759125bc2ee69f428bad..4b7733799ed5239e3337d9c70a78a3ab5fbf7be0 100644
--- a/cc/picture_layer_impl.cc
+++ b/cc/picture_layer_impl.cc
@@ -128,12 +128,16 @@ void PictureLayerImpl::dumpLayerProperties(std::string*, int indent) const {
}
void PictureLayerImpl::didUpdateTransforms() {
- tilings_.SetLayerBounds(bounds());
- // TODO(enne): Add more tilings during pinch zoom.
- if (!tilings_.num_tilings()) {
- gfx::Size tile_size = layerTreeHostImpl()->settings().defaultTileSize;
- tilings_.AddTiling(contentsScaleX(), tile_size);
- // TODO(enne): handle invalidations, create new tiles
+ if (drawsContent()) {
+ tilings_.SetLayerBounds(bounds());
+ // TODO(enne): Add more tilings during pinch zoom.
+ if (!tilings_.num_tilings()) {
+ gfx::Size tile_size = layerTreeHostImpl()->settings().defaultTileSize;
+ tilings_.AddTiling(contentsScaleX(), tile_size);
+ // TODO(enne): handle invalidations, create new tiles
+ }
+ } else {
+ tilings_.Reset();
}
gfx::Transform current_screen_space_transform = screenSpaceTransform();
« no previous file with comments | « no previous file | cc/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698