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

Side by Side Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 617853003: Revert of Add isSingleComponent bool to getConstantColorComponent (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/SkGradientShaderPriv.h ('k') | src/gpu/GrAARectRenderer.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 "GrAAConvexPathRenderer.h" 9 #include "GrAAConvexPathRenderer.h"
10 10
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 static GrGeometryProcessor* Create() { 510 static GrGeometryProcessor* Create() {
511 GR_CREATE_STATIC_GEOMETRY_PROCESSOR(gQuadEdgeEffect, QuadEdgeEffect, ()) ; 511 GR_CREATE_STATIC_GEOMETRY_PROCESSOR(gQuadEdgeEffect, QuadEdgeEffect, ()) ;
512 gQuadEdgeEffect->ref(); 512 gQuadEdgeEffect->ref();
513 return gQuadEdgeEffect; 513 return gQuadEdgeEffect;
514 } 514 }
515 515
516 virtual ~QuadEdgeEffect() {} 516 virtual ~QuadEdgeEffect() {}
517 517
518 static const char* Name() { return "QuadEdge"; } 518 static const char* Name() { return "QuadEdge"; }
519 519
520 virtual void getConstantColorComponents(GrColor* color,
521 uint32_t* validFlags) const SK_OVERR IDE {
522 *validFlags = 0;
523 }
524
520 const GrShaderVar& inQuadEdge() const { return fInQuadEdge; } 525 const GrShaderVar& inQuadEdge() const { return fInQuadEdge; }
521 526
522 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE { 527 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE {
523 return GrTBackendGeometryProcessorFactory<QuadEdgeEffect>::getInstance() ; 528 return GrTBackendGeometryProcessorFactory<QuadEdgeEffect>::getInstance() ;
524 } 529 }
525 530
526 class GLProcessor : public GrGLGeometryProcessor { 531 class GLProcessor : public GrGLGeometryProcessor {
527 public: 532 public:
528 GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor& ) 533 GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor& )
529 : INHERITED (factory) {} 534 : INHERITED (factory) {}
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 QuadEdgeEffect() 586 QuadEdgeEffect()
582 : fInQuadEdge(this->addVertexAttrib(GrShaderVar("inQuadEdge", 587 : fInQuadEdge(this->addVertexAttrib(GrShaderVar("inQuadEdge",
583 kVec4f_GrSLType, 588 kVec4f_GrSLType,
584 GrShaderVar::kAttribute_ TypeModifier))) { 589 GrShaderVar::kAttribute_ TypeModifier))) {
585 } 590 }
586 591
587 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE { 592 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE {
588 return true; 593 return true;
589 } 594 }
590 595
591 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE {
592 inout->fValidFlags = 0;
593 inout->fIsSingleComponent = false;
594 }
595
596 const GrShaderVar& fInQuadEdge; 596 const GrShaderVar& fInQuadEdge;
597 597
598 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; 598 GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
599 599
600 typedef GrFragmentProcessor INHERITED; 600 typedef GrFragmentProcessor INHERITED;
601 }; 601 };
602 602
603 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(QuadEdgeEffect); 603 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(QuadEdgeEffect);
604 604
605 GrGeometryProcessor* QuadEdgeEffect::TestCreate(SkRandom* random, 605 GrGeometryProcessor* QuadEdgeEffect::TestCreate(SkRandom* random,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 vOffset, // start vertex 713 vOffset, // start vertex
714 0, // start index 714 0, // start index
715 draw.fVertexCnt, 715 draw.fVertexCnt,
716 draw.fIndexCnt, 716 draw.fIndexCnt,
717 &devBounds); 717 &devBounds);
718 vOffset += draw.fVertexCnt; 718 vOffset += draw.fVertexCnt;
719 } 719 }
720 720
721 return true; 721 return true;
722 } 722 }
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698