5#include "flutter/lib/gpu/texture.h"
7#include "flutter/lib/gpu/formats.h"
8#include "flutter/lib/ui/painting/image.h"
32 texture_->SetCoordinateSystem(coordinate_system);
36 const uint8_t*
data =
static_cast<const uint8_t*
>(source_bytes.
data());
40 auto mapping = std::make_shared<fml::DataMapping>(
copy);
41 if (!texture_->SetContents(mapping)) {
49 texture_->GetTextureDescriptor().format);
56#if IMPELLER_SUPPORTS_RENDERING
59 image->set_image(dl_image);
81 int coordinate_system,
82 bool enable_render_target_usage,
83 bool enable_shader_read_usage,
84 bool enable_shader_write_usage) {
90 if (enable_render_target_usage) {
93 if (enable_shader_read_usage) {
96 if (enable_shader_write_usage) {
99 switch (sample_count) {
112 gpu_context->
GetContext()->GetResourceAllocator()->CreateTexture(
desc);
121 auto res = fml::MakeRefCounted<flutter::gpu::Texture>(std::move(
texture));
122 res->AssociateWithDartWrapper(wrapper);
129 int coordinate_system) {
static sk_sp< GrTextureProxy > wrapped(skiatest::Reporter *reporter, GrRecordingContext *rContext, GrProxyProvider *proxyProvider, SkBackingFit fit)
static fml::RefPtr< CanvasImage > Create()
std::shared_ptr< impeller::Context > GetContext()
Texture(std::shared_ptr< impeller::Texture > texture)
size_t GetBytesPerTexel()
std::shared_ptr< impeller::Texture > GetTexture()
bool Overwrite(const tonic::DartByteData &source_bytes)
Dart_Handle AsImage() const
void SetCoordinateSystem(impeller::TextureCoordinateSystem coordinate_system)
static sk_sp< DlImageImpeller > Make(std::shared_ptr< Texture > texture, OwningContext owning_context=OwningContext::kIO)
const void * data() const
size_t length_in_bytes() const
struct _Dart_Handle * Dart_Handle
DART_EXPORT Dart_Handle Dart_Null(void)
uint32_t uint32_t * format
#define FML_LOG(severity)
void InternalFlutterGpu_Texture_SetCoordinateSystem(flutter::gpu::Texture *wrapper, int coordinate_system)
Dart_Handle InternalFlutterGpu_Texture_AsImage(flutter::gpu::Texture *wrapper)
bool InternalFlutterGpu_Texture_Overwrite(flutter::gpu::Texture *texture, Dart_Handle source_byte_data)
int InternalFlutterGpu_Texture_BytesPerTexel(flutter::gpu::Texture *wrapper)
bool InternalFlutterGpu_Texture_Initialize(Dart_Handle wrapper, flutter::gpu::Context *gpu_context, int storage_mode, int format, int width, int height, int sample_count, int coordinate_system, bool enable_render_target_usage, bool enable_shader_read_usage, bool enable_shader_write_usage)
sk_sp< const SkImage > image
constexpr impeller::PixelFormat ToImpellerPixelFormat(FlutterGPUPixelFormat value)
constexpr impeller::TextureCoordinateSystem ToImpellerTextureCoordinateSystem(FlutterGPUTextureCoordinateSystem value)
IMPLEMENT_WRAPPERTYPEINFO(flutter_gpu, CommandBuffer)
constexpr impeller::StorageMode ToImpellerStorageMode(FlutterGPUStorageMode value)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
constexpr size_t BytesPerPixelForPixelFormat(PixelFormat format)
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...