Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef SkLightingShader_DEFINED | 8 #ifndef SkLightingShader_DEFINED |
| 9 #define SkLightingShader_DEFINED | 9 #define SkLightingShader_DEFINED |
| 10 | 10 |
| 11 #include "SkLights.h" | 11 #include "SkLights.h" |
| 12 #include "SkShader.h" | 12 #include "SkShader.h" |
| 13 | 13 |
| 14 class SkBitmap; | 14 class SkBitmap; |
| 15 class SkMatrix; | 15 class SkMatrix; |
| 16 | 16 |
| 17 class SK_API SkLightingShader { | 17 class SK_API SkLightingShader { |
| 18 public: | 18 public: |
| 19 | |
|
egdaniel
2016/06/09 16:56:37
remove this \n
dvonbeck
2016/06/09 18:51:29
Done.
| |
| 19 /** Returns a shader that lights the diffuse and normal maps with a set of l ights. | 20 /** Returns a shader that lights the diffuse and normal maps with a set of l ights. |
| 20 | 21 |
| 21 It returns a shader with a reference count of 1. | 22 It returns a shader with a reference count of 1. |
| 22 The caller should decrement the shader's reference count when done with the shader. | 23 The caller should decrement the shader's reference count when done with the shader. |
| 23 It is an error for count to be < 2. | 24 It is an error for count to be < 2. |
| 24 @param diffuse the diffuse bitmap | 25 @param diffuse the diffuse bitmap |
| 25 @param normal the normal map | 26 @param normal the normal map |
| 26 @param lights the lights applied to the normal map | 27 @param lights the lights applied to the normal map |
| 27 @param invNormRotation rotation applied to the normal map's normals | 28 @param invNormRotation rotation applied to the normal map's normals |
| 28 @param diffLocalMatrix the local matrix for the diffuse texture | 29 @param diffLocalMatrix the local matrix for the diffuse texture |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 46 (127, 127, 0). | 47 (127, 127, 0). |
| 47 */ | 48 */ |
| 48 static sk_sp<SkShader> Make(const SkBitmap& diffuse, const SkBitmap& normal, | 49 static sk_sp<SkShader> Make(const SkBitmap& diffuse, const SkBitmap& normal, |
| 49 sk_sp<SkLights> lights, const SkVector& invNormR otation, | 50 sk_sp<SkLights> lights, const SkVector& invNormR otation, |
| 50 const SkMatrix* diffLocalMatrix, const SkMatrix* normLocalMatrix); | 51 const SkMatrix* diffLocalMatrix, const SkMatrix* normLocalMatrix); |
| 51 | 52 |
| 52 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() | 53 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 #endif | 56 #endif |
| OLD | NEW |