[core][ios][android][macos] Use premultiplied image directly for RasterTile and ImageSource, un-premultiply in the shader for blending
This commit is contained in:
@@ -101,7 +101,7 @@ TEST(Buckets, SymbolBucket) {
|
||||
|
||||
TEST(Buckets, RasterBucket) {
|
||||
gl::Context context;
|
||||
UnassociatedImage rgba({ 1, 1 });
|
||||
PremultipliedImage rgba({ 1, 1 });
|
||||
|
||||
// RasterBucket::hasData() is always true.
|
||||
RasterBucket bucket = { std::move(rgba) };
|
||||
|
||||
@@ -531,7 +531,7 @@ TEST(Source, ImageSourceImageUpdate) {
|
||||
|
||||
// Load initial, so the source state will be loaded=true
|
||||
source.loadDescription(test.fileSource);
|
||||
UnassociatedImage rgba({ 1, 1 });
|
||||
PremultipliedImage rgba({ 1, 1 });
|
||||
rgba.data[0] = 255;
|
||||
rgba.data[1] = 254;
|
||||
rgba.data[2] = 253;
|
||||
|
||||
@@ -60,7 +60,7 @@ TEST(RasterTile, onError) {
|
||||
TEST(RasterTile, onParsed) {
|
||||
RasterTileTest test;
|
||||
RasterTile tile(OverscaledTileID(0, 0, 0), test.tileParameters, test.tileset);
|
||||
tile.onParsed(std::make_unique<RasterBucket>(UnassociatedImage{}));
|
||||
tile.onParsed(std::make_unique<RasterBucket>(PremultipliedImage{}));
|
||||
EXPECT_TRUE(tile.isRenderable());
|
||||
EXPECT_TRUE(tile.isLoaded());
|
||||
EXPECT_TRUE(tile.isComplete());
|
||||
|
||||
Reference in New Issue
Block a user