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/android/in_process/synchronous_compositor_factory_impl
.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_factory_impl
.h" |
6 | 6 |
7 #include "content/browser/android/in_process/synchronous_compositor_output_surfa
ce.h" | 7 #include "content/browser/android/in_process/synchronous_compositor_output_surfa
ce.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 #include "gpu/command_buffer/client/gl_in_process_context.h" | 9 #include "gpu/command_buffer/client/gl_in_process_context.h" |
10 #include "ui/gl/android/surface_texture.h" | 10 #include "ui/gl/android/surface_texture.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 const scoped_refptr<cc::ContextProvider>& context_provider, | 25 const scoped_refptr<cc::ContextProvider>& context_provider, |
26 gpu::GLInProcessContext* gl_in_process_context) | 26 gpu::GLInProcessContext* gl_in_process_context) |
27 : context_provider_(context_provider), | 27 : context_provider_(context_provider), |
28 gl_in_process_context_(gl_in_process_context) {} | 28 gl_in_process_context_(gl_in_process_context) {} |
29 | 29 |
30 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( | 30 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( |
31 uint32 stream_id) OVERRIDE { | 31 uint32 stream_id) OVERRIDE { |
32 return gl_in_process_context_->GetSurfaceTexture(stream_id); | 32 return gl_in_process_context_->GetSurfaceTexture(stream_id); |
33 } | 33 } |
34 | 34 |
35 virtual blink::WebGraphicsContext3D* Context3d() OVERRIDE { | 35 virtual gpu::gles2::GLES2Interface* ContextGL() OVERRIDE { |
36 return context_provider_->Context3d(); | 36 return context_provider_->ContextGL(); |
37 } | 37 } |
38 | 38 |
39 private: | 39 private: |
40 friend class base::RefCountedThreadSafe<VideoContextProvider>; | 40 friend class base::RefCountedThreadSafe<VideoContextProvider>; |
41 virtual ~VideoContextProvider() {} | 41 virtual ~VideoContextProvider() {} |
42 | 42 |
43 scoped_refptr<cc::ContextProvider> context_provider_; | 43 scoped_refptr<cc::ContextProvider> context_provider_; |
44 gpu::GLInProcessContext* gl_in_process_context_; | 44 gpu::GLInProcessContext* gl_in_process_context_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(VideoContextProvider); | 46 DISALLOW_COPY_AND_ASSIGN(VideoContextProvider); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 wrapped_gl_context_for_main_thread_ = context.get(); | 202 wrapped_gl_context_for_main_thread_ = context.get(); |
203 if (!context.get()) | 203 if (!context.get()) |
204 return scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>(); | 204 return scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>(); |
205 | 205 |
206 return scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>( | 206 return scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>( |
207 WebGraphicsContext3DInProcessCommandBufferImpl::WrapContext( | 207 WebGraphicsContext3DInProcessCommandBufferImpl::WrapContext( |
208 context.Pass(), attributes)); | 208 context.Pass(), attributes)); |
209 } | 209 } |
210 | 210 |
211 } // namespace content | 211 } // namespace content |
OLD | NEW |