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

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

Issue 2866733002: Remove owning_id from EffectNode and replace it by an opaque stable_id (Closed)
Patch Set: none Created 3 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
« no previous file with comments | « cc/layers/effect_tree_layer_list_iterator_unittest.cc ('k') | cc/layers/layer_impl.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 if (inputs_.opacity == opacity) 486 if (inputs_.opacity == opacity)
487 return; 487 return;
488 // We need to force a property tree rebuild when opacity changes from 1 to a 488 // We need to force a property tree rebuild when opacity changes from 1 to a
489 // non-1 value or vice-versa as render surfaces can change. 489 // non-1 value or vice-versa as render surfaces can change.
490 bool force_rebuild = opacity == 1.f || inputs_.opacity == 1.f; 490 bool force_rebuild = opacity == 1.f || inputs_.opacity == 1.f;
491 inputs_.opacity = opacity; 491 inputs_.opacity = opacity;
492 SetSubtreePropertyChanged(); 492 SetSubtreePropertyChanged();
493 if (layer_tree_host_ && !force_rebuild) { 493 if (layer_tree_host_ && !force_rebuild) {
494 PropertyTrees* property_trees = layer_tree_host_->property_trees(); 494 PropertyTrees* property_trees = layer_tree_host_->property_trees();
495 if (EffectNode* node = 495 if (EffectNode* node =
496 property_trees->effect_tree.UpdateNodeFromOwningLayerId(id())) { 496 property_trees->effect_tree.Node(effect_tree_index_)) {
497 node->opacity = opacity; 497 node->opacity = opacity;
498 node->effect_changed = true; 498 node->effect_changed = true;
499 property_trees->effect_tree.set_needs_update(true); 499 property_trees->effect_tree.set_needs_update(true);
500 } 500 }
501 } 501 }
502 if (force_rebuild) 502 if (force_rebuild)
503 SetPropertyTreesNeedRebuild(); 503 SetPropertyTreesNeedRebuild();
504 SetNeedsCommit(); 504 SetNeedsCommit();
505 } 505 }
506 506
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 ->subtree_has_copy_request; 1441 ->subtree_has_copy_request;
1442 } 1442 }
1443 1443
1444 gfx::Transform Layer::ScreenSpaceTransform() const { 1444 gfx::Transform Layer::ScreenSpaceTransform() const {
1445 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); 1445 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId);
1446 return draw_property_utils::ScreenSpaceTransform( 1446 return draw_property_utils::ScreenSpaceTransform(
1447 this, layer_tree_host_->property_trees()->transform_tree); 1447 this, layer_tree_host_->property_trees()->transform_tree);
1448 } 1448 }
1449 1449
1450 } // namespace cc 1450 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/effect_tree_layer_list_iterator_unittest.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698