| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "SkLights.h" | 9 #include "SkLights.h" |
| 10 #include "SkReadBuffer.h" | 10 #include "SkReadBuffer.h" |
| 11 #include "SkShadowShader.h" | 11 #include "SkShadowShader.h" |
| 12 #include "SkPoint3.h" | 12 #include "SkPoint3.h" |
| 13 | 13 |
| 14 //////////////////////////////////////////////////////////////////////////// | 14 //////////////////////////////////////////////////////////////////////////// |
| 15 #ifdef SK_EXPERIMENTAL_SHADOWING | 15 #ifdef SK_EXPERIMENTAL_SHADOWING |
| 16 | 16 |
| 17 #define SK_MAX_NON_AMBIENT_LIGHTS 4 | |
| 18 | |
| 19 /** \class SkShadowShaderImpl | 17 /** \class SkShadowShaderImpl |
| 20 This subclass of shader applies shadowing | 18 This subclass of shader applies shadowing |
| 21 */ | 19 */ |
| 22 class SkShadowShaderImpl : public SkShader { | 20 class SkShadowShaderImpl : public SkShader { |
| 23 public: | 21 public: |
| 24 /** Create a new shadowing shader that shadows | 22 /** Create a new shadowing shader that shadows |
| 25 @param to do to do | 23 @param to do to do |
| 26 */ | 24 */ |
| 27 SkShadowShaderImpl(sk_sp<SkShader> povDepthShader, | 25 SkShadowShaderImpl(sk_sp<SkShader> povDepthShader, |
| 28 sk_sp<SkShader> diffuseShader, | 26 sk_sp<SkShader> diffuseShader, |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 | 708 |
| 711 /////////////////////////////////////////////////////////////////////////////// | 709 /////////////////////////////////////////////////////////////////////////////// |
| 712 | 710 |
| 713 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkShadowShader) | 711 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkShadowShader) |
| 714 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkShadowShaderImpl) | 712 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkShadowShaderImpl) |
| 715 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 713 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| 716 | 714 |
| 717 /////////////////////////////////////////////////////////////////////////////// | 715 /////////////////////////////////////////////////////////////////////////////// |
| 718 | 716 |
| 719 #endif | 717 #endif |
| OLD | NEW |