WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
257452
Row byte count is not available in GraphicsContextGL::computeImageSizeBytes
https://bugs.webkit.org/show_bug.cgi?id=257452
Summary
Row byte count is not available in GraphicsContextGL::computeImageSizeBytes
Kimmo Kinnunen
Reported
2023-05-29 04:52:39 PDT
Row byte count is not available in GraphicsContextGL::computeImageSizeBytes Needed for GPUP implementation when computing readPixels pixel rectangle byte size
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-05-29 04:53:02 PDT
<
rdar://problem/109969560
>
Kimmo Kinnunen
Comment 2
2023-05-29 05:03:38 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/14450
EWS
Comment 3
2023-06-01 07:33:23 PDT
Committed
264794@main
(19a2252db08c): <
https://commits.webkit.org/264794@main
> Reviewed commits have been landed. Closing PR #14450 and removing active labels.
Michael Catanzaro
Comment 4
2023-06-05 06:08:47 PDT
Why is the test for bmalloc::roundUpToMultipleOfNonPowerOfTwo guarded by #if !USE(CAIRO)? That seems useful to test unconditionally?
Kimmo Kinnunen
Comment 5
2023-06-05 09:02:34 PDT
Wincairo doesn’t build with bmalloc in include path
Michael Catanzaro
Comment 6
2023-06-05 09:27:15 PDT
Ah, because bmalloc does not work on Windows. I would change that to OS(WINDOWS) then. Cairo is used on Linux too, and this code has nothing to do with Cairo.
Michael Catanzaro
Comment 7
2023-06-06 05:45:16 PDT
Oh, the other problem is bmalloc is just not in the include path on any platform. This broke JSCOnly builds.
Kimmo Kinnunen
Comment 8
2023-06-06 05:48:09 PDT
> Oh, the other problem is bmalloc is just not in the include path on any platform. This broke JSCOnly builds.
I think it passed all the tested builds. Would it be possible to close this bug and fix whatever other build configurations in a subsequent bug?
Michael Catanzaro
Comment 9
2023-06-06 05:59:31 PDT
So the header that the test is trying to use is: Source/bmalloc/bmalloc/Algorithm.h. This directory is added to bmalloc_PRIVATE_INCLUDE_DIRECTORIES in Source/bmalloc/CMakeLists.txt in order to ensure it's not available to higher layers that depend on the bmalloc framework. We have no other tests that depend on bmalloc except for Tools/TestWebKitAPI/Tests/WTF/bmalloc/IsoHeap.cpp, which is never built because it's not added to any CMakeLists.txt (a common problem in TestWebKitAPI). It's an intentional attempt to ensure that higher layers cannot use the bmalloc headers, but blocking ourselves from testing bmalloc does not seem useful. I see TestWebKit depends on many private framework headers: set(TestWebKit_PRIVATE_INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR} ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR} ${PAL_FRAMEWORK_HEADERS_DIR} ${TESTWEBKITAPI_DIR} ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR} ${WebKit_FRAMEWORK_HEADERS_DIR} ) but TestWebCore and TestWTF do not. Don, Fujii, is this intentional? Are you trying to remove them? OK for me to just add the required include dir to TestWTF? It would conspicuously be the only such include directory, which seems pretty suspicious. (In reply to Michael Catanzaro from
comment #6
)
> Ah, because bmalloc does not work on Windows. I would change that to > OS(WINDOWS) then. Cairo is used on Linux too, and this code has nothing to > do with Cairo.
Let's try #if !USE(SYSTEM_MALLOC).
Michael Catanzaro
Comment 10
2023-06-06 06:01:13 PDT
(In reply to Kimmo Kinnunen from
comment #8
)
> Would it be possible to close this bug and fix whatever other build > configurations in a subsequent bug?
I don't care too much whether we use this bug or a new bug. I generally use the original bug for build failures because it's easier than reporting a new bug, and to keep discussion of the patch and its fix in one place.
Michael Catanzaro
Comment 11
2023-06-06 06:05:20 PDT
(In reply to Kimmo Kinnunen from
comment #8
)
> I think it passed all the tested builds.
Problem is the JSCOnly builders are all macOS bots using XCode build. There are post-commit JSCOnly Linux bots that are currently green, but I'm not sure how that's possible. Maybe they are not building TestWTF?
Michael Catanzaro
Comment 12
2023-06-06 07:16:34 PDT
OK, I've tried building locally to reproduce this problem and was unable to do so: the bmalloc include directory really does somehow get added to my JSCOnly build. So I'm just going to land a small follow-up to change the preprocessor guards. I'll open a new bug for the missing include directory if I can figure out how to trigger it.
Michael Catanzaro
Comment 13
2023-06-06 07:18:27 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/14695
Michael Catanzaro
Comment 14
2023-06-06 08:01:28 PDT
(In reply to Michael Catanzaro from
comment #12
)
> I'll open a new bug for the missing include directory if I can figure out > how to trigger it.
I figured it out: the build was failing when built with USE_SYSTEM_MALLOC because bmalloc was not built but was used unconditionally. So my pull request above is actually sufficient to fix things.
EWS
Comment 15
2023-06-06 09:36:21 PDT
Committed
264902@main
(bdfef46eb471): <
https://commits.webkit.org/264902@main
> Reviewed commits have been landed. Closing PR #14695 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug