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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 271533011: cc: Move tiling management out of draw properties calculation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/scrollbar_animation_controller.h" 9 #include "cc/animation/scrollbar_animation_controller.h"
10 #include "cc/animation/scrollbar_animation_controller_linear_fade.h" 10 #include "cc/animation/scrollbar_animation_controller_linear_fade.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 // LayerIterator is used here instead of CallFunctionForSubtree to only 503 // LayerIterator is used here instead of CallFunctionForSubtree to only
504 // UpdateTilePriorities on layers that will be visible (and thus have valid 504 // UpdateTilePriorities on layers that will be visible (and thus have valid
505 // draw properties) and not because any ordering is required. 505 // draw properties) and not because any ordering is required.
506 typedef LayerIterator<LayerImpl> LayerIteratorType; 506 typedef LayerIterator<LayerImpl> LayerIteratorType;
507 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_); 507 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_);
508 for (LayerIteratorType it = 508 for (LayerIteratorType it =
509 LayerIteratorType::Begin(&render_surface_layer_list_); 509 LayerIteratorType::Begin(&render_surface_layer_list_);
510 it != end; 510 it != end;
511 ++it) { 511 ++it) {
512 LayerImpl* layer = *it; 512 LayerImpl* layer = *it;
513
sohanjg 2014/05/13 15:56:59 will this be the best place to managetiling ?
enne (OOO) 2014/05/13 18:04:09 No. I think UpdateTilePriorities should call Mana
514 // Untie ManageTilings from CalculateDrawProperties
515 layer->ManageTilings(layer->TransformIsAnimating(), 1.f);
516
513 if (it.represents_itself()) 517 if (it.represents_itself())
514 layer->UpdateTilePriorities(); 518 layer->UpdateTilePriorities();
515 519
516 if (!it.represents_contributing_render_surface()) 520 if (!it.represents_contributing_render_surface())
517 continue; 521 continue;
518 522
519 if (layer->mask_layer()) 523 if (layer->mask_layer())
520 layer->mask_layer()->UpdateTilePriorities(); 524 layer->mask_layer()->UpdateTilePriorities();
521 if (layer->replica_layer() && layer->replica_layer()->mask_layer()) 525 if (layer->replica_layer() && layer->replica_layer()->mask_layer())
522 layer->replica_layer()->mask_layer()->UpdateTilePriorities(); 526 layer->replica_layer()->mask_layer()->UpdateTilePriorities();
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 current->ReleaseResources(); 1020 current->ReleaseResources();
1017 if (current->mask_layer()) 1021 if (current->mask_layer())
1018 ReleaseResourcesRecursive(current->mask_layer()); 1022 ReleaseResourcesRecursive(current->mask_layer());
1019 if (current->replica_layer()) 1023 if (current->replica_layer())
1020 ReleaseResourcesRecursive(current->replica_layer()); 1024 ReleaseResourcesRecursive(current->replica_layer());
1021 for (size_t i = 0; i < current->children().size(); ++i) 1025 for (size_t i = 0; i < current->children().size(); ++i)
1022 ReleaseResourcesRecursive(current->children()[i]); 1026 ReleaseResourcesRecursive(current->children()[i]);
1023 } 1027 }
1024 1028
1025 } // namespace cc 1029 } // namespace cc
OLDNEW
« cc/layers/picture_layer_impl.cc ('K') | « cc/layers/picture_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698