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

Unified Diff: content/renderer/media/android/webmediaplayer_android.h

Issue 409793006: Eliminate MediaPlayer abstraction(paint APIs- chromium changes) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/webmediaplayer_android.h
diff --git a/content/renderer/media/android/webmediaplayer_android.h b/content/renderer/media/android/webmediaplayer_android.h
index 2ec857aef76322362fff330a60ce96e2476dba47..1b90148d93adf047724be3a86d9159e1e51ef421 100644
--- a/content/renderer/media/android/webmediaplayer_android.h
+++ b/content/renderer/media/android/webmediaplayer_android.h
@@ -29,6 +29,9 @@
#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/platform/WebURL.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/gpu/GrContext.h"
+#include "third_party/skia/include/gpu/SkGrPixelRef.h"
#include "ui/gfx/rect_f.h"
namespace base {
@@ -103,6 +106,10 @@ class WebMediaPlayerAndroid : public blink::WebMediaPlayer,
virtual void setPoster(const blink::WebURL& poster) OVERRIDE;
// Methods for painting.
+ // FIXME: This path "only works" on Android. It is a workaround for the
+ // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture
+ // internally. It should be removed and replaced by the normal paint path.
+ // https://code.google.com/p/skia/issues/detail?id=1189
virtual void paint(blink::WebCanvas* canvas,
const blink::WebRect& rect,
unsigned char alpha);
@@ -277,6 +284,11 @@ class WebMediaPlayerAndroid : public blink::WebMediaPlayer,
// NULL immediately and reset.
void SetDecryptorReadyCB(const media::DecryptorReadyCB& decryptor_ready_cb);
+ bool EnsureTextureBackedSkBitmap(GrContext* gr, SkBitmap& bitmap,
+ const blink::WebSize& size,
+ GrSurfaceOrigin origin,
+ GrPixelConfig config);
+
blink::WebFrame* const frame_;
blink::WebMediaPlayerClient* const client_;
@@ -436,6 +448,8 @@ class WebMediaPlayerAndroid : public blink::WebMediaPlayer,
// player_manager_->SetCdm() directly.
media::DecryptorReadyCB decryptor_ready_cb_;
+ SkBitmap bitmap_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
« no previous file with comments | « no previous file | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698