Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: content/renderer/media/webmediaplayer_ms.h

Issue 1833273002: Remove WebGraphicsContext3D::getGLES2Interface(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: getgles2: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "media/blink/webmediaplayer_delegate.h" 16 #include "media/blink/webmediaplayer_delegate.h"
17 #include "media/blink/webmediaplayer_util.h" 17 #include "media/blink/webmediaplayer_util.h"
18 #include "media/renderers/gpu_video_accelerator_factories.h" 18 #include "media/renderers/gpu_video_accelerator_factories.h"
19 #include "media/renderers/skcanvas_video_renderer.h" 19 #include "media/renderers/skcanvas_video_renderer.h"
20 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 20 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
21 #include "url/origin.h" 21 #include "url/origin.h"
22 22
23 namespace blink { 23 namespace blink {
24 class WebFrame; 24 class WebFrame;
25 class WebGraphicsContext3D;
26 class WebMediaPlayerClient; 25 class WebMediaPlayerClient;
27 class WebSecurityOrigin; 26 class WebSecurityOrigin;
28 class WebString; 27 class WebString;
29 } 28 }
30 29
31 namespace media { 30 namespace media {
32 class MediaLog; 31 class MediaLog;
33 class VideoFrame; 32 class VideoFrame;
34 } 33 }
35 34
36 namespace cc_blink { 35 namespace cc_blink {
37 class WebLayerImpl; 36 class WebLayerImpl;
38 } 37 }
39 38
39 namespace gpu {
40 namespace gles2 {
41 class GLES2Interface;
42 }
43 }
44
40 namespace content { 45 namespace content {
41 class MediaStreamAudioRenderer; 46 class MediaStreamAudioRenderer;
42 class MediaStreamRendererFactory; 47 class MediaStreamRendererFactory;
43 class VideoFrameProvider; 48 class VideoFrameProvider;
44 class WebMediaPlayerMSCompositor; 49 class WebMediaPlayerMSCompositor;
45 class RenderFrameObserver; 50 class RenderFrameObserver;
46 51
47 // WebMediaPlayerMS delegates calls from WebCore::MediaPlayerPrivate to 52 // WebMediaPlayerMS delegates calls from WebCore::MediaPlayerPrivate to
48 // Chrome's media player when "src" is from media stream. 53 // Chrome's media player when "src" is from media stream.
49 // 54 //
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 size_t videoDecodedByteCount() const override; 140 size_t videoDecodedByteCount() const override;
136 141
137 // WebMediaPlayerDelegate::Observer implementation. 142 // WebMediaPlayerDelegate::Observer implementation.
138 void OnHidden() override; 143 void OnHidden() override;
139 void OnShown() override; 144 void OnShown() override;
140 void OnSuspendRequested(bool must_suspend) override; 145 void OnSuspendRequested(bool must_suspend) override;
141 void OnPlay() override; 146 void OnPlay() override;
142 void OnPause() override; 147 void OnPause() override;
143 void OnVolumeMultiplierUpdate(double multiplier) override; 148 void OnVolumeMultiplierUpdate(double multiplier) override;
144 149
145 bool copyVideoTextureToPlatformTexture( 150 bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface* gl,
146 blink::WebGraphicsContext3D* web_graphics_context, 151 unsigned int texture,
147 unsigned int texture, 152 unsigned int internal_format,
148 unsigned int internal_format, 153 unsigned int type,
149 unsigned int type, 154 bool premultiply_alpha,
150 bool premultiply_alpha, 155 bool flip_y) override;
151 bool flip_y) override;
152 156
153 private: 157 private:
154 friend class WebMediaPlayerMSTest; 158 friend class WebMediaPlayerMSTest;
155 159
156 // The callback for VideoFrameProvider to signal a new frame is available. 160 // The callback for VideoFrameProvider to signal a new frame is available.
157 void OnFrameAvailable(const scoped_refptr<media::VideoFrame>& frame); 161 void OnFrameAvailable(const scoped_refptr<media::VideoFrame>& frame);
158 // Need repaint due to state change. 162 // Need repaint due to state change.
159 void RepaintInternal(); 163 void RepaintInternal();
160 164
161 // The callback for source to report error. 165 // The callback for source to report error.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // True if playback should be started upon the next call to OnShown(). Only 231 // True if playback should be started upon the next call to OnShown(). Only
228 // used on Android. 232 // used on Android.
229 bool should_play_upon_shown_; 233 bool should_play_upon_shown_;
230 234
231 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS); 235 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerMS);
232 }; 236 };
233 237
234 } // namespace content 238 } // namespace content
235 239
236 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_ 240 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_MS_H_
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | content/renderer/media/webmediaplayer_ms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698