diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-28 13:46:42 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-28 13:46:42 +0000 |
commit | b8eb2e89edf914caf5479baeffcb670d3e93f496 (patch) | |
tree | 328527b349cf6cc24c07be4f466ebe35a34c230f /src/gpu/GrDrawState.cpp | |
parent | 51c81123afbf9a09fda43ca2d287fcf4f5593e9c (diff) |
Make GrGLShaderBuilder::TextureSampler extract only required info from GrTextureAccess.
This will make it possible to init a TextureSampler without a texture or a specific config.
Also unify two separate bitfields of color components in GPU code.
Review URL: https://codereview.chromium.org/13121002
git-svn-id: http://skia.googlecode.com/svn/trunk@8428 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrDrawState.cpp')
-rw-r--r-- | src/gpu/GrDrawState.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp index e10899958b..f9e12cc207 100644 --- a/src/gpu/GrDrawState.cpp +++ b/src/gpu/GrDrawState.cpp @@ -236,7 +236,7 @@ bool GrDrawState::srcAlphaWillBeOne(GrAttribBindings bindings) const { validComponentFlags = 0; color = 0; // not strictly necessary but we get false alarms from tools about uninit. } else { - validComponentFlags = GrEffect::kAll_ValidComponentFlags; + validComponentFlags = kRGBA_GrColorComponentFlags; color = this->getColor(); } @@ -275,7 +275,7 @@ bool GrDrawState::srcAlphaWillBeOne(GrAttribBindings bindings) const { } } } - return (GrEffect::kA_ValidComponentFlag & validComponentFlags) && 0xff == GrColorUnpackA(color); + return (kA_GrColorComponentFlag & validComponentFlags) && 0xff == GrColorUnpackA(color); } bool GrDrawState::hasSolidCoverage(GrAttribBindings bindings) const { @@ -291,7 +291,7 @@ bool GrDrawState::hasSolidCoverage(GrAttribBindings bindings) const { validComponentFlags = 0; } else { coverage = fCommon.fCoverage; - validComponentFlags = GrEffect::kAll_ValidComponentFlags; + validComponentFlags = kRGBA_GrColorComponentFlags; } // Run through the coverage stages and see if the coverage will be all ones at the end. @@ -301,7 +301,7 @@ bool GrDrawState::hasSolidCoverage(GrAttribBindings bindings) const { (*effect)->getConstantColorComponents(&coverage, &validComponentFlags); } } - return (GrEffect::kAll_ValidComponentFlags == validComponentFlags) && (0xffffffff == coverage); + return (kRGBA_GrColorComponentFlags == validComponentFlags) && (0xffffffff == coverage); } //////////////////////////////////////////////////////////////////////////////// |