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

Unified Diff: content/browser/aura/gpu_process_transport_factory.cc

Issue 20185002: ContextProvider in OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: contextprovider: don't access Context3d() in OutputSurface contructors, it's not bound yet 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/aura/browser_compositor_output_surface.cc ('k') | content/browser/aura/reflector_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/aura/gpu_process_transport_factory.cc
diff --git a/content/browser/aura/gpu_process_transport_factory.cc b/content/browser/aura/gpu_process_transport_factory.cc
index eeb6f3bc5786e443ad978d6774313073365d37de..3c1eedba624c0fde85bbae7d40a18ab311c869cd 100644
--- a/content/browser/aura/gpu_process_transport_factory.cc
+++ b/content/browser/aura/gpu_process_transport_factory.cc
@@ -219,13 +219,17 @@ scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface(
if (!data)
data = CreatePerCompositorData(compositor);
- scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context;
+ scoped_refptr<ContextProviderCommandBuffer> context_provider;
+
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(switches::kUIEnableSoftwareCompositing)) {
- context =
- CreateContextCommon(data->swap_client->AsWeakPtr(), data->surface_id);
+ context_provider = ContextProviderCommandBuffer::Create(
+ base::Bind(&GpuProcessTransportFactory::CreateContextCommon,
+ base::Unretained(this),
+ data->swap_client->AsWeakPtr(),
+ data->surface_id));
}
- if (!context) {
+ if (!context_provider.get()) {
if (ui::Compositor::WasInitializedWithThread()) {
LOG(FATAL) << "Failed to create UI context, but can't use software "
" compositing with browser threaded compositing. Aborting.";
@@ -249,7 +253,7 @@ scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface(
scoped_ptr<BrowserCompositorOutputSurface> surface(
new BrowserCompositorOutputSurface(
- context.PassAs<WebKit::WebGraphicsContext3D>(),
+ context_provider,
per_compositor_data_[compositor]->surface_id,
&output_surface_map_,
base::MessageLoopProxy::current().get(),
« no previous file with comments | « content/browser/aura/browser_compositor_output_surface.cc ('k') | content/browser/aura/reflector_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698