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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h

Issue 2744743003: Add support for flattening in GeometryMapper. (Closed)
Patch Set: none Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 GeometryMapper_h 5 #ifndef GeometryMapper_h
6 #define GeometryMapper_h 6 #define GeometryMapper_h
7 7
8 #include "platform/graphics/paint/FloatClipRect.h" 8 #include "platform/graphics/paint/FloatClipRect.h"
9 #include "platform/graphics/paint/PropertyTreeState.h" 9 #include "platform/graphics/paint/PropertyTreeState.h"
10 #include "platform/transforms/TransformationMatrix.h" 10 #include "platform/transforms/TransformationMatrix.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // 106 //
107 // |mappingRect| is both input and output. 107 // |mappingRect| is both input and output.
108 void ancestorToLocalRect( 108 void ancestorToLocalRect(
109 const TransformPaintPropertyNode* ancestorTransformNode, 109 const TransformPaintPropertyNode* ancestorTransformNode,
110 const TransformPaintPropertyNode* localTransformNode, 110 const TransformPaintPropertyNode* localTransformNode,
111 FloatRect& mappingRect); 111 FloatRect& mappingRect);
112 112
113 // Returns the matrix used in |LocalToAncestorRect|. DCHECK fails iff 113 // Returns the matrix used in |LocalToAncestorRect|. DCHECK fails iff
114 // |localTransformNode| is not equal to or a descendant of 114 // |localTransformNode| is not equal to or a descendant of
115 // |ancestorTransformNode|. 115 // |ancestorTransformNode|.
116 // This matrix may not be flattened. Since GeometryMapper only supports
117 // flattened ancestor spaces, the returned matrix must be flattened to have
118 // the correct semantics (calling mapRect() on it implicitly applies
119 // flattening to the input; flattenTo2d() does it explicitly to tme matrix).
116 const TransformationMatrix& localToAncestorMatrix( 120 const TransformationMatrix& localToAncestorMatrix(
117 const TransformPaintPropertyNode* localTransformNode, 121 const TransformPaintPropertyNode* localTransformNode,
118 const TransformPaintPropertyNode* ancestorTransformNode); 122 const TransformPaintPropertyNode* ancestorTransformNode);
119 123
120 // Returns the "clip visual rect" between |localTransformState| and 124 // Returns the "clip visual rect" between |localTransformState| and
121 // |ancestorState|. See above for the definition of "clip visual rect". 125 // |ancestorState|. See above for the definition of "clip visual rect".
122 FloatClipRect localToAncestorClipRect( 126 FloatClipRect localToAncestorClipRect(
123 const PropertyTreeState& localTransformState, 127 const PropertyTreeState& localTransformState,
124 const PropertyTreeState& ancestorState); 128 const PropertyTreeState& ancestorState);
125 129
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 const TransformationMatrix m_identity; 197 const TransformationMatrix m_identity;
194 const FloatClipRect m_infiniteClip; 198 const FloatClipRect m_infiniteClip;
195 FloatClipRect m_tempRect; 199 FloatClipRect m_tempRect;
196 200
197 DISALLOW_COPY_AND_ASSIGN(GeometryMapper); 201 DISALLOW_COPY_AND_ASSIGN(GeometryMapper);
198 }; 202 };
199 203
200 } // namespace blink 204 } // namespace blink
201 205
202 #endif // GeometryMapper_h 206 #endif // GeometryMapper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698