OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrResourceProvider_DEFINED | 8 #ifndef GrResourceProvider_DEFINED |
9 #define GrResourceProvider_DEFINED | 9 #define GrResourceProvider_DEFINED |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 return buffer; | 64 return buffer; |
65 } | 65 } |
66 return this->createQuadIndexBuffer(); | 66 return this->createQuadIndexBuffer(); |
67 } | 67 } |
68 | 68 |
69 | 69 |
70 using GrTextureProvider::assignUniqueKeyToResource; | 70 using GrTextureProvider::assignUniqueKeyToResource; |
71 using GrTextureProvider::findAndRefResourceByUniqueKey; | 71 using GrTextureProvider::findAndRefResourceByUniqueKey; |
72 using GrTextureProvider::abandon; | 72 using GrTextureProvider::abandon; |
73 | 73 |
74 GrIndexBuffer* refScratchIndexBuffer(size_t size, bool dynamic, | |
bsalomon
2015/05/13 14:41:36
Do we need a scratch match param at all? When woul
robertphillips
2015/05/13 14:44:55
Well - the static, instanced geometry index buffer
| |
75 ScratchMatch match, bool calledDuringFl ush); | |
76 GrVertexBuffer* refScratchVertBuffer(size_t size, bool dynamic, | |
77 ScratchMatch match, bool calledDuringFl ush); | |
78 | |
79 protected: | |
80 GrIndexBuffer* internalRefIndexBuffer(size_t size, bool dynamic, uint32_t fl ags); | |
81 GrVertexBuffer* internalRefVertexBuffer(size_t size, bool dynamic, uint32_t flags); | |
82 | |
74 private: | 83 private: |
75 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, | 84 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, |
76 int patternSize, | 85 int patternSize, |
77 int reps, | 86 int reps, |
78 int vertCount, | 87 int vertCount, |
79 const GrUniqueKey& key); | 88 const GrUniqueKey& key); |
80 | 89 |
81 const GrIndexBuffer* createQuadIndexBuffer(); | 90 const GrIndexBuffer* createQuadIndexBuffer(); |
82 | 91 |
83 GrUniqueKey fQuadIndexBufferKey; | 92 GrUniqueKey fQuadIndexBufferKey; |
84 | 93 |
85 typedef GrTextureProvider INHERITED; | 94 typedef GrTextureProvider INHERITED; |
86 }; | 95 }; |
87 | 96 |
88 #endif | 97 #endif |
OLD | NEW |