alternate textblobgeometrychange fix... just make our own surface if needed

This should decopple fixing the replay modes from revising the API.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1868553005

Review URL: https://codereview.chromium.org/1868553005
This commit is contained in:
mtklein 2016-04-06 13:57:38 -07:00 committed by Commit bot
parent b4aa36211c
commit 9e65f9399e
3 changed files with 18 additions and 264 deletions

View File

@ -47,8 +47,10 @@ protected:
uint32_t allowSRGBInputs = canvas->getProps(&canvasProps)
? canvasProps.flags() & SkSurfaceProps::kAllowSRGBInputs_Flag : 0;
SkSurfaceProps props(allowSRGBInputs, kUnknown_SkPixelGeometry);
auto surface(canvas->makeSurface(info, &props));
if (surface) {
auto surface = canvas->makeSurface(info, &props);
if (!surface) {
surface = SkSurface::MakeRaster(info, &props);
}
SkCanvas* c = surface->getCanvas();
// LCD text on white background
@ -63,12 +65,6 @@ protected:
c->clear(0x00ffffff);
c->drawTextBlob(blob.get(), 10, 150, paint);
surface->draw(canvas, 0, 0, nullptr);
} else {
const char* text = "This test requires a surface";
size_t len = strlen(text);
SkPaint paint;
canvas->drawText(text, len, 10, 100, paint);
}
}
private:

View File

@ -141,10 +141,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -177,18 +173,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -337,10 +321,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -373,18 +353,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -630,10 +598,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -666,18 +630,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -921,10 +873,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -957,18 +905,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -1215,10 +1151,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -1251,18 +1183,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -1502,10 +1422,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -1538,18 +1454,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -1791,10 +1695,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -1827,18 +1727,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -2076,10 +1964,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -2112,18 +1996,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -2308,10 +2180,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -2344,18 +2212,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -2633,10 +2489,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -2669,18 +2521,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -2834,10 +2674,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -2870,18 +2706,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -3038,10 +2862,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -3074,18 +2894,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -3259,10 +3067,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -3295,18 +3099,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -3479,10 +3271,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -3515,18 +3303,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",
@ -3825,10 +3601,6 @@
"serialize-8888",
"gm",
"_",
"textblobgeometrychange",
"serialize-8888",
"gm",
"_",
"verylargebitmap",
"serialize-8888",
"gm",
@ -3861,18 +3633,6 @@
"sp-8888",
"gm",
"_",
"textblobgeometrychange",
"pic-8888",
"gm",
"_",
"textblobgeometrychange",
"2ndpic-8888",
"gm",
"_",
"textblobgeometrychange",
"sp-8888",
"gm",
"_",
"patch_primitive",
"sp-8888",
"gm",

View File

@ -169,14 +169,12 @@ def get_args(bot):
'fontmgr_iter',
'lightingshader',
'path_stroke_with_zero_length',
'textblobgeometrychange',
'verylargebitmap', # Windows only.
'verylarge_picture_image']: # Windows only.
blacklist.extend(['serialize-8888', 'gm', '_', test])
# skia:4769
for test in ['drawfilter',
'path_stroke_with_zero_length',
'textblobgeometrychange']:
'path_stroke_with_zero_length']:
blacklist.extend([ 'sp-8888', 'gm', '_', test])
blacklist.extend([ 'pic-8888', 'gm', '_', test])
blacklist.extend(['2ndpic-8888', 'gm', '_', test])