OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WRAPPER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_WRAPPER_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_WRAPPER_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_WRAPPER_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 void SetCurrentFrameInternal( | 95 void SetCurrentFrameInternal( |
96 const scoped_refptr<media::VideoFrame>& video_frame); | 96 const scoped_refptr<media::VideoFrame>& video_frame); |
97 | 97 |
98 // Client GL texture ID allocated to the StreamTexture. | 98 // Client GL texture ID allocated to the StreamTexture. |
99 unsigned texture_id_; | 99 unsigned texture_id_; |
100 | 100 |
101 // GL texture mailbox for |texture_id_|. | 101 // GL texture mailbox for |texture_id_|. |
102 gpu::Mailbox texture_mailbox_; | 102 gpu::Mailbox texture_mailbox_; |
103 | 103 |
104 // Stream texture ID. | |
105 unsigned stream_id_; | |
106 | |
107 // Object for calling back the compositor thread to repaint the video when a | 104 // Object for calling back the compositor thread to repaint the video when a |
108 // frame is available. It should be bound to |compositor_task_runner_|. | 105 // frame is available. It should be bound to |compositor_task_runner_|. |
109 ScopedStreamTextureProxy stream_texture_proxy_; | 106 ScopedStreamTextureProxy stream_texture_proxy_; |
110 | 107 |
111 // Size of the video frames. | 108 // Size of the video frames. |
112 gfx::Size natural_size_; | 109 gfx::Size natural_size_; |
113 | 110 |
114 scoped_refptr<StreamTextureFactory> factory_; | 111 scoped_refptr<StreamTextureFactory> factory_; |
115 | 112 |
116 base::Lock current_frame_lock_; | 113 base::Lock current_frame_lock_; |
117 scoped_refptr<media::VideoFrame> current_frame_; | 114 scoped_refptr<media::VideoFrame> current_frame_; |
118 | 115 |
119 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 116 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
120 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; | 117 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; |
121 | 118 |
122 base::WeakPtrFactory<StreamTextureWrapperImpl> weak_factory_; | 119 base::WeakPtrFactory<StreamTextureWrapperImpl> weak_factory_; |
123 | 120 |
124 DISALLOW_COPY_AND_ASSIGN(StreamTextureWrapperImpl); | 121 DISALLOW_COPY_AND_ASSIGN(StreamTextureWrapperImpl); |
125 }; | 122 }; |
126 | 123 |
127 } // namespace media | 124 } // namespace media |
128 | 125 |
129 #endif // CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_WRAPPER_IMPL_H_ | 126 #endif // CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_WRAPPER_IMPL_H_ |
OLD | NEW |