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

Commits on Apr 27, 2017

  1. Remove the vStretchSize assignment in ps_image vertex shader

    They are the redundant assignments.
    JerryShih committed Apr 27, 2017
  2. 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.
    JerryShih committed Apr 27, 2017
  3. Add samplerExternalOES, sampler2dRect target and NV12 format support …

    …in ps_yuv_image.
    
    Use WR_FEATURE_TEXTURE_EXTERNAL for samplerExternalOES support.
    Use WR_FEATURE_TEXTURE_RECT for sampler2dRect support.
    Use WR_FEATURE_NV12 for NV12 format support.
    The WR_FEATURE_TEXTURE_EXTERNAL and WR_FEATURE_TEXTURE_RECT are exclusive.
    JerryShih committed Apr 27, 2017
  4. Add new package in webrender and webrender_traits.

    enum_primitive = "0.1.1"
    num = "0.1.32"
    JerryShih committed Apr 27, 2017
  5. Add enum ImageBufferKind, ImageBufferKind and YuvColorSpace.

    Also use enum_from_primitive to convert a primitive to these enum value.
    JerryShih committed Apr 27, 2017
  6. Update push_yuv_image() interface.

    The push_yuv_image() could have 1 to 3 plane depending on the YuvFormat.
    All planar data should use the same buffer type.
    JerryShih committed Apr 27, 2017
  7. Pass ImageBufferKind, YuvFormat and YuvColorSpace in AlphaBatchKind t…

    …o select the different configuration of shader.
    
    The ps_image and ps_yuv_image have a lot of feature configurations. Use ImageBufferKind, YuvFormat and YuvColorSpace to get the corresponding shader object.
    JerryShih committed Apr 27, 2017
  8. Create the ps_image and ps_yuv_image arrays for different feature set…

    …tings.
    
    Each feature combination has its shader object in the array. We will select the correct one according the image_buffer_kind, format and color_space properties.
    JerryShih committed Apr 27, 2017
  9. Set default yuv color space setting in ps_yuv_image.

    The angle_shader_validation doesn't set any feature string for shader.
    So, the color_matrix is not defined. Set REC601 as the default value.
    JerryShih committed Apr 27, 2017
  10. Use a macro TEX_SAMPLE() to replace the different texture sampling fu…

    …nctions for WR_FEATURE_TEXTURE_EXTERNAL and WR_FEATURE_TEXTURE_RECT features.
    JerryShih committed Apr 27, 2017
  11. Remove the num::FromPrimitive usage for the enum YuvColorSpace, YuvFo…

    …rmat and ImageBufferKind.
    JerryShih committed Apr 27, 2017
  12. Update for review comment.

    JerryShih committed Apr 27, 2017
  13. Add a YuvData type which contains the channel data and format informa…

    …tion.
    JerryShih committed Apr 27, 2017
You can’t perform that action at this time.