diff options
author | 2015-09-22 11:38:46 -0700 | |
---|---|---|
committer | 2015-09-22 11:38:46 -0700 | |
commit | aca31fea8ca620bfdb2887641b7ba56e401a72d7 (patch) | |
tree | 9caecaf595521a246cd81aeb74dbd7756046ed18 /src/gpu/gl/GrGLGpu.cpp | |
parent | a16e8bcef165aabb2463339e80fdd6f1fa19b8b9 (diff) |
Stop supporting HW dither
Review URL: https://codereview.chromium.org/1359833004
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index c07f704d21..cb12fefc32 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -286,7 +286,6 @@ void GrGLGpu::onResetContext(uint32_t resetBits) { GL_CALL(DepthMask(GR_GL_FALSE)); fHWDrawFace = GrPipelineBuilder::kInvalid_DrawFace; - fHWDitherEnabled = kUnknown_TriState; if (kGL_GrGLStandard == this->glStandard()) { // Desktop-only state that we never change @@ -323,6 +322,7 @@ void GrGLGpu::onResetContext(uint32_t resetBits) { fHWWriteToColor = kUnknown_TriState; // we only ever use lines in hairline mode GL_CALL(LineWidth(1)); + GL_CALL(Disable(GR_GL_DITHER)); } if (resetBits & kMSAAEnable_GrGLBackendState) { @@ -1445,7 +1445,6 @@ bool GrGLGpu::flushGLState(const DrawArgs& args) { const GrPipeline& pipeline = *args.fPipeline; args.fPipeline->getXferProcessor()->getBlendInfo(&blendInfo); - this->flushDither(pipeline.isDitherState()); this->flushColorWrite(blendInfo.fWriteColor); this->flushDrawFace(pipeline.getDrawFace()); @@ -2344,20 +2343,6 @@ void GrGLGpu::bindTexture(int unitIdx, const GrTextureParams& params, GrGLTextur texture->setCachedTexParams(newTexParams, this->getResetTimestamp()); } -void GrGLGpu::flushDither(bool dither) { - if (dither) { - if (kYes_TriState != fHWDitherEnabled) { - GL_CALL(Enable(GR_GL_DITHER)); - fHWDitherEnabled = kYes_TriState; - } - } else { - if (kNo_TriState != fHWDitherEnabled) { - GL_CALL(Disable(GR_GL_DITHER)); - fHWDitherEnabled = kNo_TriState; - } - } -} - void GrGLGpu::flushColorWrite(bool writeColor) { if (!writeColor) { if (kNo_TriState != fHWWriteToColor) { @@ -2930,7 +2915,6 @@ void GrGLGpu::copySurfaceAsDraw(GrSurface* dst, blendInfo.reset(); this->flushBlend(blendInfo); this->flushColorWrite(true); - this->flushDither(false); this->flushDrawFace(GrPipelineBuilder::kBoth_DrawFace); this->flushHWAAState(dstRT, false); this->disableScissor(); |