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

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: Fix merge error. 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
« no previous file with comments | « gpu/command_buffer/service/context_state.h ('k') | gpu/command_buffer/service/error_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a9274b8c85ad154563141155652aedc8c8fe88b8 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -6,6 +6,7 @@
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/service/buffer_manager.h"
+#include "gpu/command_buffer/service/error_state.h"
#include "gpu/command_buffer/service/framebuffer_manager.h"
#include "gpu/command_buffer/service/program_manager.h"
#include "gpu/command_buffer/service/renderbuffer_manager.h"
@@ -34,7 +35,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 +43,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_(ErrorState::Create(logger)) {
Initialize();
}
@@ -161,6 +163,10 @@ void ContextState::RestoreState() const {
RestoreGlobalState();
}
+ErrorState* ContextState::GetErrorState() {
+ return error_state_.get();
+}
+
// 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.
« no previous file with comments | « gpu/command_buffer/service/context_state.h ('k') | gpu/command_buffer/service/error_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698