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

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

Issue 21026005: aura: Remove CreateOffscreenContext from ui::ContextFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: offscreencontext: rebase Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/aura/gpu_process_transport_factory.h" 5 #include "content/browser/aura/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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // Make sure the lost context callback doesn't try to run during destruction. 226 // Make sure the lost context callback doesn't try to run during destruction.
227 callback_factory_.InvalidateWeakPtrs(); 227 callback_factory_.InvalidateWeakPtrs();
228 } 228 }
229 229
230 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> 230 scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
231 GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() { 231 GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
232 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client; 232 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client;
233 return CreateContextCommon(swap_client, 0); 233 return CreateContextCommon(swap_client, 0);
234 } 234 }
235 235
236 scoped_ptr<WebKit::WebGraphicsContext3D>
237 GpuProcessTransportFactory::CreateOffscreenContext() {
238 return CreateOffscreenCommandBufferContext()
239 .PassAs<WebKit::WebGraphicsContext3D>();
240 }
241
242 scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface( 236 scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface(
243 ui::Compositor* compositor) { 237 ui::Compositor* compositor) {
244 PerCompositorData* data = per_compositor_data_[compositor]; 238 PerCompositorData* data = per_compositor_data_[compositor];
245 if (!data) 239 if (!data)
246 data = CreatePerCompositorData(compositor); 240 data = CreatePerCompositorData(compositor);
247 241
248 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context; 242 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context;
249 CommandLine* command_line = CommandLine::ForCurrentProcess(); 243 CommandLine* command_line = CommandLine::ForCurrentProcess();
250 if (!command_line->HasSwitch(switches::kUIEnableSoftwareCompositing)) { 244 if (!command_line->HasSwitch(switches::kUIEnableSoftwareCompositing)) {
251 context = 245 context =
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 shared_contexts_main_thread_ = NULL; 512 shared_contexts_main_thread_ = NULL;
519 513
520 scoped_ptr<GLHelper> old_helper(gl_helper_.release()); 514 scoped_ptr<GLHelper> old_helper(gl_helper_.release());
521 515
522 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 516 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
523 observer_list_, 517 observer_list_,
524 OnLostResources()); 518 OnLostResources());
525 } 519 }
526 520
527 } // namespace content 521 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698