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

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

Issue 794843002: Revert of Remove GP from drawstate, revision of invariant output for GP (Closed) Base URL: https://skia.googlesource.com/skia.git@color-to-gp
Patch Set: Created 6 years 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/GrRRectEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.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 GrSingleTextureEffect_DEFINED 8 #ifndef GrSingleTextureEffect_DEFINED
9 #define GrSingleTextureEffect_DEFINED 9 #define GrSingleTextureEffect_DEFINED
10 10
(...skipping 23 matching lines...) Expand all
34 const GrTextureParams&, 34 const GrTextureParams&,
35 GrCoordSet = kLocal_GrCoordSet); 35 GrCoordSet = kLocal_GrCoordSet);
36 36
37 /** 37 /**
38 * Can be used as a helper to implement subclass onComputeInvariantOutput(). It assumes that 38 * Can be used as a helper to implement subclass onComputeInvariantOutput(). It assumes that
39 * the subclass output color will be a modulation of the input color with a value read from the 39 * the subclass output color will be a modulation of the input color with a value read from the
40 * texture. 40 * texture.
41 */ 41 */
42 void updateInvariantOutputForModulation(GrInvariantOutput* inout) const { 42 void updateInvariantOutputForModulation(GrInvariantOutput* inout) const {
43 if (GrPixelConfigIsAlphaOnly(this->texture(0)->config())) { 43 if (GrPixelConfigIsAlphaOnly(this->texture(0)->config())) {
44 inout->mulByUnknownSingleComponent(); 44 inout->mulByUnknownAlpha();
45 } else if (GrPixelConfigIsOpaque(this->texture(0)->config())) { 45 } else if (GrPixelConfigIsOpaque(this->texture(0)->config())) {
46 inout->mulByUnknownOpaqueFourComponents(); 46 inout->mulByUnknownOpaqueColor();
47 } else { 47 } else {
48 inout->mulByUnknownFourComponents(); 48 inout->mulByUnknownColor();
49 } 49 }
50 } 50 }
51 51
52 private: 52 private:
53 GrCoordTransform fCoordTransform; 53 GrCoordTransform fCoordTransform;
54 GrTextureAccess fTextureAccess; 54 GrTextureAccess fTextureAccess;
55 55
56 typedef GrFragmentProcessor INHERITED; 56 typedef GrFragmentProcessor INHERITED;
57 }; 57 };
58 58
59 #endif 59 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrRRectEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698