Index: src/core/SkBitmapProcState.cpp |
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp |
index 33dd8f5194e938891ef32731ec5901f4073e4521..900b367b5d0a926f1e296c0724b90df5d39d8bb1 100644 |
--- a/src/core/SkBitmapProcState.cpp |
+++ b/src/core/SkBitmapProcState.cpp |
@@ -37,18 +37,22 @@ extern void Clamp_S32_opaque_D32_nofilter_DX_shaderproc(const void*, int, int, u |
#include "SkBitmapProcState_procs.h" |
SkBitmapProcInfo::SkBitmapProcInfo(const SkBitmapProvider& provider, |
- SkShader::TileMode tmx, SkShader::TileMode tmy) |
+ SkShader::TileMode tmx, SkShader::TileMode tmy, |
+ SkSourceGammaTreatment treatment) |
: fProvider(provider) |
, fTileModeX(tmx) |
, fTileModeY(tmy) |
+ , fSrcGammaTreatment(treatment) |
, fBMState(nullptr) |
{} |
SkBitmapProcInfo::SkBitmapProcInfo(const SkBitmap& bm, |
- SkShader::TileMode tmx, SkShader::TileMode tmy) |
+ SkShader::TileMode tmx, SkShader::TileMode tmy, |
+ SkSourceGammaTreatment treatment) |
: fProvider(SkBitmapProvider(bm)) |
, fTileModeX(tmx) |
, fTileModeY(tmy) |
+ , fSrcGammaTreatment(treatment) |
, fBMState(nullptr) |
{} |
@@ -129,7 +133,7 @@ bool SkBitmapProcInfo::init(const SkMatrix& inv, const SkPaint& paint) { |
allow_ignore_fractional_translate = false; |
} |
- SkDefaultBitmapController controller; |
+ SkDefaultBitmapController controller(fSrcGammaTreatment); |
fBMState = controller.requestBitmap(fProvider, inv, paint.getFilterQuality(), |
fBMStateStorage.get(), fBMStateStorage.size()); |
// Note : we allow the controller to return an empty (zero-dimension) result. Should we? |