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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 GrBatchAtlas::EvictionFunc func, void* data); | 140 GrBatchAtlas::EvictionFunc func, void* data); |
141 | 141 |
142 /** | 142 /** |
143 * If passed in render target already has a stencil buffer, return it. Other
wise attempt to | 143 * If passed in render target already has a stencil buffer, return it. Other
wise attempt to |
144 * attach one. | 144 * attach one. |
145 */ | 145 */ |
146 GrStencilAttachment* attachStencilAttachment(GrRenderTarget* rt); | 146 GrStencilAttachment* attachStencilAttachment(GrRenderTarget* rt); |
147 | 147 |
148 const GrCaps* caps() { return this->gpu()->caps(); } | 148 const GrCaps* caps() { return this->gpu()->caps(); } |
149 | 149 |
| 150 /** |
| 151 * Wraps an existing texture with a GrRenderTarget object. This is useful w
hen the provided |
| 152 * texture has a format that cannot be textured from by Skia, but we want t
o raster to it. |
| 153 * |
| 154 * @return GrRenderTarget object or NULL on failure. |
| 155 */ |
| 156 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc
& desc, |
| 157 GrWrapOwnership = kBorrow_
GrWrapOwnership); |
| 158 |
150 private: | 159 private: |
151 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, | 160 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, |
152 int patternSize, | 161 int patternSize, |
153 int reps, | 162 int reps, |
154 int vertCount, | 163 int vertCount, |
155 const GrUniqueKey& key); | 164 const GrUniqueKey& key); |
156 | 165 |
157 const GrIndexBuffer* createQuadIndexBuffer(); | 166 const GrIndexBuffer* createQuadIndexBuffer(); |
158 | 167 |
159 GrUniqueKey fQuadIndexBufferKey; | 168 GrUniqueKey fQuadIndexBufferKey; |
160 | 169 |
161 typedef GrTextureProvider INHERITED; | 170 typedef GrTextureProvider INHERITED; |
162 }; | 171 }; |
163 | 172 |
164 #endif | 173 #endif |
OLD | NEW |