| Index: src/image/SkSurface_Gpu.cpp
|
| diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
|
| index ef8dd5f06e7196e2f41e5268461cb3959f07bf20..5d3f257d461b617ca40cbd20fa5327411a6ede2e 100644
|
| --- a/src/image/SkSurface_Gpu.cpp
|
| +++ b/src/image/SkSurface_Gpu.cpp
|
| @@ -129,6 +129,17 @@ void SkSurface_Gpu::onPrepareForExternalIO() {
|
| fDevice->flush();
|
| }
|
|
|
| +bool SkSurface_Gpu::onBlitWithGamma(SkImage* image, SkScalar gamma) {
|
| + GrRenderTarget* dst = fDevice->accessDrawContext()->accessRenderTarget();
|
| + if (GrTexture* src = as_IB(image)->asTextureRef(dst->getContext(),
|
| + GrTextureParams::ClampNoFilter(),
|
| + SkSourceGammaTreatment::kRespect)) {
|
| + fDevice.get()->context()->applyGamma(dst, src, gamma);
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| sk_sp<SkSurface> SkSurface::MakeRenderTargetDirect(GrRenderTarget* target,
|
|
|