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

Side by Side Diff: src/gpu/gl/GrGLSL_impl.h

Issue 25023003: Implement color filter as GrGLEffect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrGLSL_impl_DEFINED 8 #ifndef GrGLSL_impl_DEFINED
9 #define GrGLSL_impl_DEFINED 9 #define GrGLSL_impl_DEFINED
10 10
(...skipping 21 matching lines...) Expand all
32 template<> 32 template<>
33 inline const char* GrGLSLExpr<1>::zerosStr() { 33 inline const char* GrGLSLExpr<1>::zerosStr() {
34 return "0"; 34 return "0";
35 } 35 }
36 36
37 template<> 37 template<>
38 inline const char* GrGLSLExpr<1>::onesStr() { 38 inline const char* GrGLSLExpr<1>::onesStr() {
39 return "1"; 39 return "1";
40 } 40 }
41 41
42 // GrGLSLExpr<1>::expandComponentStr() is unimplemented because using it 42 // GrGLSLExpr<1>::expandComponentStr() is unimplemented because using it is
43 // is likely an error. This is now caught compile-time. 43 // likely an error. This is now caught compile-time.
44 44
45 template<> 45 template<>
46 inline const char* GrGLSLExpr<1>::castStr() { 46 inline const char* GrGLSLExpr<1>::castStr() {
47 return "(%s)"; 47 return "(%s)";
48 } 48 }
49 49
50 template<> 50 template<>
51 template<> 51 template<>
52 inline GrGLSLExpr<4> GrGLSLExpr<4>::VectorCast(const GrGLSLExpr<4>& other) { 52 inline GrGLSLExpr<4> GrGLSLExpr<4>::VectorCast(const GrGLSLExpr<4>& other) {
53 return other; 53 return other;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 template<int N> 120 template<int N>
121 GrGLSLExpr<N> GrGLSLExpr<N>::expandComponent(GrColorComponentFlags component) co nst { 121 GrGLSLExpr<N> GrGLSLExpr<N>::expandComponent(GrColorComponentFlags component) co nst {
122 if (this->isZeros() || this->isOnes()) { 122 if (this->isZeros() || this->isOnes()) {
123 return *this; 123 return *this;
124 } 124 }
125 return GrGLSLExpr<N>(this->expandComponentStr(), this->c_str(), GrColorCompo nentFlagToChar(component)); 125 return GrGLSLExpr<N>(this->expandComponentStr(), this->c_str(), GrColorCompo nentFlagToChar(component));
126 } 126 }
127 127
128 #endif 128 #endif
OLDNEW
« src/gpu/gl/GrGLProgram.cpp ('K') | « src/gpu/gl/GrGLSL.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698