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

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

Issue 252293003: cc: Make LTHI::NotifyTileInitialized more generic. (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 | « cc/layers/picture_layer_impl.h ('k') | cc/trees/layer_tree_host_impl.cc » ('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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 contents_scale_x(), 395 contents_scale_x(),
396 current_frame_time_in_seconds); 396 current_frame_time_in_seconds);
397 397
398 if (layer_tree_impl()->IsPendingTree()) 398 if (layer_tree_impl()->IsPendingTree())
399 MarkVisibleResourcesAsRequired(); 399 MarkVisibleResourcesAsRequired();
400 400
401 // Tile priorities were modified. 401 // Tile priorities were modified.
402 layer_tree_impl()->DidModifyTilePriorities(); 402 layer_tree_impl()->DidModifyTilePriorities();
403 } 403 }
404 404
405 void PictureLayerImpl::NotifyTileInitialized(const Tile* tile) {
406 if (layer_tree_impl()->IsActiveTree()) {
407 gfx::RectF layer_damage_rect =
408 gfx::ScaleRect(tile->content_rect(), 1.f / tile->contents_scale());
409 AddDamageRect(layer_damage_rect);
410 }
411 }
412
405 void PictureLayerImpl::DidBecomeActive() { 413 void PictureLayerImpl::DidBecomeActive() {
406 LayerImpl::DidBecomeActive(); 414 LayerImpl::DidBecomeActive();
407 tilings_->DidBecomeActive(); 415 tilings_->DidBecomeActive();
408 layer_tree_impl()->DidModifyTilePriorities(); 416 layer_tree_impl()->DidModifyTilePriorities();
409 } 417 }
410 418
411 void PictureLayerImpl::DidBeginTracing() { 419 void PictureLayerImpl::DidBeginTracing() {
412 pile_->DidBeginTracing(); 420 pile_->DidBeginTracing();
413 } 421 }
414 422
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 return iterator_index_ < iterators_.size(); 1524 return iterator_index_ < iterators_.size();
1517 } 1525 }
1518 1526
1519 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( 1527 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType(
1520 PictureLayerTiling::TilingEvictionTileIterator* it) const { 1528 PictureLayerTiling::TilingEvictionTileIterator* it) const {
1521 return it->get_type() == iteration_stage_ && 1529 return it->get_type() == iteration_stage_ &&
1522 (**it)->required_for_activation() == required_for_activation_; 1530 (**it)->required_for_activation() == required_for_activation_;
1523 } 1531 }
1524 1532
1525 } // namespace cc 1533 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698