I'm trying to embed skia canvas into NSView and HWND to do some cross platform drawing. I'm using the class SkView comes with the skia source code, and use SkOSWindow as the window. But the window got blanked when the window is resizing. As showing below
Here's the code used by SkWindow when resizing,
void SkWindow::resize(int width, int height, SkColorType ct) {
if (ct == kUnknown_SkColorType)
ct = fColorType;
if (width != fBitmap.width() || height != fBitmap.height() || ct != fColorType) {
fColorType = ct;
fBitmap.allocPixels(SkImageInfo::Make(width, height,
ct, kPremul_SkAlphaType));
this->setSize(SkIntToScalar(width), SkIntToScalar(height));
this->inval(nullptr);
}
}
I'm very new to skia, and I can't find any document about this problem. Does anyone ever running into this problem? Any suggestion will appreciated!