Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_SHADER_H_ | 5 #ifndef CC_SHADER_H_ |
| 6 #define CC_SHADER_H_ | 6 #define CC_SHADER_H_ |
| 7 | 7 |
| 8 #include "third_party/skia/include/core/SkColorPriv.h" | 8 #include "third_party/skia/include/core/SkColorPriv.h" |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 class VertexShaderPosTexIdentity { | 58 class VertexShaderPosTexIdentity { |
| 59 public: | 59 public: |
| 60 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex) { } | 60 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex) { } |
| 61 std::string getShaderString() const; | 61 std::string getShaderString() const; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 class VertexShaderPosTexTransform { | 64 class VertexShaderPosTexTransform { |
| 65 public: | 65 public: |
| 66 VertexShaderPosTexTransform(); | 66 VertexShaderPosTexTransform(); |
|
whunt
2012/12/14 21:13:45
Inconsistent tabbing.
Jerome
2012/12/14 21:48:47
Done.
| |
| 67 | 67 |
| 68 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); | 68 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); |
| 69 std::string getShaderString() const; | 69 std::string getShaderString() const; |
| 70 | 70 |
| 71 int matrixLocation() const { return m_matrixLocation; } | 71 int matrixLocation() const { return m_matrixLocation; } |
| 72 int texTransformLocation() const { return m_texTransformLocation; } | 72 int texTransformLocation() const { return m_texTransformLocation; } |
| 73 int vertexOpacityLocation() const { return m_vertexOpacityLocation; } | |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 int m_matrixLocation; | 76 int m_matrixLocation; |
| 76 int m_texTransformLocation; | 77 int m_texTransformLocation; |
| 78 int m_vertexOpacityLocation; | |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 class VertexShaderQuad { | 81 class VertexShaderQuad { |
| 80 public: | 82 public: |
| 81 VertexShaderQuad(); | 83 VertexShaderQuad(); |
| 82 | 84 |
| 83 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); | 85 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); |
| 84 std::string getShaderString() const; | 86 std::string getShaderString() const; |
| 85 | 87 |
| 86 int matrixLocation() const { return m_matrixLocation; } | 88 int matrixLocation() const { return m_matrixLocation; } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); | 147 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); |
| 146 int alphaLocation() const { return -1; } | 148 int alphaLocation() const { return -1; } |
| 147 int edgeLocation() const { return -1; } | 149 int edgeLocation() const { return -1; } |
| 148 int fragmentTexTransformLocation() const { return -1; } | 150 int fragmentTexTransformLocation() const { return -1; } |
| 149 int samplerLocation() const { return m_samplerLocation; } | 151 int samplerLocation() const { return m_samplerLocation; } |
| 150 | 152 |
| 151 private: | 153 private: |
| 152 int m_samplerLocation; | 154 int m_samplerLocation; |
| 153 }; | 155 }; |
| 154 | 156 |
| 155 class FragmentShaderRGBATexFlipAlpha : public FragmentTexAlphaBinding { | 157 class FragmentShaderRGBATexFlipVaryingAlpha : public FragmentTexOpaqueBinding { |
| 156 public: | 158 public: |
| 157 std::string getShaderString() const; | 159 std::string getShaderString() const; |
| 158 }; | 160 }; |
| 161 | |
| 162 class FragmentShaderRGBATexVaryingAlpha : public FragmentTexOpaqueBinding { | |
| 163 public: | |
| 164 std::string getShaderString() const; | |
| 165 }; | |
| 159 | 166 |
| 160 class FragmentShaderRGBATexAlpha : public FragmentTexAlphaBinding { | 167 class FragmentShaderRGBATexAlpha : public FragmentTexAlphaBinding { |
|
whunt
2012/12/14 21:13:45
Is this class used anymore?
Jerome
2012/12/14 21:48:47
Yes by: TileProgram and RenderPassProgram
| |
| 161 public: | 168 public: |
| 162 std::string getShaderString() const; | 169 std::string getShaderString() const; |
| 163 }; | 170 }; |
| 164 | 171 |
| 165 class FragmentShaderRGBATexRectFlipAlpha : public FragmentTexAlphaBinding { | 172 class FragmentShaderRGBATexRectFlipVaryingAlpha : public FragmentTexAlphaBinding { |
| 166 public: | 173 public: |
| 167 std::string getShaderString() const; | 174 std::string getShaderString() const; |
| 168 }; | 175 }; |
| 169 | 176 |
| 170 class FragmentShaderRGBATexRectAlpha : public FragmentTexAlphaBinding { | 177 class FragmentShaderRGBATexRectVaryingAlpha : public FragmentTexAlphaBinding { |
| 171 public: | 178 public: |
| 172 std::string getShaderString() const; | 179 std::string getShaderString() const; |
| 173 }; | 180 }; |
| 174 | 181 |
| 175 class FragmentShaderRGBATexOpaque : public FragmentTexOpaqueBinding { | 182 class FragmentShaderRGBATexOpaque : public FragmentTexOpaqueBinding { |
| 176 public: | 183 public: |
| 177 std::string getShaderString() const; | 184 std::string getShaderString() const; |
| 178 }; | 185 }; |
| 179 | 186 |
| 180 class FragmentShaderRGBATex : public FragmentTexOpaqueBinding { | 187 class FragmentShaderRGBATex : public FragmentTexOpaqueBinding { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 338 private: | 345 private: |
| 339 int m_alphaLocation; | 346 int m_alphaLocation; |
| 340 int m_texTransformLocation; | 347 int m_texTransformLocation; |
| 341 int m_frequencyLocation; | 348 int m_frequencyLocation; |
| 342 int m_colorLocation; | 349 int m_colorLocation; |
| 343 }; | 350 }; |
| 344 | 351 |
| 345 } // namespace cc | 352 } // namespace cc |
| 346 | 353 |
| 347 #endif // CC_SHADER_H_ | 354 #endif // CC_SHADER_H_ |
| OLD | NEW |