Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 7691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7702 return; | 7702 return; |
| 7703 } | 7703 } |
| 7704 } | 7704 } |
| 7705 | 7705 |
| 7706 bool enable_srgb = | 7706 bool enable_srgb = |
| 7707 (read_buffer_has_srgb || draw_buffers_has_srgb) && | 7707 (read_buffer_has_srgb || draw_buffers_has_srgb) && |
| 7708 ((mask & GL_COLOR_BUFFER_BIT) != 0); | 7708 ((mask & GL_COLOR_BUFFER_BIT) != 0); |
| 7709 bool encode_srgb_only = | 7709 bool encode_srgb_only = |
| 7710 (draw_buffers_has_srgb && !read_buffer_has_srgb) && | 7710 (draw_buffers_has_srgb && !read_buffer_has_srgb) && |
| 7711 ((mask & GL_COLOR_BUFFER_BIT) != 0); | 7711 ((mask & GL_COLOR_BUFFER_BIT) != 0); |
| 7712 // TODO(yunchao) Need to revisit here if the read buffer is a multi-sampled | |
| 7713 // renderbuffer. | |
|
piman
2016/09/20 20:55:25
As discussed in that other CL, there is just one m
| |
| 7714 if (!enable_srgb || | 7712 if (!enable_srgb || |
| 7715 read_buffer_samples > 0 || | 7713 read_buffer_samples > 0 || |
| 7716 !feature_info_->feature_flags().desktop_srgb_support || | 7714 !feature_info_->feature_flags().desktop_srgb_support || |
| 7717 gl_version_info().IsAtLeastGL(4, 4) || | 7715 gl_version_info().IsAtLeastGL(4, 4) || |
| 7718 (gl_version_info().IsAtLeastGL(4, 2) && encode_srgb_only)) { | 7716 (gl_version_info().IsAtLeastGL(4, 2) && encode_srgb_only)) { |
| 7719 if (enable_srgb && gl_version_info().IsAtLeastGL(4, 2)) { | 7717 if (enable_srgb && gl_version_info().IsAtLeastGL(4, 2)) { |
| 7720 state_.EnableDisableFramebufferSRGB(enable_srgb); | 7718 state_.EnableDisableFramebufferSRGB(enable_srgb); |
| 7721 } | 7719 } |
| 7722 | 7720 |
| 7723 // TODO(yunchao) Need to revisit here. In GLES spec, blitFramebuffer | 7721 // TODO(yunchao) Need to revisit here. In GLES spec, blitFramebuffer |
| (...skipping 10351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 18075 } | 18073 } |
| 18076 | 18074 |
| 18077 // Include the auto-generated part of this file. We split this because it means | 18075 // Include the auto-generated part of this file. We split this because it means |
| 18078 // we can easily edit the non-auto generated parts right here in this file | 18076 // we can easily edit the non-auto generated parts right here in this file |
| 18079 // instead of having to edit some template or the code generator. | 18077 // instead of having to edit some template or the code generator. |
| 18080 #include "base/macros.h" | 18078 #include "base/macros.h" |
| 18081 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 18079 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 18082 | 18080 |
| 18083 } // namespace gles2 | 18081 } // namespace gles2 |
| 18084 } // namespace gpu | 18082 } // namespace gpu |
| OLD | NEW |