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

Side by Side Diff: Source/platform/graphics/paint/TransformDisplayItem.h

Issue 1295403003: DisplayItemPropertyTreeBuilder: Support (2D) transform and scroll display items. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/graphics/paint/ScrollDisplayItem.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 TransformDisplayItem_h 5 #ifndef TransformDisplayItem_h
6 #define TransformDisplayItem_h 6 #define TransformDisplayItem_h
7 7
8 #include "platform/graphics/paint/DisplayItem.h" 8 #include "platform/graphics/paint/DisplayItem.h"
9 #include "platform/transforms/AffineTransform.h" 9 #include "platform/transforms/AffineTransform.h"
10 #include "wtf/PassOwnPtr.h" 10 #include "wtf/PassOwnPtr.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class PLATFORM_EXPORT BeginTransformDisplayItem final : public PairedBeginDispla yItem { 14 class PLATFORM_EXPORT BeginTransformDisplayItem final : public PairedBeginDispla yItem {
15 public: 15 public:
16 BeginTransformDisplayItem(const DisplayItemClientWrapper& client, const Affi neTransform& transform) 16 BeginTransformDisplayItem(const DisplayItemClientWrapper& client, const Affi neTransform& transform)
17 : PairedBeginDisplayItem(client, BeginTransform, sizeof(*this)) 17 : PairedBeginDisplayItem(client, BeginTransform, sizeof(*this))
18 , m_transform(transform) { } 18 , m_transform(transform) { }
19 19
20 void replay(GraphicsContext&) override; 20 void replay(GraphicsContext&) override;
21 void appendToWebDisplayItemList(WebDisplayItemList*) const override; 21 void appendToWebDisplayItemList(WebDisplayItemList*) const override;
22 22
23 const AffineTransform& transform() const { return m_transform; }
24
23 private: 25 private:
24 #ifndef NDEBUG 26 #ifndef NDEBUG
25 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const final; 27 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const final;
26 #endif 28 #endif
27 29
30 private:
28 const AffineTransform m_transform; 31 const AffineTransform m_transform;
29 }; 32 };
30 33
31 class PLATFORM_EXPORT EndTransformDisplayItem final : public PairedEndDisplayIte m { 34 class PLATFORM_EXPORT EndTransformDisplayItem final : public PairedEndDisplayIte m {
32 public: 35 public:
33 EndTransformDisplayItem(const DisplayItemClientWrapper& client) 36 EndTransformDisplayItem(const DisplayItemClientWrapper& client)
34 : PairedEndDisplayItem(client, EndTransform, sizeof(*this)) { } 37 : PairedEndDisplayItem(client, EndTransform, sizeof(*this)) { }
35 38
36 void replay(GraphicsContext&) override; 39 void replay(GraphicsContext&) override;
37 void appendToWebDisplayItemList(WebDisplayItemList*) const override; 40 void appendToWebDisplayItemList(WebDisplayItemList*) const override;
38 41
39 private: 42 private:
40 #if ENABLE(ASSERT) 43 #if ENABLE(ASSERT)
41 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == BeginTransform; } 44 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == BeginTransform; }
42 #endif 45 #endif
43 }; 46 };
44 47
45 } // namespace blink 48 } // namespace blink
46 49
47 #endif // TransformDisplayItem_h 50 #endif // TransformDisplayItem_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/ScrollDisplayItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698