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