Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NV12 and TEXTURE_EXTERNAL_OES target support in WR. #1150

Merged
merged 21 commits into from Apr 27, 2017
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
deeebf5
Remove the vStretchSize assignment in ps_image vertex shader
JerryShih Apr 19, 2017
06d7376
Add samplerExternalOES support.
JerryShih Apr 19, 2017
bfc555f
Remove the unused data member in YuvImage.
JerryShih Apr 19, 2017
9dfebbb
Add samplerExternalOES support in ps_image shader.
JerryShih Apr 20, 2017
a559829
Use preprocessor to select the yuv color matrix in ps_yuv_image shader.
JerryShih Apr 20, 2017
0f5a96f
Reorder some function calls in ps_yuv_image shader.
JerryShih Apr 20, 2017
c75bb28
Add samplerExternalOES, sampler2dRect target and NV12 format support …
JerryShih Apr 20, 2017
7f53f91
Add new package in webrender and webrender_traits.
JerryShih Apr 20, 2017
652735a
Add enum ImageBufferKind, ImageBufferKind and YuvColorSpace.
JerryShih Apr 20, 2017
5a65e6c
Update push_yuv_image() interface.
JerryShih Apr 20, 2017
f734c68
Remove the match of |_| with ExternalImageType type.
JerryShih Apr 20, 2017
41ce8dd
Pass ImageBufferKind, YuvFormat and YuvColorSpace in AlphaBatchKind t…
JerryShih Apr 20, 2017
9fe5754
Create the ps_image and ps_yuv_image arrays for different feature set…
JerryShih Apr 20, 2017
d3bd47e
Add yuv_image usage in sample.
JerryShih Apr 21, 2017
06ccad4
Set default yuv color space setting in ps_yuv_image.
JerryShih Apr 21, 2017
2e76503
Move the push_yuv_image() sample code from basic.rs to yuv.rs
JerryShih Apr 27, 2017
096f2c5
Update for review comment for ps_yuv_image shader.
JerryShih Apr 27, 2017
56b2d1d
Use a macro TEX_SAMPLE() to replace the different texture sampling fu…
JerryShih Apr 27, 2017
656303c
Remove the num::FromPrimitive usage for the enum YuvColorSpace, YuvFo…
JerryShih Apr 27, 2017
52b7331
Update for review comment.
JerryShih Apr 27, 2017
1d10e44
Add a YuvData type which contains the channel data and format informa…
JerryShih Apr 27, 2017
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Remove the unused data member in YuvImage.

The color_space condition will be replaced by the shader preprocessor.
The y_st_rect, u_st_rect and v_st_rect are not used in shader.
  • Loading branch information
JerryShih committed Apr 27, 2017
commit bfc555fc6172b755bab80f5bc6b4fa66e29da3e1
@@ -747,21 +747,13 @@ Image fetch_image(int index) {
return Image(data);
}

// YUV color spaces
#define YUV_REC601 1
#define YUV_REC709 2

struct YuvImage {
vec4 y_st_rect;
vec4 u_st_rect;
vec4 v_st_rect;
vec2 size;
int color_space;
};

YuvImage fetch_yuv_image(int index) {
vec4 data = fetch_data_1(index);
return YuvImage(vec4(0.0), vec4(0.0), vec4(0.0), data.xy, int(data.z));
return YuvImage(data.xy);
}

struct BoxShadow {
@@ -175,16 +175,14 @@ pub struct YuvImagePrimitiveCpu {
#[repr(C)]
pub struct YuvImagePrimitiveGpu {
pub size: LayerSize,
pub color_space: f32,
pub padding: f32,
pub padding: [f32; 2],
}

impl YuvImagePrimitiveGpu {
pub fn new(size: LayerSize, color_space: YuvColorSpace) -> Self {
pub fn new(size: LayerSize) -> Self {
YuvImagePrimitiveGpu {
size: size,
color_space: color_space as u32 as f32,
padding: 0.0,
padding: [0.0; 2],
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.