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

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

Issue 1192443003: [Slimming Paint] Blink-side contiguous allocation of display items. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: need a constructor with WTF_MAKE_NONCOPYABLE Created 5 years, 6 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
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/Assertions.h" 10 #include "wtf/Assertions.h"
(...skipping 11 matching lines...) Expand all
22 22
23 BeginTransform3DDisplayItem(const DisplayItemClientWrapper& client, DisplayI tem::Type type, const TransformationMatrix& transform) 23 BeginTransform3DDisplayItem(const DisplayItemClientWrapper& client, DisplayI tem::Type type, const TransformationMatrix& transform)
24 : PairedBeginDisplayItem(client, type) 24 : PairedBeginDisplayItem(client, type)
25 , m_transform(transform) 25 , m_transform(transform)
26 { 26 {
27 ASSERT(DisplayItem::isTransform3DType(type)); 27 ASSERT(DisplayItem::isTransform3DType(type));
28 } 28 }
29 29
30 virtual void replay(GraphicsContext&) override; 30 virtual void replay(GraphicsContext&) override;
31 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; 31 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
32 virtual void appendByMoving(DisplayItems&) override;
32 33
33 const TransformationMatrix& transform() const { return m_transform; } 34 const TransformationMatrix& transform() const { return m_transform; }
34 35
35 private: 36 private:
36 const TransformationMatrix m_transform; 37 const TransformationMatrix m_transform;
37 FloatPoint3D m_transformOrigin; 38 FloatPoint3D m_transformOrigin;
38 }; 39 };
39 40
40 class PLATFORM_EXPORT EndTransform3DDisplayItem : public PairedEndDisplayItem { 41 class PLATFORM_EXPORT EndTransform3DDisplayItem : public PairedEndDisplayItem {
41 WTF_MAKE_FAST_ALLOCATED(EndTransform3DDisplayItem); 42 WTF_MAKE_FAST_ALLOCATED(EndTransform3DDisplayItem);
42 public: 43 public:
43 static PassOwnPtr<EndTransform3DDisplayItem> create(const DisplayItemClientW rapper& client, DisplayItem::Type type) 44 static PassOwnPtr<EndTransform3DDisplayItem> create(const DisplayItemClientW rapper& client, DisplayItem::Type type)
44 { 45 {
45 return adoptPtr(new EndTransform3DDisplayItem(client, type)); 46 return adoptPtr(new EndTransform3DDisplayItem(client, type));
46 } 47 }
47 48
48 EndTransform3DDisplayItem(const DisplayItemClientWrapper& client, DisplayIte m::Type type) 49 EndTransform3DDisplayItem(const DisplayItemClientWrapper& client, DisplayIte m::Type type)
49 : PairedEndDisplayItem(client, type) 50 : PairedEndDisplayItem(client, type)
50 { 51 {
51 ASSERT(DisplayItem::isEndTransform3DType(type)); 52 ASSERT(DisplayItem::isEndTransform3DType(type));
52 } 53 }
53 54
54 virtual void replay(GraphicsContext&) override; 55 virtual void replay(GraphicsContext&) override;
55 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override; 56 virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override;
57 virtual void appendByMoving(DisplayItems&) override;
56 58
57 private: 59 private:
58 #if ENABLE(ASSERT) 60 #if ENABLE(ASSERT)
59 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const override final 61 virtual bool isEndAndPairedWith(DisplayItem::Type otherType) const override final
60 { 62 {
61 return DisplayItem::transform3DTypeToEndTransform3DType(otherType) == ty pe(); 63 return DisplayItem::transform3DTypeToEndTransform3DType(otherType) == ty pe();
62 } 64 }
63 #endif 65 #endif
64 }; 66 };
65 67
66 } // namespace blink 68 } // namespace blink
67 69
68 #endif // Transform3DDisplayItem_h 70 #endif // Transform3DDisplayItem_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/SubtreeDisplayItem.cpp ('k') | Source/platform/graphics/paint/Transform3DDisplayItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698