| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 University of Szeged | 2 * Copyright (C) 2010 University of Szeged |
| 3 * Copyright (C) 2010 Zoltan Herczeg | 3 * Copyright (C) 2010 Zoltan Herczeg |
| 4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 class PLATFORM_EXPORT FELighting : public FilterEffect { | 40 class PLATFORM_EXPORT FELighting : public FilterEffect { |
| 41 protected: | 41 protected: |
| 42 enum LightingType { | 42 enum LightingType { |
| 43 DiffuseLighting, | 43 DiffuseLighting, |
| 44 SpecularLighting | 44 SpecularLighting |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 sk_sp<SkImageFilter> createImageFilter() override; | 47 sk_sp<SkImageFilter> createImageFilter() override; |
| 48 | 48 |
| 49 FloatRect mapPaintRect(const FloatRect&, bool forward = true) const final; | |
| 50 bool affectsTransparentPixels() const override { return true; } | 49 bool affectsTransparentPixels() const override { return true; } |
| 51 | 50 |
| 52 FELighting(Filter*, LightingType, const Color&, float, float, float, float,
PassRefPtr<LightSource>); | 51 FELighting(Filter*, LightingType, const Color&, float, float, float, float,
PassRefPtr<LightSource>); |
| 53 | 52 |
| 54 LightingType m_lightingType; | 53 LightingType m_lightingType; |
| 55 RefPtr<LightSource> m_lightSource; | 54 RefPtr<LightSource> m_lightSource; |
| 56 | 55 |
| 57 Color m_lightingColor; | 56 Color m_lightingColor; |
| 58 float m_surfaceScale; | 57 float m_surfaceScale; |
| 59 float m_diffuseConstant; | 58 float m_diffuseConstant; |
| 60 float m_specularConstant; | 59 float m_specularConstant; |
| 61 float m_specularExponent; | 60 float m_specularExponent; |
| 62 }; | 61 }; |
| 63 | 62 |
| 64 } // namespace blink | 63 } // namespace blink |
| 65 | 64 |
| 66 #endif // FELighting_h | 65 #endif // FELighting_h |
| OLD | NEW |