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

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

Issue 2632823002: SPv2: Paint SVG images and self-contained recorded pictures with their own trees. (Closed)
Patch Set: none Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 ClipPaintPropertyNode_h 5 #ifndef ClipPaintPropertyNode_h
6 #define ClipPaintPropertyNode_h 6 #define ClipPaintPropertyNode_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/geometry/FloatRoundedRect.h" 9 #include "platform/geometry/FloatRoundedRect.h"
10 #include "platform/graphics/paint/TransformPaintPropertyNode.h" 10 #include "platform/graphics/paint/TransformPaintPropertyNode.h"
11 #include "wtf/PassRefPtr.h" 11 #include "wtf/PassRefPtr.h"
12 #include "wtf/RefCounted.h" 12 #include "wtf/RefCounted.h"
13 #include "wtf/RefPtr.h" 13 #include "wtf/RefPtr.h"
14 #include "wtf/text/WTFString.h" 14 #include "wtf/text/WTFString.h"
15 15
16 #include <iosfwd> 16 #include <iosfwd>
17 17
18 namespace blink { 18 namespace blink {
19 19
20 // A clip rect created by a css property such as "overflow" or "clip". 20 // A clip rect created by a css property such as "overflow" or "clip".
21 // Along with a reference to the transform space the clip rect is based on, 21 // Along with a reference to the transform space the clip rect is based on,
22 // and a parent ClipPaintPropertyNode for inherited clips. 22 // and a parent ClipPaintPropertyNode for inherited clips.
23 // 23 //
24 // The clip tree is rooted at a node with no parent. This root node should 24 // The clip tree is rooted at a node with no parent. This root node should
25 // not be modified. 25 // not be modified.
26 class PLATFORM_EXPORT ClipPaintPropertyNode 26 class PLATFORM_EXPORT ClipPaintPropertyNode
27 : public RefCounted<ClipPaintPropertyNode> { 27 : public RefCounted<ClipPaintPropertyNode> {
28 public: 28 public:
29 // This node is really a sentinel, and does not represent a real clip
30 // space.
29 static ClipPaintPropertyNode* root(); 31 static ClipPaintPropertyNode* root();
30 32
31 static PassRefPtr<ClipPaintPropertyNode> create( 33 static PassRefPtr<ClipPaintPropertyNode> create(
32 PassRefPtr<const ClipPaintPropertyNode> parent, 34 PassRefPtr<const ClipPaintPropertyNode> parent,
33 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace, 35 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace,
34 const FloatRoundedRect& clipRect, 36 const FloatRoundedRect& clipRect,
35 CompositingReasons directCompositingReasons = CompositingReasonNone) { 37 CompositingReasons directCompositingReasons = CompositingReasonNone) {
36 return adoptRef(new ClipPaintPropertyNode( 38 return adoptRef(new ClipPaintPropertyNode(
37 std::move(parent), std::move(localTransformSpace), clipRect, 39 std::move(parent), std::move(localTransformSpace), clipRect,
38 directCompositingReasons)); 40 directCompositingReasons));
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 CompositingReasons m_directCompositingReasons; 101 CompositingReasons m_directCompositingReasons;
100 }; 102 };
101 103
102 // Redeclared here to avoid ODR issues. 104 // Redeclared here to avoid ODR issues.
103 // See platform/testing/PaintPrinters.h. 105 // See platform/testing/PaintPrinters.h.
104 void PrintTo(const ClipPaintPropertyNode&, std::ostream*); 106 void PrintTo(const ClipPaintPropertyNode&, std::ostream*);
105 107
106 } // namespace blink 108 } // namespace blink
107 109
108 #endif // ClipPaintPropertyNode_h 110 #endif // ClipPaintPropertyNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698