| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |