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

Side by Side Diff: cc/picture_layer_tiling_set.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/picture_layer_tiling_set.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/picture_layer_tiling_set.h" 5 #include "cc/picture_layer_tiling_set.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 PictureLayerTilingSet::PictureLayerTilingSet( 9 PictureLayerTilingSet::PictureLayerTilingSet(
10 PictureLayerTilingClient * client) 10 PictureLayerTilingClient * client)
(...skipping 30 matching lines...) Expand all
41 tilings_[i]->Invalidate(invalidation); 41 tilings_[i]->Invalidate(invalidation);
42 } 42 }
43 43
44 void PictureLayerTilingSet::AddTiling(float contents_scale, 44 void PictureLayerTilingSet::AddTiling(float contents_scale,
45 gfx::Size tile_size) { 45 gfx::Size tile_size) {
46 tilings_.append(PictureLayerTiling::Create(contents_scale, tile_size)); 46 tilings_.append(PictureLayerTiling::Create(contents_scale, tile_size));
47 tilings_.last()->SetClient(client_); 47 tilings_.last()->SetClient(client_);
48 tilings_.last()->SetLayerBounds(layer_bounds_); 48 tilings_.last()->SetLayerBounds(layer_bounds_);
49 } 49 }
50 50
51 void PictureLayerTilingSet::Reset() {
52 for (size_t i = 0; i < tilings_.size(); ++i)
53 tilings_[i]->Reset();
54 }
55
51 PictureLayerTilingSet::Iterator::Iterator(PictureLayerTilingSet* set, 56 PictureLayerTilingSet::Iterator::Iterator(PictureLayerTilingSet* set,
52 float contents_scale, 57 float contents_scale,
53 gfx::Rect content_rect) 58 gfx::Rect content_rect)
54 : set_(set), 59 : set_(set),
55 contents_scale_(contents_scale), 60 contents_scale_(contents_scale),
56 current_tiling_(-1) { 61 current_tiling_(-1) {
57 missing_region_.Union(content_rect); 62 missing_region_.Union(content_rect);
58 ++(*this); 63 ++(*this);
59 } 64 }
60 65
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 const gfx::Transform& current_screen_transform, 170 const gfx::Transform& current_screen_transform,
166 double time_delta) { 171 double time_delta) {
167 for (size_t i = 0; i < tilings_.size(); ++i) { 172 for (size_t i = 0; i < tilings_.size(); ++i) {
168 tilings_[i]->UpdateTilePriorities( 173 tilings_[i]->UpdateTilePriorities(
169 device_viewport, layer_content_scale_x, layer_content_scale_y, 174 device_viewport, layer_content_scale_x, layer_content_scale_y,
170 last_screen_transform, current_screen_transform, time_delta); 175 last_screen_transform, current_screen_transform, time_delta);
171 } 176 }
172 } 177 }
173 178
174 } // namespace cc 179 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_layer_tiling_set.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698