gecko-dev/dom/canvas
Jonathan Kew 12816161da Bug 1110580 - patch 1 - Accelerate canvas2d.fillText for simple unidirectional strings by reusing the same textrun to draw as we created to measure the text. r=lsalzman
In general, the canvas text-drawing code makes two passes over the string, one to measure it and the second to draw.
Each time, it has to find individual direction runs and create a separate gfxTextRun for each.
However, in the (common) case of a simple unidirectional string, we're only going to have a single run,
so it's wasteful to construct it twice; the CanvasBidiProcessor can just re-use the run from the measurement
pass when it needs to draw.

In particular, this will apply to pdf.js drawing, where each glyph is handled in a separate fillText call.
Many other uses of canvas text should also benefit somewhat.

Differential Revision: https://phabricator.services.mozilla.com/D145426
2022-05-05 08:14:11 +00:00
..
crashtests Bug 1757755 - Add size validation when restoring a WebGL context. r=jgilbert 2022-03-15 23:25:25 +00:00
gtest Bug 1519636 - Reformat recent changes to the Google coding style. r=sylvestre 2022-01-11 15:49:03 +00:00
test Bug 1766356 - Replace the specified font-size with the computed value when serializing the canvas2d font attribute. r=hiro 2022-04-28 08:50:12 +00:00
BasicRenderingContext2D.h Bug 1746093 - Allow OffscreenCanvas as an input for CanvasImageSource and ImageBitmapSource. r=lsalzman,emilio 2021-12-15 21:36:21 +00:00
CacheInvalidator.cpp
CacheInvalidator.h Bug 1723050 - Part 6: Replace typedef by using in dom/canvas/ r=jgilbert 2021-07-30 15:30:52 +00:00
CanvasGradient.cpp Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi 2021-01-07 08:53:08 +00:00
CanvasGradient.h Bug 1697344 p3: Don't hold the GradientStops object on CanvasGradient. r=jrmuizel 2021-03-29 12:12:21 +00:00
CanvasImageCache.cpp Bug 1723050 - Part 6: Replace typedef by using in dom/canvas/ r=jgilbert 2021-07-30 15:30:52 +00:00
CanvasImageCache.h Bug 1723050 - Part 6: Replace typedef by using in dom/canvas/ r=jgilbert 2021-07-30 15:30:52 +00:00
CanvasPath.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
CanvasPattern.cpp Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi 2021-01-07 08:53:08 +00:00
CanvasPattern.h Bug 1653193 - Remove public includes for CanvasRenderingContext2D.h. r=jgilbert 2020-07-21 08:39:53 +00:00
CanvasRenderingContext2D.cpp Bug 1110580 - patch 1 - Accelerate canvas2d.fillText for simple unidirectional strings by reusing the same textrun to draw as we created to measure the text. r=lsalzman 2022-05-05 08:14:11 +00:00
CanvasRenderingContext2D.h Bug 1759686 - patch 5 - Adapt canvas2d text methods to allow use from worker threads without a Document or PresShell. r=aosmond 2022-05-04 17:13:16 +00:00
CanvasRenderingContextHelper.cpp Bug 1746750 - Part 3. Implement partial OffscreenCanvasRenderingContext2D. r=lsalzman,webidl,smaug 2022-02-03 20:00:25 +00:00
CanvasRenderingContextHelper.h Bug 1746750 - Part 3. Implement partial OffscreenCanvasRenderingContext2D. r=lsalzman,webidl,smaug 2022-02-03 20:00:25 +00:00
CanvasUtils.cpp Bug 1763330 - Ship OffscreenCanvas for pdf.js r=aosmond,gfx-reviewers 2022-04-06 18:35:04 +00:00
CanvasUtils.h Bug 1746750 - Part 2. Add new WebIDL method variants to support OffscreenCanvasRenderingContext2D. r=lsalzman 2022-02-03 20:00:25 +00:00
ClientWebGLContext.cpp Bug 1703654 - Deal with Maybe<> not trivially_copyable on build-linux64-base-toolchains. r=gfx-reviewers,lsalzman 2022-05-02 23:54:10 +00:00
ClientWebGLContext.h Bug 1759706 - Ensure we initialize TexImageSourceAdapter::mOut_error for OffscreenCanvas. r=gfx-reviewers,nical 2022-03-15 15:08:05 +00:00
ClientWebGLExtensions.cpp Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl 2021-08-27 01:47:14 +00:00
ClientWebGLExtensions.h Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl 2021-08-27 01:47:14 +00:00
DrawTargetWebgl.cpp Bug 1765911 - Support cloning Patterns with internal weak references. r=aosmond 2022-04-27 18:48:59 +00:00
DrawTargetWebgl.h Bug 1764948 - Implement anti-aliasing for DrawTargetWebgl. r=gfx-reviewers,nical 2022-04-16 03:50:26 +00:00
DrawTargetWebglInternal.h Bug 1765911 - Support cloning Patterns with internal weak references. r=aosmond 2022-04-27 18:48:59 +00:00
GeneratePlaceholderCanvasData.h
HostWebGLContext.cpp Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw 2022-03-16 18:47:08 +00:00
HostWebGLContext.h Bug 1755780 - Support CopyToSwapChain on WebGLContext. r=jgilbert 2022-02-21 17:33:09 +00:00
ImageBitmap.cpp Bug 1756803 scaling/premultiply alpha of ImageData r=aosmond 2022-03-18 16:47:26 +00:00
ImageBitmap.h Bug 1746093 - Allow OffscreenCanvas as an input for CanvasImageSource and ImageBitmapSource. r=lsalzman,emilio 2021-12-15 21:36:21 +00:00
ImageBitmapRenderingContext.cpp Bug 1759527 - Ensure ImageBitmapRenderingContext checks for null surfaces. r=gfx-reviewers,jnicol 2022-03-15 12:41:02 +00:00
ImageBitmapRenderingContext.h Bug 1344524 - Change ContextCleanForFrameCapture flag to a Watchable FrameCaptureState. r=jgilbert 2022-01-24 15:31:14 +00:00
ImageBitmapSource.h Bug 1746093 - Allow OffscreenCanvas as an input for CanvasImageSource and ImageBitmapSource. r=lsalzman,emilio 2021-12-15 21:36:21 +00:00
ImageData.cpp Bug 1763424 - Limit ImageData typed array to 2Gb when created using its constructor r=edgar 2022-04-07 19:46:47 +00:00
ImageData.h Bug 1682612 - Check for ArrayBuffer Detach/Transfer in texImage2D(ImageData). r=gfx-reviewers,aosmond 2022-03-21 23:21:42 +00:00
ImageUtils.cpp Bug 1757067 - Explicitly specify chroma subsampling scheme for YCbCr data. r=jgilbert,jrmuizel 2022-03-10 09:24:15 +00:00
ImageUtils.h
MurmurHash3.cpp
MurmurHash3.h Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi 2021-01-07 08:53:08 +00:00
OffscreenCanvas.cpp Bug 1753302 - Part 1. Integrate WebGPU with OffscreenCanvas plumbing. r=gfx-reviewers,jgilbert 2022-04-04 16:42:02 +00:00
OffscreenCanvas.h Bug 1753302 - Part 1. Integrate WebGPU with OffscreenCanvas plumbing. r=gfx-reviewers,jgilbert 2022-04-04 16:42:02 +00:00
OffscreenCanvasDisplayHelper.cpp Bug 1755704 - Part 1. Add support for reading back the front buffer for WebGPU. r=gfx-reviewers,lsalzman 2022-04-27 16:05:28 +00:00
OffscreenCanvasDisplayHelper.h Bug 1753302 - Part 1. Integrate WebGPU with OffscreenCanvas plumbing. r=gfx-reviewers,jgilbert 2022-04-04 16:42:02 +00:00
OffscreenCanvasRenderingContext2D.cpp Bug 1759686 - patch 5 - Adapt canvas2d text methods to allow use from worker threads without a Document or PresShell. r=aosmond 2022-05-04 17:13:16 +00:00
OffscreenCanvasRenderingContext2D.h Bug 1759686 - patch 5 - Adapt canvas2d text methods to allow use from worker threads without a Document or PresShell. r=aosmond 2022-05-04 17:13:16 +00:00
PWebGL.ipdl Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8 2022-02-09 17:29:47 +00:00
QueueParamTraits.h Bug 1703654 - Deal with Maybe<> not trivially_copyable on build-linux64-base-toolchains. r=gfx-reviewers,lsalzman 2022-05-02 23:54:10 +00:00
SanitizeRenderer.cpp Bug 1519636 - Reformat recent changes to the Google coding style. r=sylvestre 2022-01-11 15:49:03 +00:00
SourceSurfaceWebgl.cpp Bug 1754130 - Implement SourceSurfaceWebgl for faster snapshots of DrawTargetWebgl. r=aosmond 2022-02-11 19:49:55 +00:00
SourceSurfaceWebgl.h Bug 1754130 - Support presenting a WebGLFramebuffer to its own swap chain without opaque FB. r=aosmond,jgilbert 2022-02-11 19:49:56 +00:00
TexUnpackBlob.cpp Bug 1750310 - Centralize and reuse pixelstorei pack/unpack handling. r=lsalzman 2022-02-12 02:20:42 +00:00
TexUnpackBlob.h Bug 1640607 - Send SurfaceDescriptors for GPU blitting for video-to-webgl. r=lsalzman 2021-01-14 01:23:06 +00:00
TextMetrics.h
WebGL2Context.cpp
WebGL2Context.h Bug 1607940 - Stand up webgl.out-of-process:true path. r=handyman,nika,froydnj 2020-07-21 22:56:52 +00:00
WebGL2ContextBuffers.cpp Bug 1607940 - Stand up webgl.out-of-process:true path. r=handyman,nika,froydnj 2020-07-21 22:56:52 +00:00
WebGL2ContextFramebuffers.cpp
WebGL2ContextMRTs.cpp
WebGL2ContextQueries.cpp
WebGL2ContextRenderbuffers.cpp
WebGL2ContextSamplers.cpp
WebGL2ContextState.cpp Bug 1607940 - IPC TexImage. r=lsalzman,nika,handyman 2020-07-21 22:57:01 +00:00
WebGL2ContextSync.cpp Bug 1607940 - IPC TexImage. r=lsalzman,nika,handyman 2020-07-21 22:57:01 +00:00
WebGL2ContextTransformFeedback.cpp
WebGL2ContextUniforms.cpp Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl 2021-08-27 01:47:14 +00:00
WebGLBuffer.cpp Bug 1747299 - [UniqueBuffer] Use UniqueBuffer::Take instead of copy constructors for void*. r=gfx-reviewers,sotaro 2021-12-25 00:31:48 +00:00
WebGLBuffer.h
WebGLChild.cpp Bug 1699201 - Pretty-print Deserialize failure func name and badArgId. r=lsalzman 2021-04-17 03:45:10 +00:00
WebGLChild.h Bug 1738734 - Directly pass around handles rather than using TransportDescriptor, r=jld,media-playback-reviewers,alwu 2022-02-08 23:53:45 +00:00
WebGLCommandQueue.h Bug 1519636 - First reformat with clang-format 13.0.0. r=firefox-build-system-reviewers,sylvestre,mhentges 2021-11-16 08:07:30 +00:00
WebGLContext.cpp Bug 1703654 - Deal with Maybe<> not trivially_copyable on build-linux64-base-toolchains. r=gfx-reviewers,lsalzman 2022-05-02 23:54:10 +00:00
WebGLContext.h Bug 1765195 - Remove unused ICRData. r=gfx-reviewers,lsalzman 2022-04-18 20:16:09 +00:00
WebGLContextBuffers.cpp
WebGLContextDraw.cpp Bug 1759844 - WebGLContextDraw.cpp: use .empty() instead of .size(). r=andi 2022-04-11 11:30:17 +00:00
WebGLContextExtensions.cpp Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl 2021-08-27 01:47:14 +00:00
WebGLContextFramebufferOperations.cpp Bug 1449575 - Don't attempt ColorMask elision in WebGL. r=gfx-reviewers,aosmond 2022-03-24 19:39:06 +00:00
WebGLContextGL.cpp Bug 1760726 - Failed webgl.linkProgram on CURRENT_PROGRAM should cause draws to fail. r=gfx-reviewers,lsalzman 2022-03-25 20:11:19 +00:00
WebGLContextLossHandler.cpp Bug 1647112 - P1. Make the canvas thread use BackgroundTaskQueue. r=KrisWright,jgilbert,andi 2020-07-01 17:45:36 +00:00
WebGLContextLossHandler.h Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp 2020-07-23 14:51:46 +00:00
WebGLContextState.cpp Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl 2021-08-27 01:47:14 +00:00
WebGLContextTextures.cpp Bug 1692832 - isTexUploadFromPbo iff isPboBound. r=lsalzman 2021-03-10 18:35:16 +00:00
WebGLContextUtils.cpp Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl 2021-08-27 01:47:14 +00:00
WebGLContextUtils.h Bug 1653229 - Remove unnecessary includes for BindingUtils.h. r=jgilbert 2020-07-22 15:12:10 +00:00
WebGLContextValidate.cpp Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl 2021-08-27 01:47:14 +00:00
WebGLContextVertexArray.cpp
WebGLContextVertices.cpp Bug 1754767 - Remove duplicate includes r=media-playback-reviewers,padenot 2022-02-11 10:01:15 +00:00
WebGLExtensions.cpp Bug 1735431 - Merge WebGLExtension* into WebGLExtensions.cpp. r=gfx-reviewers,nical 2021-10-19 23:07:00 +00:00
WebGLExtensions.h Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl 2021-08-27 01:47:14 +00:00
WebGLFormats.cpp Bug 1759845 - used !foo.empty() instead of foo.size(). r=jgilbert 2022-03-28 20:14:45 +00:00
WebGLFormats.h Bug 1750310 - Centralize and reuse pixelstorei pack/unpack handling. r=lsalzman 2022-02-12 02:20:42 +00:00
WebGLFramebuffer.cpp Bug 1449575 - Don't attempt ColorMask elision in WebGL. r=gfx-reviewers,aosmond 2022-03-24 19:39:06 +00:00
WebGLFramebuffer.h Bug 1754130 - Support presenting a WebGLFramebuffer to its own swap chain without opaque FB. r=aosmond,jgilbert 2022-02-11 19:49:56 +00:00
WebGLInternalFormatsTable.h
WebGLIpdl.h Bug 1703654 - Deal with Maybe<> not trivially_copyable on build-linux64-base-toolchains. r=gfx-reviewers,lsalzman 2022-05-02 23:54:10 +00:00
WebGLMemoryTracker.cpp
WebGLMemoryTracker.h
WebGLMethodDispatcher.h Bug 1755780 - Support CopyToSwapChain on WebGLContext. r=jgilbert 2022-02-21 17:33:09 +00:00
WebGLObjectModel.h
WebGLParent.cpp Bug 1748019 - Add GRAPHICS profile markers to WebGLParent. r=gfx-reviewers,lsalzman 2021-12-31 00:56:07 +00:00
WebGLParent.h Bug 1746111 - (Re)serialize WebRTC frame SurfaceDescriptorBuffers for convert-and-upload on WebGLParent. r=gfx-reviewers,nika,lsalzman 2021-12-15 01:54:21 +00:00
WebGLProgram.cpp Bug 1725074 - Allow attribs with the same names as uniforms. r=gfx-reviewers,lsalzman 2021-12-13 20:42:30 +00:00
WebGLProgram.h Bug 1726265 - Prototype webgl draft ext OES_draw_buffers_indexed. r=lsalzman,emilio,webidl 2021-08-27 01:47:14 +00:00
WebGLQuery.cpp Bug 1607940 - IPC TexImage. r=lsalzman,nika,handyman 2020-07-21 22:57:01 +00:00
WebGLQuery.h
WebGLQueueParamTraits.h Bug 1765195 - Remove unused ICRData. r=gfx-reviewers,lsalzman 2022-04-18 20:16:09 +00:00
WebGLRenderbuffer.cpp
WebGLRenderbuffer.h
WebGLSampler.cpp
WebGLSampler.h
WebGLShader.cpp Bug 1747299 - [UniqueBuffer] Use UniqueBuffer::Take instead of copy constructors for void*. r=gfx-reviewers,sotaro 2021-12-25 00:31:48 +00:00
WebGLShader.h
WebGLShaderValidator.cpp Bug 1717151 - Prep ANGLE for vendoring. r=gfx-reviewers,kvark 2021-09-16 18:24:28 +00:00
WebGLShaderValidator.h Bug 1671599 - Make `dom/canvas` buildable outside of `unified-build` environment. r=jgilbert 2020-10-20 13:14:51 +00:00
WebGLStrongTypes.h
WebGLSync.cpp
WebGLSync.h
WebGLTexelConversions.cpp Bug 1723050 - Part 6: Replace typedef by using in dom/canvas/ r=jgilbert 2021-07-30 15:30:52 +00:00
WebGLTexelConversions.h Bug 1723050 - Part 6: Replace typedef by using in dom/canvas/ r=jgilbert 2021-07-30 15:30:52 +00:00
WebGLTexture.cpp Bug 1743065 - Skip generating mipmaps with out-of-bounds base levels r=jgilbert 2022-02-18 05:39:01 +00:00
WebGLTexture.h Bug 1696075 - Match spec for webgl sampling feedback detection. r=lsalzman 2021-03-04 03:14:50 +00:00
WebGLTextureUpload.cpp Bug 1682612 - Check for ArrayBuffer Detach/Transfer in texImage2D(ImageData). r=gfx-reviewers,aosmond 2022-03-21 23:21:42 +00:00
WebGLTransformFeedback.cpp Bug 1715690 - Generalize WebGL RENDERER into large buckets. r=lsalzman 2021-06-14 21:27:08 +00:00
WebGLTransformFeedback.h Bug 1653193 - Remove public includes for CanvasRenderingContext2D.h. r=jgilbert 2020-07-21 08:39:53 +00:00
WebGLTypes.h Bug 1703654 - Deal with Maybe<> not trivially_copyable on build-linux64-base-toolchains. r=gfx-reviewers,lsalzman 2022-05-02 23:54:10 +00:00
WebGLValidateStrings.cpp Bug 1725069 - Allow GLSL-invalid chars in shaderSource. r=gfx-reviewers,kvark 2021-09-16 20:19:11 +00:00
WebGLValidateStrings.h Bug 1725069 - Allow GLSL-invalid chars in shaderSource. r=gfx-reviewers,kvark 2021-09-16 20:19:11 +00:00
WebGLVertexArray.cpp
WebGLVertexArray.h
WebGLVertexArrayFake.cpp Bug 1671599 - Make `dom/canvas` buildable outside of `unified-build` environment. r=jgilbert 2020-10-20 13:14:51 +00:00
WebGLVertexArrayFake.h
WebGLVertexArrayGL.cpp Bug 1671599 - Make `dom/canvas` buildable outside of `unified-build` environment. r=jgilbert 2020-10-20 13:14:51 +00:00
WebGLVertexArrayGL.h
XRWebGLLayer.cpp Bug 1596772 - Make nsICanvasRenderingContextInternal::GetParentObject off-screen compatible. r=aosmond 2021-12-14 14:21:10 +00:00
XRWebGLLayer.h
moz.build Bug 1766375 - Disable implicit-fallthrough warnings in Windows builds like other platforms. r=firefox-build-system-reviewers,andi 2022-04-27 22:12:53 +00:00
nsICanvasRenderingContextInternal.cpp Backed out 3 changesets (bug 1755704, bug 1765816) for causing reftest failures on webgl-color-test.html 2022-04-24 02:33:33 +03:00
nsICanvasRenderingContextInternal.h Backed out 3 changesets (bug 1755704, bug 1765816) for causing reftest failures on webgl-color-test.html 2022-04-24 02:33:33 +03:00