| 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 |
| 11 #include "GrBatchAtlas.h" | 11 #include "GrBatchAtlas.h" |
| 12 #include "GrIndexBuffer.h" | 12 #include "GrIndexBuffer.h" |
| 13 #include "GrTextureProvider.h" | 13 #include "GrTextureProvider.h" |
| 14 #include "GrPathRange.h" | 14 #include "GrPathRange.h" |
| 15 | 15 |
| 16 class GrBatchAtlas; | 16 class GrBatchAtlas; |
| 17 class GrIndexBuffer; | 17 class GrIndexBuffer; |
| 18 class GrPath; | 18 class GrPath; |
| 19 class GrRenderTarget; |
| 20 class GrStencilAttachment; |
| 19 class GrStrokeInfo; | 21 class GrStrokeInfo; |
| 20 class GrVertexBuffer; | 22 class GrVertexBuffer; |
| 21 class SkDescriptor; | 23 class SkDescriptor; |
| 22 class SkPath; | 24 class SkPath; |
| 23 class SkTypeface; | 25 class SkTypeface; |
| 24 | 26 |
| 25 /** | 27 /** |
| 26 * An extension of the texture provider for arbitrary resource types. This class
is intended for | 28 * An extension of the texture provider for arbitrary resource types. This class
is intended for |
| 27 * use within the Gr code base, not by clients or extensions (e.g. third party G
rProcessor | 29 * use within the Gr code base, not by clients or extensions (e.g. third party G
rProcessor |
| 28 * derivatives). | 30 * derivatives). |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 * @param func An eviction function which will be called whene
ver the atlas has to | 129 * @param func An eviction function which will be called whene
ver the atlas has to |
| 128 * evict data | 130 * evict data |
| 129 * @param data User supplied data which will be passed into fu
nc whenver an | 131 * @param data User supplied data which will be passed into fu
nc whenver an |
| 130 * eviction occurs | 132 * eviction occurs |
| 131 * | 133 * |
| 132 * @return An initialized GrBatchAtlas, or nullptr if crea
tion fails | 134 * @return An initialized GrBatchAtlas, or nullptr if crea
tion fails |
| 133 */ | 135 */ |
| 134 GrBatchAtlas* createAtlas(GrPixelConfig, int width, int height, int numPlots
X, int numPlotsY, | 136 GrBatchAtlas* createAtlas(GrPixelConfig, int width, int height, int numPlots
X, int numPlotsY, |
| 135 GrBatchAtlas::EvictionFunc func, void* data); | 137 GrBatchAtlas::EvictionFunc func, void* data); |
| 136 | 138 |
| 139 /** |
| 140 * If passed in render target already has a stencil buffer, return it. Other
wise attempt to |
| 141 * attach one. |
| 142 */ |
| 143 GrStencilAttachment* attachStencilAttachment(GrRenderTarget* rt); |
| 144 |
| 137 private: | 145 private: |
| 138 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, | 146 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, |
| 139 int patternSize, | 147 int patternSize, |
| 140 int reps, | 148 int reps, |
| 141 int vertCount, | 149 int vertCount, |
| 142 const GrUniqueKey& key); | 150 const GrUniqueKey& key); |
| 143 | 151 |
| 144 const GrIndexBuffer* createQuadIndexBuffer(); | 152 const GrIndexBuffer* createQuadIndexBuffer(); |
| 145 | 153 |
| 146 GrUniqueKey fQuadIndexBufferKey; | 154 GrUniqueKey fQuadIndexBufferKey; |
| 147 | 155 |
| 148 typedef GrTextureProvider INHERITED; | 156 typedef GrTextureProvider INHERITED; |
| 149 }; | 157 }; |
| 150 | 158 |
| 151 #endif | 159 #endif |
| OLD | NEW |