Revert "add test for degenerate canvas dimension"

This reverts commit 715b919e37.

Reason for revert: compile break on win

Original change's description:
> add test for degenerate canvas dimension
> 
> Bug: skia:
> Change-Id: Ib0532e706fbcdb126619301591ddc64910babdef
> Reviewed-on: https://skia-review.googlesource.com/121341
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=liyuqian@google.com,reed@google.com

Change-Id: I09dcba20d923d04ca1dc3fd0e62e8f42e4d4cdfd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/121380
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2018-04-13 19:26:38 +00:00 committed by Skia Commit-Bot
parent 715b919e37
commit 1749af20a1

View File

@ -876,24 +876,3 @@ DEF_TEST(Canvas_SaveLayerWithNullBoundsAndZeroBoundsImageFilter, r) {
REPORTER_ASSERT(r, canvas.getDeviceClipBounds().isEmpty()); REPORTER_ASSERT(r, canvas.getDeviceClipBounds().isEmpty());
canvas.restore(); canvas.restore();
} }
#include "SkPaintImageFilter.h"
// Test that we don't crash/assert when building a canvas with degenerate coordintes
// (esp. big ones, that might invoke tiling).
DEF_TEST(Canvas_degenerate_dimension, reporter) {
// Need a paint that will sneak us past the quickReject in SkCanvas, so we can test the
// raster code further downstream.
SkPaint paint;
paint.setImageFilter(SkPaintImageFilter::Make(SkPaint(), nullptr));
REPORTER_ASSERT(reporter, !paint.canComputeFastBounds());
const int big = 100 * 1024; // big enough to definitely trigger tiling
for (SkISize size : {SkISize{0, big}, {big, 0}, {0, 0}}) {
SkBitmap bm;
bm.setInfo(SkImageInfo::MakeN32Premul(size.width(), size.height()));
SkCanvas canvas(bm);
canvas.drawRect({0, 0, 100, 90*1024}, paint);
}
}