-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Skia] Stop using ScopedGLContextCurrent to make the Skia GL context current #25101
[Skia] Stop using ScopedGLContextCurrent to make the Skia GL context current #25101
Conversation
EWS run on previous version of this PR (hash 8528678) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I have no experience with ANGLE, something for @magomez - just a few questions
@@ -86,9 +86,10 @@ bool GraphicsContextGLImageExtractor::extractImage(bool premultiplyAlpha, bool i | |||
|
|||
if (image->isTextureBacked()) { | |||
auto data = SkData::MakeUninitialized(imageInfo.computeMinByteSize()); | |||
if (!PlatformDisplay::sharedDisplayForCompositing().skiaGLContext()->makeContextCurrent()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would only return false, if the actual GL context switch fails, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, if the context is still current and nothing is done, true is returned.
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayerSkia.cpp
Show resolved
Hide resolved
8528678
to
bc1de93
Compare
EWS run on previous version of this PR (hash bc1de93) |
bc1de93
to
ada0d9e
Compare
EWS run on current version of this PR (hash ada0d9e) |
β¦current https://bugs.webkit.org/show_bug.cgi?id=270082 Reviewed by Miguel Gomez. In most of the cases we are setting anf unsetting the same context all the time. If there's WebGL content, ANGLE graphics context will make the ANGLE context current on every operation that requires it. * Source/WebCore/platform/graphics/skia/GraphicsContextGLSkia.cpp: (WebCore::GraphicsContextGLImageExtractor::extractImage): * Source/WebCore/platform/graphics/skia/ImageBufferSkiaAcceleratedBackend.cpp: (WebCore::ImageBufferSkiaAcceleratedBackend::create): (WebCore::ImageBufferSkiaAcceleratedBackend::getPixelBuffer): (WebCore::ImageBufferSkiaAcceleratedBackend::putPixelBuffer): * Source/WebCore/platform/graphics/skia/ImageBufferUtilitiesSkia.cpp: (WebCore::encodeAcceleratedImage): * Source/WebCore/platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImage::singlePixelSolidColor const): * Source/WebCore/platform/graphics/skia/PlatformDisplaySkia.cpp: (WebCore::PlatformDisplay::skiaGLContext): * Source/WebCore/platform/graphics/skia/SkiaAcceleratedBufferPool.cpp: (WebCore::SkiaAcceleratedBufferPool::~SkiaAcceleratedBufferPool): (WebCore::SkiaAcceleratedBufferPool::releaseUnusedBuffersTimerFired): * Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayerSkia.cpp: (WebCore::CoordinatedGraphicsLayer::paintTile): Canonical link: https://commits.webkit.org/275379@main
ada0d9e
to
1a34924
Compare
Committed 275379@main (1a34924): https://commits.webkit.org/275379@main Reviewed commits have been landed. Closing PR #25101 and removing active labels. |
1a34924
ada0d9e
π§ͺ wpe-wk2π§ͺ ios-wk2π§ͺ api-macπ§ͺ api-wpeπ§ͺ ios-wk2-wptπ§ͺ mac-wk1π§ͺ api-iosπ§ͺ mac-wk2π§ͺ gtk-wk2π§ͺ api-gtkπ watch