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

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

Issue 2675773003: Optimize CompositingRecorder::endCompositing to not need an SkPictureBuilder (Closed)
Patch Set: rebase Created 3 years, 10 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 PaintChunker_h 5 #ifndef PaintChunker_h
6 #define PaintChunker_h 6 #define PaintChunker_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/paint/DisplayItem.h" 9 #include "platform/graphics/paint/DisplayItem.h"
10 #include "platform/graphics/paint/PaintChunk.h" 10 #include "platform/graphics/paint/PaintChunk.h"
11 #include "platform/graphics/paint/PaintChunkProperties.h" 11 #include "platform/graphics/paint/PaintChunkProperties.h"
12 #include "wtf/Allocator.h" 12 #include "wtf/Allocator.h"
13 #include "wtf/AutoReset.h"
14 #include "wtf/Noncopyable.h" 13 #include "wtf/Noncopyable.h"
15 #include "wtf/Vector.h" 14 #include "wtf/Vector.h"
16 15
17 namespace blink { 16 namespace blink {
18 17
19 // Accepts information about changes to |PaintChunkProperties| as drawings are 18 // Accepts information about changes to |PaintChunkProperties| as drawings are
20 // accumulated, and produces a series of paint chunks: contiguous ranges of the 19 // accumulated, and produces a series of paint chunks: contiguous ranges of the
21 // display list with identical |PaintChunkProperties|. 20 // display list with identical |PaintChunkProperties|.
22 class PLATFORM_EXPORT PaintChunker final { 21 class PLATFORM_EXPORT PaintChunker final {
23 DISALLOW_NEW(); 22 DISALLOW_NEW();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Item requires its own paint chunk. 67 // Item requires its own paint chunk.
69 RequiresSeparateChunk, 68 RequiresSeparateChunk,
70 }; 69 };
71 70
72 Vector<PaintChunk> m_chunks; 71 Vector<PaintChunk> m_chunks;
73 Vector<ItemBehavior> m_chunkBehavior; 72 Vector<ItemBehavior> m_chunkBehavior;
74 Optional<PaintChunk::Id> m_currentChunkId; 73 Optional<PaintChunk::Id> m_currentChunkId;
75 PaintChunkProperties m_currentProperties; 74 PaintChunkProperties m_currentProperties;
76 }; 75 };
77 76
78 #if DCHECK_IS_ON()
79 class DisableNullPaintPropertyChecks {
80 STACK_ALLOCATED();
81 WTF_MAKE_NONCOPYABLE(DisableNullPaintPropertyChecks);
82
83 public:
84 DisableNullPaintPropertyChecks();
85
86 private:
87 AutoReset<bool> m_disabler;
88 };
89 #endif // DCHECK_IS_ON()
90
91 } // namespace blink 77 } // namespace blink
92 78
93 #endif // PaintChunker_h 79 #endif // PaintChunker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698