#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 527 of file image_decoder_impeller.cc.
527 {
529 return false;
530 }
534 return false;
535 }
536
541
542 std::shared_ptr<impeller::DeviceBuffer> device_buffer =
543 allocator_->CreateBuffer(descriptor);
544 if (!device_buffer) {
545 return false;
546 }
547
548 struct ImpellerPixelRef final :
public SkPixelRef {
549 ImpellerPixelRef(
int w,
int h,
void*
s,
size_t r)
551
552 ~ImpellerPixelRef() override {}
553 };
554
556 new ImpellerPixelRef(
info.width(),
info.height(),
557 device_buffer->OnGetContents(),
bitmap->rowBytes()));
558
559 bitmap->setPixelRef(std::move(pixel_ref), 0, 0);
560 buffer_ = std::move(device_buffer);
561 return true;
562}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kUnknown_SkColorType
uninitialized
◆ GetDeviceBuffer()
The documentation for this class was generated from the following files: