Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 50a490a

Browse files
fix gm to test unpremul etc.
Change-Id: Ia53003e31b2e24ffc5834faefb1de0687036683d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270057 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
1 parent 3e71209 commit 50a490a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

gm/aaclip.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,7 @@ DEF_SIMPLE_GM(aaclip, canvas, 240, 120) {
161161
#include "include/utils/mac/SkCGUtils.h"
162162

163163
static std::unique_ptr<SkCanvas> make_canvas(const SkBitmap& bm) {
164-
const SkImageInfo& info = bm.info();
165-
if (info.bytesPerPixel() == 4) {
166-
return SkCanvas::MakeRasterDirectN32(info.width(), info.height(),
167-
(SkPMColor*)bm.getPixels(),
168-
bm.rowBytes());
169-
} else {
170-
return std::make_unique<SkCanvas>(bm);
171-
}
164+
return SkCanvas::MakeRasterDirect(bm.info(), bm.getPixels(), bm.rowBytes());
172165
}
173166

174167
static void test_image(SkCanvas* canvas, const SkImageInfo& info) {

0 commit comments

Comments
 (0)