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

Unified Diff: gpu/command_buffer/service/context_state.h

Issue 2246823002: Disable FRAMEBUFFER_SRGB when restoring from a null context state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gl_tests on windows Created 4 years, 4 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 | « no previous file | gpu/command_buffer/service/context_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | gpu/command_buffer/service/context_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698