OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2016 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef SkNormalSourceImpl_DEFINED |
| 9 #define SkNormalSourceImpl_DEFINED |
| 10 |
| 11 #include "SkBitmapProcState.h" |
| 12 #include "SkColor.h" |
| 13 #include "SkEmptyShader.h" |
| 14 #include "SkErrorInternals.h" |
| 15 #include "SkLightingShader.h" |
| 16 #include "SkMathPriv.h" |
| 17 #include "SkPoint3.h" |
| 18 #include "SkReadBuffer.h" |
| 19 #include "SkWriteBuffer.h" |
| 20 #include "SkNormalSourceImpl.h" |
| 21 #include "GrCoordTransform.h" |
| 22 #include "GrFragmentProcessor.h" |
| 23 #include "GrInvariantOutput.h" |
| 24 #include "GrTextureAccess.h" |
| 25 #include "glsl/GrGLSLFragmentProcessor.h" |
| 26 #include "glsl/GrGLSLFragmentShaderBuilder.h" |
| 27 #include "glsl/GrGLSLProgramDataManager.h" |
| 28 #include "glsl/GrGLSLUniformHandler.h" |
| 29 #include "SkGr.h" |
| 30 #include "SkGrPriv.h" |
| 31 |
| 32 // TODO change to flattenable |
| 33 class NormalSource : public SkRefCnt { |
| 34 |
| 35 public: |
| 36 |
| 37 virtual ~NormalSource(){}; |
| 38 |
| 39 virtual const GrFragmentProcessor* asFragmentProcessor( |
| 40 GrContext* context, |
| 41 const SkMatrix& viewM, |
| 42 const SkMatrix* localMatrix, |
| 43 SkFilterQuality filterQuality, |
| 44 SkSourceGammaTreatment gammaTr
eatment) const = 0; |
| 45 }; |
| 46 |
| 47 class NormalMapSource { |
| 48 public: |
| 49 static sk_sp<NormalSource> Make(const SkBitmap& normal, const SkVector& invN
ormRotation, |
| 50 const SkMatrix* normLocalM); |
| 51 }; |
| 52 |
| 53 #endif |
OLD | NEW |