gecko-dev/gfx/2d
Lee Salzman c28c3d6e21 Bug 1874461 - Filter spurious DrawTargetRecording::SetTransform calls. r=aosmond
This is an evolution of Andrew Osmond's original version of this patch. The main
addition here is an mOptimizeTransform setting which controls whether or not the
transform filtering will be used. If it is disabled, then transforms will be
immediately flushed upon a SetTransform call as normal, so that transform state
will always be visibly changed for any use-cases that depend on this, like
potentially blobs, screenshots, or printing. However, for the main case where
this optimization is both beneficial and safe, Canvas2D recordings, we can
now safely enable this setting allowing the optimization to take place.

Andrew's original rationale for the patch is as follows:
DrawTargetRecording::SetTransform is relatively expensive because of the
cost of recording a 3x2 matrix (25 bytes). Because drawing code is often
caching the transform on the DrawTarget to accumulate transformations
prior to drawing, because it is either trying to do calculations
relevant to the drawing beforehand, or the code is layered and each
layer is applying its own transformations, we can easily save recording
space by accumulating them locally and only flushing when there is an
actual operation that depends on the transform being set.

Differential Revision: https://phabricator.services.mozilla.com/D206573
2024-04-04 19:27:27 +00:00
..
unittest Bug 1814239 - Expose Point/Size rounded-to-multiple helpers, and use them from MaybeRoundToDisplayPixels. r=tnikkel,gfx-reviewers,nical 2023-02-06 12:28:47 +00:00
2D.h Bug 1874461 - Filter spurious DrawTargetRecording::SetTransform calls. r=aosmond 2024-04-04 19:27:27 +00:00
AutoHelpersWin.h
BaseCoord.h Bug 1814239 - Expose Point/Size rounded-to-multiple helpers, and use them from MaybeRoundToDisplayPixels. r=tnikkel,gfx-reviewers,nical 2023-02-06 12:28:47 +00:00
BaseMargin.h Bug 1841729 - Change the return type of BaseMargin::{LeftRight,TopBottom}() to Coord. r=botond 2023-07-17 21:18:17 +00:00
BasePoint3D.h Bug 1660405 - Move away from mozilla::IsInfinite in favor of std::isinf. r=nbp,media-playback-reviewers,alwu 2023-03-22 11:35:34 +00:00
BasePoint4D.h
BasePoint.h No bug - Remove unreachable return in BasePoint::IsFinite(). r=dlrobertson 2023-07-13 14:23:35 +00:00
BaseRect.h Bug 1855756 - Fix the edge cases when the angle is 0deg (or 90deg) for ray(). r=hiro 2023-10-20 03:41:10 +00:00
BaseSize.h Bug 1841478 - Use strongly-typed coordinates in the BaseSize constructor. r=botond 2023-07-10 02:59:01 +00:00
BezierUtils.cpp Bug 1787694 - Use a quadratic polynomial formula with less precision loss. r=gfx-reviewers,lsalzman 2022-10-10 07:24:40 +00:00
BezierUtils.h
BigEndianInts.h
Blur.cpp Bug 1856795 - Remove redundant member init r=emilio 2023-10-15 15:29:02 +00:00
Blur.h
BlurLS3.cpp
BlurNEON.cpp
BlurSSE2.cpp
BorrowedContext.h
BufferEdgePad.cpp
BufferEdgePad.h
BufferUnrotate.cpp
BufferUnrotate.h
ConicGradientEffectD2D1.cpp Bug 1851963 - Use unsigned char in ConicGradientEffectD2D1. r=jrmuizel 2024-02-22 17:12:06 +00:00
ConicGradientEffectD2D1.h
ConvolutionFilter.cpp Bug 1805757 - Move SkConvolver into the tree. r=aosmond 2022-12-15 05:53:16 +00:00
ConvolutionFilter.h Bug 1805757 - Move SkConvolver into the tree. r=aosmond 2022-12-15 05:53:16 +00:00
ConvolutionFilterAVX2.cpp Bug 1805757 - Move SkConvolver into the tree. r=aosmond 2022-12-15 05:53:16 +00:00
ConvolutionFilterNEON.cpp Bug 1805757 - Move SkConvolver into the tree. r=aosmond 2022-12-15 05:53:16 +00:00
ConvolutionFilterSSE2.cpp Bug 1805757 - Move SkConvolver into the tree. r=aosmond 2022-12-15 05:53:16 +00:00
Coord.h Bug 1843954 - Have Coord * Primitive and Coord / Primitive return Coord. r=botond 2023-09-14 00:37:04 +00:00
CriticalSection.h
DataSourceSurface.cpp
DataSourceSurfaceWrapper.h
DataSurfaceHelpers.cpp Bug 1817442. r=tnikkel 2023-03-03 20:46:24 +00:00
DataSurfaceHelpers.h
DrawEventRecorder.cpp Bug 1887818 - Prevent to call GPUVideoImage::GetAsSourceSurface() in CanvasRenderingContext2D::DrawImage() for RemoteDecoderVideoSubDescriptor::Tnull_t if CanvasTranslator is used r=gfx-reviewers,lsalzman 2024-03-28 06:24:41 +00:00
DrawEventRecorder.h Bug 1874461 - Filter spurious DrawTargetRecording::SetTransform calls. r=aosmond 2024-04-04 19:27:27 +00:00
DrawTarget.cpp Bug 1878182 - Instantiate Cairo scaled font for ScaledFontBase::GetPathForGlyphs. r=jfkthame 2024-02-02 20:40:37 +00:00
DrawTargetCairo.cpp Bug 1037100 - Scoped.h removed because no outstanding uses. r=glandium,dom-storage-reviewers,jesup,janv 2024-02-14 06:41:58 +00:00
DrawTargetCairo.h Bug 1447839 - Avoid creating internal path builder for PathRecording unless necessary. r=jrmuizel 2023-03-17 19:04:40 +00:00
DrawTargetD2D1.cpp Bug 1873701. r=gfx-reviewers,lsalzman 2024-01-09 23:39:13 +00:00
DrawTargetD2D1.h Bug 1839490 - Add FillCircle to DrawTarget. r=lsalzman 2023-06-22 00:11:10 +00:00
DrawTargetOffset.cpp Bug 1746356 - Null-check the result of CreateSimilarDrawTarget. r=gfx-reviewers,lsalzman 2022-06-08 07:28:04 +00:00
DrawTargetOffset.h Bug 1746356 - Null-check the result of CreateSimilarDrawTarget. r=gfx-reviewers,lsalzman 2022-06-08 07:28:04 +00:00
DrawTargetRecording.cpp Bug 1874461 - Filter spurious DrawTargetRecording::SetTransform calls. r=aosmond 2024-04-04 19:27:27 +00:00
DrawTargetRecording.h Bug 1874461 - Filter spurious DrawTargetRecording::SetTransform calls. r=aosmond 2024-04-04 19:27:27 +00:00
DrawTargetSkia.cpp Bug 1888333. r=aosmond 2024-03-29 04:25:13 +00:00
DrawTargetSkia.h Bug 1447839 - Avoid creating internal path builder for PathRecording unless necessary. r=jrmuizel 2023-03-17 19:04:40 +00:00
DWriteSettings.cpp
DWriteSettings.h
ExtendInputEffectD2D1.cpp
ExtendInputEffectD2D1.h
Factory.cpp Bug 1855742 - Part 1. Make HTMLCanvasElement toDataURL and toBlob compatible with recordings. r=lsalzman 2024-02-21 03:08:02 +00:00
FilterNodeD2D1.cpp Bug 1846683: Make assertions in FilterNodeD2D1::SetInput release assertions. r=jrmuizel 2023-09-02 12:22:22 +00:00
FilterNodeD2D1.h
FilterNodeSoftware.cpp Bug 1874372 - Fix typo in FilterNodeConvolveMatrixSoftware r=jrmuizel 2024-01-12 12:39:40 +00:00
FilterNodeSoftware.h Bug 1758188: Remove unneeded mutex from FilterNodeSoftware r=gfx-reviewers,mstange 2022-03-04 21:44:29 +00:00
FilterProcessing.cpp
FilterProcessing.h
FilterProcessingScalar.cpp
FilterProcessingSIMD-inl.h
FilterProcessingSSE2.cpp
Filters.h
FontVariation.h
GenericRefCounted.h
genshaders.sh
gfx2d.sln
gfx2d.vcxproj
GradientStopsD2D.h
Helpers.h
HelpersCairo.h Bug 1816775 - Implement globalCompositeOperation "clear" without Windows. r=lsalzman 2023-03-31 07:50:57 +00:00
HelpersD2D.h Bug 1850034 - Remove pre-Win10-specific codepath from gfx/. r=gfx-reviewers,lsalzman 2023-08-26 23:44:57 +00:00
HelpersSkia.h Bug 1821512 - Fix Skia usage for API changes. r=jrmuizel 2023-04-16 15:34:50 +00:00
HelpersWinFonts.h
ImageScaling.cpp
ImageScaling.h
ImageScalingSSE2.cpp
InlineTranslator.cpp Bug 1874803 - Add sentinel invalid recorded event type. r=gfx-reviewers,lsalzman 2024-01-16 03:38:34 +00:00
InlineTranslator.h Backed out changeset 4641c3dcf0c3 (bug 1876538) for causing mochitest-chrome failures on test_animation_observers_async.html. CLOSED TREE 2024-01-26 19:21:35 +02:00
IterableArena.h
Logging.h Bug 1841478 - Use strongly-typed coordinates in the BaseSize constructor. r=botond 2023-07-10 02:59:01 +00:00
LoggingConstants.h
LuminanceNEON.cpp
LuminanceNEON.h
MacIOSurface.cpp Bug 1884836 - Base graphics support for iOS. r=gfx-reviewers,bradwerth 2024-03-15 01:28:27 +00:00
MacIOSurface.h Bug 1884836 - Base graphics support for iOS. r=gfx-reviewers,bradwerth 2024-03-15 01:28:27 +00:00
Matrix.cpp
Matrix.h Bug 1876941 - Add a Matrix4x4Typed::Cast function. r=botond 2024-01-31 22:40:21 +00:00
MatrixFwd.h
MMIHelpers.h Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,media-playback-reviewers,padenot 2023-12-04 10:09:36 +00:00
moz.build Bug 1884836 - Base graphics support for iOS. r=gfx-reviewers,bradwerth 2024-03-15 01:28:27 +00:00
NativeFontResource.cpp
NativeFontResourceDWrite.cpp Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw 2022-03-16 18:47:08 +00:00
NativeFontResourceDWrite.h
NativeFontResourceFreeType.cpp Bug 1775340 - Cleanup gfx/ includes r=sylvestre 2022-06-22 09:50:52 +00:00
NativeFontResourceFreeType.h
NativeFontResourceGDI.cpp
NativeFontResourceGDI.h
NativeFontResourceMac.cpp Bug 1803406 - Backout 2 changesets (6a82f1f120aa, 87d83c56fbe5) due to regression reported in bug 1858869. 2023-10-13 08:32:56 +00:00
NativeFontResourceMac.h
NumericTools.h Bug 1814239 - Expose Point/Size rounded-to-multiple helpers, and use them from MaybeRoundToDisplayPixels. r=tnikkel,gfx-reviewers,nical 2023-02-06 12:28:47 +00:00
Path.cpp Bug 1856795 - ride along: use = default; on some recently modified files r=emilio 2023-10-15 15:29:03 +00:00
PathAnalysis.h Bug 1801463 - Use a cursor in FlattenedPath to accelerate successive calls to ComputePointAtLength for SVG text-on-a-path layout. r=gfx-reviewers,nical 2023-02-06 15:01:20 +00:00
PathCairo.cpp Bug 1846079 - Ensure pruned point begins first sub-path if necessary. r=aosmond 2023-07-30 14:31:09 +00:00
PathCairo.h Bug 1846079 - Ensure pruned point begins first sub-path if necessary. r=aosmond 2023-07-30 14:31:09 +00:00
PathD2D.cpp Bug 1860763. Expand workaround for d2d arcs that are full circles slightly. r=gfx-reviewers,lsalzman 2023-11-01 04:05:29 +00:00
PathD2D.h Bug 1846079 - Ensure pruned point begins first sub-path if necessary. r=aosmond 2023-07-30 14:31:09 +00:00
PathHelpers.cpp Bug 1756175 - Implement roundRect for canvas2D. r=lsalzman,emilio 2023-02-21 19:41:49 +00:00
PathHelpers.h Bug 1839474 - Add support for directly stroking circles to DrawTarget. r=lsalzman 2023-06-20 19:28:48 +00:00
PathRecording.cpp Bug 1846685: Add PathOps::CheckedStreamToSink and use for event playback. r=jrmuizel 2023-09-02 16:13:30 +00:00
PathRecording.h Bug 1846685: Add PathOps::CheckedStreamToSink and use for event playback. r=jrmuizel 2023-09-02 16:13:30 +00:00
PathSkia.cpp Bug 691187 - Prune zero-length segments for canvas strokes. r=lsalzman 2023-06-02 19:06:15 +00:00
PathSkia.h Bug 1846079 - Ensure pruned point begins first sub-path if necessary. r=aosmond 2023-07-30 14:31:09 +00:00
PatternHelpers.h
Point.h Bug 1841478 - Use strongly-typed coordinates in the BaseSize constructor. r=botond 2023-07-10 02:59:01 +00:00
Polygon.h
Quaternion.cpp
Quaternion.h
RadialGradientEffectD2D1.cpp Bug 1787085 - Fix undefined behavior from cast from float to char. r=gfx-reviewers,lsalzman 2022-09-02 01:37:03 +00:00
RadialGradientEffectD2D1.h
RecordedEvent.cpp Bug 1887818 - Prevent to call GPUVideoImage::GetAsSourceSurface() in CanvasRenderingContext2D::DrawImage() for RemoteDecoderVideoSubDescriptor::Tnull_t if CanvasTranslator is used r=gfx-reviewers,lsalzman 2024-03-28 06:24:41 +00:00
RecordedEvent.h Bug 1887818 - Prevent to call GPUVideoImage::GetAsSourceSurface() in CanvasRenderingContext2D::DrawImage() for RemoteDecoderVideoSubDescriptor::Tnull_t if CanvasTranslator is used r=gfx-reviewers,lsalzman 2024-03-28 06:24:41 +00:00
RecordedEventImpl.h Bug 1887818 - Prevent to call GPUVideoImage::GetAsSourceSurface() in CanvasRenderingContext2D::DrawImage() for RemoteDecoderVideoSubDescriptor::Tnull_t if CanvasTranslator is used r=gfx-reviewers,lsalzman 2024-03-28 06:24:41 +00:00
RecordingTypes.h Bug 1850072: Initialize RecordedDrawTargetCreation::mHasExistingData. r=jrmuizel 2023-09-12 11:51:11 +00:00
Rect.h Bug 1840485 - Change the type of BaseMargin::{top,right,bottom,left} to Coord. r=botond 2023-07-01 02:23:21 +00:00
RectAbsolute.h
Scale.h
ScaledFontBase.cpp Bug 1878182 - Instantiate Cairo scaled font for ScaledFontBase::GetPathForGlyphs. r=jfkthame 2024-02-02 20:40:37 +00:00
ScaledFontBase.h
ScaledFontDWrite.cpp Bug 1862061 - Remove -moz-font-smoothing-background-color. r=gfx-reviewers,desktop-theme-reviewers,devtools-reviewers,dao,gw 2023-11-01 09:14:29 +00:00
ScaledFontDWrite.h Bug 1819272 - Implement ScaledFontDWrite::HasVariationSettings(), so that we can use the print-as-paths option for PDF output with variation fonts on Windows. r=gfx-reviewers,lsalzman 2023-03-03 14:06:07 +00:00
ScaledFontFontconfig.cpp Bug 1862061 - Remove -moz-font-smoothing-background-color. r=gfx-reviewers,desktop-theme-reviewers,devtools-reviewers,dao,gw 2023-11-01 09:14:29 +00:00
ScaledFontFontconfig.h Bug 1773936 - Apply Skia-equivalent subpixel rounding in DrawTargetWebgl. r=aosmond,gfx-reviewers 2022-06-16 21:39:07 +00:00
ScaledFontFreeType.cpp Bug 1862061 - Remove -moz-font-smoothing-background-color. r=gfx-reviewers,desktop-theme-reviewers,devtools-reviewers,dao,gw 2023-11-01 09:14:29 +00:00
ScaledFontFreeType.h Bug 1773936 - Apply Skia-equivalent subpixel rounding in DrawTargetWebgl. r=aosmond,gfx-reviewers 2022-06-16 21:39:07 +00:00
ScaledFontMac.cpp Bug 1882945 - Adjust ScaledFontMac.cpp after bug 1856035. r=gfx-reviewers,lsalzman 2024-03-01 09:52:37 +00:00
ScaledFontMac.h Bug 1862061 - Remove -moz-font-smoothing-background-color. r=gfx-reviewers,desktop-theme-reviewers,devtools-reviewers,dao,gw 2023-11-01 09:14:29 +00:00
ScaledFontWin.cpp
ScaledFontWin.h Bug 1773936 - Apply Skia-equivalent subpixel rounding in DrawTargetWebgl. r=aosmond,gfx-reviewers 2022-06-16 21:39:07 +00:00
ScaleFactor.h Bug 1727376 - Capitalize template parameters in a few headers from layout and gfx. r=botond 2022-05-11 17:23:15 +00:00
ScaleFactors2D.h Bug 1773382 - Change the return type of GetPaintedLayerScaleForFrame() to MatrixScales. r=botond 2022-06-14 21:54:55 +00:00
SFNTData.cpp Bug 1823401: Hash cmap as well as head tables for SFNTData::GetUniqueKey. r=jfkthame 2023-03-22 15:31:53 +00:00
SFNTData.h Bug 1823401: Hash cmap as well as head tables for SFNTData::GetUniqueKey. r=jfkthame 2023-03-22 15:31:53 +00:00
ShadersD2D1.h
ShadersD2D1.hlsl
ShadersD2D.fx
ShadersD2D.h
SIMD.h
SkConvolver.cpp Bug 1715136 - Make SkConvolutionFilter1D::AddFilter fallible. r=aosmond 2024-03-18 02:58:39 +00:00
SkConvolver.h Bug 1715136 - Make SkConvolutionFilter1D::AddFilter fallible. r=aosmond 2024-03-18 02:58:39 +00:00
SourceSurfaceCairo.cpp
SourceSurfaceCairo.h
SourceSurfaceD2D1.cpp
SourceSurfaceD2D1.h
SourceSurfaceRawData.cpp
SourceSurfaceRawData.h
SourceSurfaceSkia.cpp Bug 1821512 - Fix Skia usage for API changes. r=jrmuizel 2023-04-16 15:34:50 +00:00
SourceSurfaceSkia.h Bug 1752841 - Add ExtractSubrect API to SourceSurface. r=jrmuizel 2022-12-07 21:06:32 +00:00
SSEHelpers.h
StackArray.h
SVGTurbulenceRenderer-inl.h
Swizzle.cpp
Swizzle.h
SwizzleAVX2.cpp
SwizzleNEON.cpp
SwizzleSSE2.cpp
SwizzleSSSE3.cpp
Tools.h Bug 1277372 - Move away from "mozilla/TypeTraits.h". r=geckoview-reviewers,sergesanspaille,m_kato 2023-04-17 13:50:11 +00:00
Triangle.h
Types.cpp
Types.h Bug 1870872 - Create dedicated recording event for canvas DrawTarget creation. r=gfx-reviewers,lsalzman 2024-01-10 14:31:41 +00:00
UnscaledFontDWrite.h
UnscaledFontFreeType.cpp Bug 1798036 - Attach a SharedFTFaceData (recording the filename) when instantiating SharedFTFace for an installed variation font. r=lsalzman 2022-11-10 17:24:11 +00:00
UnscaledFontFreeType.h
UnscaledFontGDI.h
UnscaledFontMac.h Bug 1866105 - Add the font file path to the font descriptor sent to webrender on macOS. r=gfx-reviewers,lsalzman 2023-12-05 10:59:06 +00:00
UserData.h Bug 1786136 - Make UserData thread-safe. r=jrmuizel 2022-09-01 05:29:14 +00:00