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

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

Issue 1871613002: Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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/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()));
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698