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

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

Issue 2176573004: Enable subsequence caching for spv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CachePaintProperties
Patch Set: Spv2 configuration for PaintLayerPainterTest, unsigned->size_t etc. Created 4 years, 4 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 PaintArtifact_h 5 #ifndef PaintArtifact_h
6 #define PaintArtifact_h 6 #define PaintArtifact_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/paint/DisplayItemList.h" 9 #include "platform/graphics/paint/DisplayItemList.h"
10 #include "platform/graphics/paint/PaintChunk.h" 10 #include "platform/graphics/paint/PaintChunk.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 PaintArtifact& operator=(PaintArtifact&&); 42 PaintArtifact& operator=(PaintArtifact&&);
43 43
44 bool isEmpty() const { return m_displayItemList.isEmpty(); } 44 bool isEmpty() const { return m_displayItemList.isEmpty(); }
45 45
46 DisplayItemList& getDisplayItemList() { return m_displayItemList; } 46 DisplayItemList& getDisplayItemList() { return m_displayItemList; }
47 const DisplayItemList& getDisplayItemList() const { return m_displayItemList ; } 47 const DisplayItemList& getDisplayItemList() const { return m_displayItemList ; }
48 48
49 Vector<PaintChunk>& paintChunks() { return m_paintChunks; } 49 Vector<PaintChunk>& paintChunks() { return m_paintChunks; }
50 const Vector<PaintChunk>& paintChunks() const { return m_paintChunks; } 50 const Vector<PaintChunk>& paintChunks() const { return m_paintChunks; }
51 51
52 Vector<PaintChunk>::const_iterator findChunkByDisplayItemIndex(size_t) const ;
53
52 bool isSuitableForGpuRasterization() const { return m_isSuitableForGpuRaster ization; } 54 bool isSuitableForGpuRasterization() const { return m_isSuitableForGpuRaster ization; }
53 55
54 // Resets to an empty paint artifact. 56 // Resets to an empty paint artifact.
55 void reset(); 57 void reset();
56 58
57 // Returns the approximate memory usage, excluding memory likely to be 59 // Returns the approximate memory usage, excluding memory likely to be
58 // shared with the embedder after copying to WebDisplayItemList. 60 // shared with the embedder after copying to WebDisplayItemList.
59 size_t approximateUnsharedMemoryUsage() const; 61 size_t approximateUnsharedMemoryUsage() const;
60 62
61 // Draws the paint artifact to a GraphicsContext. 63 // Draws the paint artifact to a GraphicsContext.
62 void replay(GraphicsContext&) const; 64 void replay(GraphicsContext&) const;
63 65
64 // Writes the paint artifact into a WebDisplayItemList. 66 // Writes the paint artifact into a WebDisplayItemList.
65 void appendToWebDisplayItemList(WebDisplayItemList*) const; 67 void appendToWebDisplayItemList(WebDisplayItemList*) const;
66 68
67 private: 69 private:
68 DisplayItemList m_displayItemList; 70 DisplayItemList m_displayItemList;
69 Vector<PaintChunk> m_paintChunks; 71 Vector<PaintChunk> m_paintChunks;
70 bool m_isSuitableForGpuRasterization; 72 bool m_isSuitableForGpuRasterization;
71 73
72 friend class PaintControllerTest; 74 friend class PaintControllerTest;
73 }; 75 };
74 76
75 } // namespace blink 77 } // namespace blink
76 78
77 #endif // PaintArtifact_h 79 #endif // PaintArtifact_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698