OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrFlushToGpuDrawTarget_DEFINED | 8 #ifndef GrFlushToGpuDrawTarget_DEFINED |
9 #define GrFlushToGpuDrawTarget_DEFINED | 9 #define GrFlushToGpuDrawTarget_DEFINED |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 * before flushing and popped afterwards. | 39 * before flushing and popped afterwards. |
40 */ | 40 */ |
41 void flush(); | 41 void flush(); |
42 | 42 |
43 bool geometryHints(size_t vertexStride, int* vertexCount, int* indexCount) c
onst SK_OVERRIDE; | 43 bool geometryHints(size_t vertexStride, int* vertexCount, int* indexCount) c
onst SK_OVERRIDE; |
44 | 44 |
45 protected: | 45 protected: |
46 GrGpu* getGpu() { return fGpu; } | 46 GrGpu* getGpu() { return fGpu; } |
47 const GrGpu* getGpu() const{ return fGpu; } | 47 const GrGpu* getGpu() const{ return fGpu; } |
48 | 48 |
| 49 GrVertexBufferAllocPool* getVertexAllocPool() { return fVertexPool; } |
| 50 GrIndexBufferAllocPool* getIndexAllocPool() { return fIndexPool; } |
| 51 |
49 private: | 52 private: |
50 enum { | 53 enum { |
51 kGeoPoolStatePreAllocCnt = 4, | 54 kGeoPoolStatePreAllocCnt = 4, |
52 }; | 55 }; |
53 | 56 |
54 struct GeometryPoolState { | 57 struct GeometryPoolState { |
55 const GrVertexBuffer* fPoolVertexBuffer; | 58 const GrVertexBuffer* fPoolVertexBuffer; |
56 int fPoolStartVertex; | 59 int fPoolStartVertex; |
57 const GrIndexBuffer* fPoolIndexBuffer; | 60 const GrIndexBuffer* fPoolIndexBuffer; |
58 int fPoolStartIndex; | 61 int fPoolStartIndex; |
(...skipping 29 matching lines...) Expand all Loading... |
88 GeoPoolStateStack fGeoPoolStateStack; | 91 GeoPoolStateStack fGeoPoolStateStack; |
89 SkAutoTUnref<GrGpu> fGpu; | 92 SkAutoTUnref<GrGpu> fGpu; |
90 GrVertexBufferAllocPool* fVertexPool; | 93 GrVertexBufferAllocPool* fVertexPool; |
91 GrIndexBufferAllocPool* fIndexPool; | 94 GrIndexBufferAllocPool* fIndexPool; |
92 bool fFlushing; | 95 bool fFlushing; |
93 | 96 |
94 typedef GrClipTarget INHERITED; | 97 typedef GrClipTarget INHERITED; |
95 }; | 98 }; |
96 | 99 |
97 #endif | 100 #endif |
OLD | NEW |