Bug 950312 - Part 5: Implement SCREEN and MULTIPLY for CompositorOGL. r=mtseng
This commit is contained in:
@@ -130,6 +130,12 @@ ShaderConfigOGL::SetMask3D(bool aEnabled)
|
||||
SetFeature(ENABLE_MASK_3D, aEnabled);
|
||||
}
|
||||
|
||||
void
|
||||
ShaderConfigOGL::SetPremultiply(bool aEnabled)
|
||||
{
|
||||
SetFeature(ENABLE_PREMULTIPLY, aEnabled);
|
||||
}
|
||||
|
||||
/* static */ ProgramProfileOGL
|
||||
ProgramProfileOGL::GetProfileFor(ShaderConfigOGL aConfig)
|
||||
{
|
||||
@@ -323,6 +329,9 @@ ProgramProfileOGL::GetProfileFor(ShaderConfigOGL aConfig)
|
||||
if (aConfig.mFeatures & ENABLE_OPACITY) {
|
||||
fs << " color *= uLayerOpacity;" << endl;
|
||||
}
|
||||
if (aConfig.mFeatures & ENABLE_PREMULTIPLY) {
|
||||
fs << " color.rgb *= color.a;" << endl;
|
||||
}
|
||||
}
|
||||
if (aConfig.mFeatures & ENABLE_MASK_3D) {
|
||||
fs << " vec2 maskCoords = vMaskCoord.xy / vMaskCoord.z;" << endl;
|
||||
|
||||
Reference in New Issue
Block a user