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

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: fix warning 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
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkMipMap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLightingShader.cpp
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp
index a2ce52fe28764b2750546faf09ae96194cbc2a85..aaf29fcf3a344f0bbf8f909f6768bdfb4053ec68 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698