Index: gpu/command_buffer/service/in_process_command_buffer.cc |
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc |
index c1d46207eb68e3e5e45f47155cbc6b48de9552d1..f58140fae778d8c24366b6bfce6444ea2b3d1e9a 100644 |
--- a/gpu/command_buffer/service/in_process_command_buffer.cc |
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc |
@@ -147,10 +147,12 @@ scoped_refptr<InProcessCommandBuffer::Service> GetInitialService( |
} // anonyous namespace |
-InProcessCommandBuffer::Service::Service() {} |
+InProcessCommandBuffer::Service::Service() |
+ : gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()) {} |
InProcessCommandBuffer::Service::Service(const GpuPreferences& gpu_preferences) |
- : gpu_preferences_(gpu_preferences) {} |
+ : gpu_preferences_(gpu_preferences), |
+ gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()) {} |
InProcessCommandBuffer::Service::~Service() {} |
@@ -159,6 +161,11 @@ InProcessCommandBuffer::Service::gpu_preferences() { |
return gpu_preferences_; |
} |
+const gpu::GpuDriverBugWorkarounds& |
+InProcessCommandBuffer::Service::gpu_driver_bug_workarounds() { |
+ return gpu_driver_bug_workarounds_; |
+} |
+ |
scoped_refptr<gfx::GLShareGroup> |
InProcessCommandBuffer::Service::share_group() { |
if (!share_group_.get()) |
@@ -338,16 +345,18 @@ bool InProcessCommandBuffer::InitializeOnGpuThread( |
: service_->share_group(); |
bool bind_generates_resource = false; |
+ scoped_refptr<gles2::FeatureInfo> feature_info = |
+ new gles2::FeatureInfo(service_->gpu_driver_bug_workarounds()); |
decoder_.reset(gles2::GLES2Decoder::Create( |
params.context_group |
? params.context_group->decoder_->GetContextGroup() |
- : new gles2::ContextGroup(service_->gpu_preferences(), |
- service_->mailbox_manager(), NULL, |
- service_->shader_translator_cache(), |
- service_->framebuffer_completeness_cache(), |
- NULL, service_->subscription_ref_set(), |
- service_->pending_valuebuffer_state(), |
- bind_generates_resource))); |
+ : new gles2::ContextGroup( |
+ service_->gpu_preferences(), service_->mailbox_manager(), NULL, |
+ service_->shader_translator_cache(), |
+ service_->framebuffer_completeness_cache(), feature_info, |
+ service_->subscription_ref_set(), |
+ service_->pending_valuebuffer_state(), |
+ bind_generates_resource))); |
executor_.reset(new CommandExecutor(command_buffer.get(), decoder_.get(), |
decoder_.get())); |