Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: cc/shader.h

Issue 11570027: Adding support for per vertex opacity on textured layer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/scrollbar_layer_impl.cc ('k') | cc/shader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 class VertexShaderPosTexTransform { 64 class VertexShaderPosTexTransform {
65 public: 65 public:
66 VertexShaderPosTexTransform(); 66 VertexShaderPosTexTransform();
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex); 149 void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUni form, int* baseUniformIndex);
148 int alphaLocation() const { return -1; } 150 int alphaLocation() const { return -1; }
149 int edgeLocation() const { return -1; } 151 int edgeLocation() const { return -1; }
150 int fragmentTexTransformLocation() const { return -1; } 152 int fragmentTexTransformLocation() const { return -1; }
151 int samplerLocation() const { return m_samplerLocation; } 153 int samplerLocation() const { return m_samplerLocation; }
152 154
153 private: 155 private:
154 int m_samplerLocation; 156 int m_samplerLocation;
155 }; 157 };
156 158
157 class FragmentShaderRGBATexFlipAlpha : public FragmentTexAlphaBinding { 159 class FragmentShaderRGBATexFlipVaryingAlpha : public FragmentTexOpaqueBinding {
158 public: 160 public:
159 std::string getShaderString() const; 161 std::string getShaderString() const;
160 }; 162 };
163
164 class FragmentShaderRGBATexVaryingAlpha : public FragmentTexOpaqueBinding {
165 public:
166 std::string getShaderString() const;
167 };
161 168
162 class FragmentShaderRGBATexAlpha : public FragmentTexAlphaBinding { 169 class FragmentShaderRGBATexAlpha : public FragmentTexAlphaBinding {
163 public: 170 public:
164 std::string getShaderString() const; 171 std::string getShaderString() const;
165 }; 172 };
166 173
167 class FragmentShaderRGBATexRectFlipAlpha : public FragmentTexAlphaBinding { 174 class FragmentShaderRGBATexRectFlipVaryingAlpha : public FragmentTexAlphaBinding {
168 public: 175 public:
169 std::string getShaderString() const; 176 std::string getShaderString() const;
170 }; 177 };
171 178
172 class FragmentShaderRGBATexRectAlpha : public FragmentTexAlphaBinding { 179 class FragmentShaderRGBATexRectVaryingAlpha : public FragmentTexAlphaBinding {
173 public: 180 public:
174 std::string getShaderString() const; 181 std::string getShaderString() const;
175 }; 182 };
176 183
177 class FragmentShaderRGBATexOpaque : public FragmentTexOpaqueBinding { 184 class FragmentShaderRGBATexOpaque : public FragmentTexOpaqueBinding {
178 public: 185 public:
179 std::string getShaderString() const; 186 std::string getShaderString() const;
180 }; 187 };
181 188
182 class FragmentShaderRGBATex : public FragmentTexOpaqueBinding { 189 class FragmentShaderRGBATex : public FragmentTexOpaqueBinding {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 private: 347 private:
341 int m_alphaLocation; 348 int m_alphaLocation;
342 int m_texTransformLocation; 349 int m_texTransformLocation;
343 int m_frequencyLocation; 350 int m_frequencyLocation;
344 int m_colorLocation; 351 int m_colorLocation;
345 }; 352 };
346 353
347 } // namespace cc 354 } // namespace cc
348 355
349 #endif // CC_SHADER_H_ 356 #endif // CC_SHADER_H_
OLDNEW
« no previous file with comments | « cc/scrollbar_layer_impl.cc ('k') | cc/shader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698