Chromium Code Reviews| 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 d4505cf92173dbd4ac18e2dbad9e2e21f15fddd1..e24cbdaa9076308296a910335321e14b4d07edf6 100644 |
| --- a/gpu/command_buffer/service/context_state.h |
| +++ b/gpu/command_buffer/service/context_state.h |
| @@ -355,7 +355,11 @@ struct GPU_EXPORT ContextState { |
| void InitStateManual(const ContextState* prev_state) const; |
| - bool framebuffer_srgb_; |
| + // EnableDisableFramebufferSRGB is called at very high frequency. Cache the |
| + // true value of FRAMEBUFFER_SRGB, if we know it, to elide some of these |
| + // calls. |
| + bool framebuffer_srgb_valid_ = false; |
|
Zhenyao Mo
2016/11/30 19:31:11
This is nicer than the previous tracking mechanism
|
| + bool framebuffer_srgb_ = false; |
| // Generic vertex attrib base types: FLOAT, INT, or UINT. |
| // Each base type is encoded into 2 bits, the lowest 2 bits for location 0, |