From 12c4fc2579017a162668db077e8067512fd968ca Mon Sep 17 00:00:00 2001 From: dvonbeck Date: Mon, 27 Jun 2016 11:40:45 -0700 Subject: SkLightingShader normal vector CPU computation refactor. The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources. This CL's base was the CL for GPU handling: https://codereview.chromium.org/2043393002/ What this CL includes: - A refactor of the SkLightingShader context's code that deals with reading normals off of a normal map. This is now abstracted out into a NormalSource::Provider class that the context uses. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2050773002 Committed: https://skia.googlesource.com/skia/+/790a70118327a129cb6b48fabe80f4e184c1e67c Review-Url: https://codereview.chromium.org/2050773002 --- src/ports/SkGlobalInitialization_default.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ports/SkGlobalInitialization_default.cpp') diff --git a/src/ports/SkGlobalInitialization_default.cpp b/src/ports/SkGlobalInitialization_default.cpp index 933973eb93..cc697ce0ba 100644 --- a/src/ports/SkGlobalInitialization_default.cpp +++ b/src/ports/SkGlobalInitialization_default.cpp @@ -36,6 +36,7 @@ #include "SkMatrixConvolutionImageFilter.h" #include "SkMergeImageFilter.h" #include "SkMorphologyImageFilter.h" +#include "SkNormalSource.h" #include "SkOffsetImageFilter.h" #include "SkPaintImageFilter.h" #include "SkPerlinNoiseShader.h" @@ -87,7 +88,7 @@ void SkFlattenable::PrivateInitializer::InitEffects() { SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader) SkGradientShader::InitializeFlattenables(); SkLightingShader::InitializeFlattenables(); - SkLightingShader::NormalSource::InitializeFlattenables(); + SkNormalSource::InitializeFlattenables(); // PathEffect -- cgit v1.2.3