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

Side by Side Diff: gpu/ipc/in_process_command_buffer.cc

Issue 2654993004: Move GPU blacklist calculation to GPU proc (Closed)
Patch Set: fix win clang build Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « gpu/ipc/in_process_command_buffer.h ('k') | gpu/ipc/service/gpu_channel_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/ipc/in_process_command_buffer.h" 5 #include "gpu/ipc/in_process_command_buffer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 23 matching lines...) Expand all
34 #include "gpu/command_buffer/service/gpu_preferences.h" 34 #include "gpu/command_buffer/service/gpu_preferences.h"
35 #include "gpu/command_buffer/service/image_factory.h" 35 #include "gpu/command_buffer/service/image_factory.h"
36 #include "gpu/command_buffer/service/image_manager.h" 36 #include "gpu/command_buffer/service/image_manager.h"
37 #include "gpu/command_buffer/service/mailbox_manager.h" 37 #include "gpu/command_buffer/service/mailbox_manager.h"
38 #include "gpu/command_buffer/service/memory_program_cache.h" 38 #include "gpu/command_buffer/service/memory_program_cache.h"
39 #include "gpu/command_buffer/service/memory_tracking.h" 39 #include "gpu/command_buffer/service/memory_tracking.h"
40 #include "gpu/command_buffer/service/query_manager.h" 40 #include "gpu/command_buffer/service/query_manager.h"
41 #include "gpu/command_buffer/service/service_utils.h" 41 #include "gpu/command_buffer/service/service_utils.h"
42 #include "gpu/command_buffer/service/sync_point_manager.h" 42 #include "gpu/command_buffer/service/sync_point_manager.h"
43 #include "gpu/command_buffer/service/transfer_buffer_manager.h" 43 #include "gpu/command_buffer/service/transfer_buffer_manager.h"
44 #include "gpu/config/gpu_feature_info.h"
44 #include "gpu/ipc/gpu_in_process_thread_service.h" 45 #include "gpu/ipc/gpu_in_process_thread_service.h"
45 #include "gpu/ipc/service/image_transport_surface.h" 46 #include "gpu/ipc/service/image_transport_surface.h"
46 #include "ui/gfx/geometry/size.h" 47 #include "ui/gfx/geometry/size.h"
47 #include "ui/gl/gl_context.h" 48 #include "ui/gl/gl_context.h"
48 #include "ui/gl/gl_image.h" 49 #include "ui/gl/gl_image.h"
49 #include "ui/gl/gl_image_shared_memory.h" 50 #include "ui/gl/gl_image_shared_memory.h"
50 #include "ui/gl/gl_share_group.h" 51 #include "ui/gl/gl_share_group.h"
51 #include "ui/gl/init/gl_factory.h" 52 #include "ui/gl/init/gl_factory.h"
52 53
53 #if defined(OS_WIN) 54 #if defined(OS_WIN)
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // delete the ThreadTaskRunnerHandle before the GPU thread's message loop, 119 // delete the ThreadTaskRunnerHandle before the GPU thread's message loop,
119 // and when the message loop is shutdown, it will recreate 120 // and when the message loop is shutdown, it will recreate
120 // ThreadTaskRunnerHandle, which will re-add a new task to the, AtExitManager, 121 // ThreadTaskRunnerHandle, which will re-add a new task to the, AtExitManager,
121 // which causes a deadlock because it's already locked. 122 // which causes a deadlock because it's already locked.
122 base::ThreadTaskRunnerHandle::IsSet(); 123 base::ThreadTaskRunnerHandle::IsSet();
123 return g_default_service.Get().GetGpuThreadService(); 124 return g_default_service.Get().GetGpuThreadService();
124 } 125 }
125 126
126 } // anonyous namespace 127 } // anonyous namespace
127 128
128 InProcessCommandBuffer::Service::Service()
129 : gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()) {}
130
131 InProcessCommandBuffer::Service::Service(const GpuPreferences& gpu_preferences) 129 InProcessCommandBuffer::Service::Service(const GpuPreferences& gpu_preferences)
132 : gpu_preferences_(gpu_preferences), 130 : gpu_preferences_(gpu_preferences),
133 gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()) {} 131 gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()) {}
134 132
135 InProcessCommandBuffer::Service::Service( 133 InProcessCommandBuffer::Service::Service(
136 gpu::gles2::MailboxManager* mailbox_manager, 134 gpu::gles2::MailboxManager* mailbox_manager,
137 scoped_refptr<gl::GLShareGroup> share_group) 135 scoped_refptr<gl::GLShareGroup> share_group)
138 : gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()), 136 : gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()),
139 mailbox_manager_(mailbox_manager), 137 mailbox_manager_(mailbox_manager),
140 share_group_(share_group) {} 138 share_group_(share_group) {}
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 scoped_refptr<gles2::FeatureInfo> feature_info = 308 scoped_refptr<gles2::FeatureInfo> feature_info =
311 new gles2::FeatureInfo(service_->gpu_driver_bug_workarounds()); 309 new gles2::FeatureInfo(service_->gpu_driver_bug_workarounds());
312 310
313 context_group_ = 311 context_group_ =
314 params.context_group 312 params.context_group
315 ? params.context_group->decoder_->GetContextGroup() 313 ? params.context_group->decoder_->GetContextGroup()
316 : new gles2::ContextGroup( 314 : new gles2::ContextGroup(
317 service_->gpu_preferences(), service_->mailbox_manager(), NULL, 315 service_->gpu_preferences(), service_->mailbox_manager(), NULL,
318 service_->shader_translator_cache(), 316 service_->shader_translator_cache(),
319 service_->framebuffer_completeness_cache(), feature_info, 317 service_->framebuffer_completeness_cache(), feature_info,
320 bind_generates_resource, nullptr, nullptr); 318 bind_generates_resource, nullptr, nullptr, GpuFeatureInfo());
321 319
322 decoder_.reset(gles2::GLES2Decoder::Create(context_group_.get())); 320 decoder_.reset(gles2::GLES2Decoder::Create(context_group_.get()));
323 321
324 executor_.reset(new CommandExecutor(command_buffer.get(), decoder_.get(), 322 executor_.reset(new CommandExecutor(command_buffer.get(), decoder_.get(),
325 decoder_.get())); 323 decoder_.get()));
326 command_buffer->SetGetBufferChangeCallback(base::Bind( 324 command_buffer->SetGetBufferChangeCallback(base::Bind(
327 &CommandExecutor::SetGetBuffer, base::Unretained(executor_.get()))); 325 &CommandExecutor::SetGetBuffer, base::Unretained(executor_.get())));
328 command_buffer_ = std::move(command_buffer); 326 command_buffer_ = std::move(command_buffer);
329 327
330 decoder_->set_engine(executor_.get()); 328 decoder_->set_engine(executor_.get());
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 return wrapped_callback; 1166 return wrapped_callback;
1169 } 1167 }
1170 1168
1171 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback, 1169 InProcessCommandBuffer::GpuTask::GpuTask(const base::Closure& callback,
1172 uint32_t order_number) 1170 uint32_t order_number)
1173 : callback(callback), order_number(order_number) {} 1171 : callback(callback), order_number(order_number) {}
1174 1172
1175 InProcessCommandBuffer::GpuTask::~GpuTask() {} 1173 InProcessCommandBuffer::GpuTask::~GpuTask() {}
1176 1174
1177 } // namespace gpu 1175 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/in_process_command_buffer.h ('k') | gpu/ipc/service/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698