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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 * attach one. | 133 * attach one. |
134 */ | 134 */ |
135 GrStencilAttachment* attachStencilAttachment(GrRenderTarget* rt); | 135 GrStencilAttachment* attachStencilAttachment(GrRenderTarget* rt); |
136 | 136 |
137 const GrCaps* caps() { return this->gpu()->caps(); } | 137 const GrCaps* caps() { return this->gpu()->caps(); } |
138 | 138 |
139 /** | 139 /** |
140 * Wraps an existing texture with a GrRenderTarget object. This is useful w
hen the provided | 140 * Wraps an existing texture with a GrRenderTarget object. This is useful w
hen the provided |
141 * texture has a format that cannot be textured from by Skia, but we want t
o raster to it. | 141 * texture has a format that cannot be textured from by Skia, but we want t
o raster to it. |
142 * | 142 * |
| 143 * The texture is wrapped as borrowed. The texture object will not be freed
once the |
| 144 * render target is destroyed. |
| 145 * |
143 * @return GrRenderTarget object or NULL on failure. | 146 * @return GrRenderTarget object or NULL on failure. |
144 */ | 147 */ |
145 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc
& desc, | 148 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc
& desc); |
146 GrWrapOwnership = kBorrow_
GrWrapOwnership); | |
147 | 149 |
148 private: | 150 private: |
149 const GrBuffer* createInstancedIndexBuffer(const uint16_t* pattern, | 151 const GrBuffer* createInstancedIndexBuffer(const uint16_t* pattern, |
150 int patternSize, | 152 int patternSize, |
151 int reps, | 153 int reps, |
152 int vertCount, | 154 int vertCount, |
153 const GrUniqueKey& key); | 155 const GrUniqueKey& key); |
154 | 156 |
155 const GrBuffer* createQuadIndexBuffer(); | 157 const GrBuffer* createQuadIndexBuffer(); |
156 | 158 |
157 GrUniqueKey fQuadIndexBufferKey; | 159 GrUniqueKey fQuadIndexBufferKey; |
158 | 160 |
159 typedef GrTextureProvider INHERITED; | 161 typedef GrTextureProvider INHERITED; |
160 }; | 162 }; |
161 | 163 |
162 #endif | 164 #endif |
OLD | NEW |