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

Side by Side Diff: services/ui/gles2/gpu_state.cc

Issue 2156093004: Use mojo for cursor control in ozone drm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more proof-reading Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/ui/gles2/gpu_state.h" 5 #include "services/ui/gles2/gpu_state.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 29 matching lines...) Expand all
40 void GpuState::StopThreads() { 40 void GpuState::StopThreads() {
41 control_thread_.Stop(); 41 control_thread_.Stop();
42 gpu_thread_.task_runner()->PostTask( 42 gpu_thread_.task_runner()->PostTask(
43 FROM_HERE, 43 FROM_HERE,
44 base::Bind(&GpuState::DestroyGpuSpecificStateOnGpuThread, this)); 44 base::Bind(&GpuState::DestroyGpuSpecificStateOnGpuThread, this));
45 gpu_thread_.Stop(); 45 gpu_thread_.Stop();
46 } 46 }
47 47
48 void GpuState::InitializeOnGpuThread(base::WaitableEvent* event) { 48 void GpuState::InitializeOnGpuThread(base::WaitableEvent* event) {
49 #if defined(USE_OZONE) 49 #if defined(USE_OZONE)
50 // TODO(rjkroege): Must specify the shell::Connector here.
50 ui::OzonePlatform::InitializeForGPU(); 51 ui::OzonePlatform::InitializeForGPU();
51 #endif 52 #endif
52 hardware_rendering_available_ = gl::init::InitializeGLOneOff(); 53 hardware_rendering_available_ = gl::init::InitializeGLOneOff();
53 command_buffer_task_runner_ = new CommandBufferTaskRunner; 54 command_buffer_task_runner_ = new CommandBufferTaskRunner;
54 driver_manager_.reset(new CommandBufferDriverManager); 55 driver_manager_.reset(new CommandBufferDriverManager);
55 sync_point_manager_.reset(new gpu::SyncPointManager(true)); 56 sync_point_manager_.reset(new gpu::SyncPointManager(true));
56 share_group_ = new gl::GLShareGroup; 57 share_group_ = new gl::GLShareGroup;
57 mailbox_manager_ = new gpu::gles2::MailboxManagerImpl; 58 mailbox_manager_ = new gpu::gles2::MailboxManagerImpl;
58 59
59 // TODO(penghuang): investigate why gpu::CollectBasicGraphicsInfo() failed on 60 // TODO(penghuang): investigate why gpu::CollectBasicGraphicsInfo() failed on
(...skipping 13 matching lines...) Expand all
73 } 74 }
74 event->Signal(); 75 event->Signal();
75 76
76 } 77 }
77 78
78 void GpuState::DestroyGpuSpecificStateOnGpuThread() { 79 void GpuState::DestroyGpuSpecificStateOnGpuThread() {
79 driver_manager_.reset(); 80 driver_manager_.reset();
80 } 81 }
81 82
82 } // namespace ui 83 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698