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

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

Issue 148243011: Aura: Don't create GL context for GetSharedSurfaceHandle() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | no next file » | 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 gl_helper_.reset(); 287 gl_helper_.reset();
288 } 288 }
289 289
290 bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; } 290 bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; }
291 291
292 ui::ContextFactory* GpuProcessTransportFactory::AsContextFactory() { 292 ui::ContextFactory* GpuProcessTransportFactory::AsContextFactory() {
293 return this; 293 return this;
294 } 294 }
295 295
296 gfx::GLSurfaceHandle GpuProcessTransportFactory::GetSharedSurfaceHandle() { 296 gfx::GLSurfaceHandle GpuProcessTransportFactory::GetSharedSurfaceHandle() {
297 // TODO(sievers): crbug.com/329737
298 // Creating the context here hurts startup performance.
299 // Remove this once all tests are happy.
300 SharedMainThreadContextProvider();
301
302 gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle( 297 gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle(
303 gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT); 298 gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT);
304 handle.parent_client_id = 299 handle.parent_client_id =
305 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId(); 300 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId();
306 return handle; 301 return handle;
307 } 302 }
308 303
309 scoped_refptr<ui::Texture> GpuProcessTransportFactory::CreateTransportClient( 304 scoped_refptr<ui::Texture> GpuProcessTransportFactory::CreateTransportClient(
310 float device_scale_factor) { 305 float device_scale_factor) {
311 scoped_refptr<cc::ContextProvider> provider = 306 scoped_refptr<cc::ContextProvider> provider =
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 observer_list_, 472 observer_list_,
478 OnLostResources()); 473 OnLostResources());
479 474
480 // Kill things that use the shared context before killing the shared context. 475 // Kill things that use the shared context before killing the shared context.
481 lost_gl_helper.reset(); 476 lost_gl_helper.reset();
482 lost_offscreen_compositor_contexts = NULL; 477 lost_offscreen_compositor_contexts = NULL;
483 lost_shared_main_thread_contexts = NULL; 478 lost_shared_main_thread_contexts = NULL;
484 } 479 }
485 480
486 } // namespace content 481 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698