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

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

Issue 643743003: Create helper functions to use in computeInvariantOutput calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update blurMaskFilter 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.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 fCoordTransform.getMatrix().cheapEqualTo(other.fCoordTransform.ge tMatrix()) && 42 fCoordTransform.getMatrix().cheapEqualTo(other.fCoordTransform.ge tMatrix()) &&
43 fCoordTransform.sourceCoords() == other.fCoordTransform.sourceCoo rds(); 43 fCoordTransform.sourceCoords() == other.fCoordTransform.sourceCoo rds();
44 } 44 }
45 45
46 /** 46 /**
47 * Can be used as a helper to implement subclass onComputeInvariantOutput(). It assumes that 47 * Can be used as a helper to implement subclass onComputeInvariantOutput(). It assumes that
48 * the subclass output color will be a modulation of the input color with a value read from the 48 * the subclass output color will be a modulation of the input color with a value read from the
49 * texture. 49 * texture.
50 */ 50 */
51 void updateInvariantOutputForModulation(InvariantOutput* inout) const { 51 void updateInvariantOutputForModulation(InvariantOutput* inout) const {
52 if (inout->isOpaque() && GrPixelConfigIsOpaque(this->texture(0)->config( ))) { 52 if (GrPixelConfigIsOpaque(this->texture(0)->config())) {
53 inout->fValidFlags = kA_GrColorComponentFlag; 53 inout->mulByUnknownOpaqueColor();
54 } else { 54 } else {
55 inout->fValidFlags = 0; 55 inout->mulByUnknownColor();
56 } 56 }
57 } 57 }
58 58
59 private: 59 private:
60 GrCoordTransform fCoordTransform; 60 GrCoordTransform fCoordTransform;
61 GrTextureAccess fTextureAccess; 61 GrTextureAccess fTextureAccess;
62 62
63 typedef GrFragmentProcessor INHERITED; 63 typedef GrFragmentProcessor INHERITED;
64 }; 64 };
65 65
66 #endif 66 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.cpp ('k') | src/gpu/effects/GrTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698