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

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

Issue 14308014: Clean up of GLES2 Command Decoder by moving some of the error state into a separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the remaining tests. Added mock ErrorState. Created 7 years, 8 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
Index: gpu/command_buffer/service/context_state.cc
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc
index 0e5ee26dd87189d46680dc2f94fedc9edce6ad43..b78da810c1765c5ce436ea1e56584006b31d583f 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -34,7 +34,7 @@ TextureUnit::TextureUnit()
TextureUnit::~TextureUnit() {
}
-ContextState::ContextState(FeatureInfo* feature_info)
+ContextState::ContextState(FeatureInfo* feature_info, Logger* logger)
: pack_alignment(4),
unpack_alignment(4),
active_texture_unit(0),
@@ -42,7 +42,8 @@ ContextState::ContextState(FeatureInfo* feature_info)
hint_fragment_shader_derivative(GL_DONT_CARE),
pack_reverse_row_order(false),
fbo_binding_for_scissor_workaround_dirty_(false),
- feature_info_(feature_info) {
+ feature_info_(feature_info),
+ error_state_(logger) {
Initialize();
}
@@ -161,6 +162,10 @@ void ContextState::RestoreState() const {
RestoreGlobalState();
}
+ErrorState* ContextState::GetErrorState() {
+ return &error_state_;
+}
+
// Include the auto-generated part of this file. We split this because it means
// we can easily edit the non-auto generated parts right here in this file
// instead of having to edit some template or the code generator.

Powered by Google App Engine
This is Rietveld 408576698