summaryrefslogtreecommitdiffstats
path: root/media/blink/skcanvas_video_renderer.cc
diff options
context:
space:
mode:
authordongseong.hwang <dongseong.hwang@intel.com>2015-03-05 10:28:04 -0800
committerCommit bot <commit-bot@chromium.org>2015-03-05 18:28:55 +0000
commit46305b130beb809b98d02830c857dc3dfaf5b98b (patch)
treed8d8b0ac262188390fd5d62e615b0ee3072feaae /media/blink/skcanvas_video_renderer.cc
parenta8e635214679c50b9010d925d083f8e54b13ba92 (diff)
downloadchromium_src-46305b130beb809b98d02830c857dc3dfaf5b98b.zip
chromium_src-46305b130beb809b98d02830c857dc3dfaf5b98b.tar.gz
chromium_src-46305b130beb809b98d02830c857dc3dfaf5b98b.tar.bz2
Reland of Revert of gpu: introduce glCopySubTextureCHROMIUM (patchset #1 id:1 of https://codereview.chromium.org/972833004/)
Reason for revert: Fix OSX failure. glValidateProgram() in OSX has very strange behavior. It validates FBO unexpectedly. So glValidateProgram() falsely fails if FBO is not bound. Move the validation code after FBO binding. In addition, previous patch hits one-copy performance badly because CopySubTextureCHROMIUM didn't use image copy optimization like CopyTextureCHROMIUM. This CL applied it. Original issue's description: > Revert of gpu: introduce glCopySubTextureCHROMIUM (patchset #4 id:80001 of https://codereview.chromium.org/864513004/) > > Reason for revert: > This broke telemetry_unittests and content_browsertests on Mac (see issue 463439) > > Original issue's description: > > gpu: introduce glCopySubTextureCHROMIUM > > > > Introduce glCopySubTextureCHROMIUM to support immutable texture as well as to > > optimize WebGL texSubImage2D(video | canvas). > > > > This CL changes gl_renderer to use glCopySubTextureCHROMIUM because the > > destination texture is immutable. > > > > TEST=GLCopyTextureCHROMIUMTest > > BUG=443151 > > > > Committed: https://crrev.com/fac6a2d44323ad51429ee728e241fe22242f5ebd > > Cr-Commit-Position: refs/heads/master@{#318855} > > TBR=sievers@chromium.org,piman@chromium.org,kbr@chromium.org,zmo@chromium.org,scherkus@chromium.org,dongseong.hwang@intel.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=443151 > > Review URL: https://codereview.chromium.org/972833004 > > Cr-Commit-Position: refs/heads/master@{#318858} BUG=443151, 463439 Review URL: https://codereview.chromium.org/977853002 Cr-Commit-Position: refs/heads/master@{#319288}
Diffstat (limited to 'media/blink/skcanvas_video_renderer.cc')
-rw-r--r--media/blink/skcanvas_video_renderer.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/media/blink/skcanvas_video_renderer.cc b/media/blink/skcanvas_video_renderer.cc
index 02d914a..f20b901 100644
--- a/media/blink/skcanvas_video_renderer.cc
+++ b/media/blink/skcanvas_video_renderer.cc
@@ -144,8 +144,8 @@ bool CopyVideoFrameTextureToSkBitmapTexture(VideoFrame* video_frame,
// |texture_id|, it's needed to invalidate the state cached in skia,
// but currently the state isn't changed.
SkCanvasVideoRenderer::CopyVideoFrameTextureToGLTexture(
- context_3d.gl, video_frame, texture_id, 0, GL_RGBA, GL_UNSIGNED_BYTE,
- true, false);
+ context_3d.gl, video_frame, texture_id, GL_RGBA, GL_UNSIGNED_BYTE, true,
+ false);
bitmap->notifyPixelsChanged();
return true;
}
@@ -602,7 +602,6 @@ void SkCanvasVideoRenderer::CopyVideoFrameTextureToGLTexture(
gpu::gles2::GLES2Interface* gl,
VideoFrame* video_frame,
unsigned int texture,
- unsigned int level,
unsigned int internal_format,
unsigned int type,
bool premultiply_alpha,
@@ -625,7 +624,7 @@ void SkCanvasVideoRenderer::CopyVideoFrameTextureToGLTexture(
// "flip_y == true" means to reverse the video orientation while
// "flip_y == false" means to keep the intrinsic orientation.
gl->PixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y);
- gl->CopyTextureCHROMIUM(GL_TEXTURE_2D, source_texture, texture, level,
+ gl->CopyTextureCHROMIUM(GL_TEXTURE_2D, source_texture, texture,
internal_format, type);
gl->PixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false);
gl->PixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, false);