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

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

Issue 1110033004: Make XPFragmentBuilder only Builder with access to DstCopy. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 "SkTwoPointRadialGradient.h" 9 #include "SkTwoPointRadialGradient.h"
10 10
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 SkString p3; 582 SkString p3;
583 SkString p4; 583 SkString p4;
584 SkString p5; 584 SkString p5;
585 builder->getUniformVariable(fParamUni).appendArrayAccess(0, &p0); 585 builder->getUniformVariable(fParamUni).appendArrayAccess(0, &p0);
586 builder->getUniformVariable(fParamUni).appendArrayAccess(1, &p1); 586 builder->getUniformVariable(fParamUni).appendArrayAccess(1, &p1);
587 builder->getUniformVariable(fParamUni).appendArrayAccess(2, &p2); 587 builder->getUniformVariable(fParamUni).appendArrayAccess(2, &p2);
588 builder->getUniformVariable(fParamUni).appendArrayAccess(3, &p3); 588 builder->getUniformVariable(fParamUni).appendArrayAccess(3, &p3);
589 builder->getUniformVariable(fParamUni).appendArrayAccess(4, &p4); 589 builder->getUniformVariable(fParamUni).appendArrayAccess(4, &p4);
590 builder->getUniformVariable(fParamUni).appendArrayAccess(5, &p5); 590 builder->getUniformVariable(fParamUni).appendArrayAccess(5, &p5);
591 591
592 GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder(); 592 GrGLFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
593 // We interpolate the linear component in coords[1]. 593 // We interpolate the linear component in coords[1].
594 SkASSERT(coords[0].getType() == coords[1].getType()); 594 SkASSERT(coords[0].getType() == coords[1].getType());
595 const char* coords2D; 595 const char* coords2D;
596 SkString bVar; 596 SkString bVar;
597 if (kVec3f_GrSLType == coords[0].getType()) { 597 if (kVec3f_GrSLType == coords[0].getType()) {
598 fsBuilder->codeAppendf("\tvec3 interpolants = vec3(%s.xy, %s.x) / %s.z;\ n", 598 fsBuilder->codeAppendf("\tvec3 interpolants = vec3(%s.xy, %s.x) / %s.z;\ n",
599 coords[0].c_str(), coords[1].c_str(), coords[0].c _str()); 599 coords[0].c_str(), coords[1].c_str(), coords[0].c _str());
600 coords2D = "interpolants.xy"; 600 coords2D = "interpolants.xy";
601 bVar = "interpolants.z"; 601 bVar = "interpolants.z";
602 } else { 602 } else {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 #else 715 #else
716 716
717 bool SkTwoPointRadialGradient::asFragmentProcessor(GrContext*, const SkPaint&, c onst SkMatrix&, 717 bool SkTwoPointRadialGradient::asFragmentProcessor(GrContext*, const SkPaint&, c onst SkMatrix&,
718 const SkMatrix*, 718 const SkMatrix*,
719 GrColor*, GrFragmentProcessor **) const { 719 GrColor*, GrFragmentProcessor **) const {
720 SkDEBUGFAIL("Should not call in GPU-less build"); 720 SkDEBUGFAIL("Should not call in GPU-less build");
721 return false; 721 return false;
722 } 722 }
723 723
724 #endif 724 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698