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

Unified Diff: cc/trees/property_tree.h

Issue 2180223005: cc : Split TransformTree::ComputeTransform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/property_tree.h
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h
index 396c4cf30f68eebc5b18fdef8651495a3b17cae2..9bf1ed4430f418fb12d3c74b895135c4575d85ec 100644
--- a/cc/trees/property_tree.h
+++ b/cc/trees/property_tree.h
@@ -154,6 +154,14 @@ class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> {
int dest_id,
gfx::Transform* transform) const;
+ // Computes the change of basis transform from node |source_id| to |dest_id|.
+ // This is used by scroll children to compute transform from their scroll
+ // parent space (source) to their parent space (destination) and it can atmost
+ // be a translation.
+ bool ComputeTranslation(int source_id,
+ int dest_id,
+ gfx::Transform* transform) const;
+
void ResetChangeTracking();
// Updates the parent, target, and screen space transforms and snapping.
void UpdateTransforms(int id);
@@ -245,10 +253,9 @@ class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> {
void FromProtobuf(const proto::PropertyTree& proto,
std::unordered_map<int, int>* node_id_to_index_map);
- // Computes the combined transform between |source_id| and |dest_id| and
- // returns false if the inverse of a singular transform was used. These two
- // nodes must be on the same ancestor chain.
- bool CombineTransformsBetween(int source_id,
+ // Computes the combined transform between |source_id| and |dest_id|. These
+ // two nodes must be on the same ancestor chain.
+ void CombineTransformsBetween(int source_id,
int dest_id,
gfx::Transform* transform) const;
@@ -591,6 +598,10 @@ class CC_EXPORT PropertyTrees final {
int effect_id,
gfx::Transform* transform) const;
+ bool ComputeTransformFromTarget(int transform_id,
+ int effect_id,
+ gfx::Transform* transform) const;
+
private:
gfx::Vector2dF inner_viewport_container_bounds_delta_;
gfx::Vector2dF outer_viewport_container_bounds_delta_;

Powered by Google App Engine
This is Rietveld 408576698