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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 SpecularLighting | 54 SpecularLighting |
55 }; | 55 }; |
56 | 56 |
57 struct LightingData { | 57 struct LightingData { |
58 // This structure contains only read-only (SMP safe) data | 58 // This structure contains only read-only (SMP safe) data |
59 Uint8ClampedArray* pixels; | 59 Uint8ClampedArray* pixels; |
60 float surfaceScale; | 60 float surfaceScale; |
61 int widthMultipliedByPixelSize; | 61 int widthMultipliedByPixelSize; |
62 int widthDecreasedByOne; | 62 int widthDecreasedByOne; |
63 int heightDecreasedByOne; | 63 int heightDecreasedByOne; |
| 64 const LightSource* lightSource; |
64 | 65 |
65 inline void topLeft(int offset, IntPoint& normalVector); | 66 inline void topLeft(int offset, IntPoint& normalVector); |
66 inline void topRow(int offset, IntPoint& normalVector); | 67 inline void topRow(int offset, IntPoint& normalVector); |
67 inline void topRight(int offset, IntPoint& normalVector); | 68 inline void topRight(int offset, IntPoint& normalVector); |
68 inline void leftColumn(int offset, IntPoint& normalVector); | 69 inline void leftColumn(int offset, IntPoint& normalVector); |
69 inline void interior(int offset, IntPoint& normalVector); | 70 inline void interior(int offset, IntPoint& normalVector); |
70 inline void rightColumn(int offset, IntPoint& normalVector); | 71 inline void rightColumn(int offset, IntPoint& normalVector); |
71 inline void bottomLeft(int offset, IntPoint& normalVector); | 72 inline void bottomLeft(int offset, IntPoint& normalVector); |
72 inline void bottomRow(int offset, IntPoint& normalVector); | 73 inline void bottomRow(int offset, IntPoint& normalVector); |
73 inline void bottomRight(int offset, IntPoint& normalVector); | 74 inline void bottomRight(int offset, IntPoint& normalVector); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 float m_surfaceScale; | 116 float m_surfaceScale; |
116 float m_diffuseConstant; | 117 float m_diffuseConstant; |
117 float m_specularConstant; | 118 float m_specularConstant; |
118 float m_specularExponent; | 119 float m_specularExponent; |
119 float m_kernelUnitLengthX; | 120 float m_kernelUnitLengthX; |
120 float m_kernelUnitLengthY; | 121 float m_kernelUnitLengthY; |
121 | 122 |
122 private: | 123 private: |
123 virtual void applySoftware() OVERRIDE; | 124 virtual void applySoftware() OVERRIDE; |
124 virtual bool applySkia() OVERRIDE; | 125 virtual bool applySkia() OVERRIDE; |
| 126 |
| 127 void getTransform(FloatPoint3D* scale, FloatSize* offset) const; |
125 }; | 128 }; |
126 | 129 |
127 } // namespace WebCore | 130 } // namespace WebCore |
128 | 131 |
129 #endif // FELighting_h | 132 #endif // FELighting_h |
OLD | NEW |