| 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 eb7fc4933dbdcf60682554abe09f2156c2a10890..5c5da8275053b1abfc106abf9dea885472572854 100644
|
| --- a/gpu/command_buffer/service/context_state.cc
|
| +++ b/gpu/command_buffer/service/context_state.cc
|
| @@ -20,14 +20,6 @@ namespace gles2 {
|
|
|
| namespace {
|
|
|
| -static void EnableDisable(GLenum pname, bool enable) {
|
| - if (enable) {
|
| - glEnable(pname);
|
| - } else {
|
| - glDisable(pname);
|
| - }
|
| -}
|
| -
|
| GLuint Get2dServiceId(const TextureUnit& unit) {
|
| return unit.bound_texture_2d.get()
|
| ? unit.bound_texture_2d->service_id() : 0;
|
| @@ -96,7 +88,7 @@ ContextState::ContextState(FeatureInfo* feature_info,
|
| bound_renderbuffer_valid(false),
|
| pack_reverse_row_order(false),
|
| ignore_cached_state(false),
|
| - fbo_binding_for_scissor_workaround_dirty_(false),
|
| + fbo_binding_for_scissor_workaround_dirty(false),
|
| feature_info_(feature_info),
|
| error_state_(ErrorState::Create(error_state_client, logger)) {
|
| Initialize();
|
| @@ -291,6 +283,18 @@ ErrorState* ContextState::GetErrorState() {
|
| return error_state_.get();
|
| }
|
|
|
| +void ContextState::EnableDisable(GLenum pname, bool enable) const {
|
| + if (pname == GL_PRIMITIVE_RESTART_FIXED_INDEX) {
|
| + if (feature_info_->feature_flags().emulate_primitive_restart_fixed_index)
|
| + pname = GL_PRIMITIVE_RESTART;
|
| + }
|
| + if (enable) {
|
| + glEnable(pname);
|
| + } else {
|
| + glDisable(pname);
|
| + }
|
| +}
|
| +
|
| // 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.
|
|
|