Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
WebCore::IOSurface has WebCore::GraphicsContext as its property, it s…
…hould be the other way around https://bugs.webkit.org/show_bug.cgi?id=240417 Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-05-15 Reviewed by Simon Fraser. Do not store WebCore::GraphicsContext in WebCore::IOSurface. E.g. graphics context is not the property of the bitmap that is being drawn to. The backing bitmap is a property of the context. Instead, store the GraphicsContextCG at the place where the user is, e.g. in ImageBufferIOSurfaceBackend. This allows the context client to create the context with the options the client needs. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContextCG::GraphicsContextCG): (WebCore::GraphicsContextCG::drawNativeImage): * platform/graphics/cg/GraphicsContextCG.h: * platform/graphics/cg/IOSurfacePool.cpp: (WebCore::IOSurfacePool::willAddSurface): * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: (WebCore::ImageBufferIOSurfaceBackend::~ImageBufferIOSurfaceBackend): (WebCore::ImageBufferIOSurfaceBackend::context const): (WebCore::ImageBufferIOSurfaceBackend::releaseGraphicsContext): * platform/graphics/cg/ImageBufferIOSurfaceBackend.h: * platform/graphics/cocoa/IOSurface.h: * platform/graphics/cocoa/IOSurface.mm: (WebCore::IOSurface::create): (WebCore::IOSurface::releasePlatformGraphicsContext): (WebCore::IOSurface::ensureGraphicsContext): Deleted. (WebCore::IOSurface::releaseGraphicsContext): Deleted. Canonical link: https://commits.webkit.org/250573@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
eb8e534
commit ba9cf7e234c26d684e6bdd322401ae0201cc9af5
Showing
9 changed files
with
65 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters