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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 enum BufferUsage { | 106 enum BufferUsage { |
107 /** Caller intends to specify the buffer data rarely with respect to the
number of draws | 107 /** Caller intends to specify the buffer data rarely with respect to the
number of draws |
108 that read the data. */ | 108 that read the data. */ |
109 kStatic_BufferUsage, | 109 kStatic_BufferUsage, |
110 /** Caller intends to respecify the buffer data frequently between draws
. */ | 110 /** Caller intends to respecify the buffer data frequently between draws
. */ |
111 kDynamic_BufferUsage, | 111 kDynamic_BufferUsage, |
112 }; | 112 }; |
113 GrIndexBuffer* createIndexBuffer(size_t size, BufferUsage, uint32_t flags); | 113 GrIndexBuffer* createIndexBuffer(size_t size, BufferUsage, uint32_t flags); |
114 GrVertexBuffer* createVertexBuffer(size_t size, BufferUsage, uint32_t flags)
; | 114 GrVertexBuffer* createVertexBuffer(size_t size, BufferUsage, uint32_t flags)
; |
| 115 GrTransferBuffer* createTransferBuffer(size_t size, TransferType, uint32_t f
lags); |
115 | 116 |
116 GrTexture* createApproxTexture(const GrSurfaceDesc& desc, uint32_t flags) { | 117 GrTexture* createApproxTexture(const GrSurfaceDesc& desc, uint32_t flags) { |
117 SkASSERT(0 == flags || kNoPendingIO_Flag == flags); | 118 SkASSERT(0 == flags || kNoPendingIO_Flag == flags); |
118 return this->internalCreateApproxTexture(desc, flags); | 119 return this->internalCreateApproxTexture(desc, flags); |
119 } | 120 } |
120 | 121 |
121 /** Returns a GrBatchAtlas. This function can be called anywhere, but the r
eturned atlas should | 122 /** Returns a GrBatchAtlas. This function can be called anywhere, but the r
eturned atlas should |
122 * only be used inside of GrBatch::generateGeometry | 123 * only be used inside of GrBatch::generateGeometry |
123 * @param GrPixelConfig The pixel config which this atlas will store | 124 * @param GrPixelConfig The pixel config which this atlas will store |
124 * @param width width in pixels of the atlas | 125 * @param width width in pixels of the atlas |
(...skipping 28 matching lines...) Expand all Loading... |
153 const GrUniqueKey& key); | 154 const GrUniqueKey& key); |
154 | 155 |
155 const GrIndexBuffer* createQuadIndexBuffer(); | 156 const GrIndexBuffer* createQuadIndexBuffer(); |
156 | 157 |
157 GrUniqueKey fQuadIndexBufferKey; | 158 GrUniqueKey fQuadIndexBufferKey; |
158 | 159 |
159 typedef GrTextureProvider INHERITED; | 160 typedef GrTextureProvider INHERITED; |
160 }; | 161 }; |
161 | 162 |
162 #endif | 163 #endif |
OLD | NEW |