Revert "update p3 GM"

This reverts commit 754b5cb57d.

Reason for revert: will reland if the other CL does.

Original change's description:
> update p3 GM
> 
> The pixmap calls are pretty easy to update.
> There's no equivalent SkBitmap call, so bye bye.
> 
> Change-Id: I6eab40c69c0585d51b494e2761cd299a0758e79c
> Reviewed-on: https://skia-review.googlesource.com/c/181985
> Commit-Queue: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,scroggo@google.com,brianosman@google.com

Change-Id: I29cb2685927731e22fc1dedef80f95c7dca49459
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/182102
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2019-01-08 13:34:05 +00:00 committed by Skia Commit-Bot
parent 55ff5d3ba8
commit c46a7bcffe

View File

@ -133,6 +133,21 @@ DEF_SIMPLE_GM(p3, canvas, 450, 1300) {
canvas->translate(0,80);
// Draw a P3 red bitmap, using SkBitmap::eraseColor().
{
SkBitmap bm;
bm.allocPixels(SkImageInfo::Make(60,60, kRGBA_F16_SkColorType, kPremul_SkAlphaType, p3));
bm.eraseColor(0xffff0000/*in P3*/);
canvas->drawBitmap(bm, 10,10);
compare_pixel("drawBitmap P3 red, from SkBitmap::eraseColor()",
canvas, 10,10,
{1,0,0,1}, p3.get());
}
canvas->translate(0,80);
// Draw a P3 red bitmap, using SkPixmap::erase().
{
SkBitmap bm;
@ -141,7 +156,7 @@ DEF_SIMPLE_GM(p3, canvas, 450, 1300) {
// At the moment only SkPixmap has an erase() that takes an SkColor4f.
SkPixmap pm;
SkAssertResult(bm.peekPixels(&pm));
SkAssertResult(pm.erase(p3_to_srgb({1,0,0,1})));
SkAssertResult(pm.erase({1,0,0,1} /*in p3*/));
canvas->drawBitmap(bm, 10,10);
compare_pixel("drawBitmap P3 red, from SkPixmap::erase",
@ -159,7 +174,7 @@ DEF_SIMPLE_GM(p3, canvas, 450, 1300) {
// At the moment only SkPixmap has an erase() that takes an SkColor4f.
SkPixmap pm;
SkAssertResult(bm.peekPixels(&pm));
SkAssertResult(pm.erase(p3_to_srgb({1,0,0,1})));
SkAssertResult(pm.erase({1,0,0,1} /*in p3*/));
SkPaint paint;
paint.setShader(SkShader::MakeBitmapShader(bm, SkShader::kRepeat_TileMode,