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* getIndexBuffer(size_t size, bool dynamic, bool calledDuringFl
ush); | |
75 GrVertexBuffer* getVertexBuffer(size_t size, bool dynamic, bool calledDuring
Flush); | |
76 | |
77 private: | 74 private: |
78 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, | 75 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, |
79 int patternSize, | 76 int patternSize, |
80 int reps, | 77 int reps, |
81 int vertCount, | 78 int vertCount, |
82 const GrUniqueKey& key); | 79 const GrUniqueKey& key); |
83 | 80 |
84 const GrIndexBuffer* createQuadIndexBuffer(); | 81 const GrIndexBuffer* createQuadIndexBuffer(); |
85 | 82 |
86 GrUniqueKey fQuadIndexBufferKey; | 83 GrUniqueKey fQuadIndexBufferKey; |
87 | 84 |
88 typedef GrTextureProvider INHERITED; | 85 typedef GrTextureProvider INHERITED; |
89 }; | 86 }; |
90 | 87 |
91 #endif | 88 #endif |
OLD | NEW |