diff --git a/gfx/wr/webrender/res/ps_quad_textured.glsl b/gfx/wr/webrender/res/ps_quad_textured.glsl index 59035c753c2c..72fe2d236a53 100644 --- a/gfx/wr/webrender/res/ps_quad_textured.glsl +++ b/gfx/wr/webrender/res/ps_quad_textured.glsl @@ -16,6 +16,13 @@ void pattern_vertex(PrimitiveInfo info) { if (info.segment.uv_rect.p0 != info.segment.uv_rect.p1) { // Textured v_flags_textured = 1; + // TODO: Ideally we would unconditionally modulate the texture with the provided + // base color, however we are currently getting glitches on Adreno GPUs on Windows + // if the base color is set to white for composite primitives. While we figure this + // out, v_color is forced to white here in the textured case, which restores the + // behavior from before the patch that introduced the glitches. + // See comment in `add_composite_prim`. + v_color = vec4(1.0); vec2 f = (info.local_pos - info.segment.rect.p0) / rect_size(info.segment.rect); vs_init_sample_color0(f, info.segment.uv_rect); diff --git a/gfx/wr/webrender/src/quad.rs b/gfx/wr/webrender/src/quad.rs index 58f8da69beef..9d91339ea96b 100644 --- a/gfx/wr/webrender/src/quad.rs +++ b/gfx/wr/webrender/src/quad.rs @@ -696,7 +696,12 @@ fn add_composite_prim( &mut frame_state.frame_gpu_data.f32, rect, rect, - PremultipliedColorF::WHITE, + // TODO: The base color for composite prim should be opaque white + // (or white with some transparency to support an opacity directly + // in the quad primitive). However, passing opaque white + // here causes glitches with Adreno GPUs on Windows specifically + // (See bug 1897444). + pattern.base_color, segments, ScaleOffset::identity(), );