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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 scoped_refptr<OwnedTexture> image(new OwnedTexture( | 326 scoped_refptr<OwnedTexture> image(new OwnedTexture( |
327 provider, size, device_scale_factor, texture_id)); | 327 provider, size, device_scale_factor, texture_id)); |
328 return image; | 328 return image; |
329 } | 329 } |
330 | 330 |
331 GLHelper* GpuProcessTransportFactory::GetGLHelper() { | 331 GLHelper* GpuProcessTransportFactory::GetGLHelper() { |
332 if (!gl_helper_) { | 332 if (!gl_helper_) { |
333 scoped_refptr<cc::ContextProvider> provider = | 333 scoped_refptr<cc::ContextProvider> provider = |
334 SharedMainThreadContextProvider(); | 334 SharedMainThreadContextProvider(); |
335 if (provider.get()) | 335 if (provider.get()) |
336 gl_helper_.reset(new GLHelper(provider->Context3d(), | 336 gl_helper_.reset(new GLHelper(provider->ContextGL(), |
337 provider->ContextSupport())); | 337 provider->ContextSupport())); |
338 } | 338 } |
339 return gl_helper_.get(); | 339 return gl_helper_.get(); |
340 } | 340 } |
341 | 341 |
342 uint32 GpuProcessTransportFactory::InsertSyncPoint() { | 342 uint32 GpuProcessTransportFactory::InsertSyncPoint() { |
343 scoped_refptr<cc::ContextProvider> provider = | 343 scoped_refptr<cc::ContextProvider> provider = |
344 SharedMainThreadContextProvider(); | 344 SharedMainThreadContextProvider(); |
345 if (!provider.get()) | 345 if (!provider.get()) |
346 return 0; | 346 return 0; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 observer_list_, | 492 observer_list_, |
493 OnLostResources()); | 493 OnLostResources()); |
494 | 494 |
495 // Kill things that use the shared context before killing the shared context. | 495 // Kill things that use the shared context before killing the shared context. |
496 lost_gl_helper.reset(); | 496 lost_gl_helper.reset(); |
497 lost_offscreen_compositor_contexts = NULL; | 497 lost_offscreen_compositor_contexts = NULL; |
498 lost_shared_main_thread_contexts = NULL; | 498 lost_shared_main_thread_contexts = NULL; |
499 } | 499 } |
500 | 500 |
501 } // namespace content | 501 } // namespace content |
OLD | NEW |