Import Cobalt 21.master.0.260628
diff --git a/src/starboard/raspi/2/gyp_configuration.gypi b/src/starboard/raspi/2/gyp_configuration.gypi
index a5617d4..86a20c1 100644
--- a/src/starboard/raspi/2/gyp_configuration.gypi
+++ b/src/starboard/raspi/2/gyp_configuration.gypi
@@ -13,6 +13,12 @@
# limitations under the License.
{
+ 'variables': {
+ 'variables': {
+ 'sb_evergreen_compatible': 1,
+ },
+ },
+
'target_defaults': {
'default_configuration': 'raspi-2_debug',
'configurations': {
diff --git a/src/starboard/raspi/2/mozjs/atomic_public.h b/src/starboard/raspi/2/mozjs/atomic_public.h
deleted file mode 100644
index 5ad1ce6..0000000
--- a/src/starboard/raspi/2/mozjs/atomic_public.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2018 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.
-
-#ifndef STARBOARD_RASPI_2_MOZJS_ATOMIC_PUBLIC_H_
-#define STARBOARD_RASPI_2_MOZJS_ATOMIC_PUBLIC_H_
-
-#include "starboard/raspi/2/atomic_public.h"
-
-#endif // STARBOARD_RASPI_2_MOZJS_ATOMIC_PUBLIC_H_
diff --git a/src/starboard/raspi/2/mozjs/configuration_public.h b/src/starboard/raspi/2/mozjs/configuration_public.h
deleted file mode 100644
index 3b4427e..0000000
--- a/src/starboard/raspi/2/mozjs/configuration_public.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2018 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.
-
-// The Starboard configuration for Raspberry PI 2 Raspbian.
-
-// Other source files should never include this header directly, but should
-// include the generic "starboard/configuration.h" instead.
-
-#ifndef STARBOARD_RASPI_2_MOZJS_CONFIGURATION_PUBLIC_H_
-#define STARBOARD_RASPI_2_MOZJS_CONFIGURATION_PUBLIC_H_
-
-#include "starboard/raspi/2/configuration_public.h"
-
-#endif // STARBOARD_RASPI_2_MOZJS_CONFIGURATION_PUBLIC_H_
diff --git a/src/starboard/raspi/2/mozjs/gyp_configuration.gypi b/src/starboard/raspi/2/mozjs/gyp_configuration.gypi
deleted file mode 100644
index 4cc3212..0000000
--- a/src/starboard/raspi/2/mozjs/gyp_configuration.gypi
+++ /dev/null
@@ -1,39 +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.
-
-{
- 'target_defaults': {
- 'default_configuration': 'raspi-2-mozjs_debug',
- 'configurations': {
- 'raspi-2-mozjs_debug': {
- 'inherit_from': ['debug_base'],
- },
- 'raspi-2-mozjs_devel': {
- 'inherit_from': ['devel_base'],
- },
- 'raspi-2-mozjs_qa': {
- 'inherit_from': ['qa_base'],
- },
- 'raspi-2-mozjs_gold': {
- 'inherit_from': ['gold_base'],
- },
- }, # end of configurations
- },
-
- 'includes': [
- '../architecture.gypi',
- '../../shared/gyp_configuration.gypi',
- '<(DEPTH)/starboard/sabi/sabi.gypi',
- ],
-}
diff --git a/src/starboard/raspi/2/mozjs/gyp_configuration.py b/src/starboard/raspi/2/mozjs/gyp_configuration.py
deleted file mode 100644
index decc64f..0000000
--- a/src/starboard/raspi/2/mozjs/gyp_configuration.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2018 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.
-"""Starboard Raspberry Pi 2 platform configuration for gyp_cobalt."""
-
-import importlib
-
-# pylint: disable=invalid-name
-Raspi2PlatformConfig = importlib.import_module(
- 'starboard.raspi.2.gyp_configuration').Raspi2PlatformConfig
-
-
-class Raspi2MozjsPlatformConfig(Raspi2PlatformConfig):
-
- def __init__(self, platform, sabi_json_path=None):
- super(Raspi2MozjsPlatformConfig, self).__init__(
- platform, sabi_json_path=sabi_json_path)
-
- def GetVariables(self, config_name):
- variables = super(Raspi2MozjsPlatformConfig, self).GetVariables(config_name)
- variables.update({
- 'javascript_engine': 'mozjs-45',
- 'cobalt_enable_jit': 0,
- })
- return variables
-
-
-def CreatePlatformConfig():
- return Raspi2MozjsPlatformConfig(
- 'raspi-2-mozjs', sabi_json_path='starboard/sabi/arm/hardfp/sabi.json')
diff --git a/src/starboard/raspi/2/mozjs/starboard_platform.gyp b/src/starboard/raspi/2/mozjs/starboard_platform.gyp
deleted file mode 100644
index 53d18eb..0000000
--- a/src/starboard/raspi/2/mozjs/starboard_platform.gyp
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 2018 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.
-{
- 'includes': [
- '../../shared/starboard_platform.gypi',
- ],
-}
diff --git a/src/starboard/raspi/2/mozjs/thread_types_public.h b/src/starboard/raspi/2/mozjs/thread_types_public.h
deleted file mode 100644
index 96c08d1..0000000
--- a/src/starboard/raspi/2/mozjs/thread_types_public.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2018 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.
-
-#ifndef STARBOARD_RASPI_2_MOZJS_THREAD_TYPES_PUBLIC_H_
-#define STARBOARD_RASPI_2_MOZJS_THREAD_TYPES_PUBLIC_H_
-
-#include "starboard/raspi/2/thread_types_public.h"
-
-#endif // STARBOARD_RASPI_2_MOZJS_THREAD_TYPES_PUBLIC_H_
diff --git a/src/starboard/raspi/2/skia/configuration.cc b/src/starboard/raspi/2/skia/configuration.cc
new file mode 100644
index 0000000..0ffdf45
--- /dev/null
+++ b/src/starboard/raspi/2/skia/configuration.cc
@@ -0,0 +1,73 @@
+// Copyright 2020 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/raspi/2/skia/configuration.h"
+
+#include "cobalt/extension/configuration.h"
+#include "starboard/common/configuration_defaults.h"
+
+namespace starboard {
+namespace raspi {
+namespace skia {
+
+namespace {
+
+int CobaltSkiaGlyphAtlasWidth() {
+ return 2048;
+}
+
+int CobaltSkiaGlyphAtlasHeight() {
+ return 2048;
+}
+
+const char* CobaltRasterizerType() {
+ return "hardware";
+}
+
+const CobaltExtensionConfigurationApi kConfigurationApi = {
+ kCobaltExtensionConfigurationName,
+ 1,
+ &common::CobaltUserOnExitStrategyDefault,
+ &common::CobaltRenderDirtyRegionOnlyDefault,
+ &common::CobaltEglSwapIntervalDefault,
+ &common::CobaltFallbackSplashScreenUrlDefault,
+ &common::CobaltEnableQuicDefault,
+ &common::CobaltSkiaCacheSizeInBytesDefault,
+ &common::CobaltOffscreenTargetCacheSizeInBytesDefault,
+ &common::CobaltEncodedImageCacheSizeInBytesDefault,
+ &common::CobaltImageCacheSizeInBytesDefault,
+ &common::CobaltLocalTypefaceCacheSizeInBytesDefault,
+ &common::CobaltRemoteTypefaceCacheSizeInBytesDefault,
+ &common::CobaltMeshCacheSizeInBytesDefault,
+ &common::CobaltSoftwareSurfaceCacheSizeInBytesDefault,
+ &common::CobaltImageCacheCapacityMultiplierWhenPlayingVideoDefault,
+ &CobaltSkiaGlyphAtlasWidth,
+ &CobaltSkiaGlyphAtlasHeight,
+ &common::CobaltJsGarbageCollectionThresholdInBytesDefault,
+ &common::CobaltReduceCpuMemoryByDefault,
+ &common::CobaltReduceGpuMemoryByDefault,
+ &common::CobaltGcZealDefault,
+ &CobaltRasterizerType,
+ &common::CobaltEnableJitDefault,
+};
+
+} // namespace
+
+const void* GetConfigurationApi() {
+ return &kConfigurationApi;
+}
+
+} // namespace skia
+} // namespace raspi
+} // namespace starboard
diff --git a/src/starboard/raspi/2/skia/configuration.h b/src/starboard/raspi/2/skia/configuration.h
new file mode 100644
index 0000000..4ce8394
--- /dev/null
+++ b/src/starboard/raspi/2/skia/configuration.h
@@ -0,0 +1,28 @@
+// Copyright 2020 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.
+
+#ifndef STARBOARD_RASPI_2_SKIA_CONFIGURATION_H_
+#define STARBOARD_RASPI_2_SKIA_CONFIGURATION_H_
+
+namespace starboard {
+namespace raspi {
+namespace skia {
+
+const void* GetConfigurationApi();
+
+} // namespace skia
+} // namespace raspi
+} // namespace starboard
+
+#endif // STARBOARD_RASPI_2_SKIA_CONFIGURATION_H_
diff --git a/src/starboard/raspi/2/skia/starboard_platform.gyp b/src/starboard/raspi/2/skia/starboard_platform.gyp
index 1a1111d..8057cd1 100644
--- a/src/starboard/raspi/2/skia/starboard_platform.gyp
+++ b/src/starboard/raspi/2/skia/starboard_platform.gyp
@@ -15,4 +15,16 @@
'includes': [
'../../shared/starboard_platform.gypi',
],
+ 'target_defaults': {
+ 'sources': [
+ '<(DEPTH)/starboard/raspi/2/skia/configuration.cc',
+ '<(DEPTH)/starboard/raspi/2/skia/configuration.h',
+ '<(DEPTH)/starboard/raspi/2/skia/system_get_extensions.cc',
+ ],
+ 'sources!': [
+ '<(DEPTH)/starboard/raspi/shared/configuration.cc',
+ '<(DEPTH)/starboard/raspi/shared/configuration.h',
+ '<(DEPTH)/starboard/raspi/shared/system_get_extensions.cc',
+ ],
+ },
}
diff --git a/src/starboard/raspi/2/skia/system_get_extensions.cc b/src/starboard/raspi/2/skia/system_get_extensions.cc
new file mode 100644
index 0000000..01e50ba
--- /dev/null
+++ b/src/starboard/raspi/2/skia/system_get_extensions.cc
@@ -0,0 +1,26 @@
+// Copyright 2020 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 "cobalt/extension/configuration.h"
+#include "starboard/common/string.h"
+#include "starboard/raspi/2/skia/configuration.h"
+
+const void* SbSystemGetExtension(const char* name) {
+ if (SbStringCompareAll(name, kCobaltExtensionConfigurationName) == 0) {
+ return starboard::raspi::skia::GetConfigurationApi();
+ }
+ return NULL;
+}