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

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

Issue 2519603002: Add command buffer support for EXT_sRGB_write_control (Closed)
Patch Set: And more cleanup Created 4 years, 1 month 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
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,

Powered by Google App Engine
This is Rietveld 408576698