diff options
author | jk | 2020-05-02 07:38:35 -0500 |
---|---|---|
committer | jk | 2020-05-02 07:38:35 -0500 |
commit | 04aa5096865c594c78f52900ba565e942667c630 (patch) | |
tree | a9ac47b64369ecec9f79d8f6507a89b597789523 | |
parent | e17ecb73a97c9637fa9eacfd96e5c66938969e91 (diff) | |
download | aur-04aa5096865c594c78f52900ba565e942667c630.tar.gz |
icu 67 rebuild
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | eglGetMscRateCHROMIUM.patch | 604 | ||||
-rw-r--r-- | icu67.patch | 169 |
4 files changed, 789 insertions, 2 deletions
@@ -1,7 +1,7 @@ pkgbase = ungoogled-chromium-ozone pkgdesc = A lightweight approach to removing Google web service dependency with patches for wayland support via Ozone pkgver = 81.0.4044.129 - pkgrel = 1 + pkgrel = 2 url = https://ungoogled-software.github.io/ install = chromium.install arch = x86_64 @@ -65,6 +65,7 @@ pkgbase = ungoogled-chromium-ozone source = chromium-launcher-6.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v6.tar.gz source = rename-Relayout-in-DesktopWindowTreeHostPlatform.patch source = rebuild-Linux-frame-button-cache-when-activation.patch + source = icu67.patch source = chromium-widevine.patch source = chromium-skia-harmony.patch source = ungoogled-chromium-81.0.4044.129-1.zip::https://github.com/Eloston/ungoogled-chromium/archive/81.0.4044.129-1.zip @@ -72,11 +73,13 @@ pkgbase = ungoogled-chromium-ozone source = chromium-drirc-disable-10bpc-color-configs.conf source = vdpau-support.patch source = vaapi-build-fix.patch + source = eglGetMscRateCHROMIUM.patch source = fix-vaapi-ozone-build.patch sha256sums = ff74592f83ed91c082f746c6b0a3acf384bad91f170bd24548971c17f43046d3 sha256sums = 04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1 sha256sums = ae3bf107834bd8eda9a3ec7899fe35fde62e6111062e5def7d24bf49b53db3db sha256sums = 46f7fc9768730c460b27681ccf3dc2685c7e1fd22d70d3a82d9e57e3389bb014 + sha256sums = 5315977307e69d20b3e856d3f8724835b08e02085a4444a5c5cefea83fd7d006 sha256sums = 709e2fddba3c1f2ed4deb3a239fc0479bfa50c46e054e7f32db4fb1365fed070 sha256sums = 771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1 sha256sums = 869f130e552c4c2d1cf992e855d449034b005dce4d05a9aa8bba530745f3a2b9 @@ -84,6 +87,7 @@ pkgbase = ungoogled-chromium-ozone sha256sums = babda4f5c1179825797496898d77334ac067149cac03d797ab27ac69671a7feb sha256sums = 0ec6ee49113cc8cc5036fa008519b94137df6987bf1f9fbffb2d42d298af868a sha256sums = fad5e678d62de0e45db1c2aa871628fdc981f78c26392c1dccc457082906a350 + sha256sums = 1dd330409094dc4bf393f00a51961a983360ccf99affd4f97a61d885129d326e sha256sums = 9aebd800e5fe191cd5f4bd82c33419eefdd80919e6c6f5a3a9346a224625f094 pkgname = ungoogled-chromium-ozone @@ -6,7 +6,7 @@ pkgname=ungoogled-chromium-ozone pkgver=81.0.4044.129 -pkgrel=1 +pkgrel=2 _pkgname=ungoogled-chromium _launcher_ver=6 _ungoogled_ver=81.0.4044.129-1 @@ -33,6 +33,7 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz rename-Relayout-in-DesktopWindowTreeHostPlatform.patch rebuild-Linux-frame-button-cache-when-activation.patch + icu67.patch chromium-widevine.patch chromium-skia-harmony.patch # ----------- @@ -41,11 +42,13 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom chromium-drirc-disable-10bpc-color-configs.conf vdpau-support.patch vaapi-build-fix.patch + eglGetMscRateCHROMIUM.patch fix-vaapi-ozone-build.patch) sha256sums=('ff74592f83ed91c082f746c6b0a3acf384bad91f170bd24548971c17f43046d3' '04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1' 'ae3bf107834bd8eda9a3ec7899fe35fde62e6111062e5def7d24bf49b53db3db' '46f7fc9768730c460b27681ccf3dc2685c7e1fd22d70d3a82d9e57e3389bb014' + '5315977307e69d20b3e856d3f8724835b08e02085a4444a5c5cefea83fd7d006' '709e2fddba3c1f2ed4deb3a239fc0479bfa50c46e054e7f32db4fb1365fed070' '771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1' # ----------- @@ -54,6 +57,7 @@ sha256sums=('ff74592f83ed91c082f746c6b0a3acf384bad91f170bd24548971c17f43046d3' 'babda4f5c1179825797496898d77334ac067149cac03d797ab27ac69671a7feb' '0ec6ee49113cc8cc5036fa008519b94137df6987bf1f9fbffb2d42d298af868a' 'fad5e678d62de0e45db1c2aa871628fdc981f78c26392c1dccc457082906a350' + '1dd330409094dc4bf393f00a51961a983360ccf99affd4f97a61d885129d326e' '9aebd800e5fe191cd5f4bd82c33419eefdd80919e6c6f5a3a9346a224625f094') provides=('chromium') conflicts=('chromium') @@ -102,6 +106,9 @@ prepare() { patch -Np1 -i ../rename-Relayout-in-DesktopWindowTreeHostPlatform.patch patch -Np1 -i ../rebuild-Linux-frame-button-cache-when-activation.patch + # https://crbug.com/v8/10393 + patch -Np3 -d v8 <../icu67.patch + # Load bundled Widevine CDM if available (see chromium-widevine in the AUR) # M79 is supposed to download it as a component but it doesn't seem to work patch -Np1 -i ../chromium-widevine.patch @@ -115,6 +122,9 @@ prepare() { # Fix VAAPI build on chromium 81+ patch -Np1 -i ../vaapi-build-fix.patch + # https://bugs.chromium.org/p/chromium/issues/detail?id=1064078 + patch -Np1 -i ../eglGetMscRateCHROMIUM.patch + # Fix vaapi linkage error patch -Np1 -i ../fix-vaapi-ozone-build.patch diff --git a/eglGetMscRateCHROMIUM.patch b/eglGetMscRateCHROMIUM.patch new file mode 100644 index 000000000000..07557635196c --- /dev/null +++ b/eglGetMscRateCHROMIUM.patch @@ -0,0 +1,604 @@ +From 5cddfb828ddd82fc741549d5ee44cd9b94bd97f5 Mon Sep 17 00:00:00 2001 +From: Jonah Ryan-Davis <jonahr@google.com> +Date: Mon, 30 Mar 2020 17:13:54 +0000 +Subject: [PATCH] Use EGL_ANGLE_sync_control_rate for eglGetMscRate call + +eglGetMscRateCHROMIUM is not universally supported, so we will +switch to using the ANGLE version of the extension instead. + +Bug: chromium:1064078 +Change-Id: Ic57e2e55230df1d1c2c584e1cbf54331330a0b87 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2120453 +Reviewed-by: Zhenyao Mo <zmo@chromium.org> +Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> +Cr-Commit-Position: refs/heads/master@{#754518} +--- + +diff --git a/gpu/GLES2/extensions/ANGLE/EGL_ANGLE_sync_control_rate.txt b/gpu/GLES2/extensions/ANGLE/EGL_ANGLE_sync_control_rate.txt +new file mode 100644 +index 0000000..2056ae8 +--- /dev/null ++++ b/gpu/GLES2/extensions/ANGLE/EGL_ANGLE_sync_control_rate.txt +@@ -0,0 +1,110 @@ ++Name ++ ++ ANGLE_sync_control_rate ++ ++Name Strings ++ ++ EGL_ANGLE_sync_control_rate ++ ++Contact ++ ++ Jonah Ryan-Davis, Google (jonahr 'at' google.com) ++ ++Status ++ ++ Draft. ++ ++Version ++ ++ Version 1, 2020-03-24 ++ ++ Based on GLX_OML_sync_control Revision 6.0 ++ ++Number ++ ++ ??? ++ ++Dependencies ++ ++ The extension is written against the EGL 1.2 Specification, although it ++ should work on other versions of these specifications. This extension ++ also requires an operating system which supports CLOCK_MONOTONIC. ++ ++Overview ++ ++ This extension provides counters which let applications know about the ++ timing of the last vertical retrace. By looking at the system clock, as ++ well as the refresh rate of the monitor, this should enable applications ++ to predict the position of future retraces so as to schedule an optimal ++ workload. ++ ++ This extension incorporates the use of three counters that provide ++ the necessary synchronization. The Unadjusted System Time (or UST) ++ is the 64-bit CLOCK_MONOTONIC clock; in particular this lets the ++ application schedule future vertical retraces by querying this clock. ++ The graphics Media Stream Counter (or graphics MSC) is a counter ++ that is unique to the graphics subsystem and increments for each ++ vertical retrace that occurs. The Swap Buffer Counter (SBC) is an ++ attribute of an EGLSurface and is incremented each time a swap ++ buffer action is performed on the associated surface. ++ ++ The use of these three counters allows the application to ++ synchronize graphics rendering to vertical retraces and/or swap ++ buffer actions. For example, by querying the synchronization values for ++ a given surface, the application can accurately predict the timing for ++ the next vertical retraces and schedule rendering accordingly. ++ ++Issues ++ ++ None. ++ ++IP Status ++ ++ No known issues. ++ ++New Procedures and Functions ++ ++ Bool eglGetMscRateANGLE(EGLDisplay* dpy, ++ EGLSurface surface, ++ int32_t* numerator, ++ int32_t* denominator) ++ ++New Tokens ++ ++ None ++ ++Additions to the EGL 1.3 Specification ++ ++ The graphics MSC value is incremented once for each screen refresh. ++ For a non-interlaced display, this means that the graphics MSC value ++ is incremented for each frame. For an interlaced display, it means ++ that it will be incremented for each field. For a multi-monitor ++ system, the monitor used to determine MSC is the one where the surface ++ is located. If the surface spans multiple monitors, the monitor used ++ to determine MSC is the one with the biggest coverage in pixels. ++ ++ eglGetMscRateANGLE returns the rate at which the MSC will be incremented ++ for the display associated with <hdc>. The rate is expressed in Hertz ++ as <numerator> / <denominator>. If the MSC rate in Hertz is an ++ integer, then <denominator> will be 1 and <numerator> will be ++ the MSC rate. ++ ++ The function eglGetMscRateANGLE will return TRUE if the function ++ completed successfully, FALSE otherwise. ++ ++ Each time eglSwapBuffer succeeds, the SBC will be increased within a ++ finite time period. ++ ++Errors ++ ++ The function eglGetMscRateANGLE will return FALSE if there is no ++ current EGLContext. ++ ++New Implementation Dependent State ++ ++ None ++ ++Revision History ++ ++ Version 1, 2020-03-24 (Jonah Ryan-Davis) ++ - Initial draft, based on GLX_OML_sync_control revision 6.0. +diff --git a/gpu/GLES2/extensions/CHROMIUM/EGL_CHROMIUM_sync_control.txt b/gpu/GLES2/extensions/CHROMIUM/EGL_CHROMIUM_sync_control.txt +index 14f4e56..f699f61 100644 +--- a/gpu/GLES2/extensions/CHROMIUM/EGL_CHROMIUM_sync_control.txt ++++ b/gpu/GLES2/extensions/CHROMIUM/EGL_CHROMIUM_sync_control.txt +@@ -16,7 +16,7 @@ + + Version + +- Version 3, 2020-01-23 ++ Version 2, 2015-05-05 + + Based on GLX_OML_sync_control Revision 6.0 + +@@ -70,12 +70,6 @@ + int64_t* msc, + int64_t* sbc) + +- Bool eglGetMscRateCHROMIUM(EGLDisplay* dpy, +- EGLSurface surface, +- int32_t* numerator, +- int32_t* denominator) +- +- + New Tokens + + None +@@ -112,22 +106,16 @@ + is located. If the surface spans multiple monitors, the monitor used + to determine MSC is the one with the biggest coverage in pixels. + +- eglGetMscRateCHROMIUM returns the rate at which the MSC will be incremented +- for the display associated with <hdc>. The rate is expressed in Hertz +- as <numerator> / <denominator>. If the MSC rate in Hertz is an +- integer, then <denominator> will be 1 and <numerator> will be +- the MSC rate. +- +- The functions eglGetSyncValuesCHROMIUM, and eglGetMscRateCHROMIUM will +- return TRUE if the function completed successfully, FALSE otherwise. ++ The function eglGetSyncValuesCHROMIUM will return TRUE if the function ++ completed successfully, FALSE otherwise. + + Each time eglSwapBuffer succeeds, the SBC will be increased within a + finite time period. + + Errors + +- The functions eglGetSyncValuesCHROMIUM, and eglGetMscRateCHROMIUM will +- return FALSE if there is no current EGLContext. ++ The function eglGetSyncValuesCHROMIUM will return FALSE if there is no ++ current EGLContext. + + + New State +@@ -144,10 +132,6 @@ + + Revision History + +- Version 3, 2020-01-23 (Jonah Ryan-Davis) +- - Add the function eglGetMscRateCHROMIUM based on glXGetMscRateOML from +- GLX_OML_sync_control revision 6.0. +- + Version 2, 2015-05-05 (Chad Versace) + - Rename to EGL_CHROMIUM_sync_control from EGL_CHROMIUM_get_sync_values. + EGL_CHROMIUM_sync_control is the de facto extension name because all +diff --git a/ui/gl/EGL/eglextchromium.h b/ui/gl/EGL/eglextchromium.h +index e66d34a..22e3cf0 100644 +--- a/ui/gl/EGL/eglextchromium.h ++++ b/ui/gl/EGL/eglextchromium.h +@@ -22,21 +22,26 @@ + EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM( + EGLDisplay dpy, EGLSurface surface, EGLuint64CHROMIUM *ust, + EGLuint64CHROMIUM *msc, EGLuint64CHROMIUM *sbc); +-EGLAPI EGLBoolean EGLAPIENTRY eglGetMscRateCHROMIUM(EGLDisplay dpy, +- EGLSurface surface, +- EGLint* numerator, +- EGLint* denominator); + #endif /* EGL_EGLEXT_PROTOTYPES */ + typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCVALUESCHROMIUMPROC) + (EGLDisplay dpy, EGLSurface surface, EGLuint64CHROMIUM *ust, + EGLuint64CHROMIUM *msc, EGLuint64CHROMIUM *sbc); +-typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETMSCRATECHROMIUMPROC)( +- EGLDisplay dpy, +- EGLSurface surface, +- EGLint* numerator, +- EGLint* denominator); +-#endif +-#endif ++#endif /* EGL_CHROMIUM_sync_control */ ++ ++#ifndef EGL_ANGLE_sync_control_rate ++#define EGL_ANGLE_sync_control_rate 1 ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglGetMscRateANGLE(EGLDisplay dpy, ++ EGLSurface surface, ++ EGLint* numerator, ++ EGLint* denominator); ++#endif /* EGL_EGLEXT_PROTOTYPES */ ++typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETMSCRATEANGLEPROC)(EGLDisplay dpy, ++ EGLSurface surface, ++ EGLint* numerator, ++ EGLint* denominator); ++#endif /* EGL_ANGLE_sync_control_rate */ ++#endif /* KHRONOS_SUPPORT_INT64 */ + + #ifdef __cplusplus + } +diff --git a/ui/gl/egl_bindings_autogen_mock.cc b/ui/gl/egl_bindings_autogen_mock.cc +index f6562ad..d4d3a04 100644 +--- a/ui/gl/egl_bindings_autogen_mock.cc ++++ b/ui/gl/egl_bindings_autogen_mock.cc +@@ -299,12 +299,12 @@ + } + + EGLBoolean GL_BINDING_CALL +-MockEGLInterface::Mock_eglGetMscRateCHROMIUM(EGLDisplay dpy, +- EGLSurface surface, +- EGLint* numerator, +- EGLint* denominator) { +- MakeEglMockFunctionUnique("eglGetMscRateCHROMIUM"); +- return interface_->GetMscRateCHROMIUM(dpy, surface, numerator, denominator); ++MockEGLInterface::Mock_eglGetMscRateANGLE(EGLDisplay dpy, ++ EGLSurface surface, ++ EGLint* numerator, ++ EGLint* denominator) { ++ MakeEglMockFunctionUnique("eglGetMscRateANGLE"); ++ return interface_->GetMscRateANGLE(dpy, surface, numerator, denominator); + } + + EGLClientBuffer GL_BINDING_CALL +@@ -706,8 +706,8 @@ + if (strcmp(name, "eglGetFrameTimestampsANDROID") == 0) + return reinterpret_cast<GLFunctionPointerType>( + Mock_eglGetFrameTimestampsANDROID); +- if (strcmp(name, "eglGetMscRateCHROMIUM") == 0) +- return reinterpret_cast<GLFunctionPointerType>(Mock_eglGetMscRateCHROMIUM); ++ if (strcmp(name, "eglGetMscRateANGLE") == 0) ++ return reinterpret_cast<GLFunctionPointerType>(Mock_eglGetMscRateANGLE); + if (strcmp(name, "eglGetNativeClientBufferANDROID") == 0) + return reinterpret_cast<GLFunctionPointerType>( + Mock_eglGetNativeClientBufferANDROID); +diff --git a/ui/gl/egl_bindings_autogen_mock.h b/ui/gl/egl_bindings_autogen_mock.h +index 06f1117..4b7eb01 100644 +--- a/ui/gl/egl_bindings_autogen_mock.h ++++ b/ui/gl/egl_bindings_autogen_mock.h +@@ -131,11 +131,10 @@ + EGLint numTimestamps, + EGLint* timestamps, + EGLnsecsANDROID* values); +-static EGLBoolean GL_BINDING_CALL +-Mock_eglGetMscRateCHROMIUM(EGLDisplay dpy, +- EGLSurface surface, +- EGLint* numerator, +- EGLint* denominator); ++static EGLBoolean GL_BINDING_CALL Mock_eglGetMscRateANGLE(EGLDisplay dpy, ++ EGLSurface surface, ++ EGLint* numerator, ++ EGLint* denominator); + static EGLClientBuffer GL_BINDING_CALL Mock_eglGetNativeClientBufferANDROID( + const struct AHardwareBuffer* ahardwarebuffer); + static EGLBoolean GL_BINDING_CALL +diff --git a/ui/gl/generate_bindings.py b/ui/gl/generate_bindings.py +index 6a89047..01da79a 100755 +--- a/ui/gl/generate_bindings.py ++++ b/ui/gl/generate_bindings.py +@@ -2452,9 +2452,9 @@ + ] }], + 'arguments': 'EGLDisplay dpy, EGLSurface surface, EGLint timestamp', }, + { 'return_type': 'EGLBoolean', +- 'versions': [{ 'name': 'eglGetMscRateCHROMIUM', ++ 'versions': [{ 'name': 'eglGetMscRateANGLE', + 'extensions': [ +- 'EGL_CHROMIUM_sync_control' ++ 'EGL_ANGLE_sync_control_rate' + ] }], + 'arguments': + 'EGLDisplay dpy, EGLSurface surface, ' +diff --git a/ui/gl/gl_bindings_api_autogen_egl.h b/ui/gl/gl_bindings_api_autogen_egl.h +index 8628d7c..30b0ba80 100644 +--- a/ui/gl/gl_bindings_api_autogen_egl.h ++++ b/ui/gl/gl_bindings_api_autogen_egl.h +@@ -111,10 +111,10 @@ + EGLBoolean eglGetFrameTimestampSupportedANDROIDFn(EGLDisplay dpy, + EGLSurface surface, + EGLint timestamp) override; +-EGLBoolean eglGetMscRateCHROMIUMFn(EGLDisplay dpy, +- EGLSurface surface, +- EGLint* numerator, +- EGLint* denominator) override; ++EGLBoolean eglGetMscRateANGLEFn(EGLDisplay dpy, ++ EGLSurface surface, ++ EGLint* numerator, ++ EGLint* denominator) override; + EGLClientBuffer eglGetNativeClientBufferANDROIDFn( + const struct AHardwareBuffer* ahardwarebuffer) override; + EGLBoolean eglGetNextFrameIdANDROIDFn(EGLDisplay dpy, +diff --git a/ui/gl/gl_bindings_autogen_egl.cc b/ui/gl/gl_bindings_autogen_egl.cc +index 2f1ed11..18444223 100644 +--- a/ui/gl/gl_bindings_autogen_egl.cc ++++ b/ui/gl/gl_bindings_autogen_egl.cc +@@ -187,6 +187,8 @@ + gfx::HasExtension(extensions, "EGL_ANGLE_stream_producer_d3d_texture"); + ext.b_EGL_ANGLE_surface_d3d_texture_2d_share_handle = gfx::HasExtension( + extensions, "EGL_ANGLE_surface_d3d_texture_2d_share_handle"); ++ ext.b_EGL_ANGLE_sync_control_rate = ++ gfx::HasExtension(extensions, "EGL_ANGLE_sync_control_rate"); + ext.b_EGL_CHROMIUM_sync_control = + gfx::HasExtension(extensions, "EGL_CHROMIUM_sync_control"); + ext.b_EGL_EXT_image_flush_external = +@@ -278,9 +280,9 @@ + GetGLProcAddress("eglGetFrameTimestampSupportedANDROID")); + } + +- if (ext.b_EGL_CHROMIUM_sync_control) { +- fn.eglGetMscRateCHROMIUMFn = reinterpret_cast<eglGetMscRateCHROMIUMProc>( +- GetGLProcAddress("eglGetMscRateCHROMIUM")); ++ if (ext.b_EGL_ANGLE_sync_control_rate) { ++ fn.eglGetMscRateANGLEFn = reinterpret_cast<eglGetMscRateANGLEProc>( ++ GetGLProcAddress("eglGetMscRateANGLE")); + } + + if (ext.b_EGL_ANDROID_get_native_client_buffer) { +@@ -602,12 +604,11 @@ + timestamp); + } + +-EGLBoolean EGLApiBase::eglGetMscRateCHROMIUMFn(EGLDisplay dpy, +- EGLSurface surface, +- EGLint* numerator, +- EGLint* denominator) { +- return driver_->fn.eglGetMscRateCHROMIUMFn(dpy, surface, numerator, +- denominator); ++EGLBoolean EGLApiBase::eglGetMscRateANGLEFn(EGLDisplay dpy, ++ EGLSurface surface, ++ EGLint* numerator, ++ EGLint* denominator) { ++ return driver_->fn.eglGetMscRateANGLEFn(dpy, surface, numerator, denominator); + } + + EGLClientBuffer EGLApiBase::eglGetNativeClientBufferANDROIDFn( +@@ -1117,13 +1118,12 @@ + timestamp); + } + +-EGLBoolean TraceEGLApi::eglGetMscRateCHROMIUMFn(EGLDisplay dpy, +- EGLSurface surface, +- EGLint* numerator, +- EGLint* denominator) { +- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetMscRateCHROMIUM") +- return egl_api_->eglGetMscRateCHROMIUMFn(dpy, surface, numerator, +- denominator); ++EGLBoolean TraceEGLApi::eglGetMscRateANGLEFn(EGLDisplay dpy, ++ EGLSurface surface, ++ EGLint* numerator, ++ EGLint* denominator) { ++ TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceEGLAPI::eglGetMscRateANGLE") ++ return egl_api_->eglGetMscRateANGLEFn(dpy, surface, numerator, denominator); + } + + EGLClientBuffer TraceEGLApi::eglGetNativeClientBufferANDROIDFn( +@@ -1811,16 +1811,16 @@ + return result; + } + +-EGLBoolean LogEGLApi::eglGetMscRateCHROMIUMFn(EGLDisplay dpy, +- EGLSurface surface, +- EGLint* numerator, +- EGLint* denominator) { +- GL_SERVICE_LOG("eglGetMscRateCHROMIUM" ++EGLBoolean LogEGLApi::eglGetMscRateANGLEFn(EGLDisplay dpy, ++ EGLSurface surface, ++ EGLint* numerator, ++ EGLint* denominator) { ++ GL_SERVICE_LOG("eglGetMscRateANGLE" + << "(" << dpy << ", " << surface << ", " + << static_cast<const void*>(numerator) << ", " + << static_cast<const void*>(denominator) << ")"); + EGLBoolean result = +- egl_api_->eglGetMscRateCHROMIUMFn(dpy, surface, numerator, denominator); ++ egl_api_->eglGetMscRateANGLEFn(dpy, surface, numerator, denominator); + GL_SERVICE_LOG("GL_RESULT: " << result); + return result; + } +diff --git a/ui/gl/gl_bindings_autogen_egl.h b/ui/gl/gl_bindings_autogen_egl.h +index 546e2c9..6cafd14 100644 +--- a/ui/gl/gl_bindings_autogen_egl.h ++++ b/ui/gl/gl_bindings_autogen_egl.h +@@ -141,7 +141,7 @@ + EGLDisplay dpy, + EGLSurface surface, + EGLint timestamp); +-typedef EGLBoolean(GL_BINDING_CALL* eglGetMscRateCHROMIUMProc)( ++typedef EGLBoolean(GL_BINDING_CALL* eglGetMscRateANGLEProc)( + EGLDisplay dpy, + EGLSurface surface, + EGLint* numerator, +@@ -296,6 +296,7 @@ + bool b_EGL_ANGLE_query_surface_pointer; + bool b_EGL_ANGLE_stream_producer_d3d_texture; + bool b_EGL_ANGLE_surface_d3d_texture_2d_share_handle; ++ bool b_EGL_ANGLE_sync_control_rate; + bool b_EGL_CHROMIUM_sync_control; + bool b_EGL_EXT_image_flush_external; + bool b_EGL_KHR_fence_sync; +@@ -351,7 +352,7 @@ + eglGetFrameTimestampsANDROIDProc eglGetFrameTimestampsANDROIDFn; + eglGetFrameTimestampSupportedANDROIDProc + eglGetFrameTimestampSupportedANDROIDFn; +- eglGetMscRateCHROMIUMProc eglGetMscRateCHROMIUMFn; ++ eglGetMscRateANGLEProc eglGetMscRateANGLEFn; + eglGetNativeClientBufferANDROIDProc eglGetNativeClientBufferANDROIDFn; + eglGetNextFrameIdANDROIDProc eglGetNextFrameIdANDROIDFn; + eglGetPlatformDisplayProc eglGetPlatformDisplayFn; +@@ -512,10 +513,10 @@ + EGLDisplay dpy, + EGLSurface surface, + EGLint timestamp) = 0; +- virtual EGLBoolean eglGetMscRateCHROMIUMFn(EGLDisplay dpy, +- EGLSurface surface, +- EGLint* numerator, +- EGLint* denominator) = 0; ++ virtual EGLBoolean eglGetMscRateANGLEFn(EGLDisplay dpy, ++ EGLSurface surface, ++ EGLint* numerator, ++ EGLint* denominator) = 0; + virtual EGLClientBuffer eglGetNativeClientBufferANDROIDFn( + const struct AHardwareBuffer* ahardwarebuffer) = 0; + virtual EGLBoolean eglGetNextFrameIdANDROIDFn(EGLDisplay dpy, +@@ -685,8 +686,7 @@ + ::gl::g_current_egl_context->eglGetFrameTimestampsANDROIDFn + #define eglGetFrameTimestampSupportedANDROID \ + ::gl::g_current_egl_context->eglGetFrameTimestampSupportedANDROIDFn +-#define eglGetMscRateCHROMIUM \ +- ::gl::g_current_egl_context->eglGetMscRateCHROMIUMFn ++#define eglGetMscRateANGLE ::gl::g_current_egl_context->eglGetMscRateANGLEFn + #define eglGetNativeClientBufferANDROID \ + ::gl::g_current_egl_context->eglGetNativeClientBufferANDROIDFn + #define eglGetNextFrameIdANDROID \ +diff --git a/ui/gl/gl_enums_implementation_autogen.h b/ui/gl/gl_enums_implementation_autogen.h +index d35439c..1209923b 100644 +--- a/ui/gl/gl_enums_implementation_autogen.h ++++ b/ui/gl/gl_enums_implementation_autogen.h +@@ -829,10 +829,6 @@ + "GL_FILL_NV", + }, + { +- 0x1D00, +- "GL_FLAT_CHROMIUM", +- }, +- { + 0x1E00, + "GL_KEEP", + }, +@@ -877,14 +873,6 @@ + "GL_FONT_NUM_GLYPH_INDICES_BIT_NV", + }, + { +- 0x2400, +- "GL_EYE_LINEAR_CHROMIUM", +- }, +- { +- 0x2401, +- "GL_OBJECT_LINEAR_CHROMIUM", +- }, +- { + 0x2600, + "GL_NEAREST", + }, +@@ -2053,10 +2041,6 @@ + "GL_MAX_CUBE_MAP_TEXTURE_SIZE", + }, + { +- 0x8576, +- "GL_CONSTANT_CHROMIUM", +- }, +- { + 0x8589, + "GL_SRC1_ALPHA_EXT", + }, +@@ -4629,10 +4613,6 @@ + "GL_PATH_CLIENT_LENGTH_NV", + }, + { +- 0x907a, +- "GL_PATH_MITER_LIMIT_CHROMIUM", +- }, +- { + 0x9080, + "GL_PATH_FILL_MODE_NV", + }, +@@ -4653,10 +4633,6 @@ + "GL_PATH_STROKE_MASK_NV", + }, + { +- 0x9086, +- "GL_PATH_STROKE_BOUND_CHROMIUM", +- }, +- { + 0x9088, + "GL_COUNT_UP_NV", + }, +@@ -4965,14 +4941,6 @@ + "GL_CONTEXT_ROBUST_ACCESS_KHR", + }, + { +- 0x90a3, +- "GL_SQUARE_CHROMIUM", +- }, +- { +- 0x90a4, +- "GL_ROUND_CHROMIUM", +- }, +- { + 0x9100, + "GL_TEXTURE_2D_MULTISAMPLE", + }, +diff --git a/ui/gl/gl_mock_autogen_egl.h b/ui/gl/gl_mock_autogen_egl.h +index bcdd2a3..ba2f95f 100644 +--- a/ui/gl/gl_mock_autogen_egl.h ++++ b/ui/gl/gl_mock_autogen_egl.h +@@ -121,7 +121,7 @@ + EGLnsecsANDROID* values)); + MOCK_METHOD3(GetFrameTimestampSupportedANDROID, + EGLBoolean(EGLDisplay dpy, EGLSurface surface, EGLint timestamp)); +-MOCK_METHOD4(GetMscRateCHROMIUM, ++MOCK_METHOD4(GetMscRateANGLE, + EGLBoolean(EGLDisplay dpy, + EGLSurface surface, + EGLint* numerator, +diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc +index 72268904..750f3ed 100644 +--- a/ui/gl/gl_surface_egl.cc ++++ b/ui/gl/gl_surface_egl.cc +@@ -174,6 +174,7 @@ + bool g_egl_create_context_bind_generates_resource_supported = false; + bool g_egl_create_context_webgl_compatability_supported = false; + bool g_egl_sync_control_supported = false; ++bool g_egl_sync_control_rate_supported = false; + bool g_egl_window_fixed_size_supported = false; + bool g_egl_surfaceless_context_supported = false; + bool g_egl_surface_orientation_supported = false; +@@ -266,8 +267,12 @@ + } + + bool GetMscRate(int32_t* numerator, int32_t* denominator) override { ++ if (!g_egl_sync_control_rate_supported) { ++ return false; ++ } ++ +- bool result = eglGetMscRateCHROMIUM(g_egl_display, surface_, numerator, +- denominator) == EGL_TRUE; ++ bool result = eglGetMscRateANGLE(g_egl_display, surface_, numerator, ++ denominator) == EGL_TRUE; + return result; + } + +@@ -921,6 +920,8 @@ + g_egl_create_context_webgl_compatability_supported = + HasEGLExtension("EGL_ANGLE_create_context_webgl_compatibility"); + g_egl_sync_control_supported = HasEGLExtension("EGL_CHROMIUM_sync_control"); ++ g_egl_sync_control_rate_supported = ++ HasEGLExtension("EGL_ANGLE_sync_control_rate"); + g_egl_window_fixed_size_supported = + HasEGLExtension("EGL_ANGLE_window_fixed_size"); + g_egl_surface_orientation_supported = +@@ -1036,6 +1037,7 @@ + g_egl_create_context_bind_generates_resource_supported = false; + g_egl_create_context_webgl_compatability_supported = false; + g_egl_sync_control_supported = false; ++ g_egl_sync_control_rate_supported = false; + g_egl_window_fixed_size_supported = false; + g_egl_surface_orientation_supported = false; + g_egl_surfaceless_context_supported = false; diff --git a/icu67.patch b/icu67.patch new file mode 100644 index 000000000000..bcfcb187b3bd --- /dev/null +++ b/icu67.patch @@ -0,0 +1,169 @@ +From 2b107e7670ffb43719a66ee4a55ab408a5dcf2a5 Mon Sep 17 00:00:00 2001 +From: Ujjwal Sharma <ryzokuken@disroot.org> +Date: Wed, 22 Apr 2020 12:20:17 +0530 +Subject: [PATCH] deps: V8: backport 3f8dc4b2e5ba + +Original commit message: + + [intl] Remove soon-to-be removed getAllFieldPositions + + Needed to land ICU67.1 soon. + + Bug: v8:10393 + Change-Id: I3c7737ca600d6ccfdc46ffaddfb318ce60bc7618 + Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2136489 + Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> + Commit-Queue: Frank Tang <ftang@chromium.org> + Cr-Commit-Position: refs/heads/master@{#67027} + +Refs: https://github.com/v8/v8/commit/3f8dc4b2e5baf77b463334c769af85b79d8c1463 +--- + common.gypi | 2 +- + deps/v8/src/objects/js-number-format.cc | 72 +++++++++++++------------ + 2 files changed, 38 insertions(+), 36 deletions(-) + +diff --git a/deps/v8/src/objects/js-number-format.cc b/deps/v8/src/objects/js-number-format.cc +index 92d3e2fb82e..ced408aa173 100644 +--- a/deps/v8/src/objects/js-number-format.cc ++++ b/deps/v8/src/objects/js-number-format.cc +@@ -1197,42 +1197,31 @@ MaybeHandle<JSNumberFormat> JSNumberFormat::New(Isolate* isolate, + } + + namespace { +-Maybe<icu::UnicodeString> IcuFormatNumber( ++Maybe<bool> IcuFormatNumber( + Isolate* isolate, + const icu::number::LocalizedNumberFormatter& number_format, +- Handle<Object> numeric_obj, icu::FieldPositionIterator* fp_iter) { ++ Handle<Object> numeric_obj, icu::number::FormattedNumber* formatted) { + // If it is BigInt, handle it differently. + UErrorCode status = U_ZERO_ERROR; +- icu::number::FormattedNumber formatted; + if (numeric_obj->IsBigInt()) { + Handle<BigInt> big_int = Handle<BigInt>::cast(numeric_obj); + Handle<String> big_int_string; + ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string, + BigInt::ToString(isolate, big_int), +- Nothing<icu::UnicodeString>()); +- formatted = number_format.formatDecimal( ++ Nothing<bool>()); ++ *formatted = number_format.formatDecimal( + {big_int_string->ToCString().get(), big_int_string->length()}, status); + } else { + double number = numeric_obj->Number(); +- formatted = number_format.formatDouble(number, status); ++ *formatted = number_format.formatDouble(number, status); + } + if (U_FAILURE(status)) { + // This happen because of icu data trimming trim out "unit". + // See https://bugs.chromium.org/p/v8/issues/detail?id=8641 +- THROW_NEW_ERROR_RETURN_VALUE(isolate, +- NewTypeError(MessageTemplate::kIcuError), +- Nothing<icu::UnicodeString>()); +- } +- if (fp_iter) { +- formatted.getAllFieldPositions(*fp_iter, status); ++ THROW_NEW_ERROR_RETURN_VALUE( ++ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<bool>()); + } +- icu::UnicodeString result = formatted.toString(status); +- if (U_FAILURE(status)) { +- THROW_NEW_ERROR_RETURN_VALUE(isolate, +- NewTypeError(MessageTemplate::kIcuError), +- Nothing<icu::UnicodeString>()); +- } +- return Just(result); ++ return Just(true); + } + + } // namespace +@@ -1243,10 +1232,16 @@ MaybeHandle<String> JSNumberFormat::FormatNumeric( + Handle<Object> numeric_obj) { + DCHECK(numeric_obj->IsNumeric()); + +- Maybe<icu::UnicodeString> maybe_format = +- IcuFormatNumber(isolate, number_format, numeric_obj, nullptr); ++ icu::number::FormattedNumber formatted; ++ Maybe<bool> maybe_format = ++ IcuFormatNumber(isolate, number_format, numeric_obj, &formatted); + MAYBE_RETURN(maybe_format, Handle<String>()); +- return Intl::ToString(isolate, maybe_format.FromJust()); ++ UErrorCode status = U_ZERO_ERROR; ++ icu::UnicodeString result = formatted.toString(status); ++ if (U_FAILURE(status)) { ++ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIcuError), String); ++ } ++ return Intl::ToString(isolate, result); + } + + namespace { +@@ -1359,12 +1354,18 @@ std::vector<NumberFormatSpan> FlattenRegionsToParts( + } + + namespace { +-Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted, +- icu::FieldPositionIterator* fp_iter, ++Maybe<int> ConstructParts(Isolate* isolate, ++ icu::number::FormattedNumber* formatted, + Handle<JSArray> result, int start_index, + Handle<Object> numeric_obj, bool style_is_unit) { ++ UErrorCode status = U_ZERO_ERROR; ++ icu::UnicodeString formatted_text = formatted->toString(status); ++ if (U_FAILURE(status)) { ++ THROW_NEW_ERROR_RETURN_VALUE( ++ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing<int>()); ++ } + DCHECK(numeric_obj->IsNumeric()); +- int32_t length = formatted.length(); ++ int32_t length = formatted_text.length(); + int index = start_index; + if (length == 0) return Just(index); + +@@ -1373,13 +1374,14 @@ Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted, + // other region covers some part of the formatted string. It's possible + // there's another field with exactly the same begin and end as this backdrop, + // in which case the backdrop's field_id of -1 will give it lower priority. +- regions.push_back(NumberFormatSpan(-1, 0, formatted.length())); ++ regions.push_back(NumberFormatSpan(-1, 0, formatted_text.length())); + + { +- icu::FieldPosition fp; +- while (fp_iter->next(fp)) { +- regions.push_back(NumberFormatSpan(fp.getField(), fp.getBeginIndex(), +- fp.getEndIndex())); ++ icu::ConstrainedFieldPosition cfp; ++ cfp.constrainCategory(UFIELD_CATEGORY_NUMBER); ++ while (formatted->nextPosition(cfp, status)) { ++ regions.push_back( ++ NumberFormatSpan(cfp.getField(), cfp.getStart(), cfp.getLimit())); + } + } + +@@ -1401,7 +1403,7 @@ Maybe<int> ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted, + Handle<String> substring; + ASSIGN_RETURN_ON_EXCEPTION_VALUE( + isolate, substring, +- Intl::ToString(isolate, formatted, part.begin_pos, part.end_pos), ++ Intl::ToString(isolate, formatted_text, part.begin_pos, part.end_pos), + Nothing<int>()); + Intl::AddElement(isolate, result, index, field_type_string, substring); + ++index; +@@ -1421,14 +1423,14 @@ MaybeHandle<JSArray> JSNumberFormat::FormatToParts( + number_format->icu_number_formatter().raw(); + CHECK_NOT_NULL(fmt); + +- icu::FieldPositionIterator fp_iter; +- Maybe<icu::UnicodeString> maybe_format = +- IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter); ++ icu::number::FormattedNumber formatted; ++ Maybe<bool> maybe_format = ++ IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted); + MAYBE_RETURN(maybe_format, Handle<JSArray>()); + + Handle<JSArray> result = factory->NewJSArray(0); + Maybe<int> maybe_format_to_parts = ConstructParts( +- isolate, maybe_format.FromJust(), &fp_iter, result, 0, numeric_obj, ++ isolate, &formatted, result, 0, numeric_obj, + number_format->style() == JSNumberFormat::Style::UNIT); + MAYBE_RETURN(maybe_format_to_parts, Handle<JSArray>()); + |