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

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

Issue 1922393002: CC Animation: Unify ElementId in Blink Compositor Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@player
Patch Set: Remove NextElementId. Created 4 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/layer.h ('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 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 num_descendants_that_draw_content_ += num; 1710 num_descendants_that_draw_content_ += num;
1711 SetNeedsCommit(); 1711 SetNeedsCommit();
1712 if (parent()) 1712 if (parent())
1713 parent()->AddDrawableDescendants(num); 1713 parent()->AddDrawableDescendants(num);
1714 } 1714 }
1715 1715
1716 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { 1716 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) {
1717 benchmark->RunOnLayer(this); 1717 benchmark->RunOnLayer(this);
1718 } 1718 }
1719 1719
1720 void Layer::SetElementId(uint64_t id) { 1720 void Layer::SetElementId(ElementId id) {
1721 DCHECK(IsPropertyChangeAllowed()); 1721 DCHECK(IsPropertyChangeAllowed());
1722 if (element_id_ == id) 1722 if (element_id_ == id)
1723 return; 1723 return;
1724 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), 1724 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("compositor-worker"),
1725 "Layer::SetElementId", "id", id); 1725 "Layer::SetElementId", "id", id);
1726 element_id_ = id; 1726 element_id_ = id;
1727 SetNeedsCommit(); 1727 SetNeedsCommit();
1728 } 1728 }
1729 1729
1730 void Layer::SetMutableProperties(uint32_t properties) { 1730 void Layer::SetMutableProperties(uint32_t properties) {
(...skipping 21 matching lines...) Expand all
1752 ->data.num_copy_requests_in_subtree; 1752 ->data.num_copy_requests_in_subtree;
1753 } 1753 }
1754 1754
1755 gfx::Transform Layer::screen_space_transform() const { 1755 gfx::Transform Layer::screen_space_transform() const {
1756 DCHECK_NE(transform_tree_index_, -1); 1756 DCHECK_NE(transform_tree_index_, -1);
1757 return draw_property_utils::ScreenSpaceTransform( 1757 return draw_property_utils::ScreenSpaceTransform(
1758 this, layer_tree_host_->property_trees()->transform_tree); 1758 this, layer_tree_host_->property_trees()->transform_tree);
1759 } 1759 }
1760 1760
1761 } // namespace cc 1761 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698