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

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 1411503005: Aura on Android: content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@auraclank_upstream_select_file
Patch Set: One more rebase Created 5 years, 1 month 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 | « content/browser/browser_main_runner.cc ('k') | content/browser/compositor/surface_utils.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/compositor/gpu_process_transport_factory.h" 5 #include "content/browser/compositor/gpu_process_transport_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Make sure the lost context callback doesn't try to run during destruction. 126 // Make sure the lost context callback doesn't try to run during destruction.
127 callback_factory_.InvalidateWeakPtrs(); 127 callback_factory_.InvalidateWeakPtrs();
128 128
129 task_graph_runner_->Shutdown(); 129 task_graph_runner_->Shutdown();
130 if (raster_thread_) 130 if (raster_thread_)
131 raster_thread_->Join(); 131 raster_thread_->Join();
132 } 132 }
133 133
134 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> 134 scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
135 GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() { 135 GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
136 #if defined(OS_ANDROID)
137 // TODO(mfomitchev): crbug.com/546716
138 return CreateContextCommon(scoped_refptr<GpuChannelHost>(nullptr), 0);
139 #else
136 CauseForGpuLaunch cause = 140 CauseForGpuLaunch cause =
137 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE; 141 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE;
138 scoped_refptr<GpuChannelHost> gpu_channel_host( 142 scoped_refptr<GpuChannelHost> gpu_channel_host(
139 BrowserGpuChannelHostFactory::instance()->EstablishGpuChannelSync(cause)); 143 BrowserGpuChannelHostFactory::instance()->EstablishGpuChannelSync(cause));
140 return CreateContextCommon(gpu_channel_host, 0); 144 return CreateContextCommon(gpu_channel_host, 0);
145 #endif // OS_ANDROID
141 } 146 }
142 147
143 scoped_ptr<cc::SoftwareOutputDevice> 148 scoped_ptr<cc::SoftwareOutputDevice>
144 GpuProcessTransportFactory::CreateSoftwareOutputDevice( 149 GpuProcessTransportFactory::CreateSoftwareOutputDevice(
145 ui::Compositor* compositor) { 150 ui::Compositor* compositor) {
146 #if defined(OS_WIN) 151 #if defined(OS_WIN)
147 return scoped_ptr<cc::SoftwareOutputDevice>( 152 return scoped_ptr<cc::SoftwareOutputDevice>(
148 new SoftwareOutputDeviceWin(software_backing_.get(), compositor)); 153 new SoftwareOutputDeviceWin(software_backing_.get(), compositor));
149 #elif defined(USE_OZONE) 154 #elif defined(USE_OZONE)
150 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceOzone( 155 return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceOzone(
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 652 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
648 observer_list_, 653 observer_list_,
649 OnLostResources()); 654 OnLostResources());
650 655
651 // Kill things that use the shared context before killing the shared context. 656 // Kill things that use the shared context before killing the shared context.
652 lost_gl_helper.reset(); 657 lost_gl_helper.reset();
653 lost_shared_main_thread_contexts = NULL; 658 lost_shared_main_thread_contexts = NULL;
654 } 659 }
655 660
656 } // namespace content 661 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_runner.cc ('k') | content/browser/compositor/surface_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698