Bug 1755747 - Add support for antialiased non-snapped rectangles. r=gfx-reviewers,aosmond
We need them for SVG primitives. This patch adds a bit of plumbing to disable snapping some of the primitives and forcing the antialiasing shader feature where needed, and uses it for SVG solid rectangles and images. Differential Revision: https://phabricator.services.mozilla.com/D139024
This commit is contained in:
@@ -624,7 +624,7 @@ void SurfaceTextureHost::PushDisplayItems(wr::DisplayListBuilder& aBuilder,
|
||||
case gfx::SurfaceFormat::B8G8R8A8:
|
||||
case gfx::SurfaceFormat::B8G8R8X8: {
|
||||
MOZ_ASSERT(aImageKeys.length() == 1);
|
||||
aBuilder.PushImage(aBounds, aClip, true, aFilter, aImageKeys[0],
|
||||
aBuilder.PushImage(aBounds, aClip, true, false, aFilter, aImageKeys[0],
|
||||
!(mFlags & TextureFlags::NON_PREMULTIPLIED),
|
||||
wr::ColorF{1.0f, 1.0f, 1.0f, 1.0f},
|
||||
preferCompositorSurface, supportsExternalCompositing);
|
||||
@@ -783,7 +783,7 @@ void AndroidHardwareBufferTextureHost::PushDisplayItems(
|
||||
case gfx::SurfaceFormat::B8G8R8X8: {
|
||||
MOZ_ASSERT(aImageKeys.length() == 1);
|
||||
aBuilder.PushImage(
|
||||
aBounds, aClip, true, aFilter, aImageKeys[0],
|
||||
aBounds, aClip, true, false, aFilter, aImageKeys[0],
|
||||
!(mFlags & TextureFlags::NON_PREMULTIPLIED),
|
||||
wr::ColorF{1.0f, 1.0f, 1.0f, 1.0f},
|
||||
aFlags.contains(PushDisplayItemFlag::PREFER_COMPOSITOR_SURFACE));
|
||||
@@ -909,7 +909,7 @@ void EGLImageTextureHost::PushDisplayItems(
|
||||
const Range<wr::ImageKey>& aImageKeys, PushDisplayItemFlagSet aFlags) {
|
||||
MOZ_ASSERT(aImageKeys.length() == 1);
|
||||
aBuilder.PushImage(
|
||||
aBounds, aClip, true, aFilter, aImageKeys[0],
|
||||
aBounds, aClip, true, false, aFilter, aImageKeys[0],
|
||||
!(mFlags & TextureFlags::NON_PREMULTIPLIED),
|
||||
wr::ColorF{1.0f, 1.0f, 1.0f, 1.0f},
|
||||
aFlags.contains(PushDisplayItemFlag::PREFER_COMPOSITOR_SURFACE));
|
||||
|
||||
Reference in New Issue
Block a user