Index: cc/output/shader.h |
diff --git a/cc/output/shader.h b/cc/output/shader.h |
index 21b4a70de5aaac404dc18061f6483967841dddf7..1cff5a14995c41f64d2dd79e6b5510563818e54b 100644 |
--- a/cc/output/shader.h |
+++ b/cc/output/shader.h |
@@ -763,11 +763,21 @@ class FragmentShaderRGBATexAlphaMaskColorMatrix : public FragmentTexBlendMode { |
class FragmentShaderYUVVideo : public FragmentTexBlendMode { |
public: |
+ enum HighbitTexture { |
+ HIGHBIT_Y8 = 0, // either RED_8 or LUMINANCE_8 |
+ HIGHBIT_LUMINANCE_F16 = 1, |
+ HIGHBIT_RG88 = 2, |
+ LAST_HIGHBIT_TEXTURE = HIGHBIT_RG88 |
+ }; |
+ |
FragmentShaderYUVVideo(); |
std::string GetShaderString( |
TexCoordPrecision precision, SamplerType sampler) const; |
- void SetFeatures(bool use_alpha_texture, bool use_nv12, bool use_color_lut); |
+ void SetFeatures(bool use_alpha_texture, |
+ bool use_nv12, |
+ bool use_color_lut, |
+ HighbitTexture highbit_texture); |
void Init(gpu::gles2::GLES2Interface* context, |
unsigned program, |
@@ -781,6 +791,8 @@ class FragmentShaderYUVVideo : public FragmentTexBlendMode { |
int alpha_location() const { return alpha_location_; } |
int yuv_matrix_location() const { return yuv_matrix_location_; } |
int yuv_adj_location() const { return yuv_adj_location_; } |
+ int ya_size_location() const { return ya_size_location_; } |
+ int uv_size_location() const { return uv_size_location_; } |
int ya_clamp_rect_location() const { return ya_clamp_rect_location_; } |
int uv_clamp_rect_location() const { return uv_clamp_rect_location_; } |
int resource_multiplier_location() const { |
@@ -792,6 +804,7 @@ class FragmentShaderYUVVideo : public FragmentTexBlendMode { |
bool use_alpha_texture_; |
bool use_nv12_; |
bool use_color_lut_; |
+ HighbitTexture highbit_texture_ = HIGHBIT_Y8; |
int y_texture_location_; |
int u_texture_location_; |
@@ -802,6 +815,8 @@ class FragmentShaderYUVVideo : public FragmentTexBlendMode { |
int alpha_location_; |
int yuv_matrix_location_; |
int yuv_adj_location_; |
+ int ya_size_location_; |
+ int uv_size_location_; |
int ya_clamp_rect_location_; |
int uv_clamp_rect_location_; |
int resource_multiplier_location_; |