#include "flutter/flow/ohos_layers/picture_layer.h"
#include "flutter/flow/ohos_layers/paint_context.h"
namespace flutter::OHOS {
void PictureLayer::Prepare(const SkMatrix& matrix)
{
SkRect bounds = GetPicture()->cullRect().makeOffset(offset_.x(), offset_.y());
SetPaintBounds(bounds);
}
void PictureLayer::Paint(const PaintContext& paintContext) const
{
SkAutoCanvasRestore save(paintContext.skCanvas, true);
paintContext.skCanvas->translate(offset_.x(), offset_.y());
paintContext.skCanvas->drawPicture(GetPicture());
}
}