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

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

Issue 684203003: Update GrTRecorder to preserve memory allocations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/GrTRecorder.h » ('j') | src/gpu/GrTRecorder.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 GrInOrderDrawBuffer_DEFINED 8 #ifndef GrInOrderDrawBuffer_DEFINED
9 #define GrInOrderDrawBuffer_DEFINED 9 #define GrInOrderDrawBuffer_DEFINED
10 10
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 void recordStateIfNecessary(); 294 void recordStateIfNecessary();
295 // We lazily record clip changes in order to skip clips that have no effect. 295 // We lazily record clip changes in order to skip clips that have no effect.
296 void recordClipIfNecessary(); 296 void recordClipIfNecessary();
297 // Records any trace markers for a command after adding it to the buffer. 297 // Records any trace markers for a command after adding it to the buffer.
298 void recordTraceMarkersIfNecessary(); 298 void recordTraceMarkersIfNecessary();
299 299
300 virtual bool isIssued(uint32_t drawID) { return drawID != fDrawID; } 300 virtual bool isIssued(uint32_t drawID) { return drawID != fDrawID; }
301 301
302 // TODO: Use a single allocator for commands and records 302 // TODO: Use a single allocator for commands and records
303 enum { 303 enum {
304 kCmdBufferInitialSizeInBytes = 64 * 1024, 304 kCmdBufferInitialSizeInBytes = 8 * 1024,
Chris Dalton 2014/11/07 19:38:47 This was arbitrary. The idea is that, since GrTRec
bsalomon 2014/11/07 20:06:42 makes sense to me
305 kGeoPoolStatePreAllocCnt = 4, 305 kGeoPoolStatePreAllocCnt = 4,
306 }; 306 };
307 307
308 CmdBuffer fCmdBuffer; 308 CmdBuffer fCmdBuffer;
309 GrDrawState* fLastState; 309 GrDrawState* fLastState;
310 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; 310 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers;
311 GrGpu* fDstGpu; 311 GrGpu* fDstGpu;
312 GrVertexBufferAllocPool& fVertexPool; 312 GrVertexBufferAllocPool& fVertexPool;
313 GrIndexBufferAllocPool& fIndexPool; 313 GrIndexBufferAllocPool& fIndexPool;
314 314
(...skipping 12 matching lines...) Expand all
327 typedef SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> GeoPoolStateS tack; 327 typedef SkSTArray<kGeoPoolStatePreAllocCnt, GeometryPoolState> GeoPoolStateS tack;
328 328
329 GeoPoolStateStack fGeoPoolStateStack; 329 GeoPoolStateStack fGeoPoolStateStack;
330 bool fFlushing; 330 bool fFlushing;
331 uint32_t fDrawID; 331 uint32_t fDrawID;
332 332
333 typedef GrClipTarget INHERITED; 333 typedef GrClipTarget INHERITED;
334 }; 334 };
335 335
336 #endif 336 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrTRecorder.h » ('j') | src/gpu/GrTRecorder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698