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

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1955603003: Bring back sRGB-write-control as a caps bit. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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/gl/GrGLCaps.cpp ('k') | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 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 #include "GrGLGpu.h" 8 #include "GrGLGpu.h"
9 #include "GrGLBuffer.h" 9 #include "GrGLBuffer.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 2621 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 GL_CALL_RET(status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER)); 2632 GL_CALL_RET(status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
2633 if (status != GR_GL_FRAMEBUFFER_COMPLETE) { 2633 if (status != GR_GL_FRAMEBUFFER_COMPLETE) {
2634 SkDebugf("GrGLGpu::flushRenderTarget glCheckFramebufferStatus %x \n", status); 2634 SkDebugf("GrGLGpu::flushRenderTarget glCheckFramebufferStatus %x \n", status);
2635 } 2635 }
2636 } 2636 }
2637 #endif 2637 #endif
2638 fHWBoundRenderTargetUniqueID = rtID; 2638 fHWBoundRenderTargetUniqueID = rtID;
2639 this->flushViewport(target->getViewport()); 2639 this->flushViewport(target->getViewport());
2640 } 2640 }
2641 2641
2642 if (this->glCaps().srgbSupport()) { 2642 if (this->glCaps().srgbWriteControl()) {
2643 bool enableSRGBWrite = GrPixelConfigIsSRGB(target->config()) && !disable SRGB; 2643 bool enableSRGBWrite = GrPixelConfigIsSRGB(target->config()) && !disable SRGB;
2644 if (enableSRGBWrite && kYes_TriState != fHWSRGBFramebuffer) { 2644 if (enableSRGBWrite && kYes_TriState != fHWSRGBFramebuffer) {
2645 GL_CALL(Enable(GR_GL_FRAMEBUFFER_SRGB)); 2645 GL_CALL(Enable(GR_GL_FRAMEBUFFER_SRGB));
2646 fHWSRGBFramebuffer = kYes_TriState; 2646 fHWSRGBFramebuffer = kYes_TriState;
2647 } else if (!enableSRGBWrite && kNo_TriState != fHWSRGBFramebuffer) { 2647 } else if (!enableSRGBWrite && kNo_TriState != fHWSRGBFramebuffer) {
2648 GL_CALL(Disable(GR_GL_FRAMEBUFFER_SRGB)); 2648 GL_CALL(Disable(GR_GL_FRAMEBUFFER_SRGB));
2649 fHWSRGBFramebuffer = kNo_TriState; 2649 fHWSRGBFramebuffer = kNo_TriState;
2650 } 2650 }
2651 } 2651 }
2652 2652
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
4246 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4246 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4247 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4247 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4248 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4248 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4249 copyParams->fWidth = texture->width(); 4249 copyParams->fWidth = texture->width();
4250 copyParams->fHeight = texture->height(); 4250 copyParams->fHeight = texture->height();
4251 return true; 4251 return true;
4252 } 4252 }
4253 } 4253 }
4254 return false; 4254 return false;
4255 } 4255 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698