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

Side by Side Diff: cc/trees/property_tree.h

Issue 1060413002: cc: Re-use transforms from transform nodes when computing visible rects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CC_TREES_PROPERTY_TREE_H_ 5 #ifndef CC_TREES_PROPERTY_TREE_H_
6 #define CC_TREES_PROPERTY_TREE_H_ 6 #define CC_TREES_PROPERTY_TREE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> { 147 class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> {
148 public: 148 public:
149 // Computes the change of basis transform from node |source_id| to |dest_id|. 149 // Computes the change of basis transform from node |source_id| to |dest_id|.
150 // The function returns false iff the inverse of a singular transform was 150 // The function returns false iff the inverse of a singular transform was
151 // used (and the result should, therefore, not be trusted). 151 // used (and the result should, therefore, not be trusted).
152 bool ComputeTransform(int source_id, 152 bool ComputeTransform(int source_id,
153 int dest_id, 153 int dest_id,
154 gfx::Transform* transform) const; 154 gfx::Transform* transform) const;
155 155
156 // Computes the change of basis transform from node |source_id| to |dest_id|,
157 // including any sublayer scale at |dest_id|. The function returns false iff
158 // the inverse of a singular transform was used (and the result should,
159 // therefore, not be trusted).
160 bool ComputeTransformWithDestinationSublayerScale(
161 int source_id,
162 int dest_id,
163 gfx::Transform* transform) const;
164
165 // Computes the change of basis transform from node |source_id| to |dest_id|,
166 // including any sublayer scale at |source_id|. The function returns false
167 // iff the inverse of a singular transform was used (and the result should,
168 // therefore, not be trusted).
169 bool ComputeTransformWithSourceSublayerScale(int source_id,
170 int dest_id,
171 gfx::Transform* transform) const;
172
156 // Returns true iff the nodes indexed by |source_id| and |dest_id| are 2D axis 173 // Returns true iff the nodes indexed by |source_id| and |dest_id| are 2D axis
157 // aligned with respect to one another. 174 // aligned with respect to one another.
158 bool Are2DAxisAligned(int source_id, int dest_id) const; 175 bool Are2DAxisAligned(int source_id, int dest_id) const;
159 176
160 // Updates the parent, target, and screen space transforms and snapping. 177 // Updates the parent, target, and screen space transforms and snapping.
161 void UpdateTransforms(int id); 178 void UpdateTransforms(int id);
162 179
163 private: 180 private:
164 // Returns true iff the node at |desc_id| is a descendant of the node at 181 // Returns true iff the node at |desc_id| is a descendant of the node at
165 // |anc_id|. 182 // |anc_id|.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 class CC_EXPORT PropertyTrees final { 214 class CC_EXPORT PropertyTrees final {
198 public: 215 public:
199 TransformTree transform_tree; 216 TransformTree transform_tree;
200 OpacityTree opacity_tree; 217 OpacityTree opacity_tree;
201 ClipTree clip_tree; 218 ClipTree clip_tree;
202 }; 219 };
203 220
204 } // namespace cc 221 } // namespace cc
205 222
206 #endif // CC_TREES_PROPERTY_TREE_H_ 223 #endif // CC_TREES_PROPERTY_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698