Trim legacy web binding and Win32 pointer state

This commit is contained in:
2026-06-17 11:06:02 +02:00
parent 06bfd62546
commit cf2fcd36e4
8 changed files with 27 additions and 53 deletions

View File

@@ -17,10 +17,6 @@ struct RetainedLegacyAndroidStoragePaths final {
};
#endif
struct RetainedLegacyWebPlatformServicesBinding final {
pp::platform::WebPlatformServices* services = nullptr;
};
#ifdef __ANDROID__
[[nodiscard]] RetainedLegacyAndroidStoragePaths& retained_legacy_android_storage_paths()
{
@@ -29,12 +25,6 @@ struct RetainedLegacyWebPlatformServicesBinding final {
}
#endif
[[nodiscard]] RetainedLegacyWebPlatformServicesBinding& retained_legacy_web_platform_services_binding()
{
static RetainedLegacyWebPlatformServicesBinding state;
return state;
}
class RetainedWebPlatformServices final : public pp::platform::WebPlatformServices {
public:
void publish_exported_image(std::string_view path) override
@@ -76,9 +66,6 @@ public:
[[nodiscard]] pp::platform::WebPlatformServices& active_legacy_web_platform_services()
{
if (auto* services = retained_legacy_web_platform_services_binding().services)
return *services;
static RetainedWebPlatformServices services;
return pp::platform::resolve_web_platform_services(services);
}
@@ -88,11 +75,6 @@ public:
return std::make_unique<RetainedWebPlatformServices>();
}
void set_legacy_web_platform_services(pp::platform::WebPlatformServices* services)
{
retained_legacy_web_platform_services_binding().services = services;
}
[[nodiscard]] bool handles_legacy_web_platform_family(pp::platform::PlatformFamily family) noexcept
{
return family == pp::platform::PlatformFamily::webgl;

View File

@@ -9,7 +9,6 @@ namespace pp::platform::legacy {
[[nodiscard]] pp::platform::WebPlatformServices& active_legacy_web_platform_services();
[[nodiscard]] std::unique_ptr<pp::platform::WebPlatformServices> create_legacy_web_platform_services();
void set_legacy_web_platform_services(pp::platform::WebPlatformServices* services);
[[nodiscard]] bool handles_legacy_web_platform_family(pp::platform::PlatformFamily family) noexcept;
void publish_legacy_web_exported_image(std::string_view path);
[[nodiscard]] bool try_publish_legacy_web_exported_image(