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

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

Issue 2143333002: Add resource provider flag to avoid client-side buffers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add resource provider flag to avoid client-side buffers Created 4 years, 5 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/GrCaps.cpp ('k') | src/gpu/GrResourceProvider.h » ('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 2011 Google Inc. 2 * Copyright 2011 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 GrGpu_DEFINED 8 #ifndef GrGpu_DEFINED
9 #define GrGpu_DEFINED 9 #define GrGpu_DEFINED
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 * Implements GrTextureProvider::wrapBackendRenderTarget 130 * Implements GrTextureProvider::wrapBackendRenderTarget
131 */ 131 */
132 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc&, Gr WrapOwnership); 132 GrRenderTarget* wrapBackendRenderTarget(const GrBackendRenderTargetDesc&, Gr WrapOwnership);
133 133
134 /** 134 /**
135 * Implements GrTextureProvider::wrapBackendTextureAsRenderTarget 135 * Implements GrTextureProvider::wrapBackendTextureAsRenderTarget
136 */ 136 */
137 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc& ); 137 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc& );
138 138
139 /** 139 /**
140 * Creates a buffer. 140 * Creates a buffer in GPU memory. For a client-side buffer use GrBuffer::Cr eateCPUBacked.
141 * 141 *
142 * @param size size of buffer to create. 142 * @param size size of buffer to create.
143 * @param intendedType hint to the graphics subsystem about what the buff er will be used for. 143 * @param intendedType hint to the graphics subsystem about what the buff er will be used for.
144 * @param accessPattern hint to the graphics subsystem about how the data will be accessed. 144 * @param accessPattern hint to the graphics subsystem about how the data will be accessed.
145 * @param data optional data with which to initialize the buffer. 145 * @param data optional data with which to initialize the buffer.
146 * 146 *
147 * @return the buffer if successful, otherwise nullptr. 147 * @return the buffer if successful, otherwise nullptr.
148 */ 148 */
149 GrBuffer* createBuffer(size_t size, GrBufferType intendedType, GrAccessPatte rn accessPattern, 149 GrBuffer* createBuffer(size_t size, GrBufferType intendedType, GrAccessPatte rn accessPattern,
150 const void* data = nullptr); 150 const void* data = nullptr);
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 SkSTArray<1, MultisampleSpecs, true> fMultisampleSpecs; 598 SkSTArray<1, MultisampleSpecs, true> fMultisampleSpecs;
599 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. 599 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
600 GrContext* fContext; 600 GrContext* fContext;
601 601
602 friend class GrPathRendering; 602 friend class GrPathRendering;
603 friend class gr_instanced::InstancedRendering; 603 friend class gr_instanced::InstancedRendering;
604 typedef SkRefCnt INHERITED; 604 typedef SkRefCnt INHERITED;
605 }; 605 };
606 606
607 #endif 607 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/GrResourceProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698