Delete orphaned legacy platform shim
This commit is contained in:
@@ -18,6 +18,11 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
|
|
||||||
## Reductions
|
## Reductions
|
||||||
|
|
||||||
|
- 2026-06-17: `DEBT-0017` was narrowed again. The orphaned
|
||||||
|
`src/platform_legacy/legacy_platform_services.*` shim and its
|
||||||
|
`legacy_platform_fallback_behavior.h` helper were deleted after the root app,
|
||||||
|
WebGL entrypoint, and retained Android package graphs all moved off that
|
||||||
|
fallback path.
|
||||||
- 2026-06-17: `DEBT-0017` was narrowed again. The retained Android package
|
- 2026-06-17: `DEBT-0017` was narrowed again. The retained Android package
|
||||||
CMake projects now compile `src/platform_android/android_platform_services.cpp`
|
CMake projects now compile `src/platform_android/android_platform_services.cpp`
|
||||||
instead of `src/platform_legacy/legacy_platform_services.cpp`, matching the
|
instead of `src/platform_legacy/legacy_platform_services.cpp`, matching the
|
||||||
|
|||||||
@@ -70,6 +70,12 @@ What is already real:
|
|||||||
- `pp_app_core`
|
- `pp_app_core`
|
||||||
|
|
||||||
Latest slice:
|
Latest slice:
|
||||||
|
- The orphaned `src/platform_legacy/legacy_platform_services.*` shim and its
|
||||||
|
`src/platform_legacy/legacy_platform_fallback_behavior.h` helper are now
|
||||||
|
deleted from the repo.
|
||||||
|
- The root app graph, WebGL entrypoint, and retained Android package graphs had
|
||||||
|
already moved off that fallback path, so the old generic platform-legacy
|
||||||
|
adapter no longer exists as a compiled code path.
|
||||||
- `android/android/CMakeLists.txt`, `android/quest/CMakeLists.txt`, and
|
- `android/android/CMakeLists.txt`, `android/quest/CMakeLists.txt`, and
|
||||||
`android/focus/CMakeLists.txt` now compile
|
`android/focus/CMakeLists.txt` now compile
|
||||||
`src/platform_android/android_platform_services.cpp` instead of
|
`src/platform_android/android_platform_services.cpp` instead of
|
||||||
|
|||||||
@@ -84,6 +84,12 @@ Completed, blocked, and superseded task history moved to
|
|||||||
the queue is now ordered by code movement instead.
|
the queue is now ordered by code movement instead.
|
||||||
|
|
||||||
Current slice:
|
Current slice:
|
||||||
|
- The orphaned `src/platform_legacy/legacy_platform_services.*` shim and
|
||||||
|
`src/platform_legacy/legacy_platform_fallback_behavior.h` helper are now
|
||||||
|
deleted.
|
||||||
|
- Root builds, the WebGL entrypoint, and the retained Android package graphs
|
||||||
|
had already moved off that fallback path, so the old generic legacy platform
|
||||||
|
adapter is no longer present as a compiled code path.
|
||||||
- `android/android/CMakeLists.txt`, `android/quest/CMakeLists.txt`, and
|
- `android/android/CMakeLists.txt`, `android/quest/CMakeLists.txt`, and
|
||||||
`android/focus/CMakeLists.txt` now compile
|
`android/focus/CMakeLists.txt` now compile
|
||||||
`src/platform_android/android_platform_services.cpp` instead of the retained
|
`src/platform_android/android_platform_services.cpp` instead of the retained
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <string_view>
|
|
||||||
|
|
||||||
#include "legacy_ui_gl_dispatch.h"
|
|
||||||
#include "platform_api/platform_services.h"
|
|
||||||
#include "renderer_gl/opengl_capabilities.h"
|
|
||||||
|
|
||||||
namespace pp::platform::legacy {
|
|
||||||
|
|
||||||
inline void bind_default_opengl_render_target()
|
|
||||||
{
|
|
||||||
pp::legacy::ui_gl::bind_opengl_framebuffer(
|
|
||||||
pp::renderer::gl::framebuffer_target(),
|
|
||||||
pp::renderer::gl::default_framebuffer_id());
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void complete_prepared_file_without_save(
|
|
||||||
std::string_view path,
|
|
||||||
const pp::platform::PreparedFileCallback& callback)
|
|
||||||
{
|
|
||||||
if (!callback)
|
|
||||||
return;
|
|
||||||
|
|
||||||
callback(std::string(path), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,313 +0,0 @@
|
|||||||
#include "pch.h"
|
|
||||||
#include "platform_legacy/legacy_platform_services.h"
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include "log.h"
|
|
||||||
#include "platform_legacy/legacy_platform_fallback_behavior.h"
|
|
||||||
#include "platform_api/network_tls_policy.h"
|
|
||||||
#include "platform_api/platform_policy.h"
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
// DEBT-0017: retained non-Windows fallback adapter until each platform owns a
|
|
||||||
// concrete PlatformServices implementation without this bridge.
|
|
||||||
class LegacyPlatformServices final : public pp::platform::PlatformServices {
|
|
||||||
public:
|
|
||||||
explicit LegacyPlatformServices(pp::platform::legacy::LegacyPlatformServicesConfig config = {})
|
|
||||||
{
|
|
||||||
(void)config;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] pp::platform::PlatformStoragePaths prepare_storage_paths() override
|
|
||||||
{
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
void log_stacktrace() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void trigger_crash_test() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] std::string clipboard_text() override
|
|
||||||
{
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool set_clipboard_text(std::string_view text) override
|
|
||||||
{
|
|
||||||
const std::string value(text);
|
|
||||||
(void)value;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_cursor_visible(bool visible) override
|
|
||||||
{
|
|
||||||
(void)visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_virtual_keyboard_visible(bool visible) override
|
|
||||||
{
|
|
||||||
(void)visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
void attach_ui_thread() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void detach_ui_thread() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void acquire_render_context() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void release_render_context() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void present_render_context() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void bind_default_render_target() override
|
|
||||||
{
|
|
||||||
pp::platform::legacy::bind_default_opengl_render_target();
|
|
||||||
}
|
|
||||||
|
|
||||||
void bind_main_render_target() override
|
|
||||||
{
|
|
||||||
bind_default_render_target();
|
|
||||||
}
|
|
||||||
|
|
||||||
void apply_render_platform_hints() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void install_render_debug_callback() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void begin_render_capture_frame() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void end_render_capture_frame() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool deletes_recorded_files_on_clear() override
|
|
||||||
{
|
|
||||||
return pp::platform::platform_deletes_recorded_files_on_clear(
|
|
||||||
pp::platform::current_platform_family());
|
|
||||||
}
|
|
||||||
|
|
||||||
void clear_recorded_files(std::string_view recording_path) override
|
|
||||||
{
|
|
||||||
(void)recording_path;
|
|
||||||
}
|
|
||||||
|
|
||||||
void publish_exported_image(std::string_view path) override
|
|
||||||
{
|
|
||||||
const auto family = pp::platform::current_platform_family();
|
|
||||||
if (!pp::platform::platform_publishes_exported_images(family))
|
|
||||||
{
|
|
||||||
(void)path;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
(void)path;
|
|
||||||
}
|
|
||||||
|
|
||||||
void flush_persistent_storage() override
|
|
||||||
{
|
|
||||||
const auto family = pp::platform::current_platform_family();
|
|
||||||
if (!pp::platform::platform_flushes_persistent_storage(family))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] std::vector<std::string> document_browse_roots(
|
|
||||||
std::string_view work_path,
|
|
||||||
std::string_view data_path) override
|
|
||||||
{
|
|
||||||
return pp::platform::platform_document_browse_roots(
|
|
||||||
pp::platform::current_platform_family(),
|
|
||||||
work_path,
|
|
||||||
data_path);
|
|
||||||
}
|
|
||||||
|
|
||||||
void save_ui_state() override
|
|
||||||
{
|
|
||||||
if (!pp::platform::platform_saves_native_ui_state(pp::platform::current_platform_family()))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool enables_live_asset_reloading() override
|
|
||||||
{
|
|
||||||
return pp::platform::platform_enables_live_asset_reloading(
|
|
||||||
pp::platform::current_platform_family());
|
|
||||||
}
|
|
||||||
|
|
||||||
void update_platform_frame(float delta_time_seconds) override
|
|
||||||
{
|
|
||||||
(void)delta_time_seconds;
|
|
||||||
}
|
|
||||||
|
|
||||||
void report_rendered_frames(int frames) override
|
|
||||||
{
|
|
||||||
(void)frames;
|
|
||||||
}
|
|
||||||
|
|
||||||
void pick_image(pp::platform::PickedPathCallback callback) override
|
|
||||||
{
|
|
||||||
(void)callback;
|
|
||||||
}
|
|
||||||
|
|
||||||
void pick_file(std::vector<std::string> file_types, pp::platform::PickedPathCallback callback) override
|
|
||||||
{
|
|
||||||
(void)file_types;
|
|
||||||
(void)callback;
|
|
||||||
}
|
|
||||||
|
|
||||||
void pick_save_file(std::vector<std::string> file_types, pp::platform::PickedPathCallback callback) override
|
|
||||||
{
|
|
||||||
(void)file_types;
|
|
||||||
(void)callback;
|
|
||||||
}
|
|
||||||
|
|
||||||
void pick_directory(pp::platform::PickedPathCallback callback) override
|
|
||||||
{
|
|
||||||
#ifdef __ANDROID__
|
|
||||||
(void)callback;
|
|
||||||
#else
|
|
||||||
(void)callback;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool supports_working_directory_picker() override
|
|
||||||
{
|
|
||||||
return pp::platform::platform_supports_working_directory_picker(
|
|
||||||
pp::platform::current_platform_family());
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] std::string format_working_directory_path(std::string_view path) override
|
|
||||||
{
|
|
||||||
return std::string(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool uses_prepared_file_writes() override
|
|
||||||
{
|
|
||||||
return pp::platform::platform_uses_prepared_file_writes(
|
|
||||||
pp::platform::current_platform_family());
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool uses_work_directory_document_export_collections() override
|
|
||||||
{
|
|
||||||
return pp::platform::platform_uses_work_directory_document_export_collections(
|
|
||||||
pp::platform::current_platform_family());
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool disables_network_tls_verification() override
|
|
||||||
{
|
|
||||||
return pp::platform::default_disables_network_tls_verification();
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool uses_ppbr_export_data_directory_override() override
|
|
||||||
{
|
|
||||||
return pp::platform::platform_uses_ppbr_export_data_directory_override(
|
|
||||||
pp::platform::current_platform_family());
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool supports_sonarpen() override
|
|
||||||
{
|
|
||||||
return pp::platform::platform_supports_sonarpen(pp::platform::current_platform_family());
|
|
||||||
}
|
|
||||||
|
|
||||||
void start_sonarpen() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] int default_canvas_resolution() override
|
|
||||||
{
|
|
||||||
return pp::platform::platform_default_canvas_resolution(
|
|
||||||
pp::platform::current_platform_family());
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool draws_canvas_tip_for_pointer(
|
|
||||||
bool is_mouse,
|
|
||||||
bool is_stylus,
|
|
||||||
bool is_left_button_release) override
|
|
||||||
{
|
|
||||||
return pp::platform::platform_draws_canvas_tip_for_pointer(
|
|
||||||
pp::platform::current_platform_family(),
|
|
||||||
is_mouse,
|
|
||||||
is_stylus,
|
|
||||||
is_left_button_release);
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] float adjust_canvas_input_pressure(float pressure) override
|
|
||||||
{
|
|
||||||
return pressure;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] pp::platform::PreparedFileTarget prepare_writable_file(
|
|
||||||
std::string_view type,
|
|
||||||
std::string_view default_name,
|
|
||||||
std::string_view data_path,
|
|
||||||
std::string_view temporary_path) override
|
|
||||||
{
|
|
||||||
return pp::platform::plan_platform_writable_file(
|
|
||||||
pp::platform::current_platform_family(),
|
|
||||||
type,
|
|
||||||
default_name,
|
|
||||||
data_path,
|
|
||||||
temporary_path);
|
|
||||||
}
|
|
||||||
|
|
||||||
void display_file(std::string_view path) override
|
|
||||||
{
|
|
||||||
(void)path;
|
|
||||||
}
|
|
||||||
|
|
||||||
void share_file(std::string_view path) override
|
|
||||||
{
|
|
||||||
(void)path;
|
|
||||||
}
|
|
||||||
|
|
||||||
void request_app_close() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] bool start_vr_mode() override
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void stop_vr_mode() override
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void save_prepared_file(
|
|
||||||
std::string_view path,
|
|
||||||
std::string_view suggested_name,
|
|
||||||
pp::platform::PreparedFileCallback callback) override
|
|
||||||
{
|
|
||||||
(void)suggested_name;
|
|
||||||
pp::platform::legacy::complete_prepared_file_without_save(path, callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace pp::platform::legacy {
|
|
||||||
|
|
||||||
std::unique_ptr<PlatformServices> create_platform_services(
|
|
||||||
LegacyPlatformServicesConfig config)
|
|
||||||
{
|
|
||||||
return std::make_unique<LegacyPlatformServices>(std::move(config));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#include "platform_api/platform_services.h"
|
|
||||||
|
|
||||||
namespace pp::platform::legacy {
|
|
||||||
|
|
||||||
struct LegacyPlatformServicesConfig {
|
|
||||||
};
|
|
||||||
|
|
||||||
[[nodiscard]] std::unique_ptr<PlatformServices> create_platform_services(
|
|
||||||
LegacyPlatformServicesConfig config = {});
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user