Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
d8297e9
vibe-slopped spike
sargunv May 30, 2026
398422a
fix request configuration crash, demo map now works
sargunv May 30, 2026
34272c9
compress research / status doc for readability
sargunv May 30, 2026
967a32f
Continue HarmonyOS sample bring-up
sargunv May 30, 2026
d12f80c
Add OHOS hilog backend
sargunv May 30, 2026
d20be2e
Add HarmonyOS Vulkan window backend
sargunv May 30, 2026
d854d71
Fix HarmonyOS RCP request lifetimes
sargunv May 31, 2026
4e1edd1
Fix HarmonyOS map density scaling
sargunv May 31, 2026
3b01760
Use display refresh rate in HarmonyOS sample
sargunv May 31, 2026
a6d92cf
Add HarmonyOS shove pitch gesture
sargunv May 31, 2026
1277847
Improve HarmonyOS camera interactions
sargunv May 31, 2026
af29f8d
Remove local HarmonyOS sample style
sargunv May 31, 2026
7ed461b
Render HarmonyOS gestures from frame callbacks
sargunv May 31, 2026
4bd71f0
Expose HarmonyOS frame timing telemetry
sargunv May 31, 2026
15cf5d2
Tune HarmonyOS fling gestures
sargunv May 31, 2026
d5257fa
Set Bright as HarmonyOS sample default
sargunv May 31, 2026
af6dca1
Render HarmonyOS sample attribution overlay
sargunv May 31, 2026
45ed867
Update HarmonyOS research status
sargunv May 31, 2026
e53fd51
Enable Vulkan surface transforms on OHOS
sargunv May 31, 2026
95426f7
Prepare OHOS docs for review
sargunv May 31, 2026
544ee3a
deslop pass 1
sargunv May 31, 2026
37243b5
Update Vulkan debug callbacks for Vulkan-Hpp
sargunv May 31, 2026
36c56a8
Add HarmonyOS sample renderer products
sargunv May 31, 2026
92796f9
Update HarmonyOS sample app icon
sargunv May 31, 2026
7a84bfc
Use shared HarmonyOS sample icon resource
sargunv May 31, 2026
53bc2cd
Add local HarmonyOS signing override
sargunv May 31, 2026
0157bc5
Add HarmonyOS sample clang config
sargunv May 31, 2026
9106975
Add HarmonyOS sample signing generator
sargunv May 31, 2026
b75d610
Trim HarmonyOS platform README
sargunv May 31, 2026
2bc87cc
deslop round 2
sargunv May 31, 2026
8a9a9cf
Clean up HarmonyOS sample nits
sargunv May 31, 2026
4fdbee2
Move HarmonyOS MapView into sample
sargunv May 31, 2026
973e059
Update HarmonyOS research notes
sargunv May 31, 2026
74ba323
Centralize OHOS compiler workarounds
sargunv May 31, 2026
e4e6f4c
mini deslop
sargunv May 31, 2026
12fa189
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 31, 2026
a8d14e3
Fix Bazel source location header
sargunv May 31, 2026
58c0a30
Document OHOS CI setup direction
sargunv May 31, 2026
73f9b7a
CI research
sargunv May 31, 2026
bbddabe
Move OHOS window bridge into sample
sargunv May 31, 2026
9173b3e
Remove HarmonyOS research notes
sargunv May 31, 2026
935b898
better fix for emulator opengl
sargunv May 31, 2026
bda82fe
Merge branch 'main' into ohos-research
sargunv May 31, 2026
d09e9ee
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 31, 2026
ab83e69
Document OHOS RCP error code source
sargunv May 31, 2026
dda1f12
tweak readme
sargunv May 31, 2026
a6dd749
Fix end-of-file-fixer exclusions
sargunv May 31, 2026
5edcd7b
fix pre-commit churn
sargunv May 31, 2026
a72fafe
fix clang-tidy failure
sargunv May 31, 2026
fcbbd00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 31, 2026
8efb8b0
core: Update Vulkan headers
sargunv May 31, 2026
5908c8b
core: Add source location fallback
sargunv May 31, 2026
fa802ce
core: Tolerate stencil clipping setup failures
sargunv May 31, 2026
b2c72c0
ohos: Require OpenGL ES 3 for EGL backend
sargunv Jun 1, 2026
3cebd79
fix codex comment
sargunv Jun 1, 2026
d8a1ebd
Merge branch 'split/gl-stencil-fallback' into ohos-research
sargunv Jun 1, 2026
0198f8d
Merge branch 'split/source-location' into ohos-research
sargunv Jun 1, 2026
d0f963e
Merge branch 'split/vulkan-headers' into ohos-research
sargunv Jun 1, 2026
b9bbe76
core: Enable Vulkan surface transforms by capability
sargunv Jun 1, 2026
552a813
Merge branch 'split/vulkan-surface-transform' into ohos-research
sargunv Jun 1, 2026
8bd53a4
ohos: use OpenHarmony HTTP file source
sargunv Jun 1, 2026
577f66e
try adding CI
sargunv Jun 1, 2026
967c55e
Rename source location helper
sargunv Jun 1, 2026
b0b28fd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 1, 2026
47f4cda
core: Refine stencil clipping fallback
sargunv Jun 1, 2026
29d2e5e
core: Tighten stencil fallback invariants
sargunv Jun 1, 2026
6b09a13
const cleanup
sargunv Jun 1, 2026
a338fed
Merge remote-tracking branch 'upstream/main' into ohos-research
sargunv Jun 1, 2026
7f3e396
Merge remote-tracking branch 'origin/split/gl-stencil-fallback' into …
sargunv Jun 1, 2026
aa4bb35
Merge remote-tracking branch 'origin/split/source-location' into ohos…
sargunv Jun 1, 2026
264dc5a
Merge remote-tracking branch 'upstream/main' into ohos-research
sargunv Jun 13, 2026
218a7d4
Refactor OHOS sample XComponent ownership
sargunv Jun 13, 2026
47d7ad0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 13, 2026
b692463
Fix OHOS image stride and GL teardown
sargunv Jun 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ bazel-out
bazel-bin
bazel-testlogs
.cache
.pixi
.idea
.vscode
.cxx
Expand Down
120 changes: 120 additions & 0 deletions .github/workflows/ohos-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: ohos-ci

on:
workflow_dispatch:
push:
branches:
- main
- ohos-*.*.x
paths:
- CMakeLists.txt
- CMakePresets.json
- "platform/default/**"
- "platform/linux/**"
- "platform/ohos/**"
- ".github/workflows/ohos-ci.yml"
- "bin/**"
- "expression-test/**"
- "include/**"
- "metrics/**"
- "render-test/**"
- "scripts/**"
- "src/**"
- "test/**"
- "vendor/**"
- ".gitmodules"
- "!**/*.md"

pull_request:
branches:
- "*"
paths:
- CMakeLists.txt
- CMakePresets.json
- "platform/default/**"
- "platform/linux/**"
- "platform/ohos/**"
- ".github/workflows/ohos-ci.yml"
- "bin/**"
- "expression-test/**"
- "include/**"
- "metrics/**"
- "render-test/**"
- "scripts/**"
- "src/**"
- "test/**"
- "vendor/**"
- ".gitmodules"
- "!**/*.md"

concurrency:
# cancel jobs on PRs only
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- name: OpenGL
preset: harmonyos-opengl
- name: Vulkan
preset: harmonyos-vulkan
name: ${{ matrix.name }}
env:
OHOS_SDK_VERSION: "6.1"

defaults:
run:
working-directory: ./
shell: bash

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
with:
submodules: recursive
persist-credentials: false

- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y \
ccache \
ninja-build
/usr/sbin/update-ccache-symlinks

- name: Set up OpenHarmony SDK
uses: openharmony-rs/setup-ohos-sdk@eb82b94ef522b07269679195c2512f22e922ef3b # v1.0.0
with:
version: ${{ env.OHOS_SDK_VERSION }}
components: native

- name: Set up ccache
uses: hendrikmuhs/ccache-action@33522472633dbd32578e909b315f5ee43ba878ce # v1.2.22
with:
key: OHOS_${{ matrix.preset }}_${{ env.OHOS_SDK_VERSION }}_${{ github.sha }}
restore-keys: |
OHOS_${{ matrix.preset }}_${{ env.OHOS_SDK_VERSION }}_${{ github.ref }}
OHOS_${{ matrix.preset }}_${{ env.OHOS_SDK_VERSION }}
max-size: 200M

- name: Print tool versions
run: |
cmake --version
ninja --version
"${OHOS_SDK_NATIVE}/llvm/bin/clang" --version

- name: Configure maplibre-native
run: |
cmake --preset "${{ matrix.preset }}" \
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache"

- name: Build mbgl-core
run: cmake --build --preset "${{ matrix.preset }}"
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ endif()

project("MapLibre Native" LANGUAGES CXX C)

if(CMAKE_SYSTEM_NAME STREQUAL OHOS)
# The OHOS SDK toolchain injects --gcc-toolchain, which clang reports as unused.
# OHOS SDK 6.0.1 ships libc++ ranges algorithms behind -fexperimental-library.
add_compile_options(
$<$<COMPILE_LANGUAGE:C>:-Wno-unused-command-line-argument>
$<$<COMPILE_LANGUAGE:CXX>:-Wno-unused-command-line-argument>
$<$<COMPILE_LANGUAGE:CXX>:-fexperimental-library>
)
endif()

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER MapLibre)

Expand Down Expand Up @@ -954,6 +964,7 @@ list(APPEND SRC_FILES
${PROJECT_SOURCE_DIR}/src/mbgl/util/quaternion.cpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/rapidjson.cpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/rapidjson.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/source_location.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/std.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/stopwatch.cpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/stopwatch.hpp
Expand Down Expand Up @@ -1275,6 +1286,8 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL Android)
include(${PROJECT_SOURCE_DIR}/platform/android/android.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL Linux)
include(${PROJECT_SOURCE_DIR}/platform/linux/linux.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL OHOS)
include(${PROJECT_SOURCE_DIR}/platform/ohos/ohos.cmake)
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
include(${PROJECT_SOURCE_DIR}/platform/darwin/darwin.cmake)
include(${PROJECT_SOURCE_DIR}/platform/macos/macos.cmake)
Expand Down
61 changes: 61 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,46 @@
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
}
},
{
"name": "harmonyos",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-harmonyos",
"condition": {
"type": "notEquals",
"lhs": "$env{OHOS_SDK_NATIVE}",
"rhs": ""
},
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{OHOS_SDK_NATIVE}/build/cmake/ohos.toolchain.cmake",
"OHOS_SDK_NATIVE": "$env{OHOS_SDK_NATIVE}",
"OHOS_ARCH": "arm64-v8a",
"OHOS_STL": "c++_shared",
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"MLN_WITH_GLFW": "OFF",
"MLN_WITH_OPENGL": "ON",
"MLN_WITH_EGL": "ON"
}
},
{
"name": "harmonyos-opengl",
"inherits": "harmonyos",
"binaryDir": "${sourceDir}/build-harmonyos-opengl",
"displayName": "HarmonyOS OpenGL",
"description": "OpenHarmony GLES/EGL and NetworkKit HTTP build"
},
{
"name": "harmonyos-vulkan",
"inherits": "harmonyos",
"binaryDir": "${sourceDir}/build-harmonyos-vulkan",
"displayName": "HarmonyOS Vulkan",
"description": "OpenHarmony Vulkan and NetworkKit HTTP build",
"cacheVariables": {
"MLN_WITH_OPENGL": "OFF",
"MLN_WITH_EGL": "OFF",
"MLN_WITH_VULKAN": "ON"
}
},
{
"name": "windows",
"hidden": true,
Expand Down Expand Up @@ -377,6 +417,27 @@
"configurePreset": "linux-vulkan",
"targets": ["mbgl-core"]
},
{
"name": "harmonyos-build",
"hidden": true,
"condition": {
"type": "notEquals",
"lhs": "$env{OHOS_SDK_NATIVE}",
"rhs": ""
}
},
{
"name": "harmonyos-opengl",
"inherits": "harmonyos-build",
"configurePreset": "harmonyos-opengl",
"targets": ["mbgl-core"]
},
{
"name": "harmonyos-vulkan",
"inherits": "harmonyos-build",
"configurePreset": "harmonyos-vulkan",
"targets": ["mbgl-core"]
},
{
"name": "windows-opengl-core",
"configurePreset": "windows-opengl",
Expand Down
1 change: 0 additions & 1 deletion platform/linux/src/gl_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#define GL_GLEXT_PROTOTYPES

#include <GLES3/gl3.h>
#include <GLES3/gl3ext.h>
Comment thread
sargunv marked this conversation as resolved.

namespace mbgl {
namespace platform {
Expand Down
32 changes: 32 additions & 0 deletions platform/ohos/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# OpenHarmony

This platform support is experimental. It targets the
[OpenHarmony](https://en.wikipedia.org/wiki/OpenHarmony) family of operating
systems, including [HarmonyOS](https://en.wikipedia.org/wiki/HarmonyOS).

Public OpenHarmony platform documentation is available in the
[OpenHarmony docs repository](https://github.com/openharmony/docs).

See [the sample readme](./sample/README.md) to build and run the NAPI/XComponent
integration example in DevEco Studio.

## CMake Build

When invoking CMake directly from this repository root, set the native SDK paths
before using the HarmonyOS presets:

```sh
export OHOS_SDK_NATIVE=/path/to/openharmony/native

cmake --preset harmonyos-opengl
cmake --build --preset harmonyos-opengl

cmake --preset harmonyos-vulkan
cmake --build --preset harmonyos-vulkan
```

The presets use the OpenHarmony SDK from `OHOS_SDK_NATIVE`. They are disabled
until that variable is set.

DevEco Studio and Hvigor provide the native SDK path from the configured SDK
when building `platform/ohos/sample`.
Loading
Loading