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

Side by Side Diff: src/image/SkSurface.cpp

Issue 1210303003: add getTextureHandle to SkSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak dox Created 5 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 | « include/core/SkSurface.h ('k') | src/image/SkSurface_Base.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 2012 Google Inc. 2 * Copyright 2012 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 #include "SkSurface_Base.h" 8 #include "SkSurface_Base.h"
9 #include "SkImagePriv.h" 9 #include "SkImagePriv.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 const void* SkSurface::peekPixels(SkImageInfo* info, size_t* rowBytes) { 169 const void* SkSurface::peekPixels(SkImageInfo* info, size_t* rowBytes) {
170 return this->getCanvas()->peekPixels(info, rowBytes); 170 return this->getCanvas()->peekPixels(info, rowBytes);
171 } 171 }
172 172
173 bool SkSurface::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t d stRowBytes, 173 bool SkSurface::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t d stRowBytes,
174 int srcX, int srcY) { 174 int srcX, int srcY) {
175 return this->getCanvas()->readPixels(dstInfo, dstPixels, dstRowBytes, srcX, srcY); 175 return this->getCanvas()->readPixels(dstInfo, dstPixels, dstRowBytes, srcX, srcY);
176 } 176 }
177 177
178 GrBackendObject SkSurface::getTextureHandle(TextureHandleAccess access) {
179 return asSB(this)->onGetTextureHandle(access);
180 }
181
178 //////////////////////////////////////////////////////////////////////////////// ////// 182 //////////////////////////////////////////////////////////////////////////////// //////
179 183
180 #if !SK_SUPPORT_GPU 184 #if !SK_SUPPORT_GPU
181 185
182 SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget*, const SkSurfaceProp s*) { 186 SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget*, const SkSurfaceProp s*) {
183 return NULL; 187 return NULL;
184 } 188 }
185 189
186 SkSurface* SkSurface::NewRenderTarget(GrContext*, Budgeted, const SkImageInfo&, int, 190 SkSurface* SkSurface::NewRenderTarget(GrContext*, Budgeted, const SkImageInfo&, int,
187 const SkSurfaceProps*) { 191 const SkSurfaceProps*) {
188 return NULL; 192 return NULL;
189 } 193 }
190 194
191 SkSurface* SkSurface::NewWrappedRenderTarget(GrContext*, GrBackendTextureDesc, 195 SkSurface* SkSurface::NewWrappedRenderTarget(GrContext*, GrBackendTextureDesc,
192 const SkSurfaceProps*) { 196 const SkSurfaceProps*) {
193 return NULL; 197 return NULL;
194 } 198 }
195 199
196 #endif 200 #endif
OLDNEW
« no previous file with comments | « include/core/SkSurface.h ('k') | src/image/SkSurface_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698