gecko-dev/layout/painting
Alexis Beingessner 9c4535798f Bug 1357545 - handle text-shadows/decorations with webrender (layers-free) r=jrmuizel
This replaces our DrawTargetCapture hack with a similar but more powerful TextDrawTarget
hack. The old design had several limitations:

* It couldn't handle shadows
* It couldn't handle selections
* It couldn't handle font/color changes in a single text-run
* It couldn't handle decorations (underline, overline, line-through)

Mostly this was a consequence of the fact that it only modified the start and end
of the rendering algorithm, and therefore couldn't distinguish draw calls for different
parts of the text.

This new design is based on a similar principle as DrawTargetCapture, but also passes
down the TextDrawTarget in the drawing arguments, so that the drawing algorithm can
notify us of changes in phase (e.g. "now we're doing underlines"). This also lets us
directly pass data to TextDrawTarget when possible (as is done for shadows and selections).

In doing this, I also improved the logic copied from ContainsOnlyColoredGlyphs to handle
changes in font/color mid-text-run (which can happen because of font fallback).

The end result is:

* We handle all shadows natively
* We handle all selections natively
* We handle all decorations natively
* We handle font/color changes in a single text-run
    * Although we still hackily intercept draw calls
    * But we don't need to buffer commands, reducing total memcopies

In addition, this change integrates webrender's PushTextShadow and PushLine APIs,
which were designed for this use case. This is only done in the layerless path;
WebrenderTextLayer continues to be semantically limited, as we aren't actively
maintaining non-layers-free webrender anymore.

This also doesn't modify TextLayers, to minimize churn. In theory they can be
augmented to support the richer semantics that TextDrawTarget has, but there's
little motivation since the API is largely unused with this change.

MozReview-Commit-ID: 4IjTsSW335h

--HG--
extra : rebase_source : d69f69648ade5c7a8e6bb756f4b8ab9e2543e576
2017-06-19 10:58:28 -04:00
..
ActiveLayerTracker.cpp Bug 1389215 - Don't layerize in response to margin changes. r=mattwoodrow 2017-08-12 18:42:04 -04:00
ActiveLayerTracker.h Bug 1389215 - Don't layerize in response to margin changes. r=mattwoodrow 2017-08-12 18:42:04 -04:00
BorderCache.h
BorderConsts.h Bug 1320014 Part 6 - Remove #define NS_CORNER_[TOP_LEFT/TOP_RIGHT/BOTTOM_RIGHT/BOTTOM_LEFT] r=mats 2017-01-04 18:15:30 +08:00
DashedCornerFinder.cpp
DashedCornerFinder.h
DisplayItemClip.cpp Bug 1370682 - Send DisplayItemClip's RoundedRect clips to WR. r=mstange 2017-08-10 14:00:08 -04:00
DisplayItemClip.h Bug 1370682 - Send DisplayItemClip's RoundedRect clips to WR. r=mstange 2017-08-10 14:00:08 -04:00
DisplayItemClipChain.cpp
DisplayItemClipChain.h
DisplayItemScrollClip.cpp
DisplayItemScrollClip.h
DisplayListClipState.cpp
DisplayListClipState.h
DottedCornerFinder.cpp Bug 1320014 Part 3 - Move Corner from namespace mozilla::css into mozilla. r=mats 2017-01-04 17:18:49 +08:00
DottedCornerFinder.h Bug 1320014 Part 3 - Move Corner from namespace mozilla::css into mozilla. r=mats 2017-01-04 17:18:49 +08:00
FrameLayerBuilder.cpp Backed out changeset 189abf9f8d6d (bug 1363922) 2017-08-17 16:11:28 +02:00
FrameLayerBuilder.h Backed out changeset 189abf9f8d6d (bug 1363922) 2017-08-17 16:11:28 +02:00
LayerState.h
MaskLayerImageCache.cpp Bug 1388639 - Use KnowsCompositor instead of ShadowForwarder in MaskImageData and MaskLayerImageCache r=nical 2017-08-10 11:43:11 +09:00
MaskLayerImageCache.h Bug 1388639 - Use KnowsCompositor instead of ShadowForwarder in MaskImageData and MaskLayerImageCache r=nical 2017-08-10 11:43:11 +09:00
PaintTracker.cpp
PaintTracker.h
moz.build Bug 1341101 part 1 - Move nsCSSRendering::PaintGradient into its own file r=jrmuizel 2017-03-14 01:05:41 -05:00
nsCSSRendering.cpp Bug 1357545 - handle text-shadows/decorations with webrender (layers-free) r=jrmuizel 2017-06-19 10:58:28 -04:00
nsCSSRendering.h Bug 1357545 - handle text-shadows/decorations with webrender (layers-free) r=jrmuizel 2017-06-19 10:58:28 -04:00
nsCSSRenderingBorders.cpp Bug 1389010, part 8 - Stop abusing mAllBordersSameStyle in nsCSSBorderRenderer::DrawBorders to force drawing as separate parts. r=dholbert 2017-08-08 11:24:56 +01:00
nsCSSRenderingBorders.h Bug 1389010, part 7 - Call AllBordersSameWidth in nsCSSBorderRenderer's constructor and store the result as a member. r=dholbert 2017-08-08 10:02:35 +01:00
nsCSSRenderingGradients.cpp Bug 1382128 part 5 - Remove WrGradientStop and WrGradientExtendMode. r=kats 2017-07-19 01:47:07 -04:00
nsCSSRenderingGradients.h Bug 1382128 part 5 - Remove WrGradientStop and WrGradientExtendMode. r=kats 2017-07-19 01:47:07 -04:00
nsDisplayItemTypes.h Backed out changeset e9985564e081 (bug 1388162) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:20 +02:00
nsDisplayItemTypesList.h Backed out changeset e9985564e081 (bug 1388162) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:20 +02:00
nsDisplayList.cpp Bug 1389139 - Add support for transform and perspective display items to layers-free APZ. r=jrmuizel 2017-08-16 12:50:37 -04:00
nsDisplayList.h Bug 1389139 - Add support for transform and perspective display items to layers-free APZ. r=jrmuizel 2017-08-16 12:50:37 -04:00
nsDisplayListInvalidation.cpp
nsDisplayListInvalidation.h
nsImageRenderer.cpp Bug 1388634 - Set correct sampling filter when pushing image. r=kats 2017-08-09 14:27:46 +08:00
nsImageRenderer.h Bug 1376855 - Support nsDisplayBackgroundImage in layers free mode. r=kats 2017-06-28 15:07:45 -07:00