From 6344bdaaccc9f2bef0953f75a34ff110d0a5e290 Mon Sep 17 00:00:00 2001 From: Madhura Jayaraman Date: Wed, 4 Sep 2024 09:49:04 -0700 Subject: [PATCH] Revert "Merge origin/main (#4005) (#4078)" This reverts commit 708c7ab6bcf952f33395b8e74b21143373ad64ba. --- .../actions/check_artifact_size/action.yaml | 41 +- .github/workflows/main.yaml | 3 +- .pre-commit-config.yaml | 2 - BUILD_STATUS.md | 7 +- README.md | 2 + base/files/file.h | 4 + base/files/file_starboard.cc | 15 +- base/memory/platform_shared_memory_handle.h | 2 +- cobalt/black_box_tests/black_box_tests.py | 1 - .../testdata/cpu_usage_tracker_test.html | 42 - .../testdata/navigator_test.html | 29 - .../black_box_tests/tests/navigator_test.py | 47 - cobalt/browser/cpu_usage_tracker.cc | 6 - cobalt/browser/cpu_usage_tracker.h | 1 - cobalt/browser/device_authentication.h | 5 +- cobalt/browser/idl_files.gni | 1 - cobalt/dom/memory_info.cc | 14 - cobalt/dom/memory_info.h | 2 - cobalt/dom/memory_info.idl | 1 - cobalt/dom/navigator.cc | 5 - cobalt/dom/navigator.h | 2 - cobalt/dom/navigator.idl | 1 - cobalt/dom/navigator_concurrent_hardware.idl | 18 - cobalt/dom/navigator_test.cc | 11 - cobalt/h5vcc/h5vcc_settings.cc | 11 - cobalt/h5vcc/h5vcc_settings.h | 2 - cobalt/h5vcc/h5vcc_settings.idl | 1 - cobalt/input/BUILD.gn | 14 +- cobalt/media/base/drm_system.cc | 33 +- cobalt/media/base/drm_system.h | 2 - cobalt/media/base/metrics_provider.cc | 87 - cobalt/media/base/metrics_provider.h | 15 - cobalt/media/base/metrics_provider_test.cc | 160 - cobalt/media/base/sbplayer_interface.cc | 43 +- cobalt/script/javascript_engine.h | 1 - cobalt/script/v8c/v8c_engine.cc | 3 +- cobalt/tools/download_from_gcs.py | 4 +- docker/linux/base/build/Dockerfile | 1 - docker/linux/clang-3-9/Dockerfile | 3 - docker/linux/clang-3-9/requirements.in | 7 - docker/linux/clang-3-9/requirements.txt | 10 - docker/linux/gcc-6-3/Dockerfile | 3 - docker/linux/gcc-6-3/requirements.txt | 10 - docker/linux/linux-x64x11/Dockerfile | 3 + .../{gcc-6-3 => linux-x64x11}/requirements.in | 3 +- docker/linux/linux-x64x11/requirements.txt | 78 + docker/linux/unittest/requirements.in | 4 +- docker/linux/unittest/requirements.txt | 10 +- docker/precommit_hooks/requirements.txt | 62 +- docker/pytest/requirements.in | 1 - docker/pytest/requirements.txt | 46 +- docker/windows/base/build/requirements.in | 1 - docker/windows/base/build/requirements.txt | 12 +- .../trust_store_in_memory_starboard.cc | 1 + precommit_hooks/requirements.in | 1 - precommit_hooks/requirements.txt | 14 +- requirements.txt | 1 - starboard/android/shared/BUILD.gn | 4 +- ....cc => max_output_buffers_lookup_table.cc} | 2 +- ...le.h => max_output_buffers_lookup_table.h} | 6 +- .../shared/media_is_video_supported.cc | 2 +- starboard/android/shared/video_decoder.h | 2 +- starboard/build/config/base_configuration.gni | 1 + starboard/build/config/enable_vr.gni | 26 + starboard/configuration.h | 2 +- starboard/elf_loader/exported_symbols.cc | 3 +- starboard/file.h | 4 +- .../linux/x64x11/system_get_property_impl.cc | 4 + starboard/nplb/BUILD.gn | 1 - .../nplb_evergreen_compat_tests/sabi_test.cc | 64 +- .../posix_directory_open_test.cc | 1 + .../posix_string_scan_test.cc | 95 - starboard/shared/starboard/media/BUILD.gn | 1 - .../shared/uwp/system_get_device_type.cc | 42 - .../shared/win32/system_get_device_type.cc | 28 - starboard/stub/BUILD.gn | 3 + third_party/boringssl/BUILD.gn | 12 - third_party/boringssl/src/tool/tool.cc | 2 - third_party/devtools/BUILD.gn | 1 + .../lighthouse/lighthouse-dt-bundle.js | 71336 ++++++++++++++++ third_party/libjpeg_turbo/BUILD.gn | 1 - third_party/libjpeg_turbo/cdjpeg.h | 10 +- third_party/libjpeg_turbo/jmemsys.h | 2 +- third_party/libjpeg_turbo/jpeglib.h | 8 +- .../histograms/metadata/cobalt/histograms.xml | 135 - 85 files changed, 71698 insertions(+), 1009 deletions(-) delete mode 100644 cobalt/black_box_tests/testdata/navigator_test.html delete mode 100644 cobalt/black_box_tests/tests/navigator_test.py delete mode 100644 cobalt/dom/navigator_concurrent_hardware.idl delete mode 100644 docker/linux/clang-3-9/requirements.in delete mode 100644 docker/linux/clang-3-9/requirements.txt delete mode 100644 docker/linux/gcc-6-3/requirements.txt rename docker/linux/{gcc-6-3 => linux-x64x11}/requirements.in (90%) create mode 100644 docker/linux/linux-x64x11/requirements.txt rename starboard/android/shared/{max_media_codec_output_buffers_lookup_table.cc => max_output_buffers_lookup_table.cc} (97%) rename starboard/android/shared/{max_media_codec_output_buffers_lookup_table.h => max_output_buffers_lookup_table.h} (88%) create mode 100644 starboard/build/config/enable_vr.gni delete mode 100644 starboard/nplb/posix_compliance/posix_string_scan_test.cc delete mode 100644 starboard/shared/uwp/system_get_device_type.cc delete mode 100644 starboard/shared/win32/system_get_device_type.cc create mode 100644 third_party/devtools/front_end/audits_worker/lighthouse/lighthouse-dt-bundle.js diff --git a/.github/actions/check_artifact_size/action.yaml b/.github/actions/check_artifact_size/action.yaml index 380351ed8b5d..f7395bea675f 100644 --- a/.github/actions/check_artifact_size/action.yaml +++ b/.github/actions/check_artifact_size/action.yaml @@ -41,27 +41,13 @@ runs: const latestRun = workflowRuns.data.workflow_runs[0].id; // Get the artifact uploaded on the latest successful workflow run on the main branch. - let allArtifacts = []; - let page = 1; - let hasNextPage = true; - while (hasNextPage) { - const response = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: latestRun, - page: page - }); - - allArtifacts = allArtifacts.concat(response.data.artifacts); - - if (response.data.artifacts.length === 0) { - hasNextPage = false; - } else { - page++; - } - } + const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: latestRun + }); - const matchArtifacts = allArtifacts.filter((artifact) => { + const matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == '${{ inputs.name }}'; }); @@ -103,15 +89,16 @@ runs: for (let file in fileSizeThresholds) { console.log(`Checking file size of ${file}.`); - const fileName = file.split('/').pop(); - const downloadFilePath = path.join('${{ steps.download-artifact.outputs.downloadDir }}', fileName); + const downloadFilePath = path.join('${{ steps.download-artifact.outputs.downloadDir }}', file); if (!fs.existsSync(downloadFilePath)) { - core.setFailed(`File ${file} was not uploaded to the main branch.`); + console.error(`File ${file} was not uploaded to the main branch.`); + continue; } const filePath = path.join(process.env.GITHUB_WORKSPACE, '${{ inputs.path }}', file); if (!fs.existsSync(filePath)) { - core.setFailed(`File ${file} was not created in the current workflow run.`); + console.error(`File ${filePath} was not created in the current workflow run.`); + continue; } const oldStats = fs.statSync(downloadFilePath); @@ -122,14 +109,14 @@ runs: console.log(`Latest uploaded artifact size on the main branch is ${oldSize / 1024}kB, new artifact size generated in this PR is ${newSize / 1024}kB.`); const deltaSize = newSize - oldSize; - const deltaThreshold = (Math.abs(deltaSize) / oldSize * 100).toFixed(1); + const deltaThreshold = (Math.abs(deltaSize) / oldSize * 100).toFixed(4); if (deltaSize < 0) { console.log(`Artifact size is decreased by ${Math.abs(deltaSize)} (${deltaThreshold}%).`); } else { console.log(`Artifact size is increased by ${deltaSize} (${deltaThreshold}%).`); - const threshold = (fileSizeThresholds[file] * 100).toFixed(1); - if (deltaThreshold > threshold) { + if (deltaThreshold > fileSizeThresholds[file]) { + const threshold = (fileSizeThresholds[file] * 100).toFixed(4); console.error(`Artifact size increase exceeds threshold ${threshold}%.`); core.setOutput("addLabel", true); } diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f4e76a21ef82..2ff636b76ebe 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -264,7 +264,8 @@ jobs: uses: ./.github/actions/build - name: 'Check Artifact Size' uses: ./.github/actions/check_artifact_size - if: ${{ false }} # ${{ inputs.artifact_size_increase_thresholds }} + if: ${{ inputs.artifact_size_increase_thresholds }} + continue-on-error: true # Ignore this step if check artifact size failed. with: workflow: ${{ github.workflow }} name: ${{ matrix.platform }}-${{ matrix.config }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3320afde09fb..b163dc5be0b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -166,7 +166,6 @@ repos: entry: python ./download_resources.py language: python stages: [post-checkout] - additional_dependencies: [certifi] always_run: true - id: test-download-from-gcs-helper name: test download from gcs helper @@ -175,7 +174,6 @@ repos: pass_filenames: false always_run: true stages: [push] - additional_dependencies: [certifi] args: [-m, unittest, cobalt/tools/download_from_gcs_test.py] - id: test-python3-compatibility name: Test Python 3 Compatibility diff --git a/BUILD_STATUS.md b/BUILD_STATUS.md index 038c3c98fcb6..560e0010ed5d 100644 --- a/BUILD_STATUS.md +++ b/BUILD_STATUS.md @@ -10,8 +10,8 @@ | Linux | [![linux](https://github.com/youtube/cobalt/actions/workflows/linux.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux.yaml?query=event%3Apush+branch%3Amain) | [![linux_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![linux_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![linux_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) | | Raspi-2 | [![raspi-2](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml?query=event%3Apush+branch%3Amain) | [![raspi-2_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![raspi-2_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![raspi-2_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) | | Stub | [![stub](https://github.com/youtube/cobalt/actions/workflows/stub.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub.yaml?query=event%3Apush+branch%3Amain) | [![stub_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/stub_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![stub_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/stub_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![stub_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/stub_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/stub_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) | -| Win32 | - | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) | -| Xbox One | - | [![xb1_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | | +| Win32 | [![win32](https://github.com/youtube/cobalt/actions/workflows/win32.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32.yaml?query=event%3Apush+branch%3Amain) | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Apush+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Apush+branch%3A23.lts.1%2B) | +| Xbox One | [![xb1](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml?query=event%3Apush+branch%3Amain) | [![xb1_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | | | Python | [![python](https://github.com/youtube/cobalt/actions/workflows/pytest.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/pytest.yaml?query=event%3Apush+branch%3Amain) | [![python_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/pytest_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/pytest_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | | | Java | [![java](https://github.com/youtube/cobalt/actions/workflows/gradle.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/gradle.yaml?query=event%3Apush+branch%3Amain) | [![java_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/gradle_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=push)](https://github.com/youtube/cobalt/actions/workflows/gradle_25.lts.1+.yaml?query=event%3Apush+branch%3A25.lts.1%2B) | | | @@ -23,7 +23,8 @@ | Evergreen | [![evergreen](https://github.com/youtube/cobalt/actions/workflows/evergreen.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/evergreen.yaml?query=event%3Aschedule+branch%3Amain) | [![evergreen_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/evergreen_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/evergreen_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![evergreen_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/evergreen_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/evergreen_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![evergreen_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/evergreen_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/evergreen_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) | | Linux | [![linux](https://github.com/youtube/cobalt/actions/workflows/linux.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/linux.yaml?query=event%3Aschedule+branch%3Amain) | [![linux_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/linux_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![linux_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/linux_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![linux_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/linux_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) | | Raspi-2 | [![raspi-2](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml?query=event%3Aschedule+branch%3Amain) | [![raspi-2_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![raspi-2_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![raspi-2_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/raspi-2_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) | -| Win32 | - | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) | +| Win32 | [![win32](https://github.com/youtube/cobalt/actions/workflows/win32.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/win32.yaml?query=event%3Aschedule+branch%3Amain) | [![win32_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_25.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A25.lts.1%2B) | [![win32_24.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml/badge.svg?branch=24.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_24.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A24.lts.1%2B) | [![win32_23.lts.1+](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml/badge.svg?branch=23.lts.1%2B&event=workflow_dispatch)](https://github.com/youtube/cobalt/actions/workflows/win32_23.lts.1+.yaml?query=event%3Aworkflow_dispatch+branch%3A23.lts.1%2B) | +| Xbox One | [![xb1](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml/badge.svg?branch=main&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml?query=event%3Aschedule+branch%3Amain) | [![xb1_25.lts.1+](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml/badge.svg?branch=25.lts.1%2B&event=schedule)](https://github.com/youtube/cobalt/actions/workflows/xb1_25.lts.1+.yaml?query=event%3Aschedule+branch%3A24.lts.1%2B) | | | # Legacy releases diff --git a/README.md b/README.md index d430c6144738..f29ca775f571 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ [![evergreen](https://github.com/youtube/cobalt/actions/workflows/evergreen.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/evergreen.yaml?query=event%3Apush+branch%3Amain) [![linux](https://github.com/youtube/cobalt/actions/workflows/linux.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/linux.yaml?query=event%3Apush+branch%3Amain) [![raspi-2](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/raspi-2.yaml?query=event%3Apush+branch%3Amain) +[![win32](https://github.com/youtube/cobalt/actions/workflows/win32.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/win32.yaml?query=event%3Apush+branch%3Amain) +[![xb1](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml/badge.svg?branch=main&event=push)](https://github.com/youtube/cobalt/actions/workflows/xb1.yaml?query=event%3Apush+branch%3Amain) ## Overview diff --git a/base/files/file.h b/base/files/file.h index e1b57553f94f..855f763e8d9e 100644 --- a/base/files/file.h +++ b/base/files/file.h @@ -433,6 +433,10 @@ class BASE_EXPORT File { #endif }; +#if defined(STARBOARD) +void SetLastFileError(File::Error error); +#endif + } // namespace base #endif // BASE_FILES_FILE_H_ diff --git a/base/files/file_starboard.cc b/base/files/file_starboard.cc index 393c6b5d095b..17a4a4d308c1 100644 --- a/base/files/file_starboard.cc +++ b/base/files/file_starboard.cc @@ -32,6 +32,15 @@ namespace base { +namespace { +SbFileError g_sb_file_error = kSbFileOk; +} // namespace + +// TODO: remove SbFileError +void SetLastFileError(File::Error error) { + g_sb_file_error = static_cast(error); +} + void RecordFileWriteStat(int write_file_result) { auto& stats_tracker = starboard::StatsTrackerContainer::GetInstance()->stats_tracker(); @@ -44,9 +53,9 @@ void RecordFileWriteStat(int write_file_result) { } // Make sure our Whence mappings match the system headers. -static_assert(File::FROM_BEGIN == static_cast(SEEK_SET) && - File::FROM_CURRENT == static_cast(SEEK_CUR) && - File::FROM_END == static_cast(SEEK_END), +static_assert(File::FROM_BEGIN == static_cast(kSbFileFromBegin) && + File::FROM_CURRENT == static_cast(kSbFileFromCurrent) && + File::FROM_END == static_cast(kSbFileFromEnd), "Whence enums from base must match those of Starboard."); void File::Info::FromStat(const stat_wrapper_t& stat_info) { diff --git a/base/memory/platform_shared_memory_handle.h b/base/memory/platform_shared_memory_handle.h index 2869f0313a41..e7484cabc6a9 100644 --- a/base/memory/platform_shared_memory_handle.h +++ b/base/memory/platform_shared_memory_handle.h @@ -54,7 +54,7 @@ struct BASE_EXPORT ScopedFDPair { // Platform-specific shared memory type used by the shared memory system. #if defined(STARBOARD) -using PlatformSharedMemoryHandle = int; +using PlatformSharedMemoryHandle = SbFile; using ScopedPlatformSharedMemoryHandle = ScopedFD; #elif BUILDFLAG(IS_APPLE) using PlatformSharedMemoryHandle = mach_port_t; diff --git a/cobalt/black_box_tests/black_box_tests.py b/cobalt/black_box_tests/black_box_tests.py index e9f2f868a4a8..8b0d39755513 100755 --- a/cobalt/black_box_tests/black_box_tests.py +++ b/cobalt/black_box_tests/black_box_tests.py @@ -74,7 +74,6 @@ # 'h5vcc_watchdog_api_test', 'http_cache', 'javascript_profiler', - 'navigator_test', 'performance_resource_timing_test', 'persistent_cookie', 'pointer_event_on_fixed_element_test', diff --git a/cobalt/black_box_tests/testdata/cpu_usage_tracker_test.html b/cobalt/black_box_tests/testdata/cpu_usage_tracker_test.html index e790e747db4b..7053f0bbaf3a 100644 --- a/cobalt/black_box_tests/testdata/cpu_usage_tracker_test.html +++ b/cobalt/black_box_tests/testdata/cpu_usage_tracker_test.html @@ -20,24 +20,6 @@ - - - - - diff --git a/cobalt/black_box_tests/tests/navigator_test.py b/cobalt/black_box_tests/tests/navigator_test.py deleted file mode 100644 index 9ec99a5665e8..000000000000 --- a/cobalt/black_box_tests/tests/navigator_test.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2024 The Cobalt Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Test navigator API.""" - -from cobalt.black_box_tests import black_box_tests -from cobalt.black_box_tests.threaded_web_server import ThreadedWebServer -import logging - -PLATFORMS_SUPPORTED = [ - 'linux-x64x11', - 'linux-x64x11-egl', - 'linux-x64x11-gcc-6-3', - 'linux-x64x11-skia', - 'android-arm', - 'android-arm64', - 'android-arm64-vulkan', - 'android-x86', - 'raspi-2', - 'raspi-2-skia', - 'linux-x64x11-clang-crosstool', -] - - -class NavigatorTest(black_box_tests.BlackBoxTestCase): - - def test_navigator(self): - if self.launcher_params.platform not in PLATFORMS_SUPPORTED: - logging.warning('Blackbox tests disabled for platform:%s', - self.launcher_params.platform) - return - - with ThreadedWebServer(binding_address=self.GetBindingAddress()) as server: - url = server.GetURL(file_name='testdata/navigator_test.html') - with self.CreateCobaltRunner(url=url) as runner: - runner.WaitForJSTestsSetup() - self.assertTrue(runner.JSTestsSucceeded()) diff --git a/cobalt/browser/cpu_usage_tracker.cc b/cobalt/browser/cpu_usage_tracker.cc index d53e4cc6385f..36ad4b85649d 100644 --- a/cobalt/browser/cpu_usage_tracker.cc +++ b/cobalt/browser/cpu_usage_tracker.cc @@ -300,12 +300,6 @@ void CpuUsageTracker::UpdateIntervalsEnabled(bool enabled) { } } -base::Value CpuUsageTracker::GetIntervalsDefinition() { - base::Value intervals; - storage_->Get(kIntervals, &intervals); - return std::move(intervals); -} - void CpuUsageTracker::UpdateIntervalsDefinition( const base::Value& intervals_value) { if (!task_runner_->RunsTasksInCurrentSequence()) { diff --git a/cobalt/browser/cpu_usage_tracker.h b/cobalt/browser/cpu_usage_tracker.h index 8ccdb8f48e4d..85c03380fb22 100644 --- a/cobalt/browser/cpu_usage_tracker.h +++ b/cobalt/browser/cpu_usage_tracker.h @@ -40,7 +40,6 @@ class CpuUsageTracker : base::CurrentThread::DestructionObserver { static CpuUsageTracker* GetInstance(); void Initialize(persistent_storage::PersistentSettings*); - base::Value GetIntervalsDefinition(); void UpdateIntervalsDefinition(const base::Value&); void UpdateIntervalsEnabled(bool); void StartOneTimeTracking(); diff --git a/cobalt/browser/device_authentication.h b/cobalt/browser/device_authentication.h index 142b6a547557..382938d51b26 100644 --- a/cobalt/browser/device_authentication.h +++ b/cobalt/browser/device_authentication.h @@ -24,10 +24,7 @@ namespace cobalt { namespace browser { // Returns a base64 encoded SHA256 hash representing the device authentication -// signature, the device certification scope, and the current time as query -// parameters in a string. The signature is the result of signing a message, -// containing the certification scope and the current time, with a secret key -// provided by the device. +// signature based on the device certification scope and the current time. std::string GetDeviceAuthenticationSignedURLQueryString(); // The following methods are deterministic helper functions used in the diff --git a/cobalt/browser/idl_files.gni b/cobalt/browser/idl_files.gni index 77116a71e9f2..0d0747ea5a6e 100644 --- a/cobalt/browser/idl_files.gni +++ b/cobalt/browser/idl_files.gni @@ -399,7 +399,6 @@ dependency_idl_files = [ "//cobalt/dom/global_event_handlers.idl", "//cobalt/dom/html_element_cssom_view.idl", "//cobalt/dom/mouse_event_cssom_view.idl", - "//cobalt/dom/navigator_concurrent_hardware.idl", "//cobalt/dom/navigator_licenses.idl", "//cobalt/dom/navigator_plugins.idl", "//cobalt/dom/navigator_storage_utils.idl", diff --git a/cobalt/dom/memory_info.cc b/cobalt/dom/memory_info.cc index 1c6619e6cc76..d6875450f7bd 100644 --- a/cobalt/dom/memory_info.cc +++ b/cobalt/dom/memory_info.cc @@ -61,20 +61,6 @@ uint32 MemoryInfo::used_js_heap_size( .used_heap_size); } -uint32 MemoryInfo::js_heap_size_limit( - script::EnvironmentSettings* environment_settings) const { - if (!environment_settings) { - return 0u; - } - return static_cast( - base::polymorphic_downcast( - environment_settings) - ->context() - ->javascript_engine() - ->GetHeapStatistics() - .heap_size_limit); -} - uint32 MemoryInfo::media_source_size_limit( script::EnvironmentSettings* environment_settings) const { auto memory_info = GetDecoderBufferMemoryInfo(environment_settings); diff --git a/cobalt/dom/memory_info.h b/cobalt/dom/memory_info.h index 5d1dd57d10ff..a6e4dcfd50b2 100644 --- a/cobalt/dom/memory_info.h +++ b/cobalt/dom/memory_info.h @@ -33,8 +33,6 @@ class MemoryInfo : public script::Wrappable { script::EnvironmentSettings* environment_settings) const; uint32 used_js_heap_size( script::EnvironmentSettings* environment_settings) const; - uint32 js_heap_size_limit( - script::EnvironmentSettings* environment_settings) const; uint32 media_source_size_limit( script::EnvironmentSettings* environment_settings) const; uint32 total_media_source_size( diff --git a/cobalt/dom/memory_info.idl b/cobalt/dom/memory_info.idl index 16257fae9076..4308390a6b80 100644 --- a/cobalt/dom/memory_info.idl +++ b/cobalt/dom/memory_info.idl @@ -20,7 +20,6 @@ ] interface MemoryInfo { [CallWith=EnvironmentSettings] readonly attribute unsigned long totalJSHeapSize; [CallWith=EnvironmentSettings] readonly attribute unsigned long usedJSHeapSize; - [CallWith=EnvironmentSettings] readonly attribute unsigned long jsHeapSizeLimit; [CallWith=EnvironmentSettings] readonly attribute unsigned long mediaSourceSizeLimit; [CallWith=EnvironmentSettings] readonly attribute unsigned long totalMediaSourceSize; diff --git a/cobalt/dom/navigator.cc b/cobalt/dom/navigator.cc index 0aabea2ccb9d..7ad053c7c7e5 100644 --- a/cobalt/dom/navigator.cc +++ b/cobalt/dom/navigator.cc @@ -18,7 +18,6 @@ #include #include "base/optional.h" -#include "base/system/sys_info.h" #include "base/trace_event/trace_event.h" #include "cobalt/dom/captions/system_caption_settings.h" #include "cobalt/dom/dom_settings.h" @@ -155,10 +154,6 @@ Navigator::Navigator(script::EnvironmentSettings* settings, new media_capture::MediaDevices(settings, script_value_factory())), system_caption_settings_(captions) {} -uint64_t Navigator::hardware_concurrency() const { - return static_cast(base::SysInfo::NumberOfProcessors()); -} - const std::string Navigator::licenses() const { GeneratedResourceMap resource_map; DOMEmbeddedResources::GenerateMap(resource_map); diff --git a/cobalt/dom/navigator.h b/cobalt/dom/navigator.h index 30d393a46a54..73e928e99f15 100644 --- a/cobalt/dom/navigator.h +++ b/cobalt/dom/navigator.h @@ -47,8 +47,6 @@ class Navigator : public web::NavigatorBase { Navigator(const Navigator&) = delete; Navigator& operator=(const Navigator&) = delete; - uint64_t hardware_concurrency() const; - // Web API: NavigatorLicenses const std::string licenses() const; diff --git a/cobalt/dom/navigator.idl b/cobalt/dom/navigator.idl index 8bd07f464b67..6a215209dd09 100644 --- a/cobalt/dom/navigator.idl +++ b/cobalt/dom/navigator.idl @@ -16,7 +16,6 @@ interface Navigator {}; -Navigator implements NavigatorConcurrentHardware; Navigator implements NavigatorID; Navigator implements NavigatorLanguage; Navigator implements NavigatorPlugins; diff --git a/cobalt/dom/navigator_concurrent_hardware.idl b/cobalt/dom/navigator_concurrent_hardware.idl deleted file mode 100644 index 39cde72516ef..000000000000 --- a/cobalt/dom/navigator_concurrent_hardware.idl +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2024 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -[NoInterfaceObject] -interface NavigatorConcurrentHardware { - readonly attribute unsigned long long hardwareConcurrency; -}; diff --git a/cobalt/dom/navigator_test.cc b/cobalt/dom/navigator_test.cc index 7042c7897a07..297288a72452 100644 --- a/cobalt/dom/navigator_test.cc +++ b/cobalt/dom/navigator_test.cc @@ -16,7 +16,6 @@ #include #include "base/logging.h" -#include "base/strings/string_number_conversions.h" #include "cobalt/bindings/testing/utils.h" #include "cobalt/dom/testing/test_with_javascript.h" #include "cobalt/web/testing/gtest_workarounds.h" @@ -161,15 +160,5 @@ TEST_F(NavigatorTest, NavigatorOnline) { EXPECT_EQ("true", result); } -TEST_F(NavigatorTest, NavigatorConcurrentHardware) { - std::string result; - EXPECT_TRUE(EvaluateScript("typeof navigator.hardwareConcurrency", &result)); - EXPECT_EQ("number", result); - EXPECT_TRUE(EvaluateScript("navigator.hardwareConcurrency", &result)); - int count = -1; - EXPECT_TRUE(base::StringToInt(result, &count)); - EXPECT_GE(count, 0); -} - } // namespace dom } // namespace cobalt diff --git a/cobalt/h5vcc/h5vcc_settings.cc b/cobalt/h5vcc/h5vcc_settings.cc index 3c6062001737..0cb5ca7ef878 100644 --- a/cobalt/h5vcc/h5vcc_settings.cc +++ b/cobalt/h5vcc/h5vcc_settings.cc @@ -185,16 +185,5 @@ int H5vccSettings::GetPersistentSettingAsInt(const std::string& key, return default_setting; } -std::string H5vccSettings::GetPersistentSettingAsString( - const std::string& key) const { - if (key.compare("cpu_usage_tracker_intervals") == 0) { - base::Value value = - browser::CpuUsageTracker::GetInstance()->GetIntervalsDefinition(); - absl::optional json = base::WriteJson(value); - return json.value_or(std::string()); - } - return std::string(); -} - } // namespace h5vcc } // namespace cobalt diff --git a/cobalt/h5vcc/h5vcc_settings.h b/cobalt/h5vcc/h5vcc_settings.h index 972f3a79ec13..e1541ebd48b5 100644 --- a/cobalt/h5vcc/h5vcc_settings.h +++ b/cobalt/h5vcc/h5vcc_settings.h @@ -63,8 +63,6 @@ class H5vccSettings : public script::Wrappable { int GetPersistentSettingAsInt(const std::string& key, int default_setting) const; - std::string GetPersistentSettingAsString(const std::string& key) const; - DEFINE_WRAPPABLE_TYPE(H5vccSettings); private: diff --git a/cobalt/h5vcc/h5vcc_settings.idl b/cobalt/h5vcc/h5vcc_settings.idl index 10223ffbc047..703e483897c4 100644 --- a/cobalt/h5vcc/h5vcc_settings.idl +++ b/cobalt/h5vcc/h5vcc_settings.idl @@ -16,5 +16,4 @@ interface H5vccSettings { boolean set(DOMString name, (long or DOMString) value); void setPersistentSettingAsInt(DOMString name, long value); long getPersistentSettingAsInt(DOMString name, long default_setting); - DOMString getPersistentSettingAsString(DOMString name); }; diff --git a/cobalt/input/BUILD.gn b/cobalt/input/BUILD.gn index 10482451e9a0..978550d2dc8d 100644 --- a/cobalt/input/BUILD.gn +++ b/cobalt/input/BUILD.gn @@ -15,8 +15,6 @@ static_library("input") { sources = [ "camera_3d.h", - "camera_3d_input_poller.cc", - "camera_3d_input_poller.h", "create_default_camera_3d.h", "input_device_manager.h", "input_device_manager_desktop.cc", @@ -35,6 +33,18 @@ static_library("input") { "keypress_generator_filter.h", ] + if (enable_vr) { + sources += [ + "//internal/cobalt/input/private/camera_3d_vr.cc", + "//internal/cobalt/input/private/camera_3d_vr.h", + ] + } else { + sources += [ + "camera_3d_input_poller.cc", + "camera_3d_input_poller.h", + ] + } + deps = [ "//cobalt/base", "//cobalt/dom", diff --git a/cobalt/media/base/drm_system.cc b/cobalt/media/base/drm_system.cc index 8f3ccd8f62b1..5e187c8e30fa 100644 --- a/cobalt/media/base/drm_system.cc +++ b/cobalt/media/base/drm_system.cc @@ -25,23 +25,6 @@ namespace cobalt { namespace media { -SbDrmSystem CreateSbDrmSystemWithHistogram( - const char* key_system, void* context, - SbDrmSessionUpdateRequestFunc update_request_callback, - SbDrmSessionUpdatedFunc session_updated_callback, - SbDrmSessionKeyStatusesChangedFunc key_statuses_changed_callback, - SbDrmServerCertificateUpdatedFunc server_certificate_updated_callback, - SbDrmSessionClosedFunc session_closed_callback, - MediaMetricsProvider& media_metrics_provider) { - media_metrics_provider.StartTrackingAction(MediaAction::SBDRM_CREATE); - auto drm_system = SbDrmCreateSystem( - key_system, context, update_request_callback, session_updated_callback, - key_statuses_changed_callback, server_certificate_updated_callback, - session_closed_callback); - media_metrics_provider.EndTrackingAction(MediaAction::SBDRM_CREATE); - return drm_system; -} - DECLARE_INSTANCE_COUNTER(DrmSystem); DrmSystem::Session::Session( @@ -97,11 +80,10 @@ void DrmSystem::Session::Close() { } DrmSystem::DrmSystem(const char* key_system) - : wrapped_drm_system_(CreateSbDrmSystemWithHistogram( + : wrapped_drm_system_(SbDrmCreateSystem( key_system, this, OnSessionUpdateRequestGeneratedFunc, OnSessionUpdatedFunc, OnSessionKeyStatusesChangedFunc, - OnServerCertificateUpdatedFunc, OnSessionClosedFunc, - media_metrics_provider_)), + OnServerCertificateUpdatedFunc, OnSessionClosedFunc)), task_runner_(base::SequencedTaskRunner::GetCurrentDefault()), ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)), weak_this_(weak_ptr_factory_.GetWeakPtr()) { @@ -119,9 +101,7 @@ DrmSystem::~DrmSystem() { ON_INSTANCE_RELEASED(DrmSystem); if (is_valid()) { - media_metrics_provider_.StartTrackingAction(MediaAction::SBDRM_DESTROY); SbDrmDestroySystem(wrapped_drm_system_); - media_metrics_provider_.EndTrackingAction(MediaAction::SBDRM_DESTROY); } else { LOG(WARNING) << "Attempting to close invalid SbDrmSystem"; } @@ -230,12 +210,8 @@ void DrmSystem::GenerateSessionUpdateRequest( << ", init data size: " << init_data_length << ", ticket: " << ticket; - media_metrics_provider_.StartTrackingAction( - MediaAction::SBDRM_GENERATE_SESSION_UPDATE_REQUEST); SbDrmGenerateSessionUpdateRequest(wrapped_drm_system_, ticket, type.c_str(), init_data, init_data_length); - media_metrics_provider_.EndTrackingAction( - MediaAction::SBDRM_GENERATE_SESSION_UPDATE_REQUEST); } void DrmSystem::UpdateSession( @@ -262,11 +238,8 @@ void DrmSystem::UpdateSession( << "), key length: " << key_length << ", ticket: " << ticket << ", session id: " << session_id; - media_metrics_provider_.StartTrackingAction( - MediaAction::SBDRM_UPDATE_SESSION); SbDrmUpdateSession(wrapped_drm_system_, ticket, key, key_length, session_id.c_str(), session_id.size()); - media_metrics_provider_.EndTrackingAction(MediaAction::SBDRM_UPDATE_SESSION); } void DrmSystem::CloseSession(const std::string& session_id) { @@ -276,9 +249,7 @@ void DrmSystem::CloseSession(const std::string& session_id) { LOG(INFO) << "Close session of drm system (" << wrapped_drm_system_ << "), session id: " << session_id; - media_metrics_provider_.StartTrackingAction(MediaAction::SBDRM_CLOSE_SESSION); SbDrmCloseSession(wrapped_drm_system_, session_id.c_str(), session_id.size()); - media_metrics_provider_.EndTrackingAction(MediaAction::SBDRM_CLOSE_SESSION); } void DrmSystem::OnSessionUpdateRequestGenerated( diff --git a/cobalt/media/base/drm_system.h b/cobalt/media/base/drm_system.h index 446735b8919c..402cafd324e3 100644 --- a/cobalt/media/base/drm_system.h +++ b/cobalt/media/base/drm_system.h @@ -26,7 +26,6 @@ #include "base/optional.h" #include "base/single_thread_task_runner.h" #include "base/task/sequenced_task_runner.h" -#include "cobalt/media/base/metrics_provider.h" #include "starboard/atomic.h" #include "starboard/drm.h" @@ -232,7 +231,6 @@ class DrmSystem : public base::RefCounted { SbDrmStatus status, const char* error_message); - MediaMetricsProvider media_metrics_provider_; const SbDrmSystem wrapped_drm_system_; scoped_refptr const task_runner_; diff --git a/cobalt/media/base/metrics_provider.cc b/cobalt/media/base/metrics_provider.cc index 687a136a288d..1d899ba2b4a6 100644 --- a/cobalt/media/base/metrics_provider.cc +++ b/cobalt/media/base/metrics_provider.cc @@ -151,93 +151,6 @@ void MediaMetricsProvider::ReportActionLatencyUMA( UMA_HISTOGRAM_TIMES("Cobalt.Media.SbPlayer.Destroy.LatencyTiming", action_duration); break; - case MediaAction::SBPLAYER_GET_PREFERRED_OUTPUT_MODE: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbPlayer.GetPreferredOutputMode.LatencyTiming", - action_duration, base::TimeDelta::FromMicroseconds(1), - base::TimeDelta::FromMicroseconds(100), 50); - break; - case MediaAction::SBPLAYER_SEEK: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbPlayer.Seek.LatencyTiming", action_duration, - base::TimeDelta::FromMicroseconds(1), - base::TimeDelta::FromMicroseconds(800), 50); - break; - case MediaAction::SBPLAYER_WRITE_END_OF_STREAM_AUDIO: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbPlayer.WriteEndOfStream.Audio.LatencyTiming", - action_duration, base::TimeDelta::FromMicroseconds(1), - base::TimeDelta::FromMilliseconds(25), 50); - break; - case MediaAction::SBPLAYER_WRITE_END_OF_STREAM_VIDEO: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbPlayer.WriteEndOfStream.Video.LatencyTiming", - action_duration, base::TimeDelta::FromMicroseconds(1), - base::TimeDelta::FromMilliseconds(25), 50); - break; - case MediaAction::SBPLAYER_SET_BOUNDS: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbPlayer.SetBounds.LatencyTiming", action_duration, - base::TimeDelta::FromMicroseconds(50), - base::TimeDelta::FromMilliseconds(60), 50); - break; - case MediaAction::SBPLAYER_SET_PLAYBACK_RATE: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbPlayer.SetPlaybackRate.LatencyTiming", - action_duration, base::TimeDelta::FromMicroseconds(1), - base::TimeDelta::FromMilliseconds(50), 50); - break; - case MediaAction::SBPLAYER_SET_VOLUME: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbPlayer.SetVolume.LatencyTiming", action_duration, - base::TimeDelta::FromMicroseconds(1), - base::TimeDelta::FromMilliseconds(50), 50); - break; - case MediaAction::SBPLAYER_GET_INFO: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbPlayer.GetInfo.LatencyTiming", action_duration, - base::TimeDelta::FromMicroseconds(1), - base::TimeDelta::FromMilliseconds(20), 50); - break; - case MediaAction::SBPLAYER_GET_CURRENT_FRAME: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbPlayer.GetCurrentFrame.LatencyTiming", - action_duration, base::TimeDelta::FromMicroseconds(1), - base::TimeDelta::FromMilliseconds(250), 50); - break; - case MediaAction::SBPLAYER_GET_AUDIO_CONFIG: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbPlayer.GetAudioConfig.LatencyTiming", action_duration, - base::TimeDelta::FromMicroseconds(1), - base::TimeDelta::FromMilliseconds(50), 50); - break; - case MediaAction::SBDRM_CREATE: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbDrm.Create.LatencyTiming", action_duration, - base::TimeDelta::FromMicroseconds(500), - base::TimeDelta::FromMilliseconds(250), 50); - break; - case MediaAction::SBDRM_DESTROY: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbDrm.Destroy.LatencyTiming", action_duration, - base::TimeDelta::FromMicroseconds(500), - base::TimeDelta::FromMilliseconds(250), 50); - break; - case MediaAction::SBDRM_GENERATE_SESSION_UPDATE_REQUEST: - UMA_HISTOGRAM_TIMES( - "Cobalt.Media.SbDrm.GenerateSessionUpdateRequest.LatencyTiming", - action_duration); - break; - case MediaAction::SBDRM_UPDATE_SESSION: - UMA_HISTOGRAM_TIMES("Cobalt.Media.SbDrm.UpdateSession.LatencyTiming", - action_duration); - break; - case MediaAction::SBDRM_CLOSE_SESSION: - UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES( - "Cobalt.Media.SbDrm.CloseSession.LatencyTiming", action_duration, - base::TimeDelta::FromMicroseconds(500), - base::TimeDelta::FromMilliseconds(50), 50); - break; case MediaAction::UNKNOWN_ACTION: default: break; diff --git a/cobalt/media/base/metrics_provider.h b/cobalt/media/base/metrics_provider.h index 135b2601716f..4ac3e8718c1e 100644 --- a/cobalt/media/base/metrics_provider.h +++ b/cobalt/media/base/metrics_provider.h @@ -44,21 +44,6 @@ enum class MediaAction : uint8_t { SBPLAYER_CREATE, SBPLAYER_CREATE_URL_PLAYER, SBPLAYER_DESTROY, - SBPLAYER_GET_PREFERRED_OUTPUT_MODE, - SBPLAYER_SEEK, - SBPLAYER_WRITE_END_OF_STREAM_AUDIO, - SBPLAYER_WRITE_END_OF_STREAM_VIDEO, - SBPLAYER_SET_BOUNDS, - SBPLAYER_SET_PLAYBACK_RATE, - SBPLAYER_SET_VOLUME, - SBPLAYER_GET_INFO, - SBPLAYER_GET_CURRENT_FRAME, - SBPLAYER_GET_AUDIO_CONFIG, - SBDRM_CREATE, - SBDRM_DESTROY, - SBDRM_GENERATE_SESSION_UPDATE_REQUEST, - SBDRM_UPDATE_SESSION, - SBDRM_CLOSE_SESSION, }; class MediaMetricsProvider { diff --git a/cobalt/media/base/metrics_provider_test.cc b/cobalt/media/base/metrics_provider_test.cc index 0037f02daa31..83e9ce8b7901 100644 --- a/cobalt/media/base/metrics_provider_test.cc +++ b/cobalt/media/base/metrics_provider_test.cc @@ -94,166 +94,6 @@ TEST_F(MediaMetricsProviderTest, SbPlayerDestroy) { std::string(kUmaPrefix) + "SbPlayer.Destroy.LatencyTiming", 100, 1); } -TEST_F(MediaMetricsProviderTest, SbPlayerGetPreferredOutputMode) { - metrics_.StartTrackingAction(MediaAction::SBPLAYER_GET_PREFERRED_OUTPUT_MODE); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBPLAYER_GET_PREFERRED_OUTPUT_MODE); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbPlayer.GetPreferredOutputMode.LatencyTiming", - 570, 1); -} - -TEST_F(MediaMetricsProviderTest, SbPlayerSeek) { - metrics_.StartTrackingAction(MediaAction::SBPLAYER_SEEK); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBPLAYER_SEEK); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbPlayer.Seek.LatencyTiming", 570, 1); -} - -TEST_F(MediaMetricsProviderTest, SbPlayerSetBounds) { - metrics_.StartTrackingAction(MediaAction::SBPLAYER_SET_BOUNDS); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBPLAYER_SET_BOUNDS); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbPlayer.SetBounds.LatencyTiming", 570, 1); -} - -TEST_F(MediaMetricsProviderTest, SbPlayerSetPlaybackRate) { - metrics_.StartTrackingAction(MediaAction::SBPLAYER_SET_PLAYBACK_RATE); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBPLAYER_SET_PLAYBACK_RATE); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbPlayer.SetPlaybackRate.LatencyTiming", 570, - 1); -} - -TEST_F(MediaMetricsProviderTest, SbPlayerSetVolume) { - metrics_.StartTrackingAction(MediaAction::SBPLAYER_SET_VOLUME); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBPLAYER_SET_VOLUME); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbPlayer.SetVolume.LatencyTiming", 570, 1); -} - -TEST_F(MediaMetricsProviderTest, SbPlayerGetInfo) { - metrics_.StartTrackingAction(MediaAction::SBPLAYER_GET_INFO); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBPLAYER_GET_INFO); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbPlayer.GetInfo.LatencyTiming", 570, 1); -} - -TEST_F(MediaMetricsProviderTest, SbPlayerGetCurrentFrame) { - metrics_.StartTrackingAction(MediaAction::SBPLAYER_GET_CURRENT_FRAME); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBPLAYER_GET_CURRENT_FRAME); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbPlayer.GetCurrentFrame.LatencyTiming", 570, - 1); -} - -TEST_F(MediaMetricsProviderTest, SbPlayerGetAudioConfig) { - metrics_.StartTrackingAction(MediaAction::SBPLAYER_GET_AUDIO_CONFIG); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBPLAYER_GET_AUDIO_CONFIG); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbPlayer.GetAudioConfig.LatencyTiming", 570, - 1); -} - -TEST_F(MediaMetricsProviderTest, SbPlayerWriteEndOfStreamAudio) { - metrics_.StartTrackingAction(MediaAction::SBPLAYER_WRITE_END_OF_STREAM_AUDIO); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBPLAYER_WRITE_END_OF_STREAM_AUDIO); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbPlayer.WriteEndOfStream.Audio.LatencyTiming", - 570, 1); -} - -TEST_F(MediaMetricsProviderTest, SbPlayerWriteEndOfStreamVideo) { - metrics_.StartTrackingAction(MediaAction::SBPLAYER_WRITE_END_OF_STREAM_VIDEO); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBPLAYER_WRITE_END_OF_STREAM_VIDEO); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbPlayer.WriteEndOfStream.Video.LatencyTiming", - 570, 1); -} - -TEST_F(MediaMetricsProviderTest, SbDrmCloseSession) { - metrics_.StartTrackingAction(MediaAction::SBDRM_CLOSE_SESSION); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBDRM_CLOSE_SESSION); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbDrm.CloseSession.LatencyTiming", 570, 1); -} - -TEST_F(MediaMetricsProviderTest, SbDrmCreate) { - metrics_.StartTrackingAction(MediaAction::SBDRM_CREATE); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBDRM_CREATE); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbDrm.Create.LatencyTiming", 570, 1); -} - -TEST_F(MediaMetricsProviderTest, SbDrmDestroy) { - metrics_.StartTrackingAction(MediaAction::SBDRM_DESTROY); - - clock_.Advance(base::TimeDelta::FromMicroseconds(570)); - metrics_.EndTrackingAction(MediaAction::SBDRM_DESTROY); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbDrm.Destroy.LatencyTiming", 570, 1); -} - -TEST_F(MediaMetricsProviderTest, SbDrmGenerateSessionUpdateRequest) { - metrics_.StartTrackingAction( - MediaAction::SBDRM_GENERATE_SESSION_UPDATE_REQUEST); - - clock_.Advance(base::TimeDelta::FromMilliseconds(100)); - metrics_.EndTrackingAction( - MediaAction::SBDRM_GENERATE_SESSION_UPDATE_REQUEST); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + - "SbDrm.GenerateSessionUpdateRequest.LatencyTiming", - 100, 1); -} - -TEST_F(MediaMetricsProviderTest, SbDrmUpdateSession) { - metrics_.StartTrackingAction(MediaAction::SBDRM_UPDATE_SESSION); - - clock_.Advance(base::TimeDelta::FromMilliseconds(100)); - metrics_.EndTrackingAction(MediaAction::SBDRM_UPDATE_SESSION); - - histogram_tester_.ExpectUniqueSample( - std::string(kUmaPrefix) + "SbDrm.UpdateSession.LatencyTiming", 100, 1); -} - } // namespace } // namespace media diff --git a/cobalt/media/base/sbplayer_interface.cc b/cobalt/media/base/sbplayer_interface.cc index 6b367d4c15ef..ec7b76d1acc1 100644 --- a/cobalt/media/base/sbplayer_interface.cc +++ b/cobalt/media/base/sbplayer_interface.cc @@ -79,12 +79,7 @@ SbPlayer DefaultSbPlayerInterface::Create( SbPlayerOutputMode DefaultSbPlayerInterface::GetPreferredOutputMode( const SbPlayerCreationParam* creation_param) { - media_metrics_provider_.StartTrackingAction( - MediaAction::SBPLAYER_GET_PREFERRED_OUTPUT_MODE); - auto output_mode = SbPlayerGetPreferredOutputMode(creation_param); - media_metrics_provider_.EndTrackingAction( - MediaAction::SBPLAYER_GET_PREFERRED_OUTPUT_MODE); - return output_mode; + return SbPlayerGetPreferredOutputMode(creation_param); } void DefaultSbPlayerInterface::Destroy(SbPlayer player) { @@ -96,13 +91,11 @@ void DefaultSbPlayerInterface::Destroy(SbPlayer player) { void DefaultSbPlayerInterface::Seek(SbPlayer player, base::TimeDelta seek_to_timestamp, int ticket) { - media_metrics_provider_.StartTrackingAction(MediaAction::SBPLAYER_SEEK); #if SB_API_VERSION >= 15 SbPlayerSeek(player, seek_to_timestamp.InMicroseconds(), ticket); #else // SB_API_VERSION >= 15 SbPlayerSeek2(player, seek_to_timestamp.InMicroseconds(), ticket); #endif // SB_API_VERSION >= 15 - media_metrics_provider_.EndTrackingAction(MediaAction::SBPLAYER_SEEK); } bool DefaultSbPlayerInterface::IsEnhancedAudioExtensionEnabled() const { @@ -138,57 +131,35 @@ int DefaultSbPlayerInterface::GetMaximumNumberOfSamplesPerWrite( void DefaultSbPlayerInterface::WriteEndOfStream(SbPlayer player, SbMediaType stream_type) { - auto media_action = (stream_type == kSbMediaTypeAudio) - ? MediaAction::SBPLAYER_WRITE_END_OF_STREAM_AUDIO - : MediaAction::SBPLAYER_WRITE_END_OF_STREAM_VIDEO; - media_metrics_provider_.StartTrackingAction(media_action); SbPlayerWriteEndOfStream(player, stream_type); - media_metrics_provider_.EndTrackingAction(media_action); } void DefaultSbPlayerInterface::SetBounds(SbPlayer player, int z_index, int x, int y, int width, int height) { - media_metrics_provider_.StartTrackingAction(MediaAction::SBPLAYER_SET_BOUNDS); SbPlayerSetBounds(player, z_index, x, y, width, height); - media_metrics_provider_.EndTrackingAction(MediaAction::SBPLAYER_SET_BOUNDS); } bool DefaultSbPlayerInterface::SetPlaybackRate(SbPlayer player, double playback_rate) { - media_metrics_provider_.StartTrackingAction( - MediaAction::SBPLAYER_SET_PLAYBACK_RATE); - auto set_playback_rate = SbPlayerSetPlaybackRate(player, playback_rate); - media_metrics_provider_.EndTrackingAction( - MediaAction::SBPLAYER_SET_PLAYBACK_RATE); - return set_playback_rate; + return SbPlayerSetPlaybackRate(player, playback_rate); } void DefaultSbPlayerInterface::SetVolume(SbPlayer player, double volume) { - media_metrics_provider_.StartTrackingAction(MediaAction::SBPLAYER_SET_VOLUME); SbPlayerSetVolume(player, volume); - media_metrics_provider_.EndTrackingAction(MediaAction::SBPLAYER_SET_VOLUME); } void DefaultSbPlayerInterface::GetInfo(SbPlayer player, #if SB_API_VERSION >= 15 SbPlayerInfo* out_player_info) { - media_metrics_provider_.StartTrackingAction(MediaAction::SBPLAYER_GET_INFO); SbPlayerGetInfo(player, out_player_info); #else // SB_API_VERSION >= 15 SbPlayerInfo2* out_player_info2) { - media_metrics_provider_.StartTrackingAction(MediaAction::SBPLAYER_GET_INFO); SbPlayerGetInfo2(player, out_player_info2); #endif // SB_API_VERSION >= 15 - media_metrics_provider_.EndTrackingAction(MediaAction::SBPLAYER_GET_INFO); } SbDecodeTarget DefaultSbPlayerInterface::GetCurrentFrame(SbPlayer player) { - media_metrics_provider_.StartTrackingAction( - MediaAction::SBPLAYER_GET_CURRENT_FRAME); - auto current_frame = SbPlayerGetCurrentFrame(player); - media_metrics_provider_.EndTrackingAction( - MediaAction::SBPLAYER_GET_CURRENT_FRAME); - return current_frame; + return SbPlayerGetCurrentFrame(player); } #if SB_HAS(PLAYER_WITH_URL) @@ -228,13 +199,7 @@ void DefaultSbPlayerInterface::GetUrlPlayerExtraInfo( bool DefaultSbPlayerInterface::GetAudioConfiguration( SbPlayer player, int index, SbMediaAudioConfiguration* out_audio_configuration) { - media_metrics_provider_.StartTrackingAction( - MediaAction::SBPLAYER_GET_AUDIO_CONFIG); - auto audio_configuration = - SbPlayerGetAudioConfiguration(player, index, out_audio_configuration); - media_metrics_provider_.EndTrackingAction( - MediaAction::SBPLAYER_GET_AUDIO_CONFIG); - return audio_configuration; + return SbPlayerGetAudioConfiguration(player, index, out_audio_configuration); } #endif // SB_API_VERSION >= 15 diff --git a/cobalt/script/javascript_engine.h b/cobalt/script/javascript_engine.h index a7807a7e499b..55124a79294c 100644 --- a/cobalt/script/javascript_engine.h +++ b/cobalt/script/javascript_engine.h @@ -31,7 +31,6 @@ class GlobalEnvironment; struct HeapStatistics { size_t total_heap_size; size_t used_heap_size; - size_t heap_size_limit; }; class JavaScriptEngine { diff --git a/cobalt/script/v8c/v8c_engine.cc b/cobalt/script/v8c/v8c_engine.cc index 89e7a135167f..2caa5fa61be2 100644 --- a/cobalt/script/v8c/v8c_engine.cc +++ b/cobalt/script/v8c/v8c_engine.cc @@ -206,8 +206,7 @@ HeapStatistics V8cEngine::GetHeapStatistics() { v8::HeapStatistics v8_heap_statistics; isolate_->GetHeapStatistics(&v8_heap_statistics); return {v8_heap_statistics.total_heap_size(), - v8_heap_statistics.used_heap_size(), - v8_heap_statistics.heap_size_limit()}; + v8_heap_statistics.used_heap_size()}; } void V8cEngine::UpdateDateTimeConfiguration() { diff --git a/cobalt/tools/download_from_gcs.py b/cobalt/tools/download_from_gcs.py index f075e9f53c51..edbef06544eb 100755 --- a/cobalt/tools/download_from_gcs.py +++ b/cobalt/tools/download_from_gcs.py @@ -15,7 +15,6 @@ """Downloads files from Google Cloud Storage given corresponding sha1s.""" import argparse -import certifi import hashlib import logging import os @@ -51,8 +50,7 @@ def ExtractSha1(filename): def _DownloadFromGcsAndCheckSha1(bucket, sha1): url = f'{_BASE_GCS_URL}/{bucket}/{sha1}' - ssl_context = ssl.create_default_context(cafile=certifi.where()) - with urllib.request.urlopen(url, context=ssl_context) as res: + with urllib.request.urlopen(url, context=ssl.create_default_context()) as res: with tempfile.NamedTemporaryFile(delete=False) as tmp_file: shutil.copyfileobj(res, tmp_file) diff --git a/docker/linux/base/build/Dockerfile b/docker/linux/base/build/Dockerfile index 56632fbbf63b..50d86ca9cba9 100644 --- a/docker/linux/base/build/Dockerfile +++ b/docker/linux/base/build/Dockerfile @@ -25,7 +25,6 @@ RUN apt update -qqy \ nasm \ ninja-build \ pkgconf \ - python3-certifi \ unzip \ && /opt/clean-after-apt.sh diff --git a/docker/linux/clang-3-9/Dockerfile b/docker/linux/clang-3-9/Dockerfile index 493e7bd09e9c..86b0f5fb28ce 100644 --- a/docker/linux/clang-3-9/Dockerfile +++ b/docker/linux/clang-3-9/Dockerfile @@ -34,8 +34,5 @@ RUN python3.8 -m venv /python38_env ENV VIRTUAL_ENV /python38_env ENV PATH /python38_env/bin:$PATH -COPY clang-3-9/requirements.txt /opt/requirements.txt -RUN python3.8 -m pip install --require-hashes --no-deps -r /opt/requirements.txt - CMD gn gen ${OUTDIR}/${PLATFORM}_${CONFIG} --args="target_platform=\"${PLATFORM}\" build_type=\"${CONFIG}\" using_old_compiler=true build_with_separate_cobalt_toolchain=true" && \ ninja -v -j ${NINJA_PARALLEL} -C ${OUTDIR}/${PLATFORM}_${CONFIG} ${TARGET:-cobalt_install} diff --git a/docker/linux/clang-3-9/requirements.in b/docker/linux/clang-3-9/requirements.in deleted file mode 100644 index 4f81579b3981..000000000000 --- a/docker/linux/clang-3-9/requirements.in +++ /dev/null @@ -1,7 +0,0 @@ -# IMPORTANT: Remember to also update requirements.txt when updating this file: -# $ docker run -it --mount type=bind,source=${COBALT_SRC},target=/code -w /code python:3.8 /bin/bash -# In the container: -# $ pip3 install pip-tools -# $ pip-compile --allow-unsafe --generate-hashes path/to/requirements.in - -certifi diff --git a/docker/linux/clang-3-9/requirements.txt b/docker/linux/clang-3-9/requirements.txt deleted file mode 100644 index d9f191c2cb41..000000000000 --- a/docker/linux/clang-3-9/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --allow-unsafe --generate-hashes docker/linux/clang-3-9/requirements.in -# -certifi==2024.7.4 \ - --hash=sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b \ - --hash=sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90 - # via -r docker/linux/clang-3-9/requirements.in diff --git a/docker/linux/gcc-6-3/Dockerfile b/docker/linux/gcc-6-3/Dockerfile index 88783258f5e5..8948ca13030c 100644 --- a/docker/linux/gcc-6-3/Dockerfile +++ b/docker/linux/gcc-6-3/Dockerfile @@ -34,8 +34,5 @@ RUN python3.8 -m venv /python38_env ENV VIRTUAL_ENV /python38_env ENV PATH /python38_env/bin:$PATH -COPY gcc-6-3/requirements.txt /opt/requirements.txt -RUN python3.8 -m pip install --require-hashes --no-deps -r /opt/requirements.txt - CMD gn gen ${OUTDIR}/${PLATFORM}${SB_API_VERSION:+-sbversion-$SB_API_VERSION}_${CONFIG:-debug} --args="target_platform=\"${PLATFORM}\" build_type=\"${CONFIG:-debug}\" build_with_separate_cobalt_toolchain=true using_old_compiler=true ${SB_API_VERSION:+sb_api_version=$SB_API_VERSION}" && \ ninja -v -j ${NINJA_PARALLEL} -C ${OUTDIR}/${PLATFORM}${SB_API_VERSION:+-sbversion-$SB_API_VERSION}_${CONFIG:-debug} ${TARGET:-cobalt_install} diff --git a/docker/linux/gcc-6-3/requirements.txt b/docker/linux/gcc-6-3/requirements.txt deleted file mode 100644 index 59c01d76250b..000000000000 --- a/docker/linux/gcc-6-3/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile --allow-unsafe --generate-hashes docker/linux/gcc-6-3/requirements.in -# -certifi==2024.7.4 \ - --hash=sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b \ - --hash=sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90 - # via -r docker/linux/gcc-6-3/requirements.in diff --git a/docker/linux/linux-x64x11/Dockerfile b/docker/linux/linux-x64x11/Dockerfile index 4240c6281d2a..f3b3550eef81 100644 --- a/docker/linux/linux-x64x11/Dockerfile +++ b/docker/linux/linux-x64x11/Dockerfile @@ -27,5 +27,8 @@ RUN apt update -qqy \ libxi-dev \ && /opt/clean-after-apt.sh +COPY ./linux-x64x11/requirements.txt /opt/requirements.txt +RUN python3 -m pip install --require-hashes --no-deps -r /opt/requirements.txt + CMD gn gen ${OUTDIR}/${PLATFORM}${SB_API_VERSION:+-sbversion-$SB_API_VERSION}_${CONFIG:-debug} --args="target_platform=\"${PLATFORM}\" build_type=\"${CONFIG:-debug}\" build_with_separate_cobalt_toolchain=true ${SB_API_VERSION:+sb_api_version=$SB_API_VERSION}" && \ ninja -j ${NINJA_PARALLEL} -C ${OUTDIR}/${PLATFORM}${SB_API_VERSION:+-sbversion-$SB_API_VERSION}_${CONFIG:-debug} ${TARGET:-cobalt_install} diff --git a/docker/linux/gcc-6-3/requirements.in b/docker/linux/linux-x64x11/requirements.in similarity index 90% rename from docker/linux/gcc-6-3/requirements.in rename to docker/linux/linux-x64x11/requirements.in index 4f81579b3981..e3fb94da3003 100644 --- a/docker/linux/gcc-6-3/requirements.in +++ b/docker/linux/linux-x64x11/requirements.in @@ -4,4 +4,5 @@ # $ pip3 install pip-tools # $ pip-compile --allow-unsafe --generate-hashes path/to/requirements.in -certifi +selenium==3.141.0 +Brotli==1.0.9 diff --git a/docker/linux/linux-x64x11/requirements.txt b/docker/linux/linux-x64x11/requirements.txt new file mode 100644 index 000000000000..d7b87e89a3da --- /dev/null +++ b/docker/linux/linux-x64x11/requirements.txt @@ -0,0 +1,78 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# pip-compile --generate-hashes requirements.in +# +brotli==1.0.9 \ + --hash=sha256:12effe280b8ebfd389022aa65114e30407540ccb89b177d3fbc9a4f177c4bd5d \ + --hash=sha256:160c78292e98d21e73a4cc7f76a234390e516afcd982fa17e1422f7c6a9ce9c8 \ + --hash=sha256:16d528a45c2e1909c2798f27f7bf0a3feec1dc9e50948e738b961618e38b6a7b \ + --hash=sha256:19598ecddd8a212aedb1ffa15763dd52a388518c4550e615aed88dc3753c0f0c \ + --hash=sha256:1c48472a6ba3b113452355b9af0a60da5c2ae60477f8feda8346f8fd48e3e87c \ + --hash=sha256:268fe94547ba25b58ebc724680609c8ee3e5a843202e9a381f6f9c5e8bdb5c70 \ + --hash=sha256:269a5743a393c65db46a7bb982644c67ecba4b8d91b392403ad8a861ba6f495f \ + --hash=sha256:26d168aac4aaec9a4394221240e8a5436b5634adc3cd1cdf637f6645cecbf181 \ + --hash=sha256:29d1d350178e5225397e28ea1b7aca3648fcbab546d20e7475805437bfb0a130 \ + --hash=sha256:2aad0e0baa04517741c9bb5b07586c642302e5fb3e75319cb62087bd0995ab19 \ + --hash=sha256:3496fc835370da351d37cada4cf744039616a6db7d13c430035e901443a34daa \ + --hash=sha256:35a3edbe18e876e596553c4007a087f8bcfd538f19bc116917b3c7522fca0429 \ + --hash=sha256:3b78a24b5fd13c03ee2b7b86290ed20efdc95da75a3557cc06811764d5ad1126 \ + --hash=sha256:40d15c79f42e0a2c72892bf407979febd9cf91f36f495ffb333d1d04cebb34e4 \ + --hash=sha256:44bb8ff420c1d19d91d79d8c3574b8954288bdff0273bf788954064d260d7ab0 \ + --hash=sha256:4688c1e42968ba52e57d8670ad2306fe92e0169c6f3af0089be75bbac0c64a3b \ + --hash=sha256:495ba7e49c2db22b046a53b469bbecea802efce200dffb69b93dd47397edc9b6 \ + --hash=sha256:4d1b810aa0ed773f81dceda2cc7b403d01057458730e309856356d4ef4188438 \ + --hash=sha256:503fa6af7da9f4b5780bb7e4cbe0c639b010f12be85d02c99452825dd0feef3f \ + --hash=sha256:56d027eace784738457437df7331965473f2c0da2c70e1a1f6fdbae5402e0389 \ + --hash=sha256:5913a1177fc36e30fcf6dc868ce23b0453952c78c04c266d3149b3d39e1410d6 \ + --hash=sha256:5b6ef7d9f9c38292df3690fe3e302b5b530999fa90014853dcd0d6902fb59f26 \ + --hash=sha256:5cb1e18167792d7d21e21365d7650b72d5081ed476123ff7b8cac7f45189c0c7 \ + --hash=sha256:61a7ee1f13ab913897dac7da44a73c6d44d48a4adff42a5701e3239791c96e14 \ + --hash=sha256:622a231b08899c864eb87e85f81c75e7b9ce05b001e59bbfbf43d4a71f5f32b2 \ + --hash=sha256:68715970f16b6e92c574c30747c95cf8cf62804569647386ff032195dc89a430 \ + --hash=sha256:6b2ae9f5f67f89aade1fab0f7fd8f2832501311c363a21579d02defa844d9296 \ + --hash=sha256:6c772d6c0a79ac0f414a9f8947cc407e119b8598de7621f39cacadae3cf57d12 \ + --hash=sha256:6d847b14f7ea89f6ad3c9e3901d1bc4835f6b390a9c71df999b0162d9bb1e20f \ + --hash=sha256:76ffebb907bec09ff511bb3acc077695e2c32bc2142819491579a695f77ffd4d \ + --hash=sha256:7bbff90b63328013e1e8cb50650ae0b9bac54ffb4be6104378490193cd60f85a \ + --hash=sha256:7cb81373984cc0e4682f31bc3d6be9026006d96eecd07ea49aafb06897746452 \ + --hash=sha256:7ee83d3e3a024a9618e5be64648d6d11c37047ac48adff25f12fa4226cf23d1c \ + --hash=sha256:854c33dad5ba0fbd6ab69185fec8dab89e13cda6b7d191ba111987df74f38761 \ + --hash=sha256:85f7912459c67eaab2fb854ed2bc1cc25772b300545fe7ed2dc03954da638649 \ + --hash=sha256:87fdccbb6bb589095f413b1e05734ba492c962b4a45a13ff3408fa44ffe6479b \ + --hash=sha256:88c63a1b55f352b02c6ffd24b15ead9fc0e8bf781dbe070213039324922a2eea \ + --hash=sha256:8a674ac10e0a87b683f4fa2b6fa41090edfd686a6524bd8dedbd6138b309175c \ + --hash=sha256:93130612b837103e15ac3f9cbacb4613f9e348b58b3aad53721d92e57f96d46a \ + --hash=sha256:9744a863b489c79a73aba014df554b0e7a0fc44ef3f8a0ef2a52919c7d155031 \ + --hash=sha256:9749a124280a0ada4187a6cfd1ffd35c350fb3af79c706589d98e088c5044267 \ + --hash=sha256:97f715cf371b16ac88b8c19da00029804e20e25f30d80203417255d239f228b5 \ + --hash=sha256:9bf919756d25e4114ace16a8ce91eb340eb57a08e2c6950c3cebcbe3dff2a5e7 \ + --hash=sha256:9d12cf2851759b8de8ca5fde36a59c08210a97ffca0eb94c532ce7b17c6a3d1d \ + --hash=sha256:9ed4c92a0665002ff8ea852353aeb60d9141eb04109e88928026d3c8a9e5433c \ + --hash=sha256:a72661af47119a80d82fa583b554095308d6a4c356b2a554fdc2799bc19f2a43 \ + --hash=sha256:afde17ae04d90fbe53afb628f7f2d4ca022797aa093e809de5c3cf276f61bbfa \ + --hash=sha256:b336c5e9cf03c7be40c47b5fd694c43c9f1358a80ba384a21969e0b4e66a9b17 \ + --hash=sha256:b663f1e02de5d0573610756398e44c130add0eb9a3fc912a09665332942a2efb \ + --hash=sha256:b83bb06a0192cccf1eb8d0a28672a1b79c74c3a8a5f2619625aeb6f28b3a82bb \ + --hash=sha256:c2415d9d082152460f2bd4e382a1e85aed233abc92db5a3880da2257dc7daf7b \ + --hash=sha256:c83aa123d56f2e060644427a882a36b3c12db93727ad7a7b9efd7d7f3e9cc2c4 \ + --hash=sha256:cfc391f4429ee0a9370aa93d812a52e1fee0f37a81861f4fdd1f4fb28e8547c3 \ + --hash=sha256:db844eb158a87ccab83e868a762ea8024ae27337fc7ddcbfcddd157f841fdfe7 \ + --hash=sha256:defed7ea5f218a9f2336301e6fd379f55c655bea65ba2476346340a0ce6f74a1 \ + --hash=sha256:e16eb9541f3dd1a3e92b89005e37b1257b157b7256df0e36bd7b33b50be73bcb \ + --hash=sha256:e23281b9a08ec338469268f98f194658abfb13658ee98e2b7f85ee9dd06caa91 \ + --hash=sha256:e2d9e1cbc1b25e22000328702b014227737756f4b5bf5c485ac1d8091ada078b \ + --hash=sha256:e48f4234f2469ed012a98f4b7874e7f7e173c167bed4934912a29e03167cf6b1 \ + --hash=sha256:e4c4e92c14a57c9bd4cb4be678c25369bf7a092d55fd0866f759e425b9660806 \ + --hash=sha256:ec1947eabbaf8e0531e8e899fc1d9876c179fc518989461f5d24e2223395a9e3 \ + --hash=sha256:f909bbbc433048b499cb9db9e713b5d8d949e8c109a2a548502fb9aa8630f0b1 + # via -r requirements.in +selenium==3.141.0 \ + --hash=sha256:2d7131d7bc5a5b99a2d9b04aaf2612c411b03b8ca1b1ee8d3de5845a9be2cb3c \ + --hash=sha256:deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d + # via -r requirements.in +urllib3==1.26.18 \ + --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \ + --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 + # via selenium diff --git a/docker/linux/unittest/requirements.in b/docker/linux/unittest/requirements.in index ae98b352d839..c3b047c5a4c9 100644 --- a/docker/linux/unittest/requirements.in +++ b/docker/linux/unittest/requirements.in @@ -5,7 +5,5 @@ # $ pip-compile --allow-unsafe --generate-hashes path/to/requirements.in selenium==3.141.0 +Brotli==1.0.9 junitparser==2.8.0 - -# Integration tests. -brotli==1.0.9 diff --git a/docker/linux/unittest/requirements.txt b/docker/linux/unittest/requirements.txt index 48fe84baf1f9..c4a28ae6f6f9 100644 --- a/docker/linux/unittest/requirements.txt +++ b/docker/linux/unittest/requirements.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes docker/linux/unittest/requirements.in +# pip-compile --generate-hashes requirements.in # brotli==1.0.9 \ --hash=sha256:12effe280b8ebfd389022aa65114e30407540ccb89b177d3fbc9a4f177c4bd5d \ @@ -67,17 +67,17 @@ brotli==1.0.9 \ --hash=sha256:e4c4e92c14a57c9bd4cb4be678c25369bf7a092d55fd0866f759e425b9660806 \ --hash=sha256:ec1947eabbaf8e0531e8e899fc1d9876c179fc518989461f5d24e2223395a9e3 \ --hash=sha256:f909bbbc433048b499cb9db9e713b5d8d949e8c109a2a548502fb9aa8630f0b1 - # via -r docker/linux/unittest/requirements.in + # via -r requirements.in future==0.18.3 \ --hash=sha256:34a17436ed1e96697a86f9de3d15a3b0be01d8bc8de9c1dffd59fb8234ed5307 # via junitparser junitparser==2.8.0 \ --hash=sha256:e1a7d41e0c92ca032c46eed07a6268c478f90ec1f411ea8a76b69f245e57cfb6 - # via -r docker/linux/unittest/requirements.in + # via -r requirements.in selenium==3.141.0 \ --hash=sha256:2d7131d7bc5a5b99a2d9b04aaf2612c411b03b8ca1b1ee8d3de5845a9be2cb3c \ --hash=sha256:deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d - # via -r docker/linux/unittest/requirements.in + # via -r requirements.in urllib3==1.26.18 \ --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \ --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 diff --git a/docker/precommit_hooks/requirements.txt b/docker/precommit_hooks/requirements.txt index 85b79ddc06db..affce6b615f2 100644 --- a/docker/precommit_hooks/requirements.txt +++ b/docker/precommit_hooks/requirements.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes docker/precommit_hooks/requirements.in +# pip-compile --allow-unsafe --generate-hashes requirements.in # astroid==2.15.6 \ --hash=sha256:389656ca57b6108f939cf5d2f9a2a825a3be50ba9d589670f393236e0a03b91c \ @@ -15,7 +15,7 @@ cfgv==3.3.1 \ cpplint==1.6.1 \ --hash=sha256:00ddc86d6e4de2a9dcfa272402dcbe21593363a93b7c475bc391e335062f34b1 \ --hash=sha256:d430ce8f67afc1839340e60daa89e90de08b874bc27149833077bba726dfc13a - # via -r docker/precommit_hooks/requirements.in + # via -r requirements.in dill==0.3.7 \ --hash=sha256:76b122c08ef4ce2eedcd4d1abd8e641114bfc6c2867f49f3c41facf65bf19f5e \ --hash=sha256:cc1c8b182eb3013e24bd475ff2e9295af86c1a38eb1aff128dac8962a9ce3c03 @@ -35,7 +35,10 @@ identify==2.5.24 \ importlib-metadata==6.7.0 \ --hash=sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4 \ --hash=sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5 - # via yapf + # via + # pre-commit + # virtualenv + # yapf isort==5.11.5 \ --hash=sha256:6be1f76a507cb2ecf16c7cf14a37e41609ca082330be4e3436a18ef74add55db \ --hash=sha256:ba1d72fb2595a01c7895a5128f9585a5cc4b6d395f1c8d514989b9a7eb2a8746 @@ -96,11 +99,11 @@ platformdirs==3.10.0 \ pre-commit==2.21.0 \ --hash=sha256:31ef31af7e474a8d8995027fefdfcf509b5c913ff31f2015b4ec4beb26a6f658 \ --hash=sha256:e2f91727039fc39a92f58a588a25b87f936de6567eed4f0e673e0507edc75bad - # via -r docker/precommit_hooks/requirements.in + # via -r requirements.in pylint==2.17.5 \ --hash=sha256:73995fb8216d3bed149c8d51bba25b2c52a8251a2c8ac846ec668ce38fab5413 \ --hash=sha256:f7b601cbc06fef7e62a754e2b41294c2aa31f1cb659624b9a85bcba29eaf8252 - # via -r docker/precommit_hooks/requirements.in + # via -r requirements.in pyyaml==6.0.1 \ --hash=sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc \ --hash=sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741 \ @@ -153,11 +156,56 @@ tomlkit==0.12.1 \ --hash=sha256:38e1ff8edb991273ec9f6181244a6a391ac30e9f5098e7535640ea6be97a7c86 \ --hash=sha256:712cbd236609acc6a3e2e97253dfc52d4c2082982a88f61b640ecf0817eab899 # via pylint +typed-ast==1.5.5 \ + --hash=sha256:042eb665ff6bf020dd2243307d11ed626306b82812aba21836096d229fdc6a10 \ + --hash=sha256:045f9930a1550d9352464e5149710d56a2aed23a2ffe78946478f7b5416f1ede \ + --hash=sha256:0635900d16ae133cab3b26c607586131269f88266954eb04ec31535c9a12ef1e \ + --hash=sha256:118c1ce46ce58fda78503eae14b7664163aa735b620b64b5b725453696f2a35c \ + --hash=sha256:16f7313e0a08c7de57f2998c85e2a69a642e97cb32f87eb65fbfe88381a5e44d \ + --hash=sha256:1efebbbf4604ad1283e963e8915daa240cb4bf5067053cf2f0baadc4d4fb51b8 \ + --hash=sha256:2188bc33d85951ea4ddad55d2b35598b2709d122c11c75cffd529fbc9965508e \ + --hash=sha256:2b946ef8c04f77230489f75b4b5a4a6f24c078be4aed241cfabe9cbf4156e7e5 \ + --hash=sha256:335f22ccb244da2b5c296e6f96b06ee9bed46526db0de38d2f0e5a6597b81155 \ + --hash=sha256:381eed9c95484ceef5ced626355fdc0765ab51d8553fec08661dce654a935db4 \ + --hash=sha256:429ae404f69dc94b9361bb62291885894b7c6fb4640d561179548c849f8492ba \ + --hash=sha256:44f214394fc1af23ca6d4e9e744804d890045d1643dd7e8229951e0ef39429b5 \ + --hash=sha256:48074261a842acf825af1968cd912f6f21357316080ebaca5f19abbb11690c8a \ + --hash=sha256:4bc1efe0ce3ffb74784e06460f01a223ac1f6ab31c6bc0376a21184bf5aabe3b \ + --hash=sha256:57bfc3cf35a0f2fdf0a88a3044aafaec1d2f24d8ae8cd87c4f58d615fb5b6311 \ + --hash=sha256:597fc66b4162f959ee6a96b978c0435bd63791e31e4f410622d19f1686d5e769 \ + --hash=sha256:5f7a8c46a8b333f71abd61d7ab9255440d4a588f34a21f126bbfc95f6049e686 \ + --hash=sha256:5fe83a9a44c4ce67c796a1b466c270c1272e176603d5e06f6afbc101a572859d \ + --hash=sha256:61443214d9b4c660dcf4b5307f15c12cb30bdfe9588ce6158f4a005baeb167b2 \ + --hash=sha256:622e4a006472b05cf6ef7f9f2636edc51bda670b7bbffa18d26b255269d3d814 \ + --hash=sha256:6eb936d107e4d474940469e8ec5b380c9b329b5f08b78282d46baeebd3692dc9 \ + --hash=sha256:7f58fabdde8dcbe764cef5e1a7fcb440f2463c1bbbec1cf2a86ca7bc1f95184b \ + --hash=sha256:83509f9324011c9a39faaef0922c6f720f9623afe3fe220b6d0b15638247206b \ + --hash=sha256:8c524eb3024edcc04e288db9541fe1f438f82d281e591c548903d5b77ad1ddd4 \ + --hash=sha256:94282f7a354f36ef5dbce0ef3467ebf6a258e370ab33d5b40c249fa996e590dd \ + --hash=sha256:b445c2abfecab89a932b20bd8261488d574591173d07827c1eda32c457358b18 \ + --hash=sha256:be4919b808efa61101456e87f2d4c75b228f4e52618621c77f1ddcaae15904fa \ + --hash=sha256:bfd39a41c0ef6f31684daff53befddae608f9daf6957140228a08e51f312d7e6 \ + --hash=sha256:c631da9710271cb67b08bd3f3813b7af7f4c69c319b75475436fcab8c3d21bee \ + --hash=sha256:cc95ffaaab2be3b25eb938779e43f513e0e538a84dd14a5d844b8f2932593d88 \ + --hash=sha256:d09d930c2d1d621f717bb217bf1fe2584616febb5138d9b3e8cdd26506c3f6d4 \ + --hash=sha256:d40c10326893ecab8a80a53039164a224984339b2c32a6baf55ecbd5b1df6431 \ + --hash=sha256:d41b7a686ce653e06c2609075d397ebd5b969d821b9797d029fccd71fdec8e04 \ + --hash=sha256:d5c0c112a74c0e5db2c75882a0adf3133adedcdbfd8cf7c9d6ed77365ab90a1d \ + --hash=sha256:e1a976ed4cc2d71bb073e1b2a250892a6e968ff02aa14c1f40eba4f365ffec02 \ + --hash=sha256:e48bf27022897577d8479eaed64701ecaf0467182448bd95759883300ca818c8 \ + --hash=sha256:ed4a1a42df8a3dfb6b40c3d2de109e935949f2f66b19703eafade03173f8f437 \ + --hash=sha256:f0aefdd66f1784c58f65b502b6cf8b121544680456d1cebbd300c2c813899274 \ + --hash=sha256:fc2b8c4e1bc5cd96c1a823a885e6b158f8451cf6f5530e1829390b4d27d0807f \ + --hash=sha256:fd946abf3c31fb50eee07451a6aedbfff912fcd13cf357363f5b4e834cc5e71a \ + --hash=sha256:fe58ef6a764de7b4b36edfc8592641f56e69b7163bba9f9c8089838ee596bfb2 + # via astroid typing-extensions==4.7.1 \ --hash=sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36 \ --hash=sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2 # via # astroid + # importlib-metadata + # platformdirs # pylint virtualenv==20.24.2 \ --hash=sha256:43a3052be36080548bdee0b42919c88072037d50d56c28bd3f853cbe92b953ff \ @@ -243,7 +291,7 @@ wrapt==1.15.0 \ yapf==0.40.1 \ --hash=sha256:958587eb5c8ec6c860119a9c25d02addf30a44f75aa152a4220d30e56a98037c \ --hash=sha256:b8bfc1f280949153e795181768ca14ef43d7312629a06c43e7abd279323af313 - # via -r docker/precommit_hooks/requirements.in + # via -r requirements.in zipp==3.15.0 \ --hash=sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b \ --hash=sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556 diff --git a/docker/pytest/requirements.in b/docker/pytest/requirements.in index a8c1c5f61d55..4f5aa3435ea9 100644 --- a/docker/pytest/requirements.in +++ b/docker/pytest/requirements.in @@ -14,4 +14,3 @@ six==1.12.0 atomicwrites==1.4.1 parameterized>=0.9.0 protobuf>4 -certifi diff --git a/docker/pytest/requirements.txt b/docker/pytest/requirements.txt index a24fcf877f81..2d0e4fb49037 100644 --- a/docker/pytest/requirements.txt +++ b/docker/pytest/requirements.txt @@ -1,12 +1,12 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.7 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes docker/pytest/requirements.in +# pip-compile --generate-hashes requirements.in # atomicwrites==1.4.1 \ --hash=sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11 - # via -r docker/pytest/requirements.in + # via -r requirements.in attrs==23.1.0 \ --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ --hash=sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015 @@ -14,9 +14,7 @@ attrs==23.1.0 \ certifi==2023.7.22 \ --hash=sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082 \ --hash=sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9 - # via - # -r docker/pytest/requirements.in - # requests + # via requests charset-normalizer==3.2.0 \ --hash=sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96 \ --hash=sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c \ @@ -145,7 +143,7 @@ coverage==6.5.0 \ --hash=sha256:f4f05d88d9a80ad3cac6244d36dd89a3c00abc16371769f1340101d3cb899fc3 \ --hash=sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84 \ --hash=sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987 - # via -r docker/pytest/requirements.in + # via -r requirements.in exceptiongroup==1.1.3 \ --hash=sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9 \ --hash=sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3 @@ -157,6 +155,14 @@ idna==3.4 \ --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 # via requests +importlib-metadata==6.7.0 \ + --hash=sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4 \ + --hash=sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5 + # via + # attrs + # jsonschema + # pluggy + # pytest importlib-resources==5.12.0 \ --hash=sha256:4be82589bf5c1d7999aedf2a45159d10cb3ca4f19b2271f8792bc8e6da7b22f6 \ --hash=sha256:7b1deeebbf351c7578e09bf2f63fa2ce8b5ffec296e0d349139d43cca061a81a @@ -168,11 +174,11 @@ iniconfig==2.0.0 \ jsonschema==4.17.3 \ --hash=sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d \ --hash=sha256:a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6 - # via -r docker/pytest/requirements.in + # via -r requirements.in junitparser==2.8.0 \ --hash=sha256:a8d4290ab9fb93f2015e0dbef61ef93b7ea110e99099087a453f55c8e1481adf \ --hash=sha256:e1a7d41e0c92ca032c46eed07a6268c478f90ec1f411ea8a76b69f245e57cfb6 - # via -r docker/pytest/requirements.in + # via -r requirements.in packaging==23.1 \ --hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \ --hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f @@ -180,11 +186,11 @@ packaging==23.1 \ parameterized==0.9.0 \ --hash=sha256:4e0758e3d41bea3bbd05ec14fc2c24736723f243b28d702081aef438c9372b1b \ --hash=sha256:7fc905272cefa4f364c1a3429cbbe9c0f98b793988efb5bf90aac80f08db09b1 - # via -r docker/pytest/requirements.in + # via -r requirements.in pexpect==4.8.0 \ --hash=sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937 \ --hash=sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c - # via -r docker/pytest/requirements.in + # via -r requirements.in pkgutil-resolve-name==1.3.10 \ --hash=sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174 \ --hash=sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e @@ -205,7 +211,7 @@ protobuf==4.25.1 \ --hash=sha256:abc0525ae2689a8000837729eef7883b9391cd6aa7950249dcf5a4ede230d5dd \ --hash=sha256:becc576b7e6b553d22cbdf418686ee4daa443d7217999125c045ad56322dda10 \ --hash=sha256:ca37bf6a6d0046272c152eea90d2e4ef34593aaa32e8873fc14c16440f22d4b7 - # via -r docker/pytest/requirements.in + # via -r requirements.in ptyprocess==0.7.0 \ --hash=sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35 \ --hash=sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220 @@ -242,19 +248,25 @@ pyrsistent==0.19.3 \ pytest==7.4.0 \ --hash=sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32 \ --hash=sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a - # via -r docker/pytest/requirements.in + # via -r requirements.in requests==2.31.0 \ --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 - # via -r docker/pytest/requirements.in + # via -r requirements.in six==1.12.0 \ --hash=sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c \ --hash=sha256:d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73 - # via -r docker/pytest/requirements.in + # via -r requirements.in tomli==2.0.1 \ --hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \ --hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f # via pytest +typing-extensions==4.7.1 \ + --hash=sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36 \ + --hash=sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2 + # via + # importlib-metadata + # jsonschema urllib3==2.0.4 \ --hash=sha256:8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11 \ --hash=sha256:de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4 @@ -262,4 +274,6 @@ urllib3==2.0.4 \ zipp==3.15.0 \ --hash=sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b \ --hash=sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556 - # via importlib-resources + # via + # importlib-metadata + # importlib-resources diff --git a/docker/windows/base/build/requirements.in b/docker/windows/base/build/requirements.in index 84e7e3fabd37..b2827998fcf7 100644 --- a/docker/windows/base/build/requirements.in +++ b/docker/windows/base/build/requirements.in @@ -4,5 +4,4 @@ # $ pip3 install pip-tools # $ pip-compile --allow-unsafe --generate-hashes path/to/requirements.in -certifi six diff --git a/docker/windows/base/build/requirements.txt b/docker/windows/base/build/requirements.txt index 900712ca3527..1fc47bb74484 100644 --- a/docker/windows/base/build/requirements.txt +++ b/docker/windows/base/build/requirements.txt @@ -1,14 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: # -# pip-compile --allow-unsafe --generate-hashes docker/windows/base/build/requirements.in +# pip-compile --generate-hashes requirements.in # -certifi==2024.7.4 \ - --hash=sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b \ - --hash=sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90 - # via -r docker/windows/base/build/requirements.in six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 - # via -r docker/windows/base/build/requirements.in + # via -r requirements.in diff --git a/net/cert/internal/trust_store_in_memory_starboard.cc b/net/cert/internal/trust_store_in_memory_starboard.cc index 1bc400f5ce53..0b48d7ad1b30 100644 --- a/net/cert/internal/trust_store_in_memory_starboard.cc +++ b/net/cert/internal/trust_store_in_memory_starboard.cc @@ -118,6 +118,7 @@ std::shared_ptr TrustStoreInMemoryStarboard::TryLoadCer return nullptr; } + SbFileError out_error; char cert_buffer[kCertBufferSize]; base::FilePath cert_path = GetCertificateDirPath().Append(cert_file_name); base::File cert_file(cert_path, base::File::Flags::FLAG_OPEN | base::File::Flags::FLAG_READ); diff --git a/precommit_hooks/requirements.in b/precommit_hooks/requirements.in index 313957d0ba27..8998413d3df5 100644 --- a/precommit_hooks/requirements.in +++ b/precommit_hooks/requirements.in @@ -8,4 +8,3 @@ pre-commit<3 cpplint<2 yapf<1 pylint<3 -certifi diff --git a/precommit_hooks/requirements.txt b/precommit_hooks/requirements.txt index 6a3830819215..94d97cd69758 100644 --- a/precommit_hooks/requirements.txt +++ b/precommit_hooks/requirements.txt @@ -2,16 +2,12 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes precommit_hooks/requirements.in +# pip-compile --allow-unsafe --generate-hashes requirements.in # astroid==2.15.6 \ --hash=sha256:389656ca57b6108f939cf5d2f9a2a825a3be50ba9d589670f393236e0a03b91c \ --hash=sha256:903f024859b7c7687d7a7f3a3f73b17301f8e42dfd9cc9df9d4418172d3e2dbd # via pylint -certifi==2024.7.4 \ - --hash=sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b \ - --hash=sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90 - # via -r precommit_hooks/requirements.in cfgv==3.3.1 \ --hash=sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426 \ --hash=sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736 @@ -19,7 +15,7 @@ cfgv==3.3.1 \ cpplint==1.6.1 \ --hash=sha256:00ddc86d6e4de2a9dcfa272402dcbe21593363a93b7c475bc391e335062f34b1 \ --hash=sha256:d430ce8f67afc1839340e60daa89e90de08b874bc27149833077bba726dfc13a - # via -r precommit_hooks/requirements.in + # via -r requirements.in dill==0.3.7 \ --hash=sha256:76b122c08ef4ce2eedcd4d1abd8e641114bfc6c2867f49f3c41facf65bf19f5e \ --hash=sha256:cc1c8b182eb3013e24bd475ff2e9295af86c1a38eb1aff128dac8962a9ce3c03 @@ -100,11 +96,11 @@ platformdirs==3.10.0 \ pre-commit==2.21.0 \ --hash=sha256:31ef31af7e474a8d8995027fefdfcf509b5c913ff31f2015b4ec4beb26a6f658 \ --hash=sha256:e2f91727039fc39a92f58a588a25b87f936de6567eed4f0e673e0507edc75bad - # via -r precommit_hooks/requirements.in + # via -r requirements.in pylint==2.17.5 \ --hash=sha256:73995fb8216d3bed149c8d51bba25b2c52a8251a2c8ac846ec668ce38fab5413 \ --hash=sha256:f7b601cbc06fef7e62a754e2b41294c2aa31f1cb659624b9a85bcba29eaf8252 - # via -r precommit_hooks/requirements.in + # via -r requirements.in pyyaml==6.0.1 \ --hash=sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc \ --hash=sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741 \ @@ -247,7 +243,7 @@ wrapt==1.15.0 \ yapf==0.40.1 \ --hash=sha256:958587eb5c8ec6c860119a9c25d02addf30a44f75aa152a4220d30e56a98037c \ --hash=sha256:b8bfc1f280949153e795181768ca14ef43d7312629a06c43e7abd279323af313 - # via -r precommit_hooks/requirements.in + # via -r requirements.in zipp==3.15.0 \ --hash=sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b \ --hash=sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556 diff --git a/requirements.txt b/requirements.txt index 5719ebbb21da..ba7f12e0575a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,4 +10,3 @@ Brotli==1.0.9 six<2 pytest-pythonpath<0.8 parameterized>=0.9.0 -certifi diff --git a/starboard/android/shared/BUILD.gn b/starboard/android/shared/BUILD.gn index 5ec6ffbdb79a..d7343f02bb34 100644 --- a/starboard/android/shared/BUILD.gn +++ b/starboard/android/shared/BUILD.gn @@ -348,8 +348,8 @@ static_library("starboard_platform") { "log_internal.h", "log_raw.cc", "main.cc", - "max_media_codec_output_buffers_lookup_table.cc", - "max_media_codec_output_buffers_lookup_table.h", + "max_output_buffers_lookup_table.cc", + "max_output_buffers_lookup_table.h", "media_capabilities_cache.cc", "media_capabilities_cache.h", "media_codec_bridge.cc", diff --git a/starboard/android/shared/max_media_codec_output_buffers_lookup_table.cc b/starboard/android/shared/max_output_buffers_lookup_table.cc similarity index 97% rename from starboard/android/shared/max_media_codec_output_buffers_lookup_table.cc rename to starboard/android/shared/max_output_buffers_lookup_table.cc index e81bf10cdca5..7ed6fb8055a9 100644 --- a/starboard/android/shared/max_media_codec_output_buffers_lookup_table.cc +++ b/starboard/android/shared/max_output_buffers_lookup_table.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "starboard/android/shared/max_media_codec_output_buffers_lookup_table.h" +#include "starboard/android/shared/max_output_buffers_lookup_table.h" #include "starboard/common/log.h" #include "starboard/common/once.h" diff --git a/starboard/android/shared/max_media_codec_output_buffers_lookup_table.h b/starboard/android/shared/max_output_buffers_lookup_table.h similarity index 88% rename from starboard/android/shared/max_media_codec_output_buffers_lookup_table.h rename to starboard/android/shared/max_output_buffers_lookup_table.h index 736bd384fcf2..4dddc5d90f10 100644 --- a/starboard/android/shared/max_media_codec_output_buffers_lookup_table.h +++ b/starboard/android/shared/max_output_buffers_lookup_table.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef STARBOARD_ANDROID_SHARED_MAX_MEDIA_CODEC_OUTPUT_BUFFERS_LOOKUP_TABLE_H_ -#define STARBOARD_ANDROID_SHARED_MAX_MEDIA_CODEC_OUTPUT_BUFFERS_LOOKUP_TABLE_H_ +#ifndef STARBOARD_ANDROID_SHARED_MAX_OUTPUT_BUFFERS_LOOKUP_TABLE_H_ +#define STARBOARD_ANDROID_SHARED_MAX_OUTPUT_BUFFERS_LOOKUP_TABLE_H_ #include #include @@ -72,4 +72,4 @@ class MaxMediaCodecOutputBuffersLookupTable { } // namespace android } // namespace starboard -#endif // STARBOARD_ANDROID_SHARED_MAX_MEDIA_CODEC_OUTPUT_BUFFERS_LOOKUP_TABLE_H_ +#endif // STARBOARD_ANDROID_SHARED_MAX_OUTPUT_BUFFERS_LOOKUP_TABLE_H_ diff --git a/starboard/android/shared/media_is_video_supported.cc b/starboard/android/shared/media_is_video_supported.cc index cee2457b3a66..c6e0462d750b 100644 --- a/starboard/android/shared/media_is_video_supported.cc +++ b/starboard/android/shared/media_is_video_supported.cc @@ -14,7 +14,7 @@ #include "starboard/shared/starboard/media/media_support_internal.h" -#include "starboard/android/shared/max_media_codec_output_buffers_lookup_table.h" +#include "starboard/android/shared/max_output_buffers_lookup_table.h" #include "starboard/android/shared/media_capabilities_cache.h" #include "starboard/android/shared/media_common.h" #include "starboard/configuration.h" diff --git a/starboard/android/shared/video_decoder.h b/starboard/android/shared/video_decoder.h index 8cd7d98a3394..72f941fcc562 100644 --- a/starboard/android/shared/video_decoder.h +++ b/starboard/android/shared/video_decoder.h @@ -21,7 +21,7 @@ #include #include "starboard/android/shared/drm_system.h" -#include "starboard/android/shared/max_media_codec_output_buffers_lookup_table.h" +#include "starboard/android/shared/max_output_buffers_lookup_table.h" #include "starboard/android/shared/media_codec_bridge.h" #include "starboard/android/shared/media_decoder.h" #include "starboard/android/shared/video_frame_tracker.h" diff --git a/starboard/build/config/base_configuration.gni b/starboard/build/config/base_configuration.gni index 35faabc0037a..f0a0f2c28c08 100644 --- a/starboard/build/config/base_configuration.gni +++ b/starboard/build/config/base_configuration.gni @@ -13,6 +13,7 @@ # limitations under the License. import("//starboard/build/config/clang.gni") +import("//starboard/build/config/enable_vr.gni") import("//starboard/content/fonts/font_configuration.gni") # NOTE: diff --git a/starboard/build/config/enable_vr.gni b/starboard/build/config/enable_vr.gni new file mode 100644 index 000000000000..b7f2d81110b1 --- /dev/null +++ b/starboard/build/config/enable_vr.gni @@ -0,0 +1,26 @@ +# Copyright 2022 The Cobalt Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +declare_args() { + # Whether VR is enabled. + enable_vr = getenv("USE_VR") +} + +if (enable_vr == true || enable_vr == "1") { + enable_vr = true +} else if (enable_vr == false || enable_vr == "0" || enable_vr == "") { + enable_vr = false +} else { + assert(false, "enable_vr was set to an invalid value.") +} diff --git a/starboard/configuration.h b/starboard/configuration.h index 078f74deeaef..06accfbee943 100644 --- a/starboard/configuration.h +++ b/starboard/configuration.h @@ -35,7 +35,7 @@ // The minimum API version allowed by this version of the Starboard headers, // inclusive. -#define SB_MINIMUM_API_VERSION 15 +#define SB_MINIMUM_API_VERSION 14 // The maximum API version allowed by this version of the Starboard headers, // inclusive. The API version is not stable and is open for changes. diff --git a/starboard/elf_loader/exported_symbols.cc b/starboard/elf_loader/exported_symbols.cc index 7531c5084b33..48f816a36374 100644 --- a/starboard/elf_loader/exported_symbols.cc +++ b/starboard/elf_loader/exported_symbols.cc @@ -54,7 +54,6 @@ #include "starboard/mutex.h" #include "starboard/player.h" #if SB_API_VERSION >= 16 -#include "starboard/shared/modular/starboard_layer_posix_directory_abi_wrappers.h" #include "starboard/shared/modular/starboard_layer_posix_errno_abi_wrappers.h" #include "starboard/shared/modular/starboard_layer_posix_mmap_abi_wrappers.h" #include "starboard/shared/modular/starboard_layer_posix_pthread_abi_wrappers.h" @@ -481,6 +480,7 @@ ExportedSymbols::ExportedSymbols() { REGISTER_SYMBOL(opendir); REGISTER_SYMBOL(posix_memalign); REGISTER_SYMBOL(read); + REGISTER_SYMBOL(readdir_r); REGISTER_SYMBOL(realloc); REGISTER_SYMBOL(recv); REGISTER_SYMBOL(send); @@ -587,7 +587,6 @@ ExportedSymbols::ExportedSymbols() { map_["pthread_setname_np"] = reinterpret_cast(&__abi_wrap_pthread_setname_np); map_["read"] = reinterpret_cast(&__abi_wrap_read); - map_["readdir_r"] = reinterpret_cast(&__abi_wrap_readdir_r); map_["stat"] = reinterpret_cast(&__abi_wrap_stat); map_["time"] = reinterpret_cast(&__abi_wrap_time); map_["accept"] = reinterpret_cast(&__abi_wrap_accept); diff --git a/starboard/file.h b/starboard/file.h index 697c829d4bc9..ead07597879a 100644 --- a/starboard/file.h +++ b/starboard/file.h @@ -26,8 +26,6 @@ extern "C" { #endif -#if SB_API_VERSION < 17 - // Private structure representing an open file. typedef struct SbFilePrivate SbFilePrivate; @@ -129,6 +127,8 @@ static inline bool SbFileIsValid(SbFile file) { return file != kSbFileInvalid; } +#if SB_API_VERSION < 17 + // DEPRECATED with SB_API_VERSION 16 // // Opens the file at |path|, which must be absolute, creating it if specified by diff --git a/starboard/linux/x64x11/system_get_property_impl.cc b/starboard/linux/x64x11/system_get_property_impl.cc index 9a5f9e3db438..5612b2d7c300 100644 --- a/starboard/linux/x64x11/system_get_property_impl.cc +++ b/starboard/linux/x64x11/system_get_property_impl.cc @@ -44,6 +44,10 @@ const char kModelYear[] = "2025"; const char kModelYear[] = "2024"; #endif // SB_API_VERSION == 15 +#if SB_API_VERSION == 14 +const char kModelYear[] = "2023"; +#endif // SB_API_VERSION == 14 + } // namespace // Omit namespace linux due to symbol name conflict. diff --git a/starboard/nplb/BUILD.gn b/starboard/nplb/BUILD.gn index eac950c60671..e477e8356c83 100644 --- a/starboard/nplb/BUILD.gn +++ b/starboard/nplb/BUILD.gn @@ -152,7 +152,6 @@ target(gtest_target_type, "nplb") { "posix_compliance/posix_string_compare_no_case_test.cc", "posix_compliance/posix_string_format_test.cc", "posix_compliance/posix_string_format_wide_test.cc", - "posix_compliance/posix_string_scan_test.cc", "posix_compliance/posix_thread_attr_test.cc", "posix_compliance/posix_thread_create_test.cc", "posix_compliance/posix_thread_detach_test.cc", diff --git a/starboard/nplb/nplb_evergreen_compat_tests/sabi_test.cc b/starboard/nplb/nplb_evergreen_compat_tests/sabi_test.cc index 51328d9a0005..e048e71615dd 100644 --- a/starboard/nplb/nplb_evergreen_compat_tests/sabi_test.cc +++ b/starboard/nplb/nplb_evergreen_compat_tests/sabi_test.cc @@ -28,6 +28,66 @@ namespace nplb_evergreen_compat_tests { namespace { +#if SB_API_VERSION == 14 +const char* kSabiJsonIdArmHardfp = + "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," + "\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":4," + "\"alignment_pointer\":4,\"alignment_short\":2,\"calling_convention\":" + "\"eabi\",\"endianness\":\"little\",\"floating_point_abi\":\"hard\"," + "\"floating_point_fpu\":\"vfpv3\",\"sb_api_version\":14,\"signedness_of_" + "char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1," + "\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_" + "int\":4,\"size_of_llong\":8,\"size_of_long\":4,\"size_of_pointer\":4," + "\"size_of_short\":2,\"target_arch\":\"arm\",\"target_arch_sub\":\"v7a\"," + "\"word_size\":32}"; + +const char* kSabiJsonIdArmSoftfp = + "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," + "\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":4," + "\"alignment_pointer\":4,\"alignment_short\":2,\"calling_convention\":" + "\"eabi\",\"endianness\":\"little\",\"floating_point_abi\":\"softfp\"," + "\"floating_point_fpu\":\"vfpv3\",\"sb_api_version\":14,\"signedness_of_" + "char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1," + "\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_" + "int\":4,\"size_of_llong\":8,\"size_of_long\":4,\"size_of_pointer\":4," + "\"size_of_short\":2,\"target_arch\":\"arm\",\"target_arch_sub\":\"v7a\"," + "\"word_size\":32}"; + +const char* kSabiJsonIdArm64 = + "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," + "\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8," + "\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":" + "\"aarch64\",\"endianness\":\"little\",\"floating_point_abi\":\"\"," + "\"floating_point_fpu\":\"\",\"sb_api_version\":14,\"signedness_of_char\":" + "\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_" + "double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4," + "\"size_of_llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_" + "short\":2,\"target_arch\":\"arm64\",\"target_arch_sub\":\"v8a\",\"word_" + "size\":64}"; + +const char* kSabiJsonIdX86 = + "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," + "\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":4," + "\"alignment_pointer\":4,\"alignment_short\":2,\"calling_convention\":" + "\"sysv\",\"endianness\":\"little\",\"floating_point_abi\":\"\",\"floating_" + "point_fpu\":\"\",\"sb_api_version\":14,\"signedness_of_char\":\"signed\"," + "\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_double\":8," + "\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,\"size_of_" + "llong\":8,\"size_of_long\":4,\"size_of_pointer\":4,\"size_of_short\":2," + "\"target_arch\":\"x86\",\"target_arch_sub\":\"\",\"word_size\":32}"; + +const char* kSabiJsonIdX64Sysv = + "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," + "\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8," + "\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":" + "\"sysv\",\"endianness\":\"little\",\"floating_point_abi\":\"\",\"floating_" + "point_fpu\":\"\",\"sb_api_version\":14,\"signedness_of_char\":\"signed\"," + "\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_double\":8," + "\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,\"size_of_" + "llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_short\":2," + "\"target_arch\":\"x64\",\"target_arch_sub\":\"\",\"word_size\":64}"; +#endif // SB_API_VERSION == 14 + #if SB_API_VERSION == 15 const char* kSabiJsonIdArmHardfp = "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," @@ -196,8 +256,8 @@ TEST_F(SabiTest, VerifySABI) { SB_LOG(INFO) << "Using SB_API_VERSION=" << SB_API_VERSION; SB_LOG(INFO) << "Using SABI=" << SB_SABI_JSON_ID; - ASSERT_LE(SB_API_VERSION, SB_MAXIMUM_API_VERSION) - << "Evergreen should use SB_API_VERSION <= SB_MAXIMUM_API_VERSION"; + ASSERT_LT(SB_API_VERSION, SB_MAXIMUM_API_VERSION) + << "Evergreen should use SB_API_VERSION < SB_MAXIMUM_API_VERSION"; std::set sabi_set; sabi_set.insert(kSabiJsonIdArmHardfp); diff --git a/starboard/nplb/posix_compliance/posix_directory_open_test.cc b/starboard/nplb/posix_compliance/posix_directory_open_test.cc index d979dbcb4a06..eba5e7918027 100644 --- a/starboard/nplb/posix_compliance/posix_directory_open_test.cc +++ b/starboard/nplb/posix_compliance/posix_directory_open_test.cc @@ -94,6 +94,7 @@ TEST(PosixDirectoryOpenTest, FailsInvalidPath) { struct stat info; ASSERT_FALSE(stat(path.c_str(), &info) == 0); + SbFileError error = kSbFileErrorMax; DIR* directory = opendir(path.c_str()); EXPECT_FALSE(directory != NULL); if (directory != NULL) { diff --git a/starboard/nplb/posix_compliance/posix_string_scan_test.cc b/starboard/nplb/posix_compliance/posix_string_scan_test.cc deleted file mode 100644 index 419d65c3aaf6..000000000000 --- a/starboard/nplb/posix_compliance/posix_string_scan_test.cc +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2024 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Here we are not trying to do anything fancy, just to really sanity check that -// this is hooked up to something. - -#include "starboard/common/string.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace starboard { -namespace nplb { -namespace { - -const char kIpGood[] = "192.168.1.2"; -const char kIpBad1[] = "192.1x8.1.2"; -const char kIpBad2[] = "192.1x8"; -const char kIpBad3[] = "x.1.2.3"; -const char kIpBad4[] = "192.168.1.2."; -const char kIpFormat[] = "%u.%u.%u.%u"; - -const char kFloatString[] = "3.14159"; -const char kFloatPattern[] = "%f"; -const char kDoublePattern[] = "%lf"; -const float kExpectedFloat = 3.14159f; -const double kExpectedDouble = 3.14159; - -TEST(PosixStringScanTest, SunnyDayIp1) { - unsigned int in[4] = {0}; - EXPECT_EQ(4, sscanf(kIpGood, kIpFormat, in, in + 1, in + 2, in + 3)); - EXPECT_EQ(192, in[0]); - EXPECT_EQ(168, in[1]); - EXPECT_EQ(1, in[2]); - EXPECT_EQ(2, in[3]); -} - -TEST(PosixStringScanTest, SunnyDayIp2) { - unsigned int in[4] = {0}; - EXPECT_EQ(4, sscanf(kIpBad4, kIpFormat, in, in + 1, in + 2, in + 3)); - EXPECT_EQ(192, in[0]); - EXPECT_EQ(168, in[1]); - EXPECT_EQ(1, in[2]); - EXPECT_EQ(2, in[3]); -} - -TEST(PosixStringScanTest, SunnyDayFloat) { - float f = 0.0f; - EXPECT_EQ(1, sscanf(kFloatString, kFloatPattern, &f)); - EXPECT_EQ(kExpectedFloat, f); - - double d = 0.0; - EXPECT_EQ(1, sscanf(kFloatString, kDoublePattern, &d)); - EXPECT_EQ(kExpectedDouble, d); -} - -TEST(PosixStringScanTest, RainyDayIp1) { - unsigned int in[4] = {0}; - EXPECT_EQ(2, sscanf(kIpBad1, kIpFormat, in, in + 1, in + 2, in + 3)); - EXPECT_EQ(192, in[0]); - EXPECT_EQ(1, in[1]); - EXPECT_EQ(0, in[2]); - EXPECT_EQ(0, in[3]); -} - -TEST(PosixStringScanTest, RainyDayIp2) { - unsigned int in[4] = {0}; - EXPECT_EQ(2, sscanf(kIpBad2, kIpFormat, in, in + 1, in + 2, in + 3)); - EXPECT_EQ(192, in[0]); - EXPECT_EQ(1, in[1]); - EXPECT_EQ(0, in[2]); - EXPECT_EQ(0, in[3]); -} - -TEST(PosixStringScanTest, RainyDayIp3) { - unsigned int in[4] = {0}; - EXPECT_EQ(0, sscanf(kIpBad3, kIpFormat, in, in + 1, in + 2, in + 3)); - EXPECT_EQ(0, in[0]); - EXPECT_EQ(0, in[1]); - EXPECT_EQ(0, in[2]); - EXPECT_EQ(0, in[3]); -} - -} // namespace -} // namespace nplb -} // namespace starboard diff --git a/starboard/shared/starboard/media/BUILD.gn b/starboard/shared/starboard/media/BUILD.gn index 480d46052e1f..20cb3bf8ddee 100644 --- a/starboard/shared/starboard/media/BUILD.gn +++ b/starboard/shared/starboard/media/BUILD.gn @@ -21,7 +21,6 @@ static_library("media_util") { "//starboard/shared/starboard/media/codec_util.h", "//starboard/shared/starboard/media/key_system_supportability_cache.cc", "//starboard/shared/starboard/media/key_system_supportability_cache.h", - "//starboard/shared/starboard/media/media_support_internal.h", "//starboard/shared/starboard/media/media_util.cc", "//starboard/shared/starboard/media/media_util.h", "//starboard/shared/starboard/media/mime_supportability_cache.cc", diff --git a/starboard/shared/uwp/system_get_device_type.cc b/starboard/shared/uwp/system_get_device_type.cc deleted file mode 100644 index e1b941b08e16..000000000000 --- a/starboard/shared/uwp/system_get_device_type.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2017 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "starboard/system.h" - -#include - -#include "starboard/common/log.h" -#include "starboard/shared/win32/wchar_utils.h" - -using Windows::System::Profile::AnalyticsInfo; -using Windows::System::Profile::AnalyticsVersionInfo; - -#if SB_API_VERSION < 15 - -SbSystemDeviceType SbSystemGetDeviceType() { - AnalyticsVersionInfo ^ version_info = AnalyticsInfo::VersionInfo; - std::string family = starboard::shared::win32::platformStringToString( - version_info->DeviceFamily); - - if (family.compare("Windows.Desktop") == 0) { - return kSbSystemDeviceTypeDesktopPC; - } - if (family.compare("Windows.Xbox") == 0) { - return kSbSystemDeviceTypeGameConsole; - } - SB_NOTREACHED(); - return kSbSystemDeviceTypeUnknown; -} - -#endif diff --git a/starboard/shared/win32/system_get_device_type.cc b/starboard/shared/win32/system_get_device_type.cc deleted file mode 100644 index 5e5a4647c717..000000000000 --- a/starboard/shared/win32/system_get_device_type.cc +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2017 The Cobalt Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "starboard/system.h" - -#include - -#include "starboard/common/log.h" -#include "starboard/shared/win32/wchar_utils.h" - -#if SB_API_VERSION < 15 - -SbSystemDeviceType SbSystemGetDeviceType() { - return kSbSystemDeviceTypeDesktopPC; -} - -#endif diff --git a/starboard/stub/BUILD.gn b/starboard/stub/BUILD.gn index abfc82733012..6047f2b94508 100644 --- a/starboard/stub/BUILD.gn +++ b/starboard/stub/BUILD.gn @@ -79,8 +79,11 @@ static_library("stub_sources") { "//starboard/shared/stub/media_get_max_buffer_capacity.cc", "//starboard/shared/stub/media_get_progressive_buffer_budget.cc", "//starboard/shared/stub/media_get_video_buffer_budget.cc", + "//starboard/shared/stub/media_is_audio_supported.cc", "//starboard/shared/stub/media_is_buffer_pool_allocate_on_demand.cc", "//starboard/shared/stub/media_is_buffer_using_memory_pool.cc", + "//starboard/shared/stub/media_is_supported.cc", + "//starboard/shared/stub/media_is_video_supported.cc", "//starboard/shared/stub/memory_allocate_aligned_unchecked.cc", "//starboard/shared/stub/memory_allocate_unchecked.cc", "//starboard/shared/stub/memory_free.cc", diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn index dc4c34a43df5..84dec32885e0 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn @@ -49,7 +49,6 @@ config("internal_config") { "OPENSSL_SMALL", ] if (is_starboard) { - defines -= [ "OPENSSL_SMALL" ] defines += [ "NO_SYS_PARAM_H", "NO_SYS_UN_H", @@ -322,17 +321,6 @@ if (!use_cobalt_customizations) { } } -if (is_starboard) { - target(final_executable_type, "boringssl_tool") { - testonly = true - sources = tool_sources - deps = [ - ":boringssl", - "//starboard:starboard_group", - ] - } -} - if (build_with_chromium) { # These targets are named "_tests" rather than "_test" to avoid colliding with # a historical "boringssl_ssl_test" target. This works around a bug with the diff --git a/third_party/boringssl/src/tool/tool.cc b/third_party/boringssl/src/tool/tool.cc index ad9c6daf5017..80f3cd8316ca 100644 --- a/third_party/boringssl/src/tool/tool.cc +++ b/third_party/boringssl/src/tool/tool.cc @@ -121,8 +121,6 @@ int main(int argc, char **argv) { perror("_setmode(_fileno(stderr), O_BINARY)"); return 1; } -#elif defined(STARBOARD) - // We don't have signal() .. #else signal(SIGPIPE, SIG_IGN); #endif diff --git a/third_party/devtools/BUILD.gn b/third_party/devtools/BUILD.gn index 313159919f96..e11ca6ee943d 100644 --- a/third_party/devtools/BUILD.gn +++ b/third_party/devtools/BUILD.gn @@ -24,6 +24,7 @@ all_devtools_files = [ "front_end/audits_worker.js", "front_end/audits_worker.json", "front_end/audits_worker/AuditsService.js", + "front_end/audits_worker/lighthouse/lighthouse-dt-bundle.js", "front_end/audits_worker/module.json", "front_end/audits/auditsDialog.css", "front_end/audits/auditsStartView.css", diff --git a/third_party/devtools/front_end/audits_worker/lighthouse/lighthouse-dt-bundle.js b/third_party/devtools/front_end/audits_worker/lighthouse/lighthouse-dt-bundle.js new file mode 100644 index 000000000000..ca529b90b82e --- /dev/null +++ b/third_party/devtools/front_end/audits_worker/lighthouse/lighthouse-dt-bundle.js @@ -0,0 +1,71336 @@ +// lighthouse, browserified. 5.7.0 (005c2e6f48e7cc4bfefaa4b0551122edbe04a993) +require=function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a;}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r);},p,p.exports,r,e,n,t);}return n[i].exports;}for(var u="function"==typeof require&&require,i=0;i` elements contain a `` element with `[kind="captions"]`', + +failureTitle:'`