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

Unified Diff: cc/layers/video_layer_impl.cc

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 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 | « cc/ipc/quads_struct_traits.cc ('k') | cc/output/ca_layer_overlay.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « cc/ipc/quads_struct_traits.cc ('k') | cc/output/ca_layer_overlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698