Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 508 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ); | 508 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ); |
| 509 if (!gpu_channel_host) | 509 if (!gpu_channel_host) |
| 510 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); | 510 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); |
| 511 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); | 511 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); |
| 512 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 512 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
| 513 new WebGraphicsContext3DCommandBufferImpl( | 513 new WebGraphicsContext3DCommandBufferImpl( |
| 514 surface_id, | 514 surface_id, |
| 515 url, | 515 url, |
| 516 gpu_channel_host.get(), | 516 gpu_channel_host.get(), |
| 517 swap_client, | 517 swap_client, |
| 518 true, | |
|
jamesr
2013/11/04 20:54:56
could you either give this bool a name (as a local
piman
2013/11/04 22:03:06
Good point, done (the former).
| |
| 518 attrs, | 519 attrs, |
| 519 false, | 520 false, |
| 520 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits())); | 521 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits())); |
| 521 return context.Pass(); | 522 return context.Pass(); |
| 522 } | 523 } |
| 523 | 524 |
| 524 void GpuProcessTransportFactory::OnLostMainThreadSharedContextInsideCallback() { | 525 void GpuProcessTransportFactory::OnLostMainThreadSharedContextInsideCallback() { |
| 525 base::MessageLoop::current()->PostTask( | 526 base::MessageLoop::current()->PostTask( |
| 526 FROM_HERE, | 527 FROM_HERE, |
| 527 base::Bind(&GpuProcessTransportFactory::OnLostMainThreadSharedContext, | 528 base::Bind(&GpuProcessTransportFactory::OnLostMainThreadSharedContext, |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 548 observer_list_, | 549 observer_list_, |
| 549 OnLostResources()); | 550 OnLostResources()); |
| 550 | 551 |
| 551 // Kill things that use the shared context before killing the shared context. | 552 // Kill things that use the shared context before killing the shared context. |
| 552 lost_gl_helper.reset(); | 553 lost_gl_helper.reset(); |
| 553 lost_offscreen_compositor_contexts = NULL; | 554 lost_offscreen_compositor_contexts = NULL; |
| 554 lost_shared_main_thread_contexts = NULL; | 555 lost_shared_main_thread_contexts = NULL; |
| 555 } | 556 } |
| 556 | 557 |
| 557 } // namespace content | 558 } // namespace content |
| OLD | NEW |