Test performance of 565 bitmap scaling

This would catch b/70172912

On Linux desktops, see the difference between 8888 and 565 using:

nanobench --config 8888 -m ^bitmap_RGB_565_scale$ ^bitmap_BGRA_8888_scale$ ^bitmap_RGB_565_scale_bilerp$ ^bitmap_BGRA_8888_scale_bilerp$

On Android, use:

nanobench --config 8888 -m ^bitmap_RGB_565_scale$ ^bitmap_RGBA_8888_scale$ ^bitmap_RGB_565_scale_bilerp$ ^bitmap_RGBA_8888_scale_bilerp$

The results are similar if nanobench is run with --config 565. So
it seems that the destination color type isn't very critical.

Bug: skia:
Change-Id: I71defda4d9e089a9a973cdb0c161773bc16e4a24
Reviewed-on: https://skia-review.googlesource.com/81141
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
This commit is contained in:
Yuqian Li 2017-12-06 11:30:58 -05:00 committed by Skia Commit-Bot
parent ec34a71bea
commit 24e963d429

View File

@ -313,6 +313,10 @@ DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, f
DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, true, true, kScale_Flag | kBilerp_Flag); )
DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, true, false, kScale_Flag | kBilerp_Flag); )
// The following two cases test the performance regression of b/70172912 .
DEF_BENCH( return new FilterBitmapBench(kRGB_565_SkColorType, kOpaque_SkAlphaType, false, false, kScale_Flag | kBilerp_Flag); )
DEF_BENCH( return new BitmapBench(kRGB_565_SkColorType, kOpaque_SkAlphaType, false, false, true); )
// scale rotate filter -> S32_opaque_D32_filter_DXDY_{SSE2,SSSE3}
DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, false, false, kScale_Flag | kRotate_Flag | kBilerp_Flag); )
DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, false, false, kScale_Flag | kRotate_Flag | kBilerp_Flag); )