Better image for copyTo4444 test
This one produces noticeable differences if we fail to dither. Bug:720105 Change-Id: I208d0c8147f4cca1b484f2f55edc09ce1bef2dcb Reviewed-on: https://skia-review.googlesource.com/18036 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
c674e26950
commit
d16084ffdc
@ -27,17 +27,19 @@ protected:
|
||||
}
|
||||
|
||||
virtual SkISize onISize() {
|
||||
return SkISize::Make(1024, 512);
|
||||
return SkISize::Make(360, 180);
|
||||
}
|
||||
|
||||
virtual void onDraw(SkCanvas* canvas) {
|
||||
SkBitmap bm, bm4444;
|
||||
if (!GetResourceAsBitmap("mandrill_512.png", &bm)) {
|
||||
if (!GetResourceAsBitmap("dog.jpg", &bm)) {
|
||||
SkDebugf("Could not decode the file. Did you forget to set the "
|
||||
"resourcePath?\n");
|
||||
return;
|
||||
}
|
||||
canvas->drawBitmap(bm, 0, 0);
|
||||
|
||||
// This should dither or we will see artifacts in the background of the image.
|
||||
SkAssertResult(sk_tool_utils::copy_to(&bm4444, kARGB_4444_SkColorType, bm));
|
||||
canvas->drawBitmap(bm4444, SkIntToScalar(bm.width()), 0);
|
||||
}
|
||||
|
BIN
resources/dog.jpg
Normal file
BIN
resources/dog.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
Loading…
Reference in New Issue
Block a user