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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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 PaintController_h 5 #ifndef PaintController_h
6 #define PaintController_h 6 #define PaintController_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/RuntimeEnabledFeatures.h" 9 #include "platform/RuntimeEnabledFeatures.h"
10 #include "platform/geometry/IntRect.h" 10 #include "platform/geometry/IntRect.h"
11 #include "platform/geometry/LayoutPoint.h" 11 #include "platform/geometry/LayoutPoint.h"
12 #include "platform/graphics/ContiguousContainer.h" 12 #include "platform/graphics/ContiguousContainer.h"
13 #include "platform/graphics/paint/DisplayItem.h" 13 #include "platform/graphics/paint/DisplayItem.h"
14 #include "platform/graphics/paint/DisplayItemList.h" 14 #include "platform/graphics/paint/DisplayItemList.h"
15 #include "platform/graphics/paint/PaintArtifact.h" 15 #include "platform/graphics/paint/PaintArtifact.h"
16 #include "platform/graphics/paint/PaintChunk.h" 16 #include "platform/graphics/paint/PaintChunk.h"
17 #include "platform/graphics/paint/PaintChunker.h" 17 #include "platform/graphics/paint/PaintChunker.h"
18 #include "platform/graphics/paint/RasterInvalidationTracking.h" 18 #include "platform/graphics/paint/RasterInvalidationTracking.h"
19 #include "platform/graphics/paint/Transform3DDisplayItem.h" 19 #include "platform/graphics/paint/Transform3DDisplayItem.h"
20 #include "skia/ext/cdl_common.h"
20 #include "third_party/skia/include/core/SkRefCnt.h" 21 #include "third_party/skia/include/core/SkRefCnt.h"
21 #include "wtf/Alignment.h" 22 #include "wtf/Alignment.h"
22 #include "wtf/Assertions.h" 23 #include "wtf/Assertions.h"
23 #include "wtf/HashMap.h" 24 #include "wtf/HashMap.h"
24 #include "wtf/HashSet.h" 25 #include "wtf/HashSet.h"
25 #include "wtf/PtrUtil.h" 26 #include "wtf/PtrUtil.h"
26 #include "wtf/Vector.h" 27 #include "wtf/Vector.h"
27 #include <memory> 28 #include <memory>
28 #include <utility> 29 #include <utility>
29 30
30 class SkPicture;
31
32 namespace blink { 31 namespace blink {
33 32
34 static const size_t kInitialDisplayItemListCapacityBytes = 512; 33 static const size_t kInitialDisplayItemListCapacityBytes = 512;
35 34
36 template class RasterInvalidationTrackingMap<const PaintChunk>; 35 template class RasterInvalidationTrackingMap<const PaintChunk>;
37 36
38 // Responsible for processing display items as they are produced, and producing 37 // Responsible for processing display items as they are produced, and producing
39 // a final paint artifact when complete. This class includes logic for caching, 38 // a final paint artifact when complete. This class includes logic for caching,
40 // cache invalidation, and merging. 39 // cache invalidation, and merging.
41 class PLATFORM_EXPORT PaintController { 40 class PLATFORM_EXPORT PaintController {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 169 }
171 void setNonDefaultBackgroundColorPainted() { 170 void setNonDefaultBackgroundColorPainted() {
172 m_nonDefaultBackgroundColorPainted = true; 171 m_nonDefaultBackgroundColorPainted = true;
173 } 172 }
174 173
175 // Returns displayItemList added using createAndAppend() since beginning or 174 // Returns displayItemList added using createAndAppend() since beginning or
176 // the last commitNewDisplayItems(). Use with care. 175 // the last commitNewDisplayItems(). Use with care.
177 DisplayItemList& newDisplayItemList() { return m_newDisplayItemList; } 176 DisplayItemList& newDisplayItemList() { return m_newDisplayItemList; }
178 177
179 void appendDebugDrawingAfterCommit(const DisplayItemClient&, 178 void appendDebugDrawingAfterCommit(const DisplayItemClient&,
180 sk_sp<SkPicture>, 179 sk_sp<CdlPicture>,
181 const LayoutSize& offsetFromLayoutObject); 180 const LayoutSize& offsetFromLayoutObject);
182 181
183 void showDebugData() const { showDebugDataInternal(false); } 182 void showDebugData() const { showDebugDataInternal(false); }
184 #ifndef NDEBUG 183 #ifndef NDEBUG
185 void showDebugDataWithPictures() const { showDebugDataInternal(true); } 184 void showDebugDataWithPictures() const { showDebugDataInternal(true); }
186 #endif 185 #endif
187 186
188 #if DCHECK_IS_ON() 187 #if DCHECK_IS_ON()
189 void assertDisplayItemClientsAreLive(); 188 void assertDisplayItemClientsAreLive();
190 #endif 189 #endif
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 372
374 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 373 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
375 // A stack recording subsequence clients that are currently painting. 374 // A stack recording subsequence clients that are currently painting.
376 Vector<const DisplayItemClient*> m_currentSubsequenceClients; 375 Vector<const DisplayItemClient*> m_currentSubsequenceClients;
377 #endif 376 #endif
378 }; 377 };
379 378
380 } // namespace blink 379 } // namespace blink
381 380
382 #endif // PaintController_h 381 #endif // PaintController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698