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

Unified Diff: cc/ipc/quads_struct_traits.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.h ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/quads_struct_traits.cc
diff --git a/cc/ipc/quads_struct_traits.cc b/cc/ipc/quads_struct_traits.cc
index 7e567f561ca8dac074ea884bfe451581fa65b7e7..530603f9c216138a72857fda38a4abdd9655dd0c 100644
--- a/cc/ipc/quads_struct_traits.cc
+++ b/cc/ipc/quads_struct_traits.cc
@@ -44,6 +44,10 @@ cc::DrawQuad* AllocateAndConstruct(
quad = list->AllocateAndConstruct<cc::YUVVideoDrawQuad>();
quad->material = cc::DrawQuad::YUV_VIDEO_CONTENT;
return quad;
+ case cc::mojom::DrawQuadStateDataView::Tag::Y_VIDEO_QUAD_STATE:
+ quad = list->AllocateAndConstruct<cc::YVideoDrawQuad>();
+ quad->material = cc::DrawQuad::Y_VIDEO_CONTENT;
+ return quad;
}
NOTREACHED();
return nullptr;
@@ -230,4 +234,19 @@ bool StructTraits<cc::mojom::DrawQuadDataView, cc::DrawQuad>::Read(
return data.ReadDrawQuadState(out);
}
+// static
+bool StructTraits<cc::mojom::YVideoQuadStateDataView, cc::DrawQuad>::Read(
+ cc::mojom::YVideoQuadStateDataView data,
+ cc::DrawQuad* out) {
+ cc::YVideoDrawQuad* quad = static_cast<cc::YVideoDrawQuad*>(out);
+ quad->resources.ids[cc::YVideoDrawQuad::kResourceIdIndex] =
+ data.resource_id();
+ quad->resources.count = 1;
+ if (!data.ReadUvTopLeft(&quad->uv_top_left) ||
+ !data.ReadUvBottomRight(&quad->uv_bottom_right)) {
+ return false;
+ }
+ return true;
+}
+
} // namespace mojo
« no previous file with comments | « cc/ipc/quads_struct_traits.h ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698