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

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: Need to know when we're in L32 compatibility mode !!!? 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 cb25944a01fc9e4e9dfff5442a965a04c0ffecbf..3964e98a4e15e985d33c9367e3dee7e56f4e8d65 100644
--- a/src/core/SkLightingShader.cpp
+++ b/src/core/SkLightingShader.cpp
@@ -673,7 +673,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,
msarett 2016/06/03 16:54:17 nit: style?
+ SkMipMap::DeduceMode(rec));
SkASSERT(diffuseState);
if (!diffuseState->setup(diffTotalInv, *rec.fPaint)) {
diffuseState->~SkBitmapProcState();
@@ -682,7 +683,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::DeduceMode(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/core/SkMipMap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698