Bug 216174 - Fix Internals::supportsVCPEncoder on BigSur
Summary: Fix Internals::supportsVCPEncoder on BigSur
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on: 216212 216213
Blocks:
  Show dependency treegraph
 
Reported: 2020-09-04 07:49 PDT by youenn fablet
Modified: 2020-09-08 12:12 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.94 KB, patch)
2020-09-04 07:53 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (4.15 KB, patch)
2020-09-07 05:27 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (4.14 KB, patch)
2020-09-07 08:37 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (1.45 KB, patch)
2020-09-08 07:20 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2020-09-04 07:49:58 PDT
Fix Internals::supportsVCPEncoder on BigSur
Comment 1 youenn fablet 2020-09-04 07:51:53 PDT
<rdar://problem/66492801>
Comment 2 youenn fablet 2020-09-04 07:53:53 PDT
Created attachment 407970 [details]
Patch
Comment 3 EWS 2020-09-04 09:39:52 PDT
Committed r266614: <https://trac.webkit.org/changeset/266614>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407970 [details].
Comment 4 Myles C. Maxfield 2020-09-04 23:50:56 PDT
Did this patch cause this?

CompileC Internals-227951BA24B9AE61.o
/Users/mmaxfield/src/WebKit/OpenSource/Source/WebCore/testing/Internals.cpp:5684:34: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
    return ENABLE_VCP_ENCODER || ENABLE_VCP_VTB_ENCODER || HAVE_VTB_REQUIREDLOWLATENCY;
                                 ^~~~~~~~~~~~~~~~~~~~~~ ~~
In file included from /Users/mmaxfield/src/WebKit/OpenSource/Source/WebCore/testing/Internals.cpp:336:
/Users/mmaxfield/Build/Products/Debug/usr/local/include/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:45:74: note: expanded from macro 'ENABLE_VCP_VTB_ENCODER'
#define ENABLE_VCP_VTB_ENCODER __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 && __MAC_OS_X_VERSION_MIN_REQUIRED < 110000
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mmaxfield/src/WebKit/OpenSource/Source/WebCore/testing/Internals.cpp:5684:34: note: place parentheses around the '&&' expression to silence this warning
    return ENABLE_VCP_ENCODER || ENABLE_VCP_VTB_ENCODER || HAVE_VTB_REQUIREDLOWLATENCY;
                                 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/mmaxfield/src/WebKit/OpenSource/Source/WebCore/testing/Internals.cpp:336:
/Users/mmaxfield/Build/Products/Debug/usr/local/include/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:45:74: note: expanded from macro 'ENABLE_VCP_VTB_ENCODER'
#define ENABLE_VCP_VTB_ENCODER __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 && __MAC_OS_X_VERSION_MIN_REQUIRED < 110000
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Comment 5 Myles C. Maxfield 2020-09-05 00:05:06 PDT
I reverted this patch and now the build is successful.
Comment 6 Myles C. Maxfield 2020-09-05 00:11:42 PDT
Comment on attachment 407970 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=407970&action=review

> Source/WebCore/testing/Internals.cpp:5684
> +    return ENABLE_VCP_ENCODER || ENABLE_VCP_VTB_ENCODER || HAVE_VTB_REQUIREDLOWLATENCY;

Shouldn't this be ENABLE(VCP_ENCODER) || ENABLE(VCP_VTB_ENCODER) || HAVE(VTB_REQUIREDLOWLATENCY)?
Comment 7 Myles C. Maxfield 2020-09-05 00:17:06 PDT
I can commit a short-term fix that modifies Internals.cpp to put parentheses around ENABLE_VCP_VTB_ENCODER, but it seems like the parentheses really should be in Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h. However, I don't know what the process is for updating this third-party library, so it would be good if someone could look into this for the long term.
Comment 8 youenn fablet 2020-09-05 00:19:49 PDT
Please revert the change, I’ll reland a fully valid version.
Comment 9 Myles C. Maxfield 2020-09-05 00:20:09 PDT
Committed r266657: <https://trac.webkit.org/changeset/266657>
Comment 10 Myles C. Maxfield 2020-09-05 00:21:18 PDT
Oh, whoops, sorry, I didn't see your message!
Comment 11 Myles C. Maxfield 2020-09-05 00:24:45 PDT
(In reply to Myles C. Maxfield from comment #6)
> Comment on attachment 407970 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=407970&action=review
> 
> > Source/WebCore/testing/Internals.cpp:5684
> > +    return ENABLE_VCP_ENCODER || ENABLE_VCP_VTB_ENCODER || HAVE_VTB_REQUIREDLOWLATENCY;
> 
> Shouldn't this be ENABLE(VCP_ENCODER) || ENABLE(VCP_VTB_ENCODER) ||
> HAVE(VTB_REQUIREDLOWLATENCY)?

#define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)

I think switching to ENABLE(VCP_VTB_ENCODER) would actually have fixed this.
Comment 12 Ryosuke Niwa 2020-09-05 03:05:57 PDT
(In reply to Myles C. Maxfield from comment #9)
> Committed r266657: <https://trac.webkit.org/changeset/266657>

This patch broke mac builds:

https://trac.webkit.org/changeset/266657/webkit

/Volumes/Data/slave/mojave-release/build/Source/WebCore/testing/Internals.cpp:5684:31: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand]
    return ENABLE_VCP_ENCODER || (ENABLE_VCP_VTB_ENCODER) || HAVE_VTB_REQUIREDLOWLATENCY;
                              ^  ~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Data/slave/mojave-release/build/Source/WebCore/testing/Internals.cpp:5684:31: note: use '|' for a bitwise operation
    return ENABLE_VCP_ENCODER || (ENABLE_VCP_VTB_ENCODER) || HAVE_VTB_REQUIREDLOWLATENCY;
                              ^~
                              |
Comment 13 WebKit Commit Bot 2020-09-05 03:08:20 PDT
Re-opened since this is blocked by bug 216212
Comment 14 Ryosuke Niwa 2020-09-05 03:18:51 PDT
I reverted both the original patch & Myle's build fix attempt in https://trac.webkit.org/r266658 since it's 3am here and I can't think straight to land a proper build fix as I had only 4 hours of sleep last night.
Comment 15 youenn fablet 2020-09-07 05:27:41 PDT
Created attachment 408176 [details]
Patch for landing
Comment 16 EWS 2020-09-07 08:16:25 PDT
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
Comment 17 youenn fablet 2020-09-07 08:37:07 PDT
Created attachment 408183 [details]
Patch for landing
Comment 18 EWS 2020-09-07 09:12:01 PDT
Committed r266701: <https://trac.webkit.org/changeset/266701>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 408183 [details].
Comment 19 youenn fablet 2020-09-08 07:20:52 PDT
Reopening to attach new patch.
Comment 20 youenn fablet 2020-09-08 07:20:54 PDT
Created attachment 408226 [details]
Patch
Comment 21 Geoffrey Garen 2020-09-08 09:57:22 PDT
Comment on attachment 408226 [details]
Patch

r=me
Comment 22 Geoffrey Garen 2020-09-08 09:57:50 PDT
If this doesn't do the trick, let's use some window.internals API to wait for the pixels.
Comment 23 Geoffrey Garen 2020-09-08 09:59:02 PDT
Another thing to consider is to mark this test to run individually instead of in parallel with other tests, since that can reduce system load when running this test.
Comment 24 EWS 2020-09-08 12:12:01 PDT
Committed r266738: <https://trac.webkit.org/changeset/266738>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 408226 [details].