#include "flutter/lib/gpu/context.h"
#include "flutter/lib/gpu/export.h"
#include "flutter/lib/ui/dart_wrapper.h"
#include "third_party/tonic/typed_data/dart_byte_data.h"
Go to the source code of this file.
◆ InternalFlutterGpu_DeviceBuffer_Initialize()
Exports
Definition at line 51 of file device_buffer.cc.
55 {
58 desc.size = size_in_bytes;
59 auto device_buffer =
60 gpu_context->
GetContext()->GetResourceAllocator()->CreateBuffer(desc);
61 if (!device_buffer) {
63 return false;
64 }
65
66 auto res =
67 fml::MakeRefCounted<flutter::gpu::DeviceBuffer>(std::move(device_buffer));
68 res->AssociateWithDartWrapper(wrapper);
69
70 return true;
71}
std::shared_ptr< impeller::Context > GetContext()
#define FML_LOG(severity)
constexpr impeller::StorageMode ToImpellerStorageMode(FlutterGPUStorageMode value)
◆ InternalFlutterGpu_DeviceBuffer_InitializeWithHostData()
Definition at line 73 of file device_buffer.cc.
76 {
79 data.length_in_bytes());
80 auto device_buffer =
81 gpu_context->
GetContext()->GetResourceAllocator()->CreateBufferWithCopy(
82 mapping);
83 if (!device_buffer) {
84 FML_LOG(
ERROR) <<
"Failed to create device buffer with copy.";
85 return false;
86 }
87
88 auto res =
89 fml::MakeRefCounted<flutter::gpu::DeviceBuffer>(std::move(device_buffer));
90 res->AssociateWithDartWrapper(wrapper);
91
92 return true;
93}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
◆ InternalFlutterGpu_DeviceBuffer_Overwrite()
Definition at line 95 of file device_buffer.cc.
98 {
100 destination_offset_in_bytes);
101}