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 "SkAtomics.h" | 8 #include "SkAtomics.h" |
9 #include "SkSurface_Base.h" | 9 #include "SkSurface_Base.h" |
10 #include "SkImagePriv.h" | 10 #include "SkImagePriv.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 175 |
176 sk_sp<SkSurface> SkSurface::makeSurface(const SkImageInfo& info) { | 176 sk_sp<SkSurface> SkSurface::makeSurface(const SkImageInfo& info) { |
177 return asSB(this)->onNewSurface(info); | 177 return asSB(this)->onNewSurface(info); |
178 } | 178 } |
179 | 179 |
180 void SkSurface::draw(SkCanvas* canvas, SkScalar x, SkScalar y, | 180 void SkSurface::draw(SkCanvas* canvas, SkScalar x, SkScalar y, |
181 const SkPaint* paint) { | 181 const SkPaint* paint) { |
182 return asSB(this)->onDraw(canvas, x, y, paint); | 182 return asSB(this)->onDraw(canvas, x, y, paint); |
183 } | 183 } |
184 | 184 |
| 185 bool SkSurface::blitWithGamma(SkImage* image, SkScalar gamma) { |
| 186 return asSB(this)->onBlitWithGamma(image, gamma); |
| 187 } |
| 188 |
185 bool SkSurface::peekPixels(SkPixmap* pmap) { | 189 bool SkSurface::peekPixels(SkPixmap* pmap) { |
186 return this->getCanvas()->peekPixels(pmap); | 190 return this->getCanvas()->peekPixels(pmap); |
187 } | 191 } |
188 | 192 |
189 #ifdef SK_SUPPORT_LEGACY_PEEKPIXELS_PARMS | 193 #ifdef SK_SUPPORT_LEGACY_PEEKPIXELS_PARMS |
190 const void* SkSurface::peekPixels(SkImageInfo* info, size_t* rowBytes) { | 194 const void* SkSurface::peekPixels(SkImageInfo* info, size_t* rowBytes) { |
191 SkPixmap pm; | 195 SkPixmap pm; |
192 if (this->peekPixels(&pm)) { | 196 if (this->peekPixels(&pm)) { |
193 if (info) { | 197 if (info) { |
194 *info = pm.info(); | 198 *info = pm.info(); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 const SkSurfaceProps*) { | 248 const SkSurfaceProps*) { |
245 return nullptr; | 249 return nullptr; |
246 } | 250 } |
247 | 251 |
248 sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget(GrContext*, const GrBacken
dTextureDesc&, | 252 sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget(GrContext*, const GrBacken
dTextureDesc&, |
249 sk_sp<SkColorSpace>, const
SkSurfaceProps*) { | 253 sk_sp<SkColorSpace>, const
SkSurfaceProps*) { |
250 return nullptr; | 254 return nullptr; |
251 } | 255 } |
252 | 256 |
253 #endif | 257 #endif |
OLD | NEW |