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

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: 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 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 "platform/wtf/Allocator.h" 11 #include "platform/wtf/Allocator.h"
12 #include "platform/wtf/Assertions.h" 12 #include "platform/wtf/Assertions.h"
13 #include "platform/wtf/Noncopyable.h" 13 #include "platform/wtf/Noncopyable.h"
14 14
15 #ifndef NDEBUG 15 #ifndef NDEBUG
16 #include "platform/wtf/text/StringBuilder.h" 16 #include "platform/wtf/text/StringBuilder.h"
17 #include "platform/wtf/text/WTFString.h" 17 #include "platform/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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 328
331 // True if the client is non-null. Because m_client is const, this should 329 // True if the client is non-null. Because m_client is const, this should
332 // never be false except when we explicitly create a tombstone/"dead display 330 // never be false except when we explicitly create a tombstone/"dead display
333 // item" as part of moving an item from one list to another (see: 331 // item" as part of moving an item from one list to another (see:
334 // DisplayItemList::appendByMoving). 332 // DisplayItemList::appendByMoving).
335 bool HasValidClient() const { return client_; } 333 bool HasValidClient() const { return client_; }
336 334
337 virtual bool DrawsContent() const { return false; } 335 virtual bool DrawsContent() const { return false; }
338 336
339 // Override to implement specific analysis strategies. 337 // Override to implement specific analysis strategies.
340 virtual void AnalyzeForGpuRasterization(SkPictureGpuAnalyzer&) const {} 338 virtual int NumberOfSlowPaths() const { return 0; }
341 339
342 #ifndef NDEBUG 340 #ifndef NDEBUG
343 static WTF::String TypeAsDebugString(DisplayItem::Type); 341 static WTF::String TypeAsDebugString(DisplayItem::Type);
344 const WTF::String ClientDebugString() const { return client_debug_string_; } 342 const WTF::String ClientDebugString() const { return client_debug_string_; }
345 void SetClientDebugString(const WTF::String& s) { client_debug_string_ = s; } 343 void SetClientDebugString(const WTF::String& s) { client_debug_string_ = s; }
346 WTF::String AsDebugString() const; 344 WTF::String AsDebugString() const;
347 virtual void DumpPropertiesAsDebugString(WTF::StringBuilder&) const; 345 virtual void DumpPropertiesAsDebugString(WTF::StringBuilder&) const;
348 #endif 346 #endif
349 347
350 private: 348 private:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 bool IsEndAndPairedWith(DisplayItem::Type other_type) const override = 0; 400 bool IsEndAndPairedWith(DisplayItem::Type other_type) const override = 0;
403 #endif 401 #endif
404 402
405 private: 403 private:
406 bool IsEnd() const final { return true; } 404 bool IsEnd() const final { return true; }
407 }; 405 };
408 406
409 } // namespace blink 407 } // namespace blink
410 408
411 #endif // DisplayItem_h 409 #endif // DisplayItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698