OLD | NEW |
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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 if (!gpu_channel_host) | 437 if (!gpu_channel_host) |
438 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); | 438 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); |
439 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); | 439 GURL url("chrome://gpu/GpuProcessTransportFactory::CreateContextCommon"); |
440 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 440 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
441 new WebGraphicsContext3DCommandBufferImpl( | 441 new WebGraphicsContext3DCommandBufferImpl( |
442 surface_id, | 442 surface_id, |
443 url, | 443 url, |
444 gpu_channel_host.get(), | 444 gpu_channel_host.get(), |
445 attrs, | 445 attrs, |
446 false, | 446 false, |
447 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits())); | 447 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), |
| 448 NULL)); |
448 return context.Pass(); | 449 return context.Pass(); |
449 } | 450 } |
450 | 451 |
451 void GpuProcessTransportFactory::OnLostMainThreadSharedContextInsideCallback() { | 452 void GpuProcessTransportFactory::OnLostMainThreadSharedContextInsideCallback() { |
452 base::MessageLoop::current()->PostTask( | 453 base::MessageLoop::current()->PostTask( |
453 FROM_HERE, | 454 FROM_HERE, |
454 base::Bind(&GpuProcessTransportFactory::OnLostMainThreadSharedContext, | 455 base::Bind(&GpuProcessTransportFactory::OnLostMainThreadSharedContext, |
455 callback_factory_.GetWeakPtr())); | 456 callback_factory_.GetWeakPtr())); |
456 } | 457 } |
457 | 458 |
(...skipping 17 matching lines...) Expand all Loading... |
475 observer_list_, | 476 observer_list_, |
476 OnLostResources()); | 477 OnLostResources()); |
477 | 478 |
478 // Kill things that use the shared context before killing the shared context. | 479 // Kill things that use the shared context before killing the shared context. |
479 lost_gl_helper.reset(); | 480 lost_gl_helper.reset(); |
480 lost_offscreen_compositor_contexts = NULL; | 481 lost_offscreen_compositor_contexts = NULL; |
481 lost_shared_main_thread_contexts = NULL; | 482 lost_shared_main_thread_contexts = NULL; |
482 } | 483 } |
483 | 484 |
484 } // namespace content | 485 } // namespace content |
OLD | NEW |