Index: cc/layers/video_layer_impl.cc |
diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc |
index f1c118d32ae2ff52df77afdee6d1eb2b92fdac72..04cd59e0e87ecdd30be9483d0cf294fdce6c7734 100644 |
--- a/cc/layers/video_layer_impl.cc |
+++ b/cc/layers/video_layer_impl.cc |
@@ -12,6 +12,7 @@ |
#include "cc/layers/video_frame_provider_client_impl.h" |
#include "cc/quads/stream_video_draw_quad.h" |
#include "cc/quads/texture_draw_quad.h" |
+#include "cc/quads/y_video_draw_quad.h" |
#include "cc/quads/yuv_video_draw_quad.h" |
#include "cc/resources/resource_provider.h" |
#include "cc/resources/single_release_callback_impl.h" |
@@ -310,6 +311,21 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass, |
ValidateQuadResources(texture_quad); |
break; |
} |
+ case VideoFrameExternalResources::Y_RESOURCE: { |
+ // 16 bit RG88 requires custom bilinear filter in fragment shader. |
+ DCHECK_EQ(frame_resources_.size(), 1u); |
+ if (frame_resources_.size() < 1u) |
+ break; |
+ gfx::PointF uv_top_left(0.f, 0.f); |
+ gfx::PointF uv_bottom_right(tex_width_scale, tex_height_scale); |
+ YVideoDrawQuad* y_video_quad = |
+ render_pass->CreateAndAppendDrawQuad<YVideoDrawQuad>(); |
+ y_video_quad->SetNew(shared_quad_state, quad_rect, opaque_rect, |
+ visible_quad_rect, frame_resources_[0].id, |
+ uv_top_left, uv_bottom_right); |
+ ValidateQuadResources(y_video_quad); |
+ break; |
+ } |
case VideoFrameExternalResources::STREAM_TEXTURE_RESOURCE: { |
DCHECK_EQ(frame_resources_.size(), 1u); |
if (frame_resources_.size() < 1u) |