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
Pixel pack and unpack state is cached but also asked from the underlying context #14337
Pixel pack and unpack state is cached but also asked from the underlying context #14337
Conversation
EWS run on previous version of this PR (hash d7763e7) |
d7763e7
to
1d898f3
Compare
EWS run on previous version of this PR (hash 1d898f3) |
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.
@@ -3964,7 +3970,7 @@ void WebGLRenderingContextBase::texImageImpl(TexImageFunctionID functionID, GCGL | |||
pixels = std::span<const uint8_t> { data.data(), data.size() }; | |||
} | |||
|
|||
ScopedUnpackParametersResetRestore temporaryResetUnpack(this, true); | |||
ScopedTightUnpackParameters temporaryResetUnpack(*this, true); |
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.
Previously (Line 3668) this is written as ScopedTightUnpackParameters temporaryResetUnpack(*this)
. Remove the true
or the default parameter to ScopedTightUnpackParameters
and be explicit everywhere.
1d898f3
to
6f8698d
Compare
EWS run on current version of this PR (hash 6f8698d) |
β¦ing context https://bugs.webkit.org/show_bug.cgi?id=257314 rdar://109821711 Reviewed by Dan Glastonbury. WebGLRenderingContextBase, WebGL2RenderingContext caches the PACK_*, UNPACK_* state. When the WebGL client asks for the state, the context will ask the underlying GraphicsContextGL for the state, even though it is available as cached. Return the cached state directly. Use WebKit style for the functions and types related to this: use full names and avoid using get prefix for accesors. This is work towards being able to not send the state to the underlying context. Remote variant should always readPixels with ignoring the client packing in order to minimize transfers. This will be implemented in subsequent patches. This means the underlying pack state and WebGL pack state are going to be different, and thus asking the pack state from the underlying context would need redundant mutation of the state. * Source/WebCore/html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::initializeNewContext): (WebCore::WebGL2RenderingContext::getTextureSourceSubRectangle): (WebCore::WebGL2RenderingContext::pixelStorei): (WebCore::WebGL2RenderingContext::texImage3D): (WebCore::WebGL2RenderingContext::texSubImage3D): (WebCore::WebGL2RenderingContext::getParameter): (WebCore::WebGL2RenderingContext::resetUnpackParameters): Deleted. (WebCore::WebGL2RenderingContext::restoreUnpackParameters): Deleted. (WebCore::WebGL2RenderingContext::getPackPixelStoreParams const): Deleted. (WebCore::WebGL2RenderingContext::getUnpackPixelStoreParams const): Deleted. * Source/WebCore/html/canvas/WebGL2RenderingContext.h: * Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: (WebCore::ScopedTightUnpackParameters::ScopedTightUnpackParameters): (WebCore::ScopedTightUnpackParameters::~ScopedTightUnpackParameters): (WebCore::ScopedTightUnpackParameters::set): (WebCore::WebGLRenderingContextBase::initializeNewContext): (WebCore::WebGLRenderingContextBase::getParameter): (WebCore::WebGLRenderingContextBase::pixelStorei): (WebCore::WebGLRenderingContextBase::texImageSource): (WebCore::WebGLRenderingContextBase::texImageArrayBufferViewHelper): (WebCore::WebGLRenderingContextBase::texImageImpl): (WebCore::WebGLRenderingContextBase::validateTexFuncData): (WebCore::WebGLRenderingContextBase::unpackPixelStoreParameters const): (WebCore::ScopedUnpackParametersResetRestore::ScopedUnpackParametersResetRestore): Deleted. (WebCore::ScopedUnpackParametersResetRestore::~ScopedUnpackParametersResetRestore): Deleted. (WebCore::WebGLRenderingContextBase::resetUnpackParameters): Deleted. (WebCore::WebGLRenderingContextBase::restoreUnpackParameters): Deleted. (WebCore::WebGLRenderingContextBase::getPackPixelStoreParams const): Deleted. (WebCore::WebGLRenderingContextBase::getUnpackPixelStoreParams const): Deleted. * Source/WebCore/html/canvas/WebGLRenderingContextBase.h: (WebCore::WebGLRenderingContextBase::pixelStorePackParameters const): (WebCore::WebGLRenderingContextBase::unpackPixelStoreParameters const): * Source/WebCore/platform/graphics/GraphicsContextGL.cpp: (WebCore::GraphicsContextGL::computeImageSizeInBytes): (WebCore::GraphicsContextGL::packImageData): (WebCore::GraphicsContextGL::extractPixelBuffer): (WebCore::GraphicsContextGL::extractTextureData): * Source/WebCore/platform/graphics/GraphicsContextGL.h: Canonical link: https://commits.webkit.org/264567@main
6f8698d
to
cd21603
Compare
Committed 264567@main (cd21603): https://commits.webkit.org/264567@main Reviewed commits have been landed. Closing PR #14337 and removing active labels. |
cd21603
6f8698d
π wincairoπ§ͺ wpe-wk2π§ͺ api-macπ§ͺ gtk-wk2