OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebMediaPlayerClientImpl_h | 31 #ifndef WebMediaPlayerClientImpl_h |
32 #define WebMediaPlayerClientImpl_h | 32 #define WebMediaPlayerClientImpl_h |
33 | 33 |
34 #if ENABLE(VIDEO) | 34 #if ENABLE(VIDEO) |
35 | 35 |
36 #include "AudioSourceProvider.h" | 36 #include "AudioSourceProvider.h" |
37 #include "MediaPlayerPrivate.h" | 37 #include "MediaPlayerPrivate.h" |
| 38 #if defined(OS_ANDROID) |
| 39 #include "GrTexture.h" |
| 40 #include "SkRefCnt.h" |
| 41 #include "SkBitmap.h" |
| 42 #endif |
38 #include "WebAudioSourceProviderClient.h" | 43 #include "WebAudioSourceProviderClient.h" |
39 #include "WebMediaPlayerClient.h" | 44 #include "WebMediaPlayerClient.h" |
40 #include <wtf/OwnPtr.h> | 45 #include <wtf/OwnPtr.h> |
41 #include <wtf/PassOwnPtr.h> | 46 #include <wtf/PassOwnPtr.h> |
42 | 47 |
43 namespace WebCore { class AudioSourceProviderClient; } | 48 namespace WebCore { class AudioSourceProviderClient; } |
44 | 49 |
45 namespace WebKit { | 50 namespace WebKit { |
46 | 51 |
47 class WebHelperPluginImpl; | 52 class WebHelperPluginImpl; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 static WebCore::MediaPlayer::SupportsType supportsType( | 169 static WebCore::MediaPlayer::SupportsType supportsType( |
165 const WTF::String& type, const WTF::String& codecs, const String& keySys
tem, const WebCore::KURL&); | 170 const WTF::String& type, const WTF::String& codecs, const String& keySys
tem, const WebCore::KURL&); |
166 #else | 171 #else |
167 static WebCore::MediaPlayer::SupportsType supportsType( | 172 static WebCore::MediaPlayer::SupportsType supportsType( |
168 const WTF::String& type, const WTF::String& codecs, const WebCore::KURL&
); | 173 const WTF::String& type, const WTF::String& codecs, const WebCore::KURL&
); |
169 #endif | 174 #endif |
170 #if USE(ACCELERATED_COMPOSITING) | 175 #if USE(ACCELERATED_COMPOSITING) |
171 bool acceleratedRenderingInUse(); | 176 bool acceleratedRenderingInUse(); |
172 #endif | 177 #endif |
173 | 178 |
| 179 #if defined(OS_ANDROID) |
| 180 // FIXME: This path "only works" on Android. It is a workaround for the prob
lem that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES |
| 181 // texture internally. It should be removed and replaced by the normal paint
path. |
| 182 // https://code.google.com/p/skia/issues/detail?id=1189 |
| 183 void paintOnAndroid(WebCore::GraphicsContext* context, WebCore::GraphicsCont
ext3D* context3D, const WebCore::IntRect& rect, uint8_t alpha); |
| 184 SkAutoTUnref<GrTexture> m_texture; |
| 185 SkBitmap m_bitmap; |
| 186 #endif |
| 187 |
174 WebCore::MediaPlayer* m_mediaPlayer; | 188 WebCore::MediaPlayer* m_mediaPlayer; |
175 OwnPtr<WebMediaPlayer> m_webMediaPlayer; | 189 OwnPtr<WebMediaPlayer> m_webMediaPlayer; |
176 WebCore::KURL m_url; | 190 WebCore::KURL m_url; |
177 bool m_delayingLoad; | 191 bool m_delayingLoad; |
178 WebCore::MediaPlayer::Preload m_preload; | 192 WebCore::MediaPlayer::Preload m_preload; |
179 RefPtr<WebHelperPluginImpl> m_helperPlugin; | 193 RefPtr<WebHelperPluginImpl> m_helperPlugin; |
180 WebLayer* m_videoLayer; | 194 WebLayer* m_videoLayer; |
181 bool m_opaque; | 195 bool m_opaque; |
182 bool m_needsWebLayerForVideo; | 196 bool m_needsWebLayerForVideo; |
183 static bool m_isEnabled; | 197 static bool m_isEnabled; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 #if ENABLE(MEDIA_SOURCE) | 246 #if ENABLE(MEDIA_SOURCE) |
233 RefPtr<WebCore::MediaSource> m_mediaSource; | 247 RefPtr<WebCore::MediaSource> m_mediaSource; |
234 #endif | 248 #endif |
235 }; | 249 }; |
236 | 250 |
237 } // namespace WebKit | 251 } // namespace WebKit |
238 | 252 |
239 #endif | 253 #endif |
240 | 254 |
241 #endif | 255 #endif |
OLD | NEW |