| 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 | |
| 52 private: | 49 private: |
| 53 enum { | 50 enum { |
| 54 kGeoPoolStatePreAllocCnt = 4, | 51 kGeoPoolStatePreAllocCnt = 4, |
| 55 }; | 52 }; |
| 56 | 53 |
| 57 struct GeometryPoolState { | 54 struct GeometryPoolState { |
| 58 const GrVertexBuffer* fPoolVertexBuffer; | 55 const GrVertexBuffer* fPoolVertexBuffer; |
| 59 int fPoolStartVertex; | 56 int fPoolStartVertex; |
| 60 const GrIndexBuffer* fPoolIndexBuffer; | 57 const GrIndexBuffer* fPoolIndexBuffer; |
| 61 int fPoolStartIndex; | 58 int fPoolStartIndex; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 91 GeoPoolStateStack fGeoPoolStateStack; | 88 GeoPoolStateStack fGeoPoolStateStack; |
| 92 SkAutoTUnref<GrGpu> fGpu; | 89 SkAutoTUnref<GrGpu> fGpu; |
| 93 GrVertexBufferAllocPool* fVertexPool; | 90 GrVertexBufferAllocPool* fVertexPool; |
| 94 GrIndexBufferAllocPool* fIndexPool; | 91 GrIndexBufferAllocPool* fIndexPool; |
| 95 bool fFlushing; | 92 bool fFlushing; |
| 96 | 93 |
| 97 typedef GrClipTarget INHERITED; | 94 typedef GrClipTarget INHERITED; |
| 98 }; | 95 }; |
| 99 | 96 |
| 100 #endif | 97 #endif |
| OLD | NEW |