Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: src/core/SkLightingShader.cpp

Issue 2029373004: respect srgb gamma when building mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address comments from #4 Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkLightingShader.cpp
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp
index 542d0f3e673a43b03e3c6569875f5164d4b02cbe..1fbbaf87fa29cb76519af534854558cbbdf99e3f 100644
--- a/src/core/SkLightingShader.cpp
+++ b/src/core/SkLightingShader.cpp
@@ -677,7 +677,8 @@ SkShader::Context* SkLightingShaderImpl::onCreateContext(const ContextRec& rec,
void* diffuseStateStorage = (char*)storage + sizeof(LightingShaderContext);
SkBitmapProcState* diffuseState = new (diffuseStateStorage) SkBitmapProcState(fDiffuseMap,
- SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);
+ SkShader::kClamp_TileMode, SkShader::kClamp_TileMode,
+ SkMipMap::DeduceTreatment(rec));
SkASSERT(diffuseState);
if (!diffuseState->setup(diffTotalInv, *rec.fPaint)) {
diffuseState->~SkBitmapProcState();
@@ -686,7 +687,8 @@ SkShader::Context* SkLightingShaderImpl::onCreateContext(const ContextRec& rec,
void* normalStateStorage = (char*)storage + sizeof(LightingShaderContext) + sizeof(SkBitmapProcState);
SkBitmapProcState* normalState = new (normalStateStorage) SkBitmapProcState(fNormalMap,
- SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);
+ SkShader::kClamp_TileMode, SkShader::kClamp_TileMode,
+ SkMipMap::DeduceTreatment(rec));
SkASSERT(normalState);
if (!normalState->setup(normTotalInv, *rec.fPaint)) {
diffuseState->~SkBitmapProcState();
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkMipMap.h » ('j') | src/gpu/SkGr.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698