MCPcopy Create free account
hub / github.com/Snapchat/Valdi / draw

Method draw

snap_drawing/src/snap_drawing/cpp/Utils/Image.cpp:156–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void Image::draw(const Valdi::BitmapInfo& bitmapInfo, void* bytes) {
157 SkPixmap pixmap(toSkiaImageInfo(bitmapInfo), bytes, bitmapInfo.rowBytes);
158 _skImage->scalePixels(pixmap, SkSamplingOptions(SkCubicResampler::Mitchell()));
159}
160
161Ref<Image> Image::withFilter(const Ref<Valdi::ImageFilter>& filter) {
162 auto copiedImage = Valdi::makeShared<Image>(_skImage);

Callers

nothing calls this directly

Calls 1

toSkiaImageInfoFunction · 0.85

Tested by

no test coverage detected