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

Side by Side Diff: gpu/ipc/service/gpu_channel_manager.cc

Issue 2654993004: Move GPU blacklist calculation to GPU proc (Closed)
Patch Set: Feedback + add rest of logic back in 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/service/gpu_channel_manager.h" 5 #include "gpu/ipc/service/gpu_channel_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 GpuChannelManager::GpuChannelManager( 45 GpuChannelManager::GpuChannelManager(
46 const GpuPreferences& gpu_preferences, 46 const GpuPreferences& gpu_preferences,
47 GpuChannelManagerDelegate* delegate, 47 GpuChannelManagerDelegate* delegate,
48 GpuWatchdogThread* watchdog, 48 GpuWatchdogThread* watchdog,
49 base::SingleThreadTaskRunner* task_runner, 49 base::SingleThreadTaskRunner* task_runner,
50 base::SingleThreadTaskRunner* io_task_runner, 50 base::SingleThreadTaskRunner* io_task_runner,
51 base::WaitableEvent* shutdown_event, 51 base::WaitableEvent* shutdown_event,
52 SyncPointManager* sync_point_manager, 52 SyncPointManager* sync_point_manager,
53 GpuMemoryBufferFactory* gpu_memory_buffer_factory) 53 GpuMemoryBufferFactory* gpu_memory_buffer_factory,
54 const GpuFeatureInfo& gpu_feature_info)
54 : task_runner_(task_runner), 55 : task_runner_(task_runner),
55 io_task_runner_(io_task_runner), 56 io_task_runner_(io_task_runner),
56 gpu_preferences_(gpu_preferences), 57 gpu_preferences_(gpu_preferences),
57 gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()), 58 gpu_driver_bug_workarounds_(base::CommandLine::ForCurrentProcess()),
58 delegate_(delegate), 59 delegate_(delegate),
59 watchdog_(watchdog), 60 watchdog_(watchdog),
60 shutdown_event_(shutdown_event), 61 shutdown_event_(shutdown_event),
61 share_group_(new gl::GLShareGroup()), 62 share_group_(new gl::GLShareGroup()),
62 mailbox_manager_(gles2::MailboxManager::Create(gpu_preferences)), 63 mailbox_manager_(gles2::MailboxManager::Create(gpu_preferences)),
63 gpu_memory_manager_(this), 64 gpu_memory_manager_(this),
64 sync_point_manager_(sync_point_manager), 65 sync_point_manager_(sync_point_manager),
65 sync_point_client_waiter_( 66 sync_point_client_waiter_(
66 sync_point_manager->CreateSyncPointClientWaiter()), 67 sync_point_manager->CreateSyncPointClientWaiter()),
67 gpu_memory_buffer_factory_(gpu_memory_buffer_factory), 68 gpu_memory_buffer_factory_(gpu_memory_buffer_factory),
69 gpu_feature_info_(gpu_feature_info),
68 exiting_for_lost_context_(false), 70 exiting_for_lost_context_(false),
69 weak_factory_(this) { 71 weak_factory_(this) {
70 DCHECK(task_runner); 72 DCHECK(task_runner);
71 DCHECK(io_task_runner); 73 DCHECK(io_task_runner);
72 if (gpu_preferences_.ui_prioritize_in_gpu_process) 74 if (gpu_preferences_.ui_prioritize_in_gpu_process)
73 preemption_flag_ = new PreemptionFlag; 75 preemption_flag_ = new PreemptionFlag;
74 } 76 }
75 77
76 GpuChannelManager::~GpuChannelManager() { 78 GpuChannelManager::~GpuChannelManager() {
77 // Destroy channels before anything else because of dependencies. 79 // Destroy channels before anything else because of dependencies.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 288 }
287 } 289 }
288 if (!stub || !stub->decoder()->MakeCurrent()) 290 if (!stub || !stub->decoder()->MakeCurrent())
289 return; 291 return;
290 glFinish(); 292 glFinish();
291 DidAccessGpu(); 293 DidAccessGpu();
292 } 294 }
293 #endif 295 #endif
294 296
295 } // namespace gpu 297 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698