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

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

Issue 946423002: Separate Transform3D display item types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/DisplayItem.cpp ('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 Transform3DDisplayItem_h 5 #ifndef Transform3DDisplayItem_h
6 #define Transform3DDisplayItem_h 6 #define Transform3DDisplayItem_h
7 7
8 #include "platform/graphics/paint/DisplayItem.h" 8 #include "platform/graphics/paint/DisplayItem.h"
9 #include "platform/transforms/TransformationMatrix.h" 9 #include "platform/transforms/TransformationMatrix.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 BeginTransform3DDisplayItem : public PairedBeginDisplayIte m { 14 class PLATFORM_EXPORT BeginTransform3DDisplayItem : public PairedBeginDisplayIte m {
15 WTF_MAKE_FAST_ALLOCATED; 15 WTF_MAKE_FAST_ALLOCATED;
16 public: 16 public:
17 static PassOwnPtr<BeginTransform3DDisplayItem> create(DisplayItemClient clie nt, const TransformationMatrix& transform) 17 static PassOwnPtr<BeginTransform3DDisplayItem> create(DisplayItemClient clie nt, const TransformationMatrix& transform)
18 { 18 {
19 return adoptPtr(new BeginTransform3DDisplayItem(client, transform)); 19 return adoptPtr(new BeginTransform3DDisplayItem(client, transform));
20 } 20 }
21 21
22 BeginTransform3DDisplayItem(DisplayItemClient client, const TransformationMa trix& transform) 22 BeginTransform3DDisplayItem(DisplayItemClient client, const TransformationMa trix& transform)
23 : PairedBeginDisplayItem(client, BeginTransform) 23 : PairedBeginDisplayItem(client, BeginTransform3D)
24 , m_transform(transform) { } 24 , m_transform(transform) { }
25 25
26 virtual void replay(GraphicsContext*) override; 26 virtual void replay(GraphicsContext*) override;
27 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; 27 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
28 28
29 private: 29 private:
30 const TransformationMatrix m_transform; 30 const TransformationMatrix m_transform;
31 FloatPoint3D m_transformOrigin; 31 FloatPoint3D m_transformOrigin;
32 }; 32 };
33 33
34 class PLATFORM_EXPORT EndTransform3DDisplayItem : public PairedEndDisplayItem { 34 class PLATFORM_EXPORT EndTransform3DDisplayItem : public PairedEndDisplayItem {
35 WTF_MAKE_FAST_ALLOCATED; 35 WTF_MAKE_FAST_ALLOCATED;
36 public: 36 public:
37 static PassOwnPtr<EndTransform3DDisplayItem> create(DisplayItemClient client ) 37 static PassOwnPtr<EndTransform3DDisplayItem> create(DisplayItemClient client )
38 { 38 {
39 return adoptPtr(new EndTransform3DDisplayItem(client)); 39 return adoptPtr(new EndTransform3DDisplayItem(client));
40 } 40 }
41 41
42 EndTransform3DDisplayItem(DisplayItemClient client) 42 EndTransform3DDisplayItem(DisplayItemClient client)
43 : PairedEndDisplayItem(client, EndTransform) { } 43 : PairedEndDisplayItem(client, EndTransform3D) { }
44 44
45 virtual void replay(GraphicsContext*) override; 45 virtual void replay(GraphicsContext*) override;
46 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; 46 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
47 47
48 private: 48 private:
49 #if ENABLE(ASSERT) 49 #if ENABLE(ASSERT)
50 // FIXME: Distinguish BeginTransformDisplayItem and BeginTransform3DDisplayI tem. 50 virtual bool isEndAndPairedWith(const DisplayItem& other) const override fin al { return other.type() == BeginTransform3D; }
51 virtual bool isEndAndPairedWith(const DisplayItem& other) const override fin al { return other.type() == BeginTransform; }
52 #endif 51 #endif
53 }; 52 };
54 53
55 } // namespace blink 54 } // namespace blink
56 55
57 #endif // Transform3DDisplayItem_h 56 #endif // Transform3DDisplayItem_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698