Own Windows tablet path and thin legacy web fallback
This commit is contained in:
@@ -259,9 +259,9 @@ public:
|
||||
void publish_exported_image(std::string_view path) override
|
||||
{
|
||||
const auto family = pp::platform::current_platform_family();
|
||||
if (family == pp::platform::PlatformFamily::webgl)
|
||||
if (pp::platform::legacy::handles_legacy_web_platform_family(family))
|
||||
{
|
||||
pp::platform::legacy::active_legacy_web_platform_services().publish_exported_image(path);
|
||||
pp::platform::legacy::publish_legacy_web_exported_image(path);
|
||||
return;
|
||||
}
|
||||
if (!pp::platform::platform_publishes_exported_images(family))
|
||||
@@ -279,9 +279,9 @@ public:
|
||||
void flush_persistent_storage() override
|
||||
{
|
||||
const auto family = pp::platform::current_platform_family();
|
||||
if (family == pp::platform::PlatformFamily::webgl)
|
||||
if (pp::platform::legacy::handles_legacy_web_platform_family(family))
|
||||
{
|
||||
pp::platform::legacy::active_legacy_web_platform_services().flush_persistent_storage();
|
||||
pp::platform::legacy::flush_legacy_web_persistent_storage();
|
||||
return;
|
||||
}
|
||||
if (!pp::platform::platform_flushes_persistent_storage(family))
|
||||
@@ -449,8 +449,8 @@ public:
|
||||
[[nodiscard]] int default_canvas_resolution() override
|
||||
{
|
||||
const auto family = pp::platform::current_platform_family();
|
||||
if (family == pp::platform::PlatformFamily::webgl)
|
||||
return pp::platform::legacy::active_legacy_web_platform_services().default_canvas_resolution();
|
||||
if (pp::platform::legacy::handles_legacy_web_platform_family(family))
|
||||
return pp::platform::legacy::default_legacy_web_canvas_resolution();
|
||||
return pp::platform::platform_default_canvas_resolution(family);
|
||||
}
|
||||
|
||||
@@ -527,12 +527,9 @@ public:
|
||||
pp::platform::PreparedFileCallback callback) override
|
||||
{
|
||||
const auto family = pp::platform::current_platform_family();
|
||||
if (family == pp::platform::PlatformFamily::webgl)
|
||||
if (pp::platform::legacy::handles_legacy_web_platform_family(family))
|
||||
{
|
||||
pp::platform::legacy::active_legacy_web_platform_services().save_prepared_file(
|
||||
path,
|
||||
suggested_name,
|
||||
std::move(callback));
|
||||
pp::platform::legacy::save_legacy_web_prepared_file(path, suggested_name, std::move(callback));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user