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

Side by Side Diff: src/gpu/effects/GrConstColorProcessor.cpp

Issue 1202293002: Move GLSL-specific routines/classes to separate glsl directory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rename GrGLGLSL.{cpp,h} Created 5 years, 6 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
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 #include "effects/GrConstColorProcessor.h" 8 #include "effects/GrConstColorProcessor.h"
9 #include "gl/GrGLProcessor.h" 9 #include "gl/GrGLProcessor.h"
10 #include "gl/GrGLSL.h"
11 #include "gl/builders/GrGLProgramBuilder.h" 10 #include "gl/builders/GrGLProgramBuilder.h"
12 11
13 class GLConstColorProcessor : public GrGLFragmentProcessor { 12 class GLConstColorProcessor : public GrGLFragmentProcessor {
14 public: 13 public:
15 GLConstColorProcessor() : fPrevColor(GrColor_ILLEGAL) {} 14 GLConstColorProcessor() : fPrevColor(GrColor_ILLEGAL) {}
16 15
17 void emitCode(GrGLFPBuilder* builder, 16 void emitCode(GrGLFPBuilder* builder,
18 const GrFragmentProcessor& fp, 17 const GrFragmentProcessor& fp,
19 const char* outputColor, 18 const char* outputColor,
20 const char* inputColor, 19 const char* inputColor,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 color = 0; 123 color = 0;
125 break; 124 break;
126 case 2: 125 case 2:
127 color = random->nextULessThan(0x100); 126 color = random->nextULessThan(0x100);
128 color = color | (color << 8) | (color << 16) | (color << 24); 127 color = color | (color << 8) | (color << 16) | (color << 24);
129 break; 128 break;
130 } 129 }
131 InputMode mode = static_cast<InputMode>(random->nextULessThan(kInputModeCnt) ); 130 InputMode mode = static_cast<InputMode>(random->nextULessThan(kInputModeCnt) );
132 return GrConstColorProcessor::Create(color, mode); 131 return GrConstColorProcessor::Create(color, mode);
133 } 132 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBitmapTextGeoProc.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698