Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: src/gpu/GrResourceProvider.h

Issue 1534123003: More framework support for TransferBuffers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address more comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrResourceProvider.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrResourceProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698