Index: src/core/SkLightingShader.cpp |
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp |
index 4ab233a82890c37ace8e9362a0976443a772d19d..2907dba7d57f816f273c9cc8fd2694805c14aeba 100644 |
--- a/src/core/SkLightingShader.cpp |
+++ b/src/core/SkLightingShader.cpp |
@@ -664,24 +664,18 @@ SkShader::Context* SkLightingShaderImpl::onCreateContext(const ContextRec& rec, |
} |
void* diffuseStateStorage = (char*)storage + sizeof(LightingShaderContext); |
- SkBitmapProcState* diffuseState = new (diffuseStateStorage) SkBitmapProcState; |
+ SkBitmapProcState* diffuseState = new (diffuseStateStorage) SkBitmapProcState(fDiffuseMap, |
+ SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); |
SkASSERT(diffuseState); |
- |
- diffuseState->fTileModeX = SkShader::kClamp_TileMode; |
- diffuseState->fTileModeY = SkShader::kClamp_TileMode; |
- diffuseState->fOrigBitmap = fDiffuseMap; |
if (!diffuseState->chooseProcs(diffTotalInv, *rec.fPaint)) { |
diffuseState->~SkBitmapProcState(); |
return nullptr; |
} |
void* normalStateStorage = (char*)storage + sizeof(LightingShaderContext) + sizeof(SkBitmapProcState); |
- SkBitmapProcState* normalState = new (normalStateStorage) SkBitmapProcState; |
+ SkBitmapProcState* normalState = new (normalStateStorage) SkBitmapProcState(fNormalMap, |
+ SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); |
SkASSERT(normalState); |
- |
- normalState->fTileModeX = SkShader::kClamp_TileMode; |
- normalState->fTileModeY = SkShader::kClamp_TileMode; |
- normalState->fOrigBitmap = fNormalMap; |
if (!normalState->chooseProcs(normTotalInv, *rec.fPaint)) { |
diffuseState->~SkBitmapProcState(); |
normalState->~SkBitmapProcState(); |