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

Side by Side Diff: components/mus/gles2/gpu_state.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 | « components/mus/gles2/gpu_state.h ('k') | components/mus/surfaces/surfaces_context_provider.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 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 "components/mus/gles2/gpu_state.h" 5 #include "components/mus/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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 void GpuState::InitializeOnGpuThread(base::WaitableEvent* event) { 47 void GpuState::InitializeOnGpuThread(base::WaitableEvent* event) {
48 #if defined(USE_OZONE) 48 #if defined(USE_OZONE)
49 ui::OzonePlatform::InitializeForGPU(); 49 ui::OzonePlatform::InitializeForGPU();
50 #endif 50 #endif
51 hardware_rendering_available_ = gl::init::InitializeGLOneOff(); 51 hardware_rendering_available_ = gl::init::InitializeGLOneOff();
52 command_buffer_task_runner_ = new CommandBufferTaskRunner; 52 command_buffer_task_runner_ = new CommandBufferTaskRunner;
53 driver_manager_.reset(new CommandBufferDriverManager); 53 driver_manager_.reset(new CommandBufferDriverManager);
54 sync_point_manager_.reset(new gpu::SyncPointManager(true)); 54 sync_point_manager_.reset(new gpu::SyncPointManager(true));
55 share_group_ = new gfx::GLShareGroup; 55 share_group_ = new gl::GLShareGroup;
56 mailbox_manager_ = new gpu::gles2::MailboxManagerImpl; 56 mailbox_manager_ = new gpu::gles2::MailboxManagerImpl;
57 57
58 // TODO(penghuang): investigate why gpu::CollectBasicGraphicsInfo() failed on 58 // TODO(penghuang): investigate why gpu::CollectBasicGraphicsInfo() failed on
59 // windows remote desktop. 59 // windows remote desktop.
60 const gfx::GLImplementation impl = gfx::GetGLImplementation(); 60 const gl::GLImplementation impl = gl::GetGLImplementation();
61 if (impl != gfx::kGLImplementationNone && 61 if (impl != gl::kGLImplementationNone &&
62 impl != gfx::kGLImplementationOSMesaGL && 62 impl != gl::kGLImplementationOSMesaGL &&
63 impl != gfx::kGLImplementationMockGL) { 63 impl != gl::kGLImplementationMockGL) {
64 gpu::CollectInfoResult result = gpu::CollectBasicGraphicsInfo(&gpu_info_); 64 gpu::CollectInfoResult result = gpu::CollectBasicGraphicsInfo(&gpu_info_);
65 LOG_IF(ERROR, result != gpu::kCollectInfoSuccess) 65 LOG_IF(ERROR, result != gpu::kCollectInfoSuccess)
66 << "Collect basic graphics info failed!"; 66 << "Collect basic graphics info failed!";
67 } 67 }
68 if (impl != gfx::kGLImplementationNone) { 68 if (impl != gl::kGLImplementationNone) {
69 gpu::CollectInfoResult result = gpu::CollectContextGraphicsInfo(&gpu_info_); 69 gpu::CollectInfoResult result = gpu::CollectContextGraphicsInfo(&gpu_info_);
70 LOG_IF(ERROR, result != gpu::kCollectInfoSuccess) 70 LOG_IF(ERROR, result != gpu::kCollectInfoSuccess)
71 << "Collect context graphics info failed!"; 71 << "Collect context graphics info failed!";
72 } 72 }
73 event->Signal(); 73 event->Signal();
74 74
75 } 75 }
76 76
77 void GpuState::DestroyGpuSpecificStateOnGpuThread() { 77 void GpuState::DestroyGpuSpecificStateOnGpuThread() {
78 driver_manager_.reset(); 78 driver_manager_.reset();
79 } 79 }
80 80
81 } // namespace mus 81 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/gles2/gpu_state.h ('k') | components/mus/surfaces/surfaces_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698