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

Side by Side Diff: src/effects/gradients/SkRadialGradient.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
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/effects/gradients/SkSweepGradient.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 /* 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 "SkRadialGradient.h" 9 #include "SkRadialGradient.h"
10 #include "SkRadialGradient_Table.h" 10 #include "SkRadialGradient_Table.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 #include "gl/builders/GrGLProgramBuilder.h" 473 #include "gl/builders/GrGLProgramBuilder.h"
474 #include "SkGr.h" 474 #include "SkGr.h"
475 475
476 class GrGLRadialGradient : public GrGLGradientEffect { 476 class GrGLRadialGradient : public GrGLGradientEffect {
477 public: 477 public:
478 478
479 GrGLRadialGradient(const GrBackendProcessorFactory& factory, 479 GrGLRadialGradient(const GrBackendProcessorFactory& factory,
480 const GrProcessor&) : INHERITED (factory) { } 480 const GrProcessor&) : INHERITED (factory) { }
481 virtual ~GrGLRadialGradient() { } 481 virtual ~GrGLRadialGradient() { }
482 482
483 virtual void emitCode(GrGLProgramBuilder*, 483 virtual void emitCode(GrGLFPBuilder*,
484 const GrFragmentProcessor&, 484 const GrFragmentProcessor&,
485 const GrProcessorKey&, 485 const GrProcessorKey&,
486 const char* outputColor, 486 const char* outputColor,
487 const char* inputColor, 487 const char* inputColor,
488 const TransformedCoordsArray&, 488 const TransformedCoordsArray&,
489 const TextureSamplerArray&) SK_OVERRIDE; 489 const TextureSamplerArray&) SK_OVERRIDE;
490 490
491 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso rKeyBuilder* b) { 491 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso rKeyBuilder* b) {
492 b->add32(GenBaseGradientKey(processor)); 492 b->add32(GenBaseGradientKey(processor));
493 } 493 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 tm)); 552 tm));
553 SkPaint paint; 553 SkPaint paint;
554 GrColor paintColor; 554 GrColor paintColor;
555 GrFragmentProcessor* fp; 555 GrFragmentProcessor* fp;
556 SkAssertResult(shader->asFragmentProcessor(context, paint, NULL, &paintColor , &fp)); 556 SkAssertResult(shader->asFragmentProcessor(context, paint, NULL, &paintColor , &fp));
557 return fp; 557 return fp;
558 } 558 }
559 559
560 ///////////////////////////////////////////////////////////////////// 560 /////////////////////////////////////////////////////////////////////
561 561
562 void GrGLRadialGradient::emitCode(GrGLProgramBuilder* builder, 562 void GrGLRadialGradient::emitCode(GrGLFPBuilder* builder,
563 const GrFragmentProcessor&, 563 const GrFragmentProcessor&,
564 const GrProcessorKey& key, 564 const GrProcessorKey& key,
565 const char* outputColor, 565 const char* outputColor,
566 const char* inputColor, 566 const char* inputColor,
567 const TransformedCoordsArray& coords, 567 const TransformedCoordsArray& coords,
568 const TextureSamplerArray& samplers) { 568 const TextureSamplerArray& samplers) {
569 uint32_t baseKey = key.get32(0); 569 uint32_t baseKey = key.get32(0);
570 this->emitUniforms(builder, baseKey); 570 this->emitUniforms(builder, baseKey);
571 SkString t("length("); 571 SkString t("length(");
572 t.append(builder->getFragmentShaderBuilder()->ensureFSCoords2D(coords, 0)); 572 t.append(builder->getFragmentShaderBuilder()->ensureFSCoords2D(coords, 0));
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 str->appendScalar(fCenter.fY); 620 str->appendScalar(fCenter.fY);
621 str->append(") radius: "); 621 str->append(") radius: ");
622 str->appendScalar(fRadius); 622 str->appendScalar(fRadius);
623 str->append(" "); 623 str->append(" ");
624 624
625 this->INHERITED::toString(str); 625 this->INHERITED::toString(str);
626 626
627 str->append(")"); 627 str->append(")");
628 } 628 }
629 #endif 629 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698