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

Side by Side Diff: src/gpu/GrBufferAllocPool.h

Issue 339433009: Add trace event when GrBufferAllocPool unmaps a buffer indicating what % of the buffer was unwritte… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | src/gpu/GrBufferAllocPool.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrBufferAllocPool_DEFINED 8 #ifndef GrBufferAllocPool_DEFINED
9 #define GrBufferAllocPool_DEFINED 9 #define GrBufferAllocPool_DEFINED
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 friend class GrGpu; 148 friend class GrGpu;
149 void releaseGpuRef(); 149 void releaseGpuRef();
150 150
151 struct BufferBlock { 151 struct BufferBlock {
152 size_t fBytesFree; 152 size_t fBytesFree;
153 GrGeometryBuffer* fBuffer; 153 GrGeometryBuffer* fBuffer;
154 }; 154 };
155 155
156 bool createBlock(size_t requestSize); 156 bool createBlock(size_t requestSize);
157 void destroyBlock(); 157 void destroyBlock();
158 void flushCpuData(GrGeometryBuffer* buffer, size_t flushSize); 158 void flushCpuData(const BufferBlock& block, size_t flushSize);
159 #ifdef SK_DEBUG 159 #ifdef SK_DEBUG
160 void validate(bool unusedBlockAllowed = false) const; 160 void validate(bool unusedBlockAllowed = false) const;
161 #endif 161 #endif
162 162
163 size_t fBytesInUse; 163 size_t fBytesInUse;
164 164
165 GrGpu* fGpu; 165 GrGpu* fGpu;
166 bool fGpuIsReffed; 166 bool fGpuIsReffed;
167 bool fFrequentResetHint; 167 bool fFrequentResetHint;
168 SkTDArray<GrGeometryBuffer*> fPreallocBuffers; 168 SkTDArray<GrGeometryBuffer*> fPreallocBuffers;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 * @return number of indices that fit in one of the preallocated index 338 * @return number of indices that fit in one of the preallocated index
339 * buffers. 339 * buffers.
340 */ 340 */
341 int preallocatedBufferIndices() const; 341 int preallocatedBufferIndices() const;
342 342
343 private: 343 private:
344 typedef GrBufferAllocPool INHERITED; 344 typedef GrBufferAllocPool INHERITED;
345 }; 345 };
346 346
347 #endif 347 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrBufferAllocPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698