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

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

Issue 2013723002: Consider ClipPathDisplayItems for GPU veto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test asserts Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/ClipPathDisplayItem.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ClipPathDisplayItem_h 5 #ifndef ClipPathDisplayItem_h
6 #define ClipPathDisplayItem_h 6 #define ClipPathDisplayItem_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/Path.h" 9 #include "platform/graphics/Path.h"
10 #include "platform/graphics/paint/DisplayItem.h" 10 #include "platform/graphics/paint/DisplayItem.h"
11 #include "third_party/skia/include/core/SkPath.h" 11 #include "third_party/skia/include/core/SkPath.h"
12 #include "wtf/PassOwnPtr.h" 12 #include "wtf/PassOwnPtr.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class PLATFORM_EXPORT BeginClipPathDisplayItem final : public PairedBeginDisplay Item { 16 class PLATFORM_EXPORT BeginClipPathDisplayItem final : public PairedBeginDisplay Item {
17 public: 17 public:
18 BeginClipPathDisplayItem(const DisplayItemClient& client, const Path& clipPa th) 18 BeginClipPathDisplayItem(const DisplayItemClient& client, const Path& clipPa th)
19 : PairedBeginDisplayItem(client, BeginClipPath, sizeof(*this)) 19 : PairedBeginDisplayItem(client, BeginClipPath, sizeof(*this))
20 , m_clipPath(clipPath.getSkPath()) { } 20 , m_clipPath(clipPath.getSkPath()) { }
21 21
22 void replay(GraphicsContext&) const override; 22 void replay(GraphicsContext&) const override;
23 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const o verride; 23 void appendToWebDisplayItemList(const IntRect&, WebDisplayItemList*) const o verride;
24 24
25 void analyzeForGpuRasterization(SkPictureGpuAnalyzer&) const override;
26
25 private: 27 private:
26 const SkPath m_clipPath; 28 const SkPath m_clipPath;
27 #ifndef NDEBUG 29 #ifndef NDEBUG
28 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override; 30 void dumpPropertiesAsDebugString(WTF::StringBuilder&) const override;
29 #endif 31 #endif
30 #if ENABLE(ASSERT) 32 #if ENABLE(ASSERT)
31 bool equals(const DisplayItem& other) const final 33 bool equals(const DisplayItem& other) const final
32 { 34 {
33 return DisplayItem::equals(other) 35 return DisplayItem::equals(other)
34 && m_clipPath == static_cast<const BeginClipPathDisplayItem&>(other) .m_clipPath; 36 && m_clipPath == static_cast<const BeginClipPathDisplayItem&>(other) .m_clipPath;
(...skipping 11 matching lines...) Expand all
46 48
47 private: 49 private:
48 #if ENABLE(ASSERT) 50 #if ENABLE(ASSERT)
49 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == BeginClipPath; } 51 bool isEndAndPairedWith(DisplayItem::Type otherType) const final { return ot herType == BeginClipPath; }
50 #endif 52 #endif
51 }; 53 };
52 54
53 } // namespace blink 55 } // namespace blink
54 56
55 #endif // ClipPathDisplayItem_h 57 #endif // ClipPathDisplayItem_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/ClipPathDisplayItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698