[webkit-changes] [WebKit/WebKit] 2600ec: Some members of GPUCanvasContextCocoa can be `cons...
Gerald Squelart
noreply at github.com
Wed Oct 2 01:38:25 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2600ec7d4021ac19abf55dd33bcc54b246c06585
https://github.com/WebKit/WebKit/commit/2600ec7d4021ac19abf55dd33bcc54b246c06585
Author: Gerald Squelart <g_squelart at apple.com>
Date: 2024-10-02 (Wed, 02 Oct 2024)
Changed paths:
M Source/WebCore/html/canvas/GPUCanvasContextCocoa.h
M Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm
Log Message:
-----------
Some members of GPUCanvasContextCocoa can be `const Ref`
https://bugs.webkit.org/show_bug.cgi?id=280713
rdar://problem/137084471
Reviewed by Mike Wyrzykowski.
m_layerContentsDisplayDelegate, m_compositorIntegration, and m_presentationContext
should always be present and the same objects during the lifetime of their owning
GPUCanvasContextCocoa. So:
- Move potentially-unsafe creations of m_compositorIntegration and
m_presentationContext to GPUCanvasContextCocoa::create(), and pass them to the
constructor.
- Make the member variables `const Ref` (always present and the same non-const
objects).
- Remove now-unneeded null-checks in member functions.
* Source/WebCore/html/canvas/GPUCanvasContextCocoa.h:
* Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm:
(WebCore::GPUCanvasContextCocoa::create):
(WebCore::GPUCanvasContextCocoa::GPUCanvasContextCocoa):
(WebCore::GPUCanvasContextCocoa::surfaceBufferToImageBuffer):
(WebCore::GPUCanvasContextCocoa::transferToImageBuffer):
(WebCore::GPUCanvasContextCocoa::configure):
(WebCore::GPUCanvasContextCocoa::unconfigure):
(WebCore::GPUCanvasContextCocoa::getCurrentTexture):
(WebCore::GPUCanvasContextCocoa::present):
(WebCore::GPUCanvasContextCocoa::prepareForDisplay):
Canonical link: https://commits.webkit.org/284549@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list