Index: gpu/command_buffer/service/context_state.h |
diff --git a/gpu/command_buffer/service/context_state.h b/gpu/command_buffer/service/context_state.h |
index 2378eeb3906693caec6f0b98b451a2b5eeedc1c9..7c53a72ba78dc23acdac519c8974dfb204e9a0a1 100644 |
--- a/gpu/command_buffer/service/context_state.h |
+++ b/gpu/command_buffer/service/context_state.h |
@@ -153,6 +153,12 @@ GPU_EXPORT void Vec4::SetValues<GLint>(const GLint* values); |
template <> |
GPU_EXPORT void Vec4::SetValues<GLuint>(const GLuint* values); |
+enum FramebufferSRGBState { |
+ FRAMEBUFFER_SRGB_UNDEFINED, |
Zhenyao Mo
2016/08/15 22:37:27
Do we really need this? If the prev_context is nu
qiankun
2016/08/15 23:01:06
Yes, we do need this. See the bug this CL will fix
Zhenyao Mo
2016/08/16 17:16:48
This might fix the bug, but it's not correct. If
qiankun
2016/08/16 21:30:09
framebuffer_srgb_ is used to avoid redundant glEna
qiankun
2016/08/16 21:42:46
FRAMEBUFFER_SRGB is set dynamically on demand in c
|
+ FRAMEBUFFER_SRGB_DISABLED, |
+ FRAMEBUFFER_SRGB_ENABLED |
+}; |
+ |
struct GPU_EXPORT ContextState { |
enum Dimension { |
k2D, |
@@ -272,7 +278,7 @@ struct GPU_EXPORT ContextState { |
PixelStoreParams GetPackParams(); |
PixelStoreParams GetUnpackParams(Dimension dimension); |
- void EnableDisableFramebufferSRGB(bool enable); |
+ void EnableDisableFramebufferSRGB(FramebufferSRGBState enable); |
#include "gpu/command_buffer/service/context_state_autogen.h" |
@@ -341,7 +347,7 @@ struct GPU_EXPORT ContextState { |
void InitStateManual(const ContextState* prev_state) const; |
- bool framebuffer_srgb_; |
+ FramebufferSRGBState framebuffer_srgb_; |
// Generic vertex attrib base types: FLOAT, INT, or UINT. |
// Each base type is encoded into 2 bits, the lowest 2 bits for location 0, |