| 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 #include "SkLightingImageFilter.h" | 8 #include "SkLightingImageFilter.h" |
| 9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
| 10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 class GrGLLight; | 675 class GrGLLight; |
| 676 | 676 |
| 677 #endif | 677 #endif |
| 678 | 678 |
| 679 }; | 679 }; |
| 680 | 680 |
| 681 /////////////////////////////////////////////////////////////////////////////// | 681 /////////////////////////////////////////////////////////////////////////////// |
| 682 | 682 |
| 683 class SkLight : public SkRefCnt { | 683 class SkLight : public SkRefCnt { |
| 684 public: | 684 public: |
| 685 SK_DECLARE_INST_COUNT(SkLight) | 685 |
| 686 | 686 |
| 687 enum LightType { | 687 enum LightType { |
| 688 kDistant_LightType, | 688 kDistant_LightType, |
| 689 kPoint_LightType, | 689 kPoint_LightType, |
| 690 kSpot_LightType, | 690 kSpot_LightType, |
| 691 }; | 691 }; |
| 692 virtual LightType type() const = 0; | 692 virtual LightType type() const = 0; |
| 693 const SkPoint3& color() const { return fColor; } | 693 const SkPoint3& color() const { return fColor; } |
| 694 virtual GrGLLight* createGLLight() const = 0; | 694 virtual GrGLLight* createGLLight() const = 0; |
| 695 virtual bool isEqual(const SkLight& other) const { | 695 virtual bool isEqual(const SkLight& other) const { |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1996 | 1996 |
| 1997 fsBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight); | 1997 fsBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight); |
| 1998 } | 1998 } |
| 1999 | 1999 |
| 2000 #endif | 2000 #endif |
| 2001 | 2001 |
| 2002 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter) | 2002 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter) |
| 2003 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter) | 2003 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter) |
| 2004 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter) | 2004 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter) |
| 2005 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 2005 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
| OLD | NEW |