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 |
11 #include "GrDrawTarget.h" | 11 #include "GrDrawTarget.h" |
12 #include "GrCommandBuilder.h" | 12 #include "GrCommandBuilder.h" |
13 #include "SkChunkAlloc.h" | 13 #include "SkChunkAlloc.h" |
14 | 14 |
15 /** | 15 /** |
robertphillips
2015/07/28 16:12:52
Fix refs in comments too.
| |
16 * GrInOrderDrawBuffer is an implementation of GrDrawTarget that queues up draws for eventual | 16 * GrInOrderDrawBuffer is an implementation of GrDrawTarget that queues up draws for eventual |
17 * playback into a GrGpu. In theory one draw buffer could playback into another. When index or | 17 * playback into a GrGpu. In theory one draw buffer could playback into another. When index or |
18 * vertex buffers are used as geometry sources it is the callers the draw buffer only holds | 18 * vertex buffers are used as geometry sources it is the callers the draw buffer only holds |
19 * references to the buffers. It is the callers responsibility to ensure that th e data is still | 19 * references to the buffers. It is the callers responsibility to ensure that th e data is still |
20 * valid when the draw buffer is played back into a GrGpu. Similarly, it is the caller's | 20 * valid when the draw buffer is played back into a GrGpu. Similarly, it is the caller's |
21 * responsibility to ensure that all referenced textures, buffers, and render-ta rgets are associated | 21 * responsibility to ensure that all referenced textures, buffers, and render-ta rgets are associated |
22 * in the GrGpu object that the buffer is played back into. The buffer requires VB and IB pools to | 22 * in the GrGpu object that the buffer is played back into. The buffer requires VB and IB pools to |
23 * store geometry. | 23 * store geometry. |
24 */ | 24 */ |
25 class GrInOrderDrawBuffer : public GrClipTarget { | 25 class GrBufferedDrawTarget : public GrClipTarget { |
26 public: | 26 public: |
27 | 27 |
28 /** | 28 /** |
29 * Creates a GrInOrderDrawBuffer | 29 * Creates a GrInOrderDrawBuffer |
30 * | 30 * |
31 * @param context the context object that owns this draw buffer. | 31 * @param context the context object that owns this draw buffer. |
32 */ | 32 */ |
33 GrInOrderDrawBuffer(GrContext* context); | 33 GrBufferedDrawTarget(GrContext* context); |
34 | 34 |
35 ~GrInOrderDrawBuffer() override; | 35 ~GrBufferedDrawTarget() override; |
36 | 36 |
37 void clearStencilClip(const SkIRect& rect, | 37 void clearStencilClip(const SkIRect& rect, |
38 bool insideClip, | 38 bool insideClip, |
39 GrRenderTarget* renderTarget) override; | 39 GrRenderTarget* renderTarget) override; |
40 | 40 |
41 void discard(GrRenderTarget*) override; | 41 void discard(GrRenderTarget*) override; |
42 | 42 |
43 protected: | 43 protected: |
44 void appendIndicesAndTransforms(const void* indexValues, PathIndexType index Type, | 44 void appendIndicesAndTransforms(const void* indexValues, PathIndexType index Type, |
45 const float* transformValues, PathTransformT ype transformType, | 45 const float* transformValues, PathTransformT ype transformType, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 SkChunkAlloc fPathIndexBuffer; | 138 SkChunkAlloc fPathIndexBuffer; |
139 SkChunkAlloc fPathTransformBuffer; | 139 SkChunkAlloc fPathTransformBuffer; |
140 SkChunkAlloc fPipelineBuffer; | 140 SkChunkAlloc fPipelineBuffer; |
141 uint32_t fDrawID; | 141 uint32_t fDrawID; |
142 SkAutoTUnref<State> fPrevState; | 142 SkAutoTUnref<State> fPrevState; |
143 | 143 |
144 typedef GrClipTarget INHERITED; | 144 typedef GrClipTarget INHERITED; |
145 }; | 145 }; |
146 | 146 |
147 #endif | 147 #endif |
OLD | NEW |