| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |