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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTransformCache.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 GeometryMapperTransformCache_h 5 #ifndef GeometryMapperTransformCache_h
6 #define GeometryMapperTransformCache_h 6 #define GeometryMapperTransformCache_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 9
10 #include "platform/transforms/TransformationMatrix.h" 10 #include "platform/transforms/TransformationMatrix.h"
11 #include "wtf/Vector.h" 11 #include "wtf/Vector.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class TransformPaintPropertyNode; 15 class TransformPaintPropertyNode;
16 16
17 // A GeometryMapperTransformCache hangs off a TransformPaintPropertyNode. It 17 // A GeometryMapperTransformCache hangs off a TransformPaintPropertyNode. It
18 // stores cached "transformed rects" (See GeometryMapper.h) from that node in 18 // stores cached "transformed rects" (See GeometryMapper.h) from that node in
19 // ancestor spaces. 19 // ancestor spaces.
20 class PLATFORM_EXPORT GeometryMapperTransformCache { 20 class PLATFORM_EXPORT GeometryMapperTransformCache {
21 public: 21 public:
22 GeometryMapperTransformCache(); 22 GeometryMapperTransformCache();
23 23
24 // Returns the transformed rect (see GeometryMapper.h) of |this| in the 24 // Returns the transformed rect (see GeometryMapper.h) of |this| in the
25 // space of |ancestorTransform|, if there is one cached. Otherwise returns 25 // space of |ancestorTransform|, if there is one cached. Otherwise returns
26 // null. 26 // null.
27 //
28 // These transforms are not flattened to 2d, even if the ancestor transform
29 // space flattens.
27 const TransformationMatrix* getCachedTransform( 30 const TransformationMatrix* getCachedTransform(
28 const TransformPaintPropertyNode* ancestorTransform); 31 const TransformPaintPropertyNode* ancestorTransform);
29 32
30 // Stores the "transformed rect" of |this| in the space of |ancestors|, 33 // Stores the "transformed rect" of |this| in the space of |ancestors|,
31 // into a local cache. 34 // into a local cache.
32 void setCachedTransform(const TransformPaintPropertyNode* ancestorTransform, 35 void setCachedTransform(const TransformPaintPropertyNode* ancestorTransform,
33 const TransformationMatrix& toAncestor); 36 const TransformationMatrix& toAncestor);
34 37
35 static void clearCache(); 38 static void clearCache();
36 39
(...skipping 10 matching lines...) Expand all
47 50
48 Vector<TransformCacheEntry> m_transformCache; 51 Vector<TransformCacheEntry> m_transformCache;
49 unsigned m_cacheGeneration; 52 unsigned m_cacheGeneration;
50 53
51 DISALLOW_COPY_AND_ASSIGN(GeometryMapperTransformCache); 54 DISALLOW_COPY_AND_ASSIGN(GeometryMapperTransformCache);
52 }; 55 };
53 56
54 } // namespace blink 57 } // namespace blink
55 58
56 #endif // GeometryMapperTransformCache_h 59 #endif // GeometryMapperTransformCache_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698