fune/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
2D.h Bug 1874461 - Filter spurious DrawTargetRecording::SetTransform calls. r=aosmond 2024-04-04 19:27:27 +00:00
AutoHelpersWin.h
BaseCoord.h
BaseMargin.h
BasePoint.h
BasePoint3D.h
BasePoint4D.h
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
BezierUtils.cpp
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
ConvolutionFilter.h
ConvolutionFilterAVX2.cpp
ConvolutionFilterNEON.cpp
ConvolutionFilterSSE2.cpp
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
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
DrawTargetD2D1.cpp Bug 1873701. r=gfx-reviewers,lsalzman 2024-01-09 23:39:13 +00:00
DrawTargetD2D1.h
DrawTargetOffset.cpp
DrawTargetOffset.h
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
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
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
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
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
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
NativeFontResourceDWrite.h
NativeFontResourceFreeType.cpp
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
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
PathCairo.cpp
PathCairo.h
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
PathHelpers.cpp
PathHelpers.h
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
PathSkia.h
PatternHelpers.h
Point.h
Polygon.h
Quaternion.cpp
Quaternion.h
RadialGradientEffectD2D1.cpp
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
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
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
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
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
ScaleFactor.h
ScaleFactors2D.h
SFNTData.cpp
SFNTData.h
ShadersD2D.fx
ShadersD2D.h
ShadersD2D1.h
ShadersD2D1.hlsl
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
SourceSurfaceSkia.h
SSEHelpers.h
StackArray.h
SVGTurbulenceRenderer-inl.h
Swizzle.cpp
Swizzle.h
SwizzleAVX2.cpp
SwizzleNEON.cpp
SwizzleSSE2.cpp
SwizzleSSSE3.cpp
Tools.h
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
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