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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.h

Issue 1315323006: webgl: optimize webgl.texSubImage2D(video) path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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_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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Methods for painting. 128 // Methods for painting.
129 // FIXME: This path "only works" on Android. It is a workaround for the 129 // FIXME: This path "only works" on Android. It is a workaround for the
130 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture 130 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture
131 // internally. It should be removed and replaced by the normal paint path. 131 // internally. It should be removed and replaced by the normal paint path.
132 // https://code.google.com/p/skia/issues/detail?id=1189 132 // https://code.google.com/p/skia/issues/detail?id=1189
133 virtual void paint(blink::WebCanvas* canvas, 133 virtual void paint(blink::WebCanvas* canvas,
134 const blink::WebRect& rect, 134 const blink::WebRect& rect,
135 unsigned char alpha, 135 unsigned char alpha,
136 SkXfermode::Mode mode); 136 SkXfermode::Mode mode);
137 137
138 bool copyVideoTextureToPlatformTexture( 138 // TODO(dshwang): remove it. virtual trick allows to remove it in blink.
139 // crbug.com/504773
140 virtual bool copyVideoTextureToPlatformTexture(
139 blink::WebGraphicsContext3D* web_graphics_context, 141 blink::WebGraphicsContext3D* web_graphics_context,
140 unsigned int texture, 142 unsigned int texture,
141 unsigned int internal_format, 143 unsigned int internal_format,
142 unsigned int type, 144 unsigned int type,
143 bool premultiply_alpha, 145 bool premultiply_alpha,
146 bool flip_y);
147
148 bool copyVideoTextureToPlatformTexture(
149 blink::WebGraphicsContext3D* web_graphics_context,
150 unsigned int target,
151 unsigned int texture,
152 unsigned int internal_format,
153 unsigned int type,
154 int level,
155 bool premultiply_alpha,
156 bool flip_y) override;
157 bool copyVideoSubTextureToPlatformTexture(
oetuaho-nv 2015/10/01 07:46:21 I think that it needs to be clearer that this is c
dshwang 2015/10/21 16:12:15 This method is removed as unifying both into copyV
158 blink::WebGraphicsContext3D* web_graphics_context,
159 unsigned int target,
160 unsigned int texture,
161 int level,
162 int xoffset,
163 int yoffset,
164 bool premultiply_alpha,
144 bool flip_y) override; 165 bool flip_y) override;
145 166
146 // True if the loaded media has a playable video/audio track. 167 // True if the loaded media has a playable video/audio track.
147 virtual bool hasVideo() const; 168 virtual bool hasVideo() const;
148 virtual bool hasAudio() const; 169 virtual bool hasAudio() const;
149 170
150 virtual bool isRemote() const; 171 virtual bool isRemote() const;
151 172
152 // Dimensions of the video. 173 // Dimensions of the video.
153 virtual blink::WebSize naturalSize() const; 174 virtual blink::WebSize naturalSize() const;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 void DrawRemotePlaybackText(const std::string& remote_playback_message); 315 void DrawRemotePlaybackText(const std::string& remote_playback_message);
295 void ReallocateVideoFrame(); 316 void ReallocateVideoFrame();
296 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame); 317 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame);
297 void RemoveSurfaceTextureAndProxy(); 318 void RemoveSurfaceTextureAndProxy();
298 void DidLoadMediaInfo(MediaInfoLoader::Status status, 319 void DidLoadMediaInfo(MediaInfoLoader::Status status,
299 const GURL& redirected_url, 320 const GURL& redirected_url,
300 const GURL& first_party_for_cookies, 321 const GURL& first_party_for_cookies,
301 bool allow_stored_credentials); 322 bool allow_stored_credentials);
302 bool IsKeySystemSupported(const std::string& key_system); 323 bool IsKeySystemSupported(const std::string& key_system);
303 bool IsLocalResource(); 324 bool IsLocalResource();
325 bool CopyVideoTextureToPlatformTextureInternal(
326 blink::WebGraphicsContext3D* web_graphics_context,
327 bool is_full_copy,
328 unsigned int target,
329 unsigned int texture,
330 unsigned int internal_format,
331 unsigned int type,
332 int level,
333 int xoffset,
334 int yoffset,
335 bool premultiply_alpha,
336 bool flip_y);
304 337
305 // Actually do the work for generateKeyRequest/addKey so they can easily 338 // Actually do the work for generateKeyRequest/addKey so they can easily
306 // report results to UMA. 339 // report results to UMA.
307 MediaKeyException GenerateKeyRequestInternal(const std::string& key_system, 340 MediaKeyException GenerateKeyRequestInternal(const std::string& key_system,
308 const unsigned char* init_data, 341 const unsigned char* init_data,
309 unsigned init_data_length); 342 unsigned init_data_length);
310 MediaKeyException AddKeyInternal(const std::string& key_system, 343 MediaKeyException AddKeyInternal(const std::string& key_system,
311 const unsigned char* key, 344 const unsigned char* key,
312 unsigned key_length, 345 unsigned key_length,
313 const unsigned char* init_data, 346 const unsigned char* init_data,
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 563
531 // NOTE: Weak pointers must be invalidated before all other member variables. 564 // NOTE: Weak pointers must be invalidated before all other member variables.
532 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 565 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
533 566
534 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 567 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
535 }; 568 };
536 569
537 } // namespace content 570 } // namespace content
538 571
539 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 572 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698