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

Side by Side Diff: src/gpu/effects/GrCustomCoordsTextureEffect.h

Issue 608253002: Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix isSolidWhite 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/GrConvolutionEffect.h ('k') | src/gpu/effects/GrCustomCoordsTextureEffect.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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 #ifndef GrCustomCoordsTextureEffect_DEFINED 8 #ifndef GrCustomCoordsTextureEffect_DEFINED
9 #define GrCustomCoordsTextureEffect_DEFINED 9 #define GrCustomCoordsTextureEffect_DEFINED
10 10
(...skipping 10 matching lines...) Expand all
21 class GrCustomCoordsTextureEffect : public GrGeometryProcessor { 21 class GrCustomCoordsTextureEffect : public GrGeometryProcessor {
22 public: 22 public:
23 static GrGeometryProcessor* Create(GrTexture* tex, const GrTextureParams& p) { 23 static GrGeometryProcessor* Create(GrTexture* tex, const GrTextureParams& p) {
24 return SkNEW_ARGS(GrCustomCoordsTextureEffect, (tex, p)); 24 return SkNEW_ARGS(GrCustomCoordsTextureEffect, (tex, p));
25 } 25 }
26 26
27 virtual ~GrCustomCoordsTextureEffect() {} 27 virtual ~GrCustomCoordsTextureEffect() {}
28 28
29 static const char* Name() { return "Texture"; } 29 static const char* Name() { return "Texture"; }
30 30
31 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags ) const SK_OVERRIDE;
32
33 const GrShaderVar& inTextureCoords() const { return fInTextureCoords; } 31 const GrShaderVar& inTextureCoords() const { return fInTextureCoords; }
34 32
35 typedef GrGLCustomCoordsTextureEffect GLProcessor; 33 typedef GrGLCustomCoordsTextureEffect GLProcessor;
36 34
37 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE; 35 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE;
38 36
39 private: 37 private:
40 GrCustomCoordsTextureEffect(GrTexture* texture, const GrTextureParams& param s); 38 GrCustomCoordsTextureEffect(GrTexture* texture, const GrTextureParams& param s);
41 39
42 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; 40 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE;
43 41
42 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE;
43
44 GrTextureAccess fTextureAccess; 44 GrTextureAccess fTextureAccess;
45 const GrShaderVar& fInTextureCoords; 45 const GrShaderVar& fInTextureCoords;
46 46
47 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; 47 GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
48 48
49 typedef GrGeometryProcessor INHERITED; 49 typedef GrGeometryProcessor INHERITED;
50 }; 50 };
51 51
52 #endif 52 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConvolutionEffect.h ('k') | src/gpu/effects/GrCustomCoordsTextureEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698