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

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

Issue 1203793003: Remove flip_y, premultiply_alpha, unmultiply_alpha support in command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 6 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 | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_flipy.txt » ('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 7b0bed9a9ff9019c23ea2feba3346b91a64be28b..e4b6fb0d731f857fea72d99788efd564223bda66 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -29,7 +29,6 @@
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
-#include "gpu/blink/webgraphicscontext3d_impl.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/client/gles2_interface.h"
#include "gpu/command_buffer/common/mailbox_holder.h"
@@ -651,12 +650,6 @@ bool WebMediaPlayerAndroid::copyVideoTextureToPlatformTexture(
if (needs_external_surface_)
return false;
- // TODO(zmo): Remove the casting once Copy{Sub}TextureCHROMIUM API
- // signatures are switched over in blink.
- gpu_blink::WebGraphicsContext3DImpl* web_graphics_context_impl =
- reinterpret_cast<gpu_blink::WebGraphicsContext3DImpl*>(
- web_graphics_context);
-
scoped_refptr<VideoFrame> video_frame;
{
base::AutoLock auto_lock(current_frame_lock_);
@@ -671,33 +664,24 @@ bool WebMediaPlayerAndroid::copyVideoTextureToPlatformTexture(
mailbox_holder.texture_target == GL_TEXTURE_EXTERNAL_OES) ||
(is_remote_ && mailbox_holder.texture_target == GL_TEXTURE_2D));
- web_graphics_context_impl->waitSyncPoint(mailbox_holder.sync_point);
+ web_graphics_context->waitSyncPoint(mailbox_holder.sync_point);
// Ensure the target of texture is set before copyTextureCHROMIUM, otherwise
// an invalid texture target may be used for copy texture.
uint32 src_texture =
- web_graphics_context_impl->createAndConsumeTextureCHROMIUM(
+ web_graphics_context->createAndConsumeTextureCHROMIUM(
mailbox_holder.texture_target, mailbox_holder.mailbox.name);
- // The video is stored in an unmultiplied format, so premultiply if
- // necessary.
- web_graphics_context_impl->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM,
- premultiply_alpha);
-
// Application itself needs to take care of setting the right flip_y
// value down to get the expected result.
// flip_y==true means to reverse the video orientation while
// flip_y==false means to keep the intrinsic orientation.
- web_graphics_context_impl->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y);
- web_graphics_context_impl->copyTextureCHROMIUM(
+ web_graphics_context->copyTextureCHROMIUM(
GL_TEXTURE_2D, src_texture, texture, internal_format, type,
flip_y, premultiply_alpha, false);
- web_graphics_context_impl->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false);
- web_graphics_context_impl->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM,
- false);
- web_graphics_context_impl->deleteTexture(src_texture);
- web_graphics_context_impl->flush();
+ web_graphics_context->deleteTexture(src_texture);
+ web_graphics_context->flush();
SyncPointClientImpl client(web_graphics_context);
video_frame->UpdateReleaseSyncPoint(&client);
« no previous file with comments | « no previous file | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_flipy.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698