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

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

Issue 285373003: Reland "cc: Remove layers that are not drawn from tile manager." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | cc/resources/tile_manager.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 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 } 351 }
352 352
353 // Aggressively remove any tilings that are not seen to save memory. Note 353 // Aggressively remove any tilings that are not seen to save memory. Note
354 // that this is at the expense of doing cause more frequent re-painting. A 354 // that this is at the expense of doing cause more frequent re-painting. A
355 // better scheme would be to maintain a tighter visible_content_rect for the 355 // better scheme would be to maintain a tighter visible_content_rect for the
356 // finer tilings. 356 // finer tilings.
357 CleanUpTilingsOnActiveLayer(seen_tilings); 357 CleanUpTilingsOnActiveLayer(seen_tilings);
358 } 358 }
359 359
360 void PictureLayerImpl::DidUnregisterLayer() { 360 void PictureLayerImpl::DidUnregisterLayer() {
361 TRACE_EVENT0("cc", "PictureLayerImpl::DidUnregisterLayer");
362
361 layer_needs_to_register_itself_ = true; 363 layer_needs_to_register_itself_ = true;
362 } 364 }
363 365
364 void PictureLayerImpl::UpdateTilePriorities() { 366 void PictureLayerImpl::UpdateTilePriorities() {
367 TRACE_EVENT0("cc", "PictureLayerImpl::UpdateTilePriorities");
368
365 DCHECK(!needs_post_commit_initialization_); 369 DCHECK(!needs_post_commit_initialization_);
366 CHECK(should_update_tile_priorities_); 370 CHECK(should_update_tile_priorities_);
367 371
368 if (layer_needs_to_register_itself_) { 372 if (layer_needs_to_register_itself_) {
369 layer_tree_impl()->tile_manager()->RegisterPictureLayerImpl(this); 373 layer_tree_impl()->tile_manager()->RegisterPictureLayerImpl(this);
370 layer_needs_to_register_itself_ = false; 374 layer_needs_to_register_itself_ = false;
371 } 375 }
372 376
373 if (layer_tree_impl()->device_viewport_valid_for_tile_management()) { 377 if (layer_tree_impl()->device_viewport_valid_for_tile_management()) {
374 visible_rect_for_tile_priority_ = visible_content_rect(); 378 visible_rect_for_tile_priority_ = visible_content_rect();
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 return iterator_index_ < iterators_.size(); 1561 return iterator_index_ < iterators_.size();
1558 } 1562 }
1559 1563
1560 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( 1564 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType(
1561 PictureLayerTiling::TilingEvictionTileIterator* it) const { 1565 PictureLayerTiling::TilingEvictionTileIterator* it) const {
1562 return it->get_type() == iteration_stage_ && 1566 return it->get_type() == iteration_stage_ &&
1563 (**it)->required_for_activation() == required_for_activation_; 1567 (**it)->required_for_activation() == required_for_activation_;
1564 } 1568 }
1565 1569
1566 } // namespace cc 1570 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698