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

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

Issue 2768143002: Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: Fix win build Created 3 years, 8 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 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 DisplayItem_h 5 #ifndef DisplayItem_h
6 #define DisplayItem_h 6 #define DisplayItem_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/ContiguousContainer.h" 9 #include "platform/graphics/ContiguousContainer.h"
10 #include "platform/graphics/paint/DisplayItemClient.h" 10 #include "platform/graphics/paint/DisplayItemClient.h"
11 #include "wtf/Allocator.h" 11 #include "wtf/Allocator.h"
12 #include "wtf/Assertions.h" 12 #include "wtf/Assertions.h"
13 #include "wtf/Noncopyable.h" 13 #include "wtf/Noncopyable.h"
14 14
15 #ifndef NDEBUG 15 #ifndef NDEBUG
16 #include "wtf/text/StringBuilder.h" 16 #include "wtf/text/StringBuilder.h"
17 #include "wtf/text/WTFString.h" 17 #include "wtf/text/WTFString.h"
18 #endif 18 #endif
19 19
20 class SkPictureGpuAnalyzer;
21
22 namespace blink { 20 namespace blink {
23 21
24 class GraphicsContext; 22 class GraphicsContext;
25 class IntRect; 23 class IntRect;
26 class WebDisplayItemList; 24 class WebDisplayItemList;
27 25
28 class PLATFORM_EXPORT DisplayItem { 26 class PLATFORM_EXPORT DisplayItem {
29 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 27 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
30 28
31 public: 29 public:
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 336
339 // True if the client is non-null. Because m_client is const, this should 337 // True if the client is non-null. Because m_client is const, this should
340 // never be false except when we explicitly create a tombstone/"dead display 338 // never be false except when we explicitly create a tombstone/"dead display
341 // item" as part of moving an item from one list to another (see: 339 // item" as part of moving an item from one list to another (see:
342 // DisplayItemList::appendByMoving). 340 // DisplayItemList::appendByMoving).
343 bool hasValidClient() const { return m_client; } 341 bool hasValidClient() const { return m_client; }
344 342
345 virtual bool drawsContent() const { return false; } 343 virtual bool drawsContent() const { return false; }
346 344
347 // Override to implement specific analysis strategies. 345 // Override to implement specific analysis strategies.
348 virtual void analyzeForGpuRasterization(SkPictureGpuAnalyzer&) const {} 346 virtual int numberOfSlowPaths() const { return 0; }
349 347
350 #ifndef NDEBUG 348 #ifndef NDEBUG
351 static WTF::String typeAsDebugString(DisplayItem::Type); 349 static WTF::String typeAsDebugString(DisplayItem::Type);
352 const WTF::String clientDebugString() const { return m_clientDebugString; } 350 const WTF::String clientDebugString() const { return m_clientDebugString; }
353 void setClientDebugString(const WTF::String& s) { m_clientDebugString = s; } 351 void setClientDebugString(const WTF::String& s) { m_clientDebugString = s; }
354 WTF::String asDebugString() const; 352 WTF::String asDebugString() const;
355 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const; 353 virtual void dumpPropertiesAsDebugString(WTF::StringBuilder&) const;
356 #endif 354 #endif
357 355
358 private: 356 private:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0; 408 bool isEndAndPairedWith(DisplayItem::Type otherType) const override = 0;
411 #endif 409 #endif
412 410
413 private: 411 private:
414 bool isEnd() const final { return true; } 412 bool isEnd() const final { return true; }
415 }; 413 };
416 414
417 } // namespace blink 415 } // namespace blink
418 416
419 #endif // DisplayItem_h 417 #endif // DisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698