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

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

Issue 2768143002: Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: more const casting Created 3 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
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 12
13 namespace blink { 13 namespace blink {
14 14
15 class PLATFORM_EXPORT BeginClipPathDisplayItem final 15 class PLATFORM_EXPORT BeginClipPathDisplayItem final
16 : public PairedBeginDisplayItem { 16 : public PairedBeginDisplayItem {
17 public: 17 public:
18 BeginClipPathDisplayItem(const DisplayItemClient& client, 18 BeginClipPathDisplayItem(const DisplayItemClient& client,
19 const Path& clip_path) 19 const Path& clip_path)
20 : PairedBeginDisplayItem(client, kBeginClipPath, sizeof(*this)), 20 : PairedBeginDisplayItem(client, kBeginClipPath, sizeof(*this)),
21 clip_path_(clip_path.GetSkPath()) {} 21 clip_path_(clip_path.GetSkPath()) {}
22 22
23 void Replay(GraphicsContext&) const override; 23 void Replay(GraphicsContext&) const override;
24 void AppendToWebDisplayItemList(const IntRect&, 24 void AppendToWebDisplayItemList(const IntRect&,
25 WebDisplayItemList*) const override; 25 WebDisplayItemList*) const override;
26 26
27 void AnalyzeForGpuRasterization(SkPictureGpuAnalyzer&) const override; 27 int NumberOfSlowPaths() const override;
28 28
29 private: 29 private:
30 #ifndef NDEBUG 30 #ifndef NDEBUG
31 void DumpPropertiesAsDebugString(WTF::StringBuilder&) const override; 31 void DumpPropertiesAsDebugString(WTF::StringBuilder&) const override;
32 #endif 32 #endif
33 bool Equals(const DisplayItem& other) const final { 33 bool Equals(const DisplayItem& other) const final {
34 return DisplayItem::Equals(other) && 34 return DisplayItem::Equals(other) &&
35 clip_path_ == 35 clip_path_ ==
36 static_cast<const BeginClipPathDisplayItem&>(other).clip_path_; 36 static_cast<const BeginClipPathDisplayItem&>(other).clip_path_;
37 } 37 }
(...skipping 15 matching lines...) Expand all
53 #if DCHECK_IS_ON() 53 #if DCHECK_IS_ON()
54 bool IsEndAndPairedWith(DisplayItem::Type other_type) const final { 54 bool IsEndAndPairedWith(DisplayItem::Type other_type) const final {
55 return other_type == kBeginClipPath; 55 return other_type == kBeginClipPath;
56 } 56 }
57 #endif 57 #endif
58 }; 58 };
59 59
60 } // namespace blink 60 } // namespace blink
61 61
62 #endif // ClipPathDisplayItem_h 62 #endif // ClipPathDisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698