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

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

Issue 699943003: Move GrInvariantOutput out of GrProcessor and into its own class. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Cleanup Created 6 years, 1 month 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
11 #include "GrSingleTextureEffect.h" 11 #include "GrSingleTextureEffect.h"
12 12
13 class GrFragmentStage; 13 class GrFragmentStage;
14 class GrGLConfigConversionEffect; 14 class GrGLConfigConversionEffect;
15 class GrInvariantOutput;
15 16
16 /** 17 /**
17 * This class is used to perform config conversions. Clients may want to read/wr ite data that is 18 * This class is used to perform config conversions. Clients may want to read/wr ite data that is
18 * unpremultiplied. Also on some systems reading/writing BGRA or RGBA is faster. In those cases we 19 * unpremultiplied. Also on some systems reading/writing BGRA or RGBA is faster. In those cases we
19 * read/write using the faster path and perform an R/B swap in the shader if the client data is in 20 * read/write using the faster path and perform an R/B swap in the shader if the client data is in
20 * the slower config. 21 * the slower config.
21 */ 22 */
22 class GrConfigConversionEffect : public GrSingleTextureEffect { 23 class GrConfigConversionEffect : public GrSingleTextureEffect {
23 public: 24 public:
24 /** 25 /**
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 PMConversion* UPMToPMRule); 57 PMConversion* UPMToPMRule);
57 58
58 private: 59 private:
59 GrConfigConversionEffect(GrTexture*, 60 GrConfigConversionEffect(GrTexture*,
60 bool swapRedAndBlue, 61 bool swapRedAndBlue,
61 PMConversion pmConversion, 62 PMConversion pmConversion,
62 const SkMatrix& matrix); 63 const SkMatrix& matrix);
63 64
64 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE; 65 virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE;
65 66
66 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR IDE; 67 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE RRIDE;
67 68
68 bool fSwapRedAndBlue; 69 bool fSwapRedAndBlue;
69 PMConversion fPMConversion; 70 PMConversion fPMConversion;
70 71
71 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 72 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
72 73
73 typedef GrSingleTextureEffect INHERITED; 74 typedef GrSingleTextureEffect INHERITED;
74 }; 75 };
75 76
76 #endif 77 #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