-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OffscreenCanvas uses CanvasBase::buffer() directly
https://bugs.webkit.org/show_bug.cgi?id=275563 rdar://problem/129989623 Reviewed by Matt Woodrow. OffscreenCanvas would use CanvasBase::buffer() to transfer the offscreen canvas rendering to placeholder canvas. The transfer is a draw operation from offscreen canvas and it changes conceptually the placeholder *context*, not the placeholder canvas. Implement this by adding PlaceholderRenderingContext::setPlaceholderBuffer(). Remove redundant ImageBufferPipe and OffscreenCanvasPlaceholderData classes. PlaceholderRenderingContextSource is the thread-safe refcounted interface to submit the placeholder buffer. This is work towards making the rendering contexts be able to manage the drawing and display buffers, by eventually removing the buffers from CanvasBase. * Source/WebCore/platform/graphics/nicosia/NicosiaPlaceholderRenderingContextSource.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/NicosiaImageBufferPipe.cpp. (Nicosia::NicosiaPlaceholderRenderingContextSource::NicosiaPlaceholderRenderingContextSource): (Nicosia::NicosiaPlaceholderRenderingContextSource::~NicosiaPlaceholderRenderingContextSource): (Nicosia::NicosiaPlaceholderRenderingContextSource::setPlaceholderBuffer): (Nicosia::NicosiaPlaceholderRenderingContextSource::swapBuffersIfNeeded): (Nicosia::NicosiaPlaceholderRenderingContextSource::setContentsToLayer): (WebCore::PlaceholderRenderingContextSource::create): * Source/WebCore/Headers.cmake: * Source/WebCore/SmartPointerExpectations/UncountedCallArgsCheckerExpectations: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::transferControlToOffscreen): * Source/WebCore/html/HTMLCanvasElement.h: * Source/WebCore/html/OffscreenCanvas.cpp: (WebCore::DetachedOffscreenCanvas::DetachedOffscreenCanvas): (WebCore::DetachedOffscreenCanvas::takePlaceholderSource): (WebCore::OffscreenCanvas::create): (WebCore::OffscreenCanvas::OffscreenCanvas): (WebCore::OffscreenCanvas::detach): (WebCore::OffscreenCanvas::commitToPlaceholderCanvas): (WebCore::OffscreenCanvas::scheduleCommitToPlaceholderCanvas): (WebCore::OffscreenCanvasPlaceholderData::create): Deleted. (WebCore::OffscreenCanvasPlaceholderData::placeholder const): Deleted. (WebCore::OffscreenCanvasPlaceholderData::pipeSource const): Deleted. (WebCore::OffscreenCanvasPlaceholderData::OffscreenCanvasPlaceholderData): Deleted. (WebCore::DetachedOffscreenCanvas::takePlaceholderData): Deleted. * Source/WebCore/html/OffscreenCanvas.h: * Source/WebCore/html/canvas/PlaceholderRenderingContext.cpp: (WebCore::PlaceholderRenderingContextSource::create): (WebCore::PlaceholderRenderingContextSource::PlaceholderRenderingContextSource): (WebCore::PlaceholderRenderingContextSource::setPlaceholderBuffer): (WebCore::PlaceholderRenderingContext::create): (WebCore::PlaceholderRenderingContext::PlaceholderRenderingContext): (WebCore::PlaceholderRenderingContext::canvas const): (WebCore::PlaceholderRenderingContext::size const): (WebCore::PlaceholderRenderingContext::setContentsToLayer): (WebCore::PlaceholderRenderingContext::setPlaceholderBuffer): * Source/WebCore/html/canvas/PlaceholderRenderingContext.h: * Source/WebCore/platform/SourcesNicosia.txt: * Source/WebCore/platform/graphics/ImageBufferPipe.cpp: Removed. * Source/WebCore/platform/graphics/ImageBufferPipe.h: Removed. * Source/WebCore/platform/graphics/nicosia/NicosiaImageBufferPipe.h: Removed. Canonical link: https://commits.webkit.org/280115@main
- Loading branch information
1 parent
15ad704
commit 035c61a
Showing
16 changed files
with
194 additions
and
342 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
Oops, something went wrong.