mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 07:47:32 +09:00
CWebRender pt2
This commit is contained in:
parent
1190eb1c6a
commit
fe181d242f
22 changed files with 1623 additions and 489 deletions
|
|
@ -60,6 +60,7 @@ AddUniforms(ProgramProfileOGL& aProfile)
|
|||
"uViewportSize",
|
||||
"uVisibleCenter",
|
||||
"uYuvColorMatrix",
|
||||
"uTextureTint",
|
||||
nullptr
|
||||
};
|
||||
|
||||
|
|
@ -75,6 +76,12 @@ ShaderConfigOGL::SetRenderColor(bool aEnabled)
|
|||
SetFeature(ENABLE_RENDER_COLOR, aEnabled);
|
||||
}
|
||||
|
||||
void
|
||||
ShaderConfigOGL::SetTextureTint(bool aEnabled)
|
||||
{
|
||||
SetFeature(ENABLE_TEXTURE_TINT, aEnabled);
|
||||
}
|
||||
|
||||
void
|
||||
ShaderConfigOGL::SetTextureTarget(GLenum aTarget)
|
||||
{
|
||||
|
|
@ -351,6 +358,9 @@ ProgramProfileOGL::GetProfileFor(ShaderConfigOGL aConfig)
|
|||
if (aConfig.mFeatures & ENABLE_OPACITY) {
|
||||
fs << "uniform COLOR_PRECISION float uLayerOpacity;" << endl;
|
||||
}
|
||||
if (aConfig.mFeatures & ENABLE_TEXTURE_TINT) {
|
||||
fs << "uniform COLOR_PRECISION vec4 uTextureTint;" << endl;
|
||||
}
|
||||
}
|
||||
if (BlendOpIsMixBlendMode(blendOp)) {
|
||||
fs << "varying vec2 vBackdropCoord;" << endl;
|
||||
|
|
@ -506,6 +516,9 @@ ProgramProfileOGL::GetProfileFor(ShaderConfigOGL aConfig)
|
|||
if (aConfig.mFeatures & ENABLE_OPACITY) {
|
||||
fs << " color *= uLayerOpacity;" << endl;
|
||||
}
|
||||
if (aConfig.mFeatures & ENABLE_TEXTURE_TINT) {
|
||||
fs << " color *= uTextureTint;" << endl;
|
||||
}
|
||||
}
|
||||
if (aConfig.mFeatures & ENABLE_DEAA) {
|
||||
// Calculate the sub-pixel coverage of the pixel and modulate its opacity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue