| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 /** | 158 /** |
| 159 * Wraps an existing texture with a GrRenderTarget object. This is useful w
hen the provided | 159 * Wraps an existing texture with a GrRenderTarget object. This is useful w
hen the provided |
| 160 * texture has a format that cannot be textured from by Skia, but we want t
o raster to it. | 160 * texture has a format that cannot be textured from by Skia, but we want t
o raster to it. |
| 161 * | 161 * |
| 162 * The texture is wrapped as borrowed. The texture object will not be freed
once the | 162 * The texture is wrapped as borrowed. The texture object will not be freed
once the |
| 163 * render target is destroyed. | 163 * render target is destroyed. |
| 164 * | 164 * |
| 165 * @return GrRenderTarget object or NULL on failure. | 165 * @return GrRenderTarget object or NULL on failure. |
| 166 */ | 166 */ |
| 167 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc
& desc); | 167 sk_sp<GrRenderTarget> wrapBackendTextureAsRenderTarget(const GrBackendTextu
reDesc& desc); |
| 168 | 168 |
| 169 private: | 169 private: |
| 170 const GrBuffer* createInstancedIndexBuffer(const uint16_t* pattern, | 170 const GrBuffer* createInstancedIndexBuffer(const uint16_t* pattern, |
| 171 int patternSize, | 171 int patternSize, |
| 172 int reps, | 172 int reps, |
| 173 int vertCount, | 173 int vertCount, |
| 174 const GrUniqueKey& key); | 174 const GrUniqueKey& key); |
| 175 | 175 |
| 176 const GrBuffer* createQuadIndexBuffer(); | 176 const GrBuffer* createQuadIndexBuffer(); |
| 177 | 177 |
| 178 GrUniqueKey fQuadIndexBufferKey; | 178 GrUniqueKey fQuadIndexBufferKey; |
| 179 | 179 |
| 180 typedef GrTextureProvider INHERITED; | 180 typedef GrTextureProvider INHERITED; |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 #endif | 183 #endif |
| OLD | NEW |