Add Chromium-only Blender WebEngine parity work

This commit is contained in:
mes123456
2026-08-12 04:47:48 -04:00
commit 9fd26010f6
18225 changed files with 11622124 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
/* SPDX-FileCopyrightText: 2011-2026 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
#include "DNA_image_types.h"
#include "blender/CCL_api.h"
#include "util/image_maketx.h"
#include "util/image_metadata.h"
#include "util/types_image.h"
namespace blender {
bool CCL_resolve_texture_cache(const Image *image,
const char *filepath,
const char *texture_cache_directory,
std::string &r_tx_filepath)
{
ccl::ImageMetaData tx_metadata;
return ccl::resolve_tx(filepath,
texture_cache_directory,
ccl::ustring(image->colorspace_settings.name),
ccl::ImageAlphaType(image->alpha_mode),
ccl::IMAGE_FORMAT_PLAIN,
r_tx_filepath,
tx_metadata);
}
bool CCL_generate_texture_cache(const Image *image,
const char *filepath,
const char *texture_cache_directory)
{
std::string tx_filepath;
ccl::ImageMetaData tx_metadata;
const bool is_valid = ccl::resolve_tx(filepath,
texture_cache_directory,
ccl::ustring(image->colorspace_settings.name),
ccl::ImageAlphaType(image->alpha_mode),
ccl::IMAGE_FORMAT_PLAIN,
tx_filepath,
tx_metadata);
if (is_valid) {
return true;
}
if (tx_filepath.empty()) {
return false;
}
return make_tx(filepath,
tx_filepath,
ccl::ustring(image->colorspace_settings.name),
ccl::ImageAlphaType(image->alpha_mode),
ccl::IMAGE_FORMAT_PLAIN);
}
} // namespace blender