| 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 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include <wtf/Platform.h> | 36 #include <wtf/Platform.h> |
| 37 | 37 |
| 38 // Common base class for FEDiffuseLighting and FESpecularLighting | 38 // Common base class for FEDiffuseLighting and FESpecularLighting |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class FELighting : public FilterEffect { | 42 class FELighting : public FilterEffect { |
| 43 public: | 43 public: |
| 44 virtual void apply(); | 44 virtual void apply(); |
| 45 | 45 |
| 46 virtual void determineAbsolutePaintRect() { setAbsolutePaintRect(maxEffectRe
ct()); } | 46 virtual void determineAbsolutePaintRect() { setAbsolutePaintRect(enclosingIn
tRect(maxEffectRect())); } |
| 47 | 47 |
| 48 protected: | 48 protected: |
| 49 enum LightingType { | 49 enum LightingType { |
| 50 DiffuseLighting, | 50 DiffuseLighting, |
| 51 SpecularLighting | 51 SpecularLighting |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 struct LightingData { | 54 struct LightingData { |
| 55 // This structure contains only read-only (SMP safe) data | 55 // This structure contains only read-only (SMP safe) data |
| 56 ByteArray* pixels; | 56 ByteArray* pixels; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 float m_specularExponent; | 94 float m_specularExponent; |
| 95 float m_kernelUnitLengthX; | 95 float m_kernelUnitLengthX; |
| 96 float m_kernelUnitLengthY; | 96 float m_kernelUnitLengthY; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace WebCore | 99 } // namespace WebCore |
| 100 | 100 |
| 101 #endif // ENABLE(FILTERS) | 101 #endif // ENABLE(FILTERS) |
| 102 | 102 |
| 103 #endif // FELighting_h | 103 #endif // FELighting_h |
| OLD | NEW |