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

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

Issue 1709163003: Add wrapBackendTextureAsRenderTarget API (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix test Created 4 years, 9 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 GrBatchAtlas::EvictionFunc func, void* data); 140 GrBatchAtlas::EvictionFunc func, void* data);
141 141
142 /** 142 /**
143 * If passed in render target already has a stencil buffer, return it. Other wise attempt to 143 * If passed in render target already has a stencil buffer, return it. Other wise attempt to
144 * attach one. 144 * attach one.
145 */ 145 */
146 GrStencilAttachment* attachStencilAttachment(GrRenderTarget* rt); 146 GrStencilAttachment* attachStencilAttachment(GrRenderTarget* rt);
147 147
148 const GrCaps* caps() { return this->gpu()->caps(); } 148 const GrCaps* caps() { return this->gpu()->caps(); }
149 149
150 /**
151 * Wraps an existing texture with a GrRenderTarget object. This is useful w hen the provided
152 * texture has a format that cannot be textured from by Skia, but we want t o raster to it.
153 *
154 * @return GrRenderTarget object or NULL on failure.
155 */
156 GrRenderTarget* wrapBackendTextureAsRenderTarget(const GrBackendTextureDesc & desc,
157 GrWrapOwnership = kBorrow_ GrWrapOwnership);
158
150 private: 159 private:
151 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, 160 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern,
152 int patternSize, 161 int patternSize,
153 int reps, 162 int reps,
154 int vertCount, 163 int vertCount,
155 const GrUniqueKey& key); 164 const GrUniqueKey& key);
156 165
157 const GrIndexBuffer* createQuadIndexBuffer(); 166 const GrIndexBuffer* createQuadIndexBuffer();
158 167
159 GrUniqueKey fQuadIndexBufferKey; 168 GrUniqueKey fQuadIndexBufferKey;
160 169
161 typedef GrTextureProvider INHERITED; 170 typedef GrTextureProvider INHERITED;
162 }; 171 };
163 172
164 #endif 173 #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