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

Side by Side Diff: src/effects/gradients/SkSweepGradient.cpp

Issue 648463003: FPs now use the correct builder types(just a rename) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkSweepGradient.h" 9 #include "SkSweepGradient.h"
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 #include "gl/builders/GrGLProgramBuilder.h" 188 #include "gl/builders/GrGLProgramBuilder.h"
189 #include "SkGr.h" 189 #include "SkGr.h"
190 190
191 class GrGLSweepGradient : public GrGLGradientEffect { 191 class GrGLSweepGradient : public GrGLGradientEffect {
192 public: 192 public:
193 193
194 GrGLSweepGradient(const GrBackendProcessorFactory& factory, 194 GrGLSweepGradient(const GrBackendProcessorFactory& factory,
195 const GrProcessor&) : INHERITED (factory) { } 195 const GrProcessor&) : INHERITED (factory) { }
196 virtual ~GrGLSweepGradient() { } 196 virtual ~GrGLSweepGradient() { }
197 197
198 virtual void emitCode(GrGLProgramBuilder*, 198 virtual void emitCode(GrGLFPBuilder*,
199 const GrFragmentProcessor&, 199 const GrFragmentProcessor&,
200 const GrProcessorKey&, 200 const GrProcessorKey&,
201 const char* outputColor, 201 const char* outputColor,
202 const char* inputColor, 202 const char* inputColor,
203 const TransformedCoordsArray&, 203 const TransformedCoordsArray&,
204 const TextureSamplerArray&) SK_OVERRIDE; 204 const TextureSamplerArray&) SK_OVERRIDE;
205 205
206 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso rKeyBuilder* b) { 206 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso rKeyBuilder* b) {
207 b->add32(GenBaseGradientKey(processor)); 207 b->add32(GenBaseGradientKey(processor));
208 } 208 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 colors, stops, c olorCount)); 259 colors, stops, c olorCount));
260 SkPaint paint; 260 SkPaint paint;
261 GrFragmentProcessor* fp; 261 GrFragmentProcessor* fp;
262 GrColor paintColor; 262 GrColor paintColor;
263 SkAssertResult(shader->asFragmentProcessor(context, paint, NULL, &paintColor , &fp)); 263 SkAssertResult(shader->asFragmentProcessor(context, paint, NULL, &paintColor , &fp));
264 return fp; 264 return fp;
265 } 265 }
266 266
267 ///////////////////////////////////////////////////////////////////// 267 /////////////////////////////////////////////////////////////////////
268 268
269 void GrGLSweepGradient::emitCode(GrGLProgramBuilder* builder, 269 void GrGLSweepGradient::emitCode(GrGLFPBuilder* builder,
270 const GrFragmentProcessor&, 270 const GrFragmentProcessor&,
271 const GrProcessorKey& key, 271 const GrProcessorKey& key,
272 const char* outputColor, 272 const char* outputColor,
273 const char* inputColor, 273 const char* inputColor,
274 const TransformedCoordsArray& coords, 274 const TransformedCoordsArray& coords,
275 const TextureSamplerArray& samplers) { 275 const TextureSamplerArray& samplers) {
276 uint32_t baseKey = key.get32(0); 276 uint32_t baseKey = key.get32(0);
277 this->emitUniforms(builder, baseKey); 277 this->emitUniforms(builder, baseKey);
278 SkString coords2D = builder->getFragmentShaderBuilder()->ensureFSCoords2D(co ords, 0); 278 SkString coords2D = builder->getFragmentShaderBuilder()->ensureFSCoords2D(co ords, 0);
279 const GrGLContextInfo ctxInfo = builder->ctxInfo(); 279 const GrGLContextInfo ctxInfo = builder->ctxInfo();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 str->appendScalar(fCenter.fX); 334 str->appendScalar(fCenter.fX);
335 str->append(", "); 335 str->append(", ");
336 str->appendScalar(fCenter.fY); 336 str->appendScalar(fCenter.fY);
337 str->append(") "); 337 str->append(") ");
338 338
339 this->INHERITED::toString(str); 339 this->INHERITED::toString(str);
340 340
341 str->append(")"); 341 str->append(")");
342 } 342 }
343 #endif 343 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698