From 1749af20a11d0f364dbb7cad8dc89101f956c923 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 13 Apr 2018 19:26:38 +0000 Subject: [PATCH] Revert "add test for degenerate canvas dimension" This reverts commit 715b919e37aa662131ca70b0056bc8192d4bcee9. 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 > Commit-Queue: Mike Reed 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 Commit-Queue: Mike Reed --- tests/CanvasTest.cpp | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp index 380bdab392..06e06f0934 100644 --- a/tests/CanvasTest.cpp +++ b/tests/CanvasTest.cpp @@ -876,24 +876,3 @@ DEF_TEST(Canvas_SaveLayerWithNullBoundsAndZeroBoundsImageFilter, r) { REPORTER_ASSERT(r, canvas.getDeviceClipBounds().isEmpty()); 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); - } -} -