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

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

Issue 286873002: Revert "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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 352 }
353 353
354 // Aggressively remove any tilings that are not seen to save memory. Note 354 // Aggressively remove any tilings that are not seen to save memory. Note
355 // that this is at the expense of doing cause more frequent re-painting. A 355 // that this is at the expense of doing cause more frequent re-painting. A
356 // better scheme would be to maintain a tighter visible_content_rect for the 356 // better scheme would be to maintain a tighter visible_content_rect for the
357 // finer tilings. 357 // finer tilings.
358 CleanUpTilingsOnActiveLayer(seen_tilings); 358 CleanUpTilingsOnActiveLayer(seen_tilings);
359 } 359 }
360 360
361 void PictureLayerImpl::DidUnregisterLayer() { 361 void PictureLayerImpl::DidUnregisterLayer() {
362 TRACE_EVENT0("cc", "PictureLayerImpl::DidUnregisterLayer");
363
364 layer_needs_to_register_itself_ = true; 362 layer_needs_to_register_itself_ = true;
365 RemoveAllTilings();
366 } 363 }
367 364
368 void PictureLayerImpl::UpdateTilePriorities() { 365 void PictureLayerImpl::UpdateTilePriorities() {
369 TRACE_EVENT0("cc", "PictureLayerImpl::UpdateTilePriorities");
370
371 DCHECK(IsDrawnRenderSurfaceLayerListMember());
372 DCHECK(!needs_post_commit_initialization_); 366 DCHECK(!needs_post_commit_initialization_);
373 CHECK(should_update_tile_priorities_); 367 CHECK(should_update_tile_priorities_);
374 368
375 if (layer_needs_to_register_itself_) { 369 if (layer_needs_to_register_itself_) {
376 layer_tree_impl()->tile_manager()->RegisterPictureLayerImpl(this); 370 layer_tree_impl()->tile_manager()->RegisterPictureLayerImpl(this);
377 layer_needs_to_register_itself_ = false; 371 layer_needs_to_register_itself_ = false;
378 } 372 }
379 373
380 if (layer_tree_impl()->device_viewport_valid_for_tile_management()) { 374 if (layer_tree_impl()->device_viewport_valid_for_tile_management()) {
381 visible_rect_for_tile_priority_ = visible_content_rect(); 375 visible_rect_for_tile_priority_ = visible_content_rect();
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 return iterator_index_ < iterators_.size(); 1557 return iterator_index_ < iterators_.size();
1564 } 1558 }
1565 1559
1566 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( 1560 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType(
1567 PictureLayerTiling::TilingEvictionTileIterator* it) const { 1561 PictureLayerTiling::TilingEvictionTileIterator* it) const {
1568 return it->get_type() == iteration_stage_ && 1562 return it->get_type() == iteration_stage_ &&
1569 (**it)->required_for_activation() == required_for_activation_; 1563 (**it)->required_for_activation() == required_for_activation_;
1570 } 1564 }
1571 1565
1572 } // namespace cc 1566 } // 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