OLD | NEW |
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_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // Poster image, as defined in the <video> element. | 126 // Poster image, as defined in the <video> element. |
127 void setPoster(const blink::WebURL& poster) override; | 127 void setPoster(const blink::WebURL& poster) override; |
128 | 128 |
129 // Methods for painting. | 129 // Methods for painting. |
130 // FIXME: This path "only works" on Android. It is a workaround for the | 130 // FIXME: This path "only works" on Android. It is a workaround for the |
131 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture | 131 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture |
132 // internally. It should be removed and replaced by the normal paint path. | 132 // internally. It should be removed and replaced by the normal paint path. |
133 // https://code.google.com/p/skia/issues/detail?id=1189 | 133 // https://code.google.com/p/skia/issues/detail?id=1189 |
134 void paint(blink::WebCanvas* canvas, | 134 void paint(blink::WebCanvas* canvas, |
135 const blink::WebRect& rect, | 135 const blink::WebRect& rect, |
136 unsigned char alpha, | 136 SkPaint&) override; |
137 SkXfermode::Mode mode) override; | |
138 | 137 |
139 bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface* gl, | 138 bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface* gl, |
140 unsigned int texture, | 139 unsigned int texture, |
141 unsigned int internal_format, | 140 unsigned int internal_format, |
142 unsigned int type, | 141 unsigned int type, |
143 bool premultiply_alpha, | 142 bool premultiply_alpha, |
144 bool flip_y) override; | 143 bool flip_y) override; |
145 | 144 |
146 // True if the loaded media has a playable video/audio track. | 145 // True if the loaded media has a playable video/audio track. |
147 bool hasVideo() const override; | 146 bool hasVideo() const override; |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 524 |
526 // NOTE: Weak pointers must be invalidated before all other member variables. | 525 // NOTE: Weak pointers must be invalidated before all other member variables. |
527 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 526 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
528 | 527 |
529 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 528 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
530 }; | 529 }; |
531 | 530 |
532 } // namespace content | 531 } // namespace content |
533 | 532 |
534 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 533 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |