Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| index 29ba3d60671cf9c7159eee4eddfe57db330c7873..8dfa3f0ee4da53ed6b4f2481455e7845dc6744fb 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -670,6 +670,7 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>, |
| // Overridden from GLES2Decoder. |
| virtual bool Initialize(gfx::GLContext* context, |
| const gfx::Size& size, |
| + const DisallowedExtensions& disalloowed, |
|
zmo
2011/03/07 23:34:29
an extra o, also, it would be better to use disall
|
| const char* allowed_extensions, |
| const std::vector<int32>& attribs, |
| GLES2Decoder* parent, |
| @@ -1442,6 +1443,8 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>, |
| scoped_ptr<ShaderTranslator> vertex_translator_; |
| scoped_ptr<ShaderTranslator> fragment_translator_; |
| + DisallowedExtensions disallowed_extensions_; |
| + |
| // Cached from ContextGroup |
| const Validators* validators_; |
| FeatureInfo* feature_info_; |
| @@ -1789,6 +1792,7 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group) |
| bool GLES2DecoderImpl::Initialize(gfx::GLContext* context, |
| const gfx::Size& size, |
| + const DisallowedExtensions& disallowed, |
| const char* allowed_extensions, |
| const std::vector<int32>& attribs, |
| GLES2Decoder* parent, |
| @@ -1811,7 +1815,7 @@ bool GLES2DecoderImpl::Initialize(gfx::GLContext* context, |
| return false; |
| } |
| - if (!group_->Initialize(allowed_extensions)) { |
| + if (!group_->Initialize(disallowed, allowed_extensions)) { |
| LOG(ERROR) << "GPUProcessor::InitializeCommon failed because group " |
| << "failed to initialize."; |
| Destroy(); |
| @@ -1819,6 +1823,7 @@ bool GLES2DecoderImpl::Initialize(gfx::GLContext* context, |
| } |
| CHECK_GL_ERROR(); |
| + disallowed_extensions_ = disallowed; |
| vertex_attrib_manager_.Initialize(group_->max_vertex_attribs()); |
| @@ -6120,7 +6125,7 @@ error::Error GLES2DecoderImpl::HandleGetRequestableExtensionsCHROMIUM( |
| const gles2::GetRequestableExtensionsCHROMIUM& c) { |
| Bucket* bucket = CreateBucket(c.bucket_id); |
| scoped_ptr<FeatureInfo> info(new FeatureInfo()); |
| - info->Initialize(NULL); |
| + info->Initialize(disallowed_extensions_, NULL); |
| bucket->SetFromString(info->extensions().c_str()); |
| return error::kNoError; |
| } |