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

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

Issue 374923002: Goodbye GrEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@noref3
Patch Set: Address comments Created 6 years, 5 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/GrBicubicEffect.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.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 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 #ifndef GrConfigConversionEffect_DEFINED 8 #ifndef GrConfigConversionEffect_DEFINED
9 #define GrConfigConversionEffect_DEFINED 9 #define GrConfigConversionEffect_DEFINED
10 10
(...skipping 17 matching lines...) Expand all
28 kNone_PMConversion = 0, 28 kNone_PMConversion = 0,
29 kMulByAlpha_RoundUp_PMConversion, 29 kMulByAlpha_RoundUp_PMConversion,
30 kMulByAlpha_RoundDown_PMConversion, 30 kMulByAlpha_RoundDown_PMConversion,
31 kDivByAlpha_RoundUp_PMConversion, 31 kDivByAlpha_RoundUp_PMConversion,
32 kDivByAlpha_RoundDown_PMConversion, 32 kDivByAlpha_RoundDown_PMConversion,
33 33
34 kPMConversionCnt 34 kPMConversionCnt
35 }; 35 };
36 36
37 // Installs an effect in the GrEffectStage to perform a config conversion. 37 // Installs an effect in the GrEffectStage to perform a config conversion.
38 static const GrEffectRef* Create(GrTexture*, 38 static const GrEffect* Create(GrTexture*,
39 bool swapRedAndBlue, 39 bool swapRedAndBlue,
40 PMConversion pmConversion, 40 PMConversion pmConversion,
41 const SkMatrix& matrix); 41 const SkMatrix& matrix);
42 42
43 static const char* Name() { return "Config Conversion"; } 43 static const char* Name() { return "Config Conversion"; }
44 typedef GrGLConfigConversionEffect GLEffect; 44 typedef GrGLConfigConversionEffect GLEffect;
45 45
46 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE; 46 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE;
47 47
48 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags ) const SK_OVERRIDE; 48 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags ) const SK_OVERRIDE;
49 49
50 bool swapsRedAndBlue() const { return fSwapRedAndBlue; } 50 bool swapsRedAndBlue() const { return fSwapRedAndBlue; }
51 PMConversion pmConversion() const { return fPMConversion; } 51 PMConversion pmConversion() const { return fPMConversion; }
(...skipping 17 matching lines...) Expand all
69 69
70 bool fSwapRedAndBlue; 70 bool fSwapRedAndBlue;
71 PMConversion fPMConversion; 71 PMConversion fPMConversion;
72 72
73 GR_DECLARE_EFFECT_TEST; 73 GR_DECLARE_EFFECT_TEST;
74 74
75 typedef GrSingleTextureEffect INHERITED; 75 typedef GrSingleTextureEffect INHERITED;
76 }; 76 };
77 77
78 #endif 78 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBicubicEffect.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698