#include <image_decoder_impeller.h>
Definition at line 24 of file image_decoder_impeller.h.
◆ ImpellerAllocator()
flutter::ImpellerAllocator::ImpellerAllocator |
( |
std::shared_ptr< impeller::Allocator > |
allocator | ) |
|
|
explicit |
◆ ~ImpellerAllocator()
flutter::ImpellerAllocator::~ImpellerAllocator |
( |
| ) |
|
|
default |
◆ allocPixelRef()
bool flutter::ImpellerAllocator::allocPixelRef |
( |
SkBitmap * |
bitmap | ) |
|
|
override |
Definition at line 513 of file image_decoder_impeller.cc.
513 {
515 return false;
516 }
520 return false;
521 }
522
527
528 std::shared_ptr<impeller::DeviceBuffer> device_buffer =
529 allocator_->CreateBuffer(descriptor);
530 if (!device_buffer) {
531 return false;
532 }
533
534 struct ImpellerPixelRef final :
public SkPixelRef {
535 ImpellerPixelRef(
int w,
int h,
void*
s,
size_t r)
537
538 ~ImpellerPixelRef() override {}
539 };
540
542 new ImpellerPixelRef(
info.width(),
info.height(),
543 device_buffer->OnGetContents(),
bitmap->rowBytes()));
544
545 bitmap->setPixelRef(std::move(pixel_ref), 0, 0);
546 buffer_ = std::move(device_buffer);
547 return true;
548}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kUnknown_SkColorType
uninitialized
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder h
◆ GetDeviceBuffer()
The documentation for this class was generated from the following files: