| 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 <jni.h> | 8 #include <jni.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // Methods for painting. | 123 // Methods for painting. |
| 124 // FIXME: This path "only works" on Android. It is a workaround for the | 124 // FIXME: This path "only works" on Android. It is a workaround for the |
| 125 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture | 125 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture |
| 126 // internally. It should be removed and replaced by the normal paint path. | 126 // internally. It should be removed and replaced by the normal paint path. |
| 127 // https://code.google.com/p/skia/issues/detail?id=1189 | 127 // https://code.google.com/p/skia/issues/detail?id=1189 |
| 128 virtual void paint(blink::WebCanvas* canvas, | 128 virtual void paint(blink::WebCanvas* canvas, |
| 129 const blink::WebRect& rect, | 129 const blink::WebRect& rect, |
| 130 unsigned char alpha, | 130 unsigned char alpha, |
| 131 SkXfermode::Mode mode); | 131 SkXfermode::Mode mode); |
| 132 | 132 |
| 133 // TODO(dshwang): remove |level|. crbug.com/443151 |
| 133 virtual bool copyVideoTextureToPlatformTexture( | 134 virtual bool copyVideoTextureToPlatformTexture( |
| 134 blink::WebGraphicsContext3D* web_graphics_context, | 135 blink::WebGraphicsContext3D* web_graphics_context, |
| 135 unsigned int texture, | 136 unsigned int texture, |
| 136 unsigned int level, | 137 unsigned int level, |
| 137 unsigned int internal_format, | 138 unsigned int internal_format, |
| 138 unsigned int type, | 139 unsigned int type, |
| 139 bool premultiply_alpha, | 140 bool premultiply_alpha, |
| 140 bool flip_y); | 141 bool flip_y); |
| 142 virtual bool copyVideoTextureToPlatformTexture( |
| 143 blink::WebGraphicsContext3D* web_graphics_context, |
| 144 unsigned int texture, |
| 145 unsigned int internal_format, |
| 146 unsigned int type, |
| 147 bool premultiply_alpha, |
| 148 bool flip_y); |
| 141 | 149 |
| 142 // True if the loaded media has a playable video/audio track. | 150 // True if the loaded media has a playable video/audio track. |
| 143 virtual bool hasVideo() const; | 151 virtual bool hasVideo() const; |
| 144 virtual bool hasAudio() const; | 152 virtual bool hasAudio() const; |
| 145 | 153 |
| 146 virtual bool isRemote() const; | 154 virtual bool isRemote() const; |
| 147 | 155 |
| 148 // Dimensions of the video. | 156 // Dimensions of the video. |
| 149 virtual blink::WebSize naturalSize() const; | 157 virtual blink::WebSize naturalSize() const; |
| 150 | 158 |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 | 517 |
| 510 // NOTE: Weak pointers must be invalidated before all other member variables. | 518 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 511 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 519 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
| 512 | 520 |
| 513 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 521 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 514 }; | 522 }; |
| 515 | 523 |
| 516 } // namespace content | 524 } // namespace content |
| 517 | 525 |
| 518 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 526 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |