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

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

Issue 1833273002: Remove WebGraphicsContext3D::getGLES2Interface(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: getgles2: rebase Created 4 years, 9 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 | « content/renderer/media/android/webmediaplayer_android.h ('k') | content/renderer/media/webmediaplayer_ms.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 3ce2c1e621f04709146d91462dbc964072f704d3..afca21f12c1223a1e144610332b41416e55624e6 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -648,14 +648,12 @@ void WebMediaPlayerAndroid::paint(blink::WebCanvas* canvas,
unsigned char alpha,
SkXfermode::Mode mode) {
DCHECK(main_thread_checker_.CalledOnValidThread());
- scoped_ptr<blink::WebGraphicsContext3DProvider> provider =
- scoped_ptr<blink::WebGraphicsContext3DProvider>(blink::Platform::current(
- )->createSharedOffscreenGraphicsContext3DProvider());
+ scoped_ptr<blink::WebGraphicsContext3DProvider> provider(
+ blink::Platform::current()
+ ->createSharedOffscreenGraphicsContext3DProvider());
if (!provider)
return;
- blink::WebGraphicsContext3D* context3D = provider->context3d();
- if (!context3D)
- return;
+ gpu::gles2::GLES2Interface* gl = provider->contextGL();
// Copy video texture into a RGBA texture based bitmap first as video texture
// on Android is GL_TEXTURE_EXTERNAL_OES which is not supported by Skia yet.
@@ -673,8 +671,8 @@ void WebMediaPlayerAndroid::paint(blink::WebCanvas* canvas,
unsigned textureId = skia::GrBackendObjectToGrGLTextureInfo(
(bitmap_.getTexture())->getTextureHandle())
->fID;
- if (!copyVideoTextureToPlatformTexture(context3D, textureId,
- GL_RGBA, GL_UNSIGNED_BYTE, true, false)) {
+ if (!copyVideoTextureToPlatformTexture(gl, textureId, GL_RGBA,
+ GL_UNSIGNED_BYTE, true, false)) {
return;
}
@@ -697,14 +695,12 @@ void WebMediaPlayerAndroid::paint(blink::WebCanvas* canvas,
}
bool WebMediaPlayerAndroid::copyVideoTextureToPlatformTexture(
- blink::WebGraphicsContext3D* web_graphics_context,
+ gpu::gles2::GLES2Interface* gl,
unsigned int texture,
unsigned int internal_format,
unsigned int type,
bool premultiply_alpha,
bool flip_y) {
- // TODO(danakj): Pass a GLES2Interface to this method instead.
- gpu::gles2::GLES2Interface* gl = web_graphics_context->getGLES2Interface();
DCHECK(main_thread_checker_.CalledOnValidThread());
// Don't allow clients to copy an encrypted video frame.
if (needs_external_surface_)
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | content/renderer/media/webmediaplayer_ms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698