OLD | NEW |
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 const GrGeometryProcesso
r*, | 249 const GrGeometryProcesso
r*, |
250 const GrPathProcessor*, | 250 const GrPathProcessor*, |
251 GrGpu::DrawType, | 251 GrGpu::DrawType, |
252 const GrScissorState&, | 252 const GrScissorState&, |
253 const GrDeviceCoordTextu
re*); | 253 const GrDeviceCoordTextu
re*); |
254 // We lazily record clip changes in order to skip clips that have no effect. | 254 // We lazily record clip changes in order to skip clips that have no effect. |
255 void recordClipIfNecessary(); | 255 void recordClipIfNecessary(); |
256 // Records any trace markers for a command after adding it to the buffer. | 256 // Records any trace markers for a command after adding it to the buffer. |
257 void recordTraceMarkersIfNecessary(); | 257 void recordTraceMarkersIfNecessary(); |
258 | 258 |
259 virtual bool isIssued(uint32_t drawID) SK_OVERRIDE { return drawID != fDrawI
D; } | 259 bool isIssued(uint32_t drawID) SK_OVERRIDE { return drawID != fDrawID; } |
260 | 260 |
261 // TODO: Use a single allocator for commands and records | 261 // TODO: Use a single allocator for commands and records |
262 enum { | 262 enum { |
263 kCmdBufferInitialSizeInBytes = 8 * 1024, | 263 kCmdBufferInitialSizeInBytes = 8 * 1024, |
264 kPathIdxBufferMinReserve = 2 * 64, // 64 uint16_t's | 264 kPathIdxBufferMinReserve = 2 * 64, // 64 uint16_t's |
265 kPathXformBufferMinReserve = 2 * 64, // 64 two-float transforms | 265 kPathXformBufferMinReserve = 2 * 64, // 64 two-float transforms |
266 }; | 266 }; |
267 | 267 |
268 CmdBuffer fCmdBuffer; | 268 CmdBuffer fCmdBuffer; |
269 GrOptDrawState* fPrevState; | 269 GrOptDrawState* fPrevState; |
270 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; | 270 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; |
271 SkTDArray<char> fPathIndexBuffer; | 271 SkTDArray<char> fPathIndexBuffer; |
272 SkTDArray<float> fPathTransformBuffer; | 272 SkTDArray<float> fPathTransformBuffer; |
273 uint32_t fDrawID; | 273 uint32_t fDrawID; |
274 | 274 |
275 typedef GrFlushToGpuDrawTarget INHERITED; | 275 typedef GrFlushToGpuDrawTarget INHERITED; |
276 }; | 276 }; |
277 | 277 |
278 #endif | 278 #endif |
OLD | NEW |