Index: cc/output/shader.h |
diff --git a/cc/output/shader.h b/cc/output/shader.h |
index 7ef6ea9a7dfb4b9e9d8baa98071090cb156ba7c0..cc83700b83896f9fd800a89713583eb38571f66e 100644 |
--- a/cc/output/shader.h |
+++ b/cc/output/shader.h |
@@ -76,6 +76,7 @@ struct ShaderLocations { |
int tex_transform = -1; |
int backdrop = -1; |
int backdrop_rect = -1; |
+ int original_backdrop = -1; |
}; |
// Note: The highp_threshold_cache must be provided by the caller to make |
@@ -346,11 +347,16 @@ class VertexShaderVideoTransform { |
class FragmentTexBlendMode { |
public: |
int backdrop_location() const { return backdrop_location_; } |
+ int original_backdrop_location() const { return original_backdrop_location_; } |
int backdrop_rect_location() const { return backdrop_rect_location_; } |
BlendMode blend_mode() const { return blend_mode_; } |
void set_blend_mode(BlendMode blend_mode) { blend_mode_ = blend_mode; } |
bool has_blend_mode() const { return blend_mode_ != BLEND_MODE_NONE; } |
+ void set_mask_for_background(bool mask_for_background) { |
+ mask_for_background_ = mask_for_background; |
+ } |
+ bool mask_for_background() const { return mask_for_background_; } |
protected: |
FragmentTexBlendMode(); |
@@ -358,10 +364,12 @@ class FragmentTexBlendMode { |
std::string SetBlendModeFunctions(std::string shader_string) const; |
int backdrop_location_; |
+ int original_backdrop_location_; |
int backdrop_rect_location_; |
private: |
BlendMode blend_mode_; |
+ bool mask_for_background_; |
std::string GetHelperFunctions() const; |
std::string GetBlendFunction() const; |
@@ -597,7 +605,7 @@ class FragmentShaderRGBATexAlphaMask : public FragmentTexBlendMode { |
std::string GetShaderString( |
TexCoordPrecision precision, SamplerType sampler) const; |
static std::string GetShaderHead(); |
- static std::string GetShaderBody(); |
+ static std::string GetShaderBody(bool mask_for_background); |
void FillLocations(ShaderLocations* locations) const; |
void Init(gpu::gles2::GLES2Interface* context, |
unsigned program, |
@@ -628,7 +636,7 @@ class FragmentShaderRGBATexAlphaMaskAA : public FragmentTexBlendMode { |
std::string GetShaderString( |
TexCoordPrecision precision, SamplerType sampler) const; |
static std::string GetShaderHead(); |
- static std::string GetShaderBody(); |
+ static std::string GetShaderBody(bool mask_for_background); |
void FillLocations(ShaderLocations* locations) const; |
void Init(gpu::gles2::GLES2Interface* context, |
unsigned program, |
@@ -660,7 +668,7 @@ class FragmentShaderRGBATexAlphaMaskColorMatrixAA |
std::string GetShaderString( |
TexCoordPrecision precision, SamplerType sampler) const; |
static std::string GetShaderHead(); |
- static std::string GetShaderBody(); |
+ static std::string GetShaderBody(bool mask_for_background); |
void FillLocations(ShaderLocations* locations) const; |
void Init(gpu::gles2::GLES2Interface* context, |
unsigned program, |
@@ -716,7 +724,7 @@ class FragmentShaderRGBATexAlphaMaskColorMatrix : public FragmentTexBlendMode { |
std::string GetShaderString( |
TexCoordPrecision precision, SamplerType sampler) const; |
static std::string GetShaderHead(); |
- static std::string GetShaderBody(); |
+ static std::string GetShaderBody(bool mask_for_background); |
void FillLocations(ShaderLocations* locations) const; |
void Init(gpu::gles2::GLES2Interface* context, |
unsigned program, |