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 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMPL_H
_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMPL_H
_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMPL_H
_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMPL_H
_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 // Factory for when using synchronous compositor in Android WebView. | 25 // Factory for when using synchronous compositor in Android WebView. |
26 class StreamTextureFactorySynchronousImpl : public StreamTextureFactory { | 26 class StreamTextureFactorySynchronousImpl : public StreamTextureFactory { |
27 public: | 27 public: |
28 class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> { | 28 class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> { |
29 public: | 29 public: |
30 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( | 30 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( |
31 uint32 stream_id) = 0; | 31 uint32 stream_id) = 0; |
32 | 32 |
| 33 virtual uint32 CreateStreamTexture(uint32 texture_id) = 0; |
| 34 |
33 virtual gpu::gles2::GLES2Interface* ContextGL() = 0; | 35 virtual gpu::gles2::GLES2Interface* ContextGL() = 0; |
34 | 36 |
35 virtual void AddObserver(StreamTextureFactoryContextObserver* obs) = 0; | 37 virtual void AddObserver(StreamTextureFactoryContextObserver* obs) = 0; |
36 virtual void RemoveObserver(StreamTextureFactoryContextObserver* obs) = 0; | 38 virtual void RemoveObserver(StreamTextureFactoryContextObserver* obs) = 0; |
37 | 39 |
38 protected: | 40 protected: |
39 friend class base::RefCountedThreadSafe<ContextProvider>; | 41 friend class base::RefCountedThreadSafe<ContextProvider>; |
40 virtual ~ContextProvider() {} | 42 virtual ~ContextProvider() {} |
41 }; | 43 }; |
42 | 44 |
(...skipping 25 matching lines...) Expand all Loading... |
68 scoped_refptr<ContextProvider> context_provider_; | 70 scoped_refptr<ContextProvider> context_provider_; |
69 int frame_id_; | 71 int frame_id_; |
70 StreamTextureFactoryContextObserver* observer_; | 72 StreamTextureFactoryContextObserver* observer_; |
71 | 73 |
72 DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureFactorySynchronousImpl); | 74 DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureFactorySynchronousImpl); |
73 }; | 75 }; |
74 | 76 |
75 } // namespace content | 77 } // namespace content |
76 | 78 |
77 #endif // CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMP
L_H_ | 79 #endif // CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_SYNCHRONOUS_IMP
L_H_ |
OLD | NEW |