| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 sk_sp<SkImage> SkSurface::makeImageSnapshot(SkBudgeted budgeted) { | 165 sk_sp<SkImage> SkSurface::makeImageSnapshot(SkBudgeted budgeted) { |
| 166 // the caller will call unref() to balance this | 166 // the caller will call unref() to balance this |
| 167 return asSB(this)->refCachedImage(budgeted, kNo_ForceUnique); | 167 return asSB(this)->refCachedImage(budgeted, kNo_ForceUnique); |
| 168 } | 168 } |
| 169 | 169 |
| 170 sk_sp<SkImage> SkSurface::makeImageSnapshot(SkBudgeted budgeted, ForceUnique uni
que) { | 170 sk_sp<SkImage> SkSurface::makeImageSnapshot(SkBudgeted budgeted, ForceUnique uni
que) { |
| 171 // the caller will call unref() to balance this | 171 // the caller will call unref() to balance this |
| 172 return asSB(this)->refCachedImage(budgeted, unique); | 172 return asSB(this)->refCachedImage(budgeted, unique); |
| 173 } | 173 } |
| 174 | 174 |
| 175 SkSurface* SkSurface::newSurface(const SkImageInfo& info) { | 175 sk_sp<SkSurface> SkSurface::makeSurface(const SkImageInfo& info) { |
| 176 return asSB(this)->onNewSurface(info); | 176 return asSB(this)->onNewSurface(info); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void SkSurface::draw(SkCanvas* canvas, SkScalar x, SkScalar y, | 179 void SkSurface::draw(SkCanvas* canvas, SkScalar x, SkScalar y, |
| 180 const SkPaint* paint) { | 180 const SkPaint* paint) { |
| 181 return asSB(this)->onDraw(canvas, x, y, paint); | 181 return asSB(this)->onDraw(canvas, x, y, paint); |
| 182 } | 182 } |
| 183 | 183 |
| 184 bool SkSurface::peekPixels(SkPixmap* pmap) { | 184 bool SkSurface::peekPixels(SkPixmap* pmap) { |
| 185 return this->getCanvas()->peekPixels(pmap); | 185 return this->getCanvas()->peekPixels(pmap); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 215 } | 215 } |
| 216 | 216 |
| 217 void SkSurface::prepareForExternalIO() { | 217 void SkSurface::prepareForExternalIO() { |
| 218 asSB(this)->onPrepareForExternalIO(); | 218 asSB(this)->onPrepareForExternalIO(); |
| 219 } | 219 } |
| 220 | 220 |
| 221 ////////////////////////////////////////////////////////////////////////////////
////// | 221 ////////////////////////////////////////////////////////////////////////////////
////// |
| 222 | 222 |
| 223 #if !SK_SUPPORT_GPU | 223 #if !SK_SUPPORT_GPU |
| 224 | 224 |
| 225 SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget*, const SkSurfaceProp
s*) { | 225 sk_sp<SkSurface> SkSurface::MakeRenderTargetDirect(GrRenderTarget*, const SkSurf
aceProps*) { |
| 226 return nullptr; | 226 return nullptr; |
| 227 } | 227 } |
| 228 | 228 |
| 229 SkSurface* SkSurface::NewRenderTarget(GrContext*, SkBudgeted, const SkImageInfo&
, int, | 229 sk_sp<SkSurface> SkSurface::MakeRenderTarget(GrContext*, SkBudgeted, const SkIma
geInfo&, int, |
| 230 const SkSurfaceProps*, GrTextureStorageAll
ocator) { | 230 const SkSurfaceProps*, GrTextureSto
rageAllocator) { |
| 231 return nullptr; | 231 return nullptr; |
| 232 } | 232 } |
| 233 | 233 |
| 234 SkSurface* SkSurface::NewFromBackendTexture(GrContext*, const GrBackendTextureDe
sc&, | 234 sk_sp<SkSurface> SkSurface::MakeFromBackendTexture(GrContext*, const GrBackendTe
xtureDesc&, |
| 235 const SkSurfaceProps*) { | 235 const SkSurfaceProps*) { |
| 236 return nullptr; | 236 return nullptr; |
| 237 } | 237 } |
| 238 | 238 |
| 239 SkSurface* SkSurface::NewFromBackendRenderTarget(GrContext*, const GrBackendRend
erTargetDesc&, | 239 sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext*, |
| 240 const SkSurfaceProps*) { | 240 const GrBackendRenderTar
getDesc&, |
| 241 const SkSurfaceProps*) { |
| 241 return nullptr; | 242 return nullptr; |
| 242 } | 243 } |
| 243 | 244 |
| 244 SkSurface* NewFromBackendTextureAsRenderTarget(GrContext*, const GrBackendTextur
eDesc&, | 245 sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget(GrContext*, const GrBacken
dTextureDesc&, |
| 245 const SkSurfaceProps*) { | 246 const SkSurfaceProps*) { |
| 246 return nullptr; | 247 return nullptr; |
| 247 } | 248 } |
| 248 | 249 |
| 249 #endif | 250 #endif |
| OLD | NEW |