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

Side by Side Diff: cc/layers/tiled_layer.cc

Issue 23530003: cc: Block commit on activate by setting a flag on LayerTreeHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blockcommit: move bool to proxy Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layers/tiled_layer.h ('k') | cc/test/fake_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layers/tiled_layer.h" 5 #include "cc/layers/tiled_layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 iter != invalid_tiles.end(); 228 iter != invalid_tiles.end();
229 ++iter) 229 ++iter)
230 tiler_->TakeTile((*iter)->i(), (*iter)->j()); 230 tiler_->TakeTile((*iter)->i(), (*iter)->j());
231 231
232 // TiledLayer must push properties every frame, since viewport state and 232 // TiledLayer must push properties every frame, since viewport state and
233 // occlusion from anywhere in the tree can change what the layer decides to 233 // occlusion from anywhere in the tree can change what the layer decides to
234 // push to the impl tree. 234 // push to the impl tree.
235 needs_push_properties_ = true; 235 needs_push_properties_ = true;
236 } 236 }
237 237
238 bool TiledLayer::BlocksPendingCommit() const { return true; }
enne (OOO) 2013/08/29 20:01:33 I don't think this is safe to just remove.
enne (OOO) 2013/08/29 20:03:22 Or, it seems unlikely that anybody would stick a T
danakj 2013/08/29 20:13:52 Unit tests do it, but they all pass. So I was like
enne (OOO) 2013/08/29 20:19:10 ... I think partial updates would be very wrong w
239
240 PrioritizedResourceManager* TiledLayer::ResourceManager() { 238 PrioritizedResourceManager* TiledLayer::ResourceManager() {
241 if (!layer_tree_host()) 239 if (!layer_tree_host())
242 return NULL; 240 return NULL;
243 return layer_tree_host()->contents_texture_manager(); 241 return layer_tree_host()->contents_texture_manager();
244 } 242 }
245 243
246 const PrioritizedResource* TiledLayer::ResourceAtForTesting(int i, 244 const PrioritizedResource* TiledLayer::ResourceAtForTesting(int i,
247 int j) const { 245 int j) const {
248 UpdatableTile* tile = TileAt(i, j); 246 UpdatableTile* tile = TileAt(i, j);
249 if (!tile) 247 if (!tile)
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 gfx::Rect prepaint_rect = visible_content_rect(); 890 gfx::Rect prepaint_rect = visible_content_rect();
893 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, 891 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns,
894 -tiler_->tile_size().height() * kPrepaintRows); 892 -tiler_->tile_size().height() * kPrepaintRows);
895 gfx::Rect content_rect(content_bounds()); 893 gfx::Rect content_rect(content_bounds());
896 prepaint_rect.Intersect(content_rect); 894 prepaint_rect.Intersect(content_rect);
897 895
898 return prepaint_rect; 896 return prepaint_rect;
899 } 897 }
900 898
901 } // namespace cc 899 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer.h ('k') | cc/test/fake_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698