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

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1359833004: Stop supporting HW dither (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index c07f704d21342df6ebb7723c0358dca14351c903..cb12fefc3291f48388275702a71e48d555ddd408 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();
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698