aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrTextureDomain.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-02-15 10:22:23 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-15 17:27:10 +0000
commitf3b995b628ef76bff28b9721dd1e182336156086 (patch)
treea0a0dcb7d12934495c445a73fe18bae9fda42bb7 /src/gpu/effects/GrTextureDomain.cpp
parent2b512d00ef8d6a8eb200396ab0a64294e84c4fa4 (diff)
Clarify when tweak alpha for coverage optimizaton can occur.
Also refer to it directly rather than using the term "modulate" Change-Id: Ifa44a4d46e1be11b567943f58ead24e38f10d03b Reviewed-on: https://skia-review.googlesource.com/8488 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/effects/GrTextureDomain.cpp')
-rw-r--r--src/gpu/effects/GrTextureDomain.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 142cd1d98b..39bc3ccb8a 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -251,9 +251,9 @@ sk_sp<GrFragmentProcessor> GrTextureDomainEffect::Make(GrTexture* texture,
inline GrFragmentProcessor::OptimizationFlags GrTextureDomainEffect::OptFlags(
GrPixelConfig config, GrTextureDomain::Mode mode) {
if (mode == GrTextureDomain::kDecal_Mode || !GrPixelConfigIsOpaque(config)) {
- return GrFragmentProcessor::kModulatesInput_OptimizationFlag;
+ return GrFragmentProcessor::kCompatibleWithCoverageAsAlpha_OptimizationFlag;
} else {
- return GrFragmentProcessor::kModulatesInput_OptimizationFlag |
+ return GrFragmentProcessor::kCompatibleWithCoverageAsAlpha_OptimizationFlag |
GrFragmentProcessor::kPreservesOpaqueInput_OptimizationFlag;
}
}
@@ -398,7 +398,7 @@ sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::Make(GrTe
GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentProcessor(
GrTexture* texture, const SkIRect& subset, const SkIPoint& deviceSpaceOffset)
- : INHERITED(kModulatesInput_OptimizationFlag)
+ : INHERITED(kCompatibleWithCoverageAsAlpha_OptimizationFlag)
, fTextureSampler(texture, GrSamplerParams::ClampNoFilter())
, fTextureDomain(texture, GrTextureDomain::MakeTexelDomain(subset),
GrTextureDomain::kDecal_Mode) {
@@ -422,7 +422,7 @@ GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentPro
sk_sp<GrTextureProxy> proxy,
const SkIRect& subset,
const SkIPoint& deviceSpaceOffset)
- : INHERITED(kModulatesInput_OptimizationFlag)
+ : INHERITED(kCompatibleWithCoverageAsAlpha_OptimizationFlag)
, fTextureSampler(context->textureProvider(), proxy, GrSamplerParams::ClampNoFilter())
, fTextureDomain(proxy.get(), GrTextureDomain::MakeTexelDomain(subset),
GrTextureDomain::kDecal_Mode) {