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

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

Issue 111063003: Aura: Don't create GL context for CreateSharedSurfaceHandle() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to make tests happy by still creating shared context Created 6 years, 11 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
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 71e8efc30cd540d8c56c047f69b9055b2734445a..022d8d68a9d7bfd9543fbe1b68be00d759cf4f5c 100644
--- a/content/browser/aura/gpu_process_transport_factory.cc
+++ b/content/browser/aura/gpu_process_transport_factory.cc
@@ -288,24 +288,23 @@ ui::ContextFactory* GpuProcessTransportFactory::AsContextFactory() {
return this;
}
-gfx::GLSurfaceHandle GpuProcessTransportFactory::CreateSharedSurfaceHandle() {
+gfx::GLSurfaceHandle GpuProcessTransportFactory::GetSharedSurfaceHandle() {
+ // TODO(sievers): crbug.com/329737
+ // Creating the context here hurts startup performance.
+ // Remove this once all tests are happy.
scoped_refptr<cc::ContextProvider> provider =
SharedMainThreadContextProvider();
- if (!provider.get())
- return gfx::GLSurfaceHandle();
- ContextProviderCommandBuffer* provider_command_buffer =
- static_cast<ContextProviderCommandBuffer*>(provider.get());
+ LOG_IF(ERROR, !provider.get())
+ << "Could not create shared context. CanUseBrowserCompositor() = "
+ << GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor();
+
gfx::GLSurfaceHandle handle = gfx::GLSurfaceHandle(
gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT);
- handle.parent_gpu_process_id = provider_command_buffer->GetGPUProcessID();
handle.parent_client_id =
BrowserGpuChannelHostFactory::instance()->GetGpuChannelId();
return handle;
}
-void GpuProcessTransportFactory::DestroySharedSurfaceHandle(
- gfx::GLSurfaceHandle surface) {}
-
scoped_refptr<ui::Texture> GpuProcessTransportFactory::CreateTransportClient(
float device_scale_factor) {
scoped_refptr<cc::ContextProvider> provider =
« no previous file with comments | « content/browser/aura/gpu_process_transport_factory.h ('k') | content/browser/aura/image_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698