OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
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 SkLightingImageFilter_DEFINED | 8 #ifndef SkLightingImageFilter_DEFINED |
9 #define SkLightingImageFilter_DEFINED | 9 #define SkLightingImageFilter_DEFINED |
10 | 10 |
11 #include "SkImageFilter.h" | 11 #include "SkImageFilter.h" |
12 #include "SkColor.h" | 12 #include "SkColor.h" |
13 | 13 |
14 #ifdef SK_LEGACY_SKPOINT3_CTORS | |
15 // TODO: remove this. Chromium relies on having this included here | |
16 #include "SkPoint3.h" | |
17 #else | |
18 struct SkPoint3; | |
19 #endif | |
20 | 14 |
21 class SkLight; | 15 class SkLight; |
| 16 struct SkPoint3; |
22 | 17 |
23 class SK_API SkLightingImageFilter : public SkImageFilter { | 18 class SK_API SkLightingImageFilter : public SkImageFilter { |
24 public: | 19 public: |
25 static SkImageFilter* CreateDistantLitDiffuse(const SkPoint3& direction, | 20 static SkImageFilter* CreateDistantLitDiffuse(const SkPoint3& direction, |
26 SkColor lightColor, SkScalar surfaceScale, SkScalar kd, | 21 SkColor lightColor, SkScalar surfaceScale, SkScalar kd, |
27 SkImageFilter* input = NULL, const CropRect* cropRect = NULL); | 22 SkImageFilter* input = NULL, const CropRect* cropRect = NULL); |
28 static SkImageFilter* CreatePointLitDiffuse(const SkPoint3& location, | 23 static SkImageFilter* CreatePointLitDiffuse(const SkPoint3& location, |
29 SkColor lightColor, SkScalar surfaceScale, SkScalar kd, | 24 SkColor lightColor, SkScalar surfaceScale, SkScalar kd, |
30 SkImageFilter* input = NULL, const CropRect* cropRect = NULL); | 25 SkImageFilter* input = NULL, const CropRect* cropRect = NULL); |
31 static SkImageFilter* CreateSpotLitDiffuse(const SkPoint3& location, | 26 static SkImageFilter* CreateSpotLitDiffuse(const SkPoint3& location, |
(...skipping 23 matching lines...) Expand all Loading... |
55 const SkLight* light() const { return fLight.get(); } | 50 const SkLight* light() const { return fLight.get(); } |
56 SkScalar surfaceScale() const { return fSurfaceScale; } | 51 SkScalar surfaceScale() const { return fSurfaceScale; } |
57 | 52 |
58 private: | 53 private: |
59 typedef SkImageFilter INHERITED; | 54 typedef SkImageFilter INHERITED; |
60 SkAutoTUnref<SkLight> fLight; | 55 SkAutoTUnref<SkLight> fLight; |
61 SkScalar fSurfaceScale; | 56 SkScalar fSurfaceScale; |
62 }; | 57 }; |
63 | 58 |
64 #endif | 59 #endif |
OLD | NEW |