Open mgood7123 opened 2 years ago
if i test this in pure native i get SOMETHING ELSE
i expect TWO FIVE FIVE
like in https://fiddle.skia.org/c/feaaefb4c89602123b712bd2688c723f
SkImageInfo info = SkImageInfo::MakeA8(1, 1);
auto gpuSurface(SkSurface::MakeRenderTarget(AsGrRecordingContext(context), SkBudgeted::kNo, info, 0, kBottomLeft_GrSurfaceOrigin, nullptr, false));
auto surfaceCanvas = gpuSurface->getCanvas();
SkColor color;
color = SkColorSetA(color, 255);
surfaceCanvas->drawColor(color);
auto image_(gpuSurface->makeImageSnapshot());
auto raster = image_->makeRasterImage();
SkPixmap pixmap;
raster->peekPixels(&pixmap);
const uint8_t* pixels = reinterpret_cast<const uint8_t*>(pixmap.addr());
SkDebugf(pixels == nullptr ? "nullptr\n" : pixels[0] == 255 ? "TWO FIVE FIVE\n" : "SOMETHING ELSE\n");
Description
Alpha8 GPU color does not match Alpha8 CPU color
Code
Expected Behavior
Actual Behavior
Basic Information
Reproduction Link
Skia TestBed.zip