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

Unified Diff: src/core/SkLightingShader_NormalSource.cpp

Issue 2062703003: Abstracted diffuse color map out of SkLightingShaderImpl into a generic SkShader (Closed) Base URL: https://skia.googlesource.com/skia@dvonbeck-normal-api-change
Patch Set: Rebased, now allocates LightingShaderContext deps on the heap 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
« src/core/SkLightingShader.cpp ('K') | « src/core/SkLightingShader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLightingShader_NormalSource.cpp
diff --git a/src/core/SkLightingShader_NormalSource.cpp b/src/core/SkLightingShader_NormalSource.cpp
index 15e3ecd789594f6bcbc46f3d81222f7941ebcfc3..2eeb709e00e7c9f83c9761260fc0a9424f5919ee 100644
--- a/src/core/SkLightingShader_NormalSource.cpp
+++ b/src/core/SkLightingShader_NormalSource.cpp
@@ -168,7 +168,6 @@ sk_sp<GrFragmentProcessor> NormalMapSourceImpl::asFragmentProcessor(
const SkMatrix *localMatrix,
SkFilterQuality filterQuality,
SkSourceGammaTreatment gammaTreatment) const {
-
sk_sp<GrFragmentProcessor> bitmapFP = fBitmapShader->asFragmentProcessor(context, viewM,
localMatrix, filterQuality, gammaTreatment);
@@ -278,7 +277,6 @@ void NormalMapSourceImpl::flatten(SkWriteBuffer& buf) const {
sk_sp<SkLightingShader::NormalSource> SkLightingShader::NormalSource::MakeMap(
const SkBitmap &normal, const SkVector &invNormRotation, const SkMatrix *normLocalM) {
-
if (normal.isNull() || SkBitmapProcShader::BitmapIsTooBig(normal)) {
return nullptr;
}
« src/core/SkLightingShader.cpp ('K') | « src/core/SkLightingShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698