Drawable PR2 - Renderer Integration (#1459)

This commit is contained in:
mwilsnd
2023-08-09 11:54:37 -04:00
committed by Bart Louwers
parent 054ededf4a
commit c5915954e0
12 changed files with 26 additions and 32 deletions

View File

@@ -56,4 +56,4 @@ load(
provisioning_profile_repository(
name = "local_provisioning_profiles"
)
)

View File

@@ -437,4 +437,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mbgl

View File

@@ -56,7 +56,7 @@ objc_library(
hdrs = [
"//platform/darwin:include/mbgl/util/image+MLNAdditions.hpp",
],
copts = WARNING_FLAGS + MAPLIBRE_FLAGS + [
copts = WARNING_FLAGS["ios"] + MAPLIBRE_FLAGS + [
"-fmodules",
"-Wno-gnu-zero-variadic-macro-arguments",
"-Wno-variadic-macros",

View File

@@ -20,4 +20,4 @@
-dontwarn org.conscrypt.*
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE
-dontwarn org.openjsse.net.ssl.OpenJSSE

View File

@@ -135,7 +135,7 @@ objc_library(
],
allow_empty = False,
),
copts = MAPLIBRE_FLAGS + WARNING_FLAGS,
copts = MAPLIBRE_FLAGS + WARNING_FLAGS["ios"],
data = glob(
[
"test/Media.xcassets/**",
@@ -166,7 +166,7 @@ objc_library(
"test/MLNOfflineStorageTests.mm",
],
),
copts = CPP_FLAGS + MAPLIBRE_FLAGS + WARNING_FLAGS + ["-Wno-deprecated-declarations"],
copts = CPP_FLAGS + MAPLIBRE_FLAGS + WARNING_FLAGS["ios"] + ["-Wno-deprecated-declarations"],
visibility = [
"//platform/ios/test:__pkg__",
],

View File

@@ -53,9 +53,9 @@ if [ ! -d platform/ios/build ]; then
mkdir platform/ios/build
fi
cp platform/ios/platform/ios/framework/Info-static.plist "$temp_info_static_plist"
cp platform/ios/platform/ios/framework/Info.plist "$temp_info_plist"
cp platform/ios/platform/ios/app/Info.plist "$temp_app_info_plist"
cp platform/ios/framework/Info-static.plist "$temp_info_static_plist"
cp platform/ios/framework/Info.plist "$temp_info_plist"
cp platform/ios/app/Info.plist "$temp_app_info_plist"
# Replace semver and hash
plutil -replace MLNSemanticVersionString -string "$sem_version" "$temp_info_static_plist"

View File

@@ -2,8 +2,6 @@
set -eo pipefail
pushd ../../../../../
# "static" or "dynamic"
build_type="static"
@@ -19,9 +17,6 @@ hash=$(git log | head -1 | awk '{ print $2 }' | cut -c 1-10) && true
args=("--sem-ver" "$sem_version" "--hash" "$hash")
# Provisioning profile name/UUID
uuid="iOS Team Provisioning Profile: *"
while [[ $# -gt 0 ]]; do
case $1 in
--static)
@@ -85,7 +80,7 @@ if [ ! -d platform/ios/build ]; then
mkdir platform/ios/build
fi
bash "platform/ios/platform/ios/scripts/bazel-generate-plists.sh" "${args[@]}"
bash "platform/ios/scripts/bazel-generate-plists.sh" "${args[@]}"
echo "------ Building Maplibre version: $sem_version hash: $hash ------"

View File

@@ -45,7 +45,7 @@ while [[ $# -gt 0 ]]; do
esac
done
bash "platform/ios/platform/ios/scripts/bazel-generate-plists.sh" "${args[@]}"
bash "platform/ios/scripts/bazel-generate-plists.sh" "${args[@]}"
echo "------ Building Maplibre version: $sem_version hash: $hash ------"
@@ -53,5 +53,3 @@ echo "------ Building Maplibre version: $sem_version hash: $hash ------"
# Example invocation: ./bazel-xcodeproj.sh flavor split teamid 1234567890
# Find your team ID inside a .mobileprovision file or in your keychain (Apple development: your@email -> Get Info -> Organizational Unit)
bazel run //platform/ios:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=$flavor --//:maplibre_platform=ios"
popd

View File

@@ -16,14 +16,15 @@ public:
using UniqueVertexBufferResource = std::unique_ptr<VertexBufferResource>;
// This class has a template argument that we use to specify the vertex type. It is not used by
// the implementation, but serves type checking purposes during build time.
// This class has a template argument that we use to specify the vertex type. It
// is not used by the implementation, but serves type checking purposes during
// build time.
template <class>
class VertexBuffer {
public:
VertexBuffer(const std::size_t elements_, UniqueVertexBufferResource&& resource_)
: elements(elements_), resource(std::move(resource_)) {
}
: elements(elements_),
resource(std::move(resource_)) {}
std::size_t elements;

View File

@@ -57,11 +57,9 @@ using UniqueVertexArrayState = std::unique_ptr<VertexArrayState, VertexArrayStat
class VertexArray {
public:
VertexArray(UniqueVertexArrayState state_)
: state(std::move(state_)) {
}
: state(std::move(state_)) {}
VertexArray(VertexArray&& other)
: state(std::move(other.state)) {
}
: state(std::move(other.state)) {}
void bind(Context&, const gfx::IndexBuffer&, const AttributeBindingArray&);

View File

@@ -931,9 +931,13 @@ void RenderOrchestrator::observeRenderTargets(std::function<void(const RenderTar
}
#endif // MLN_DRAWABLE_RENDERER
void RenderOrchestrator::onGlyphsError(const FontStack& fontStack, const GlyphRange& glyphRange, std::exception_ptr error) {
Log::Error(Event::Style, "Failed to load glyph range " + std::to_string(glyphRange.first) + "-" + std::to_string(glyphRange.second) +
" for font stack " + fontStackToString(fontStack) + ": " + util::toString(error));
void RenderOrchestrator::onGlyphsError(const FontStack& fontStack,
const GlyphRange& glyphRange,
std::exception_ptr error) {
Log::Error(Event::Style,
"Failed to load glyph range " + std::to_string(glyphRange.first) + "-" +
std::to_string(glyphRange.second) + " for font stack " + fontStackToString(fontStack) + ": " +
util::toString(error));
observer->onResourceError(error);
}

View File

@@ -53,9 +53,7 @@ class LayerProperties;
using ImmutableLayer = Immutable<style::Layer::Impl>;
class RenderOrchestrator final : public GlyphManagerObserver,
public ImageManagerObserver,
public RenderSourceObserver {
class RenderOrchestrator final : public GlyphManagerObserver, public ImageManagerObserver, public RenderSourceObserver {
public:
RenderOrchestrator(bool backgroundLayerAsColor_, const std::optional<std::string>& localFontFamily_);
~RenderOrchestrator() override;