Hi all, I make a SkSurface based on GPU, it all normal except for when I readpixels from the SkSurface, I got a empty data
Here is the way I created SkSurface :
```
GrGLFramebufferInfo framebufferInfo = {};
framebufferInfo.fFBOID = 0;
framebufferInfo.fFormat = GL_RGBA8_OES;
GrBackendRenderTarget renderTarget(mWidth0, mHeight, 0, 0, framebufferInfo);
return SkSurface::MakeFromBackendRenderTarget(
context, // the GrDirectContext made outside
renderTarget,
GrSurfaceOrigin::kBottomLeft_GrSurfaceOrigin,
kRGBA_8888_SkColorType,
SkColorSpace::MakeSRGB(),
nullptr
);
```
Here is the way I used it
```
char* buf = (char*)malloc(mWidth * mHeight * 4);
memset(buf, 0, mWidth * mHeight * 4);
const SkImageInfo imageInfo = SkImageInfo::Make(
mWidth,
mHeight,
kRGBA_8888_SkColorType,
kPremul_SkAlphaType,
SkColorSpace::MakeSRGB()
);
bool success = mSkSurface->readPixels(
imageInfo,
buf,
mWidth * 4,
0,
0
);
free(buf);
```
the `success` is true, but the `buf` read from skSurface is empty