Bug 1435094 - wire up GlyphRasterSpace to nsDisplayTransform. r=kats,mstange
When a transform thinks it's animated we should abandon screen rasterization and instead favour local rasterization. This produces a more visually pleasant rendering, as pixel-snapping "wobbles" the text between frames. The float scale of GlyphRasterSpace::Local is currently unused, but this PR tries its best to set it to a reasonable value, based on discussion with glennw about the intended semantics. We agreed it should specify the scale *relative* to the parent stacking context, which means it's just whatever scaling the stacking context's transform applies. It's possible we'll need to clamp this value or make it properly 2-dimensional later on. Some book-keeping is added to StackingContextHelper to ensure that GlyphRasterSpace::Screen is never requested by a descendent of a stacking context using GlyphRasterSpace::Local. nsDisplayMask is changed to use a StackingContextHelper to ensure rasterSpace is properly propagated. In addition, this is the first commit making use of cbindgen's new support for bridging Rust enums natively into C++! This bumps our minimum cbindgen to 6.0.0 (just released). MozReview-Commit-ID: 9AlsB6nUheB
This commit is contained in:
@@ -327,7 +327,9 @@ AsyncImagePipelineManager::ApplyAsyncImages()
|
||||
nullptr,
|
||||
pipeline->mMixBlendMode,
|
||||
nsTArray<wr::WrFilterOp>(),
|
||||
true);
|
||||
true,
|
||||
// This is fine to do unconditionally because we only push images here.
|
||||
wr::GlyphRasterSpace::Screen());
|
||||
|
||||
LayoutDeviceRect rect(0, 0, pipeline->mCurrentTexture->GetSize().width, pipeline->mCurrentTexture->GetSize().height);
|
||||
if (pipeline->mScaleToSize.isSome()) {
|
||||
|
||||
Reference in New Issue
Block a user