From 9e2b43aee24f3a9827e05d34578ba9a747236cd5 Mon Sep 17 00:00:00 2001 From: halliwell Date: Wed, 13 May 2015 09:27:21 -0700 Subject: Add distinction between RGB and RGBA native texture video frame and resources Currently it's impossible to place a NATIVE_TEXTURE VideoFrame into an overlay, because: * NATIVE_TEXTURE VideoFrame turns into RGB_RESOURCE in VideoResourceUpdater * RGB_RESOURCE always sets premultipled_alpha flag on its TextureDrawQuad (see VideoLayerImpl::AppendQuads) * OverlayStrategyCommon rejects quads with premultiplied alpha BUG= Review URL: https://codereview.chromium.org/1134643002 Cr-Commit-Position: refs/heads/master@{#329651} --- cc/trees/layer_tree_host_unittest_context.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cc/trees') diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc index c1436e5..71c9ea0 100644 --- a/cc/trees/layer_tree_host_unittest_context.cc +++ b/cc/trees/layer_tree_host_unittest_context.cc @@ -1078,11 +1078,13 @@ class LayerTreeHostContextTestDontUseLostResources hw_video_frame_ = VideoFrame::WrapNativeTexture( gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point), media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4), - gfx::Rect(0, 0, 4, 4), gfx::Size(4, 4), base::TimeDelta(), false); + gfx::Rect(0, 0, 4, 4), gfx::Size(4, 4), base::TimeDelta(), + false /* allow_overlay */, true /* has_alpha */); scaled_hw_video_frame_ = VideoFrame::WrapNativeTexture( gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, sync_point), media::VideoFrame::ReleaseMailboxCB(), gfx::Size(4, 4), - gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta(), false); + gfx::Rect(0, 0, 3, 2), gfx::Size(4, 4), base::TimeDelta(), + false /* allow_overlay */, true /* has_alpha */); color_frame_provider_.set_frame(color_video_frame_); hw_frame_provider_.set_frame(hw_video_frame_); -- cgit v1.1