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

Side by Side Diff: src/gpu/effects/GrSimpleTextureEffect.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/gpu/effects/GrSimpleTextureEffect.h ('k') | src/gpu/effects/GrSingleTextureEffect.h » ('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 2012 Google Inc. 2 * Copyright 2012 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 "gl/builders/GrGLProgramBuilder.h" 8 #include "gl/builders/GrGLProgramBuilder.h"
9 #include "GrSimpleTextureEffect.h" 9 #include "GrSimpleTextureEffect.h"
10 #include "gl/GrGLProcessor.h" 10 #include "gl/GrGLProcessor.h"
(...skipping 23 matching lines...) Expand all
34 coords[0].getType()); 34 coords[0].getType());
35 fsBuilder->codeAppend(";\n"); 35 fsBuilder->codeAppend(";\n");
36 } 36 }
37 37
38 private: 38 private:
39 typedef GrGLFragmentProcessor INHERITED; 39 typedef GrGLFragmentProcessor INHERITED;
40 }; 40 };
41 41
42 /////////////////////////////////////////////////////////////////////////////// 42 ///////////////////////////////////////////////////////////////////////////////
43 43
44 void GrSimpleTextureEffect::onComputeInvariantOutput(InvariantOutput* inout) con st { 44 void GrSimpleTextureEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const {
45 this->updateInvariantOutputForModulation(inout); 45 this->updateConstantColorComponentsForModulation(color, validFlags);
46 inout->fIsSingleComponent = false;
47 } 46 }
48 47
49 const GrBackendFragmentProcessorFactory& GrSimpleTextureEffect::getFactory() con st { 48 const GrBackendFragmentProcessorFactory& GrSimpleTextureEffect::getFactory() con st {
50 return GrTBackendFragmentProcessorFactory<GrSimpleTextureEffect>::getInstanc e(); 49 return GrTBackendFragmentProcessorFactory<GrSimpleTextureEffect>::getInstanc e();
51 } 50 }
52 51
53 /////////////////////////////////////////////////////////////////////////////// 52 ///////////////////////////////////////////////////////////////////////////////
54 53
55 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSimpleTextureEffect); 54 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSimpleTextureEffect);
56 55
(...skipping 17 matching lines...) Expand all
74 73
75 static const GrCoordSet kCoordSets[] = { 74 static const GrCoordSet kCoordSets[] = {
76 kLocal_GrCoordSet, 75 kLocal_GrCoordSet,
77 kPosition_GrCoordSet 76 kPosition_GrCoordSet
78 }; 77 };
79 GrCoordSet coordSet = kCoordSets[random->nextULessThan(SK_ARRAY_COUNT(kCoord Sets))]; 78 GrCoordSet coordSet = kCoordSets[random->nextULessThan(SK_ARRAY_COUNT(kCoord Sets))];
80 79
81 const SkMatrix& matrix = GrProcessorUnitTest::TestMatrix(random); 80 const SkMatrix& matrix = GrProcessorUnitTest::TestMatrix(random);
82 return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet); 81 return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet);
83 } 82 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.h ('k') | src/gpu/effects/GrSingleTextureEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698