diff options
author | scroggo <scroggo@google.com> | 2015-12-16 14:17:58 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-16 14:17:58 -0800 |
commit | c8f969309cafebeb16ad057f766b61bdc406a8b8 (patch) | |
tree | a654a5793f85b08b7ee29faa848cdb39d7dd75d5 /tests/FlattenableFactoryToName.cpp | |
parent | f61088321c0906f62431c029173c1a7a70856ec7 (diff) |
Revert of Add test for previously unflattenables (patchset #1 id:1 of https://codereview.chromium.org/1514373003/ )
Reason for revert:
Speculative fix for skbug.com/4709
Original issue's description:
> Add test for previously unflattenables
>
> BUG=skia:4613
>
> Committed: https://skia.googlesource.com/skia/+/061aaa79f7d8a2e93962e8296abaae13f0a7a715
TBR=halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4613
Review URL: https://codereview.chromium.org/1532753002
Diffstat (limited to 'tests/FlattenableFactoryToName.cpp')
-rw-r--r-- | tests/FlattenableFactoryToName.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/tests/FlattenableFactoryToName.cpp b/tests/FlattenableFactoryToName.cpp deleted file mode 100644 index f8cb4fa2f9..0000000000 --- a/tests/FlattenableFactoryToName.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2015 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "SkAlphaThresholdFilter.h" -#include "SkImage.h" -#include "Test.h" - -static void test_flattenable(skiatest::Reporter* r, - const SkFlattenable* f, - const char* desc) { - if (f) { - SkFlattenable::Factory factory = f->getFactory(); - REPORTER_ASSERT(r, factory); - if (factory) { - if (!SkFlattenable::FactoryToName(factory)) { - ERRORF(r, "SkFlattenable::FactoryToName() fails with %s.", desc); - } - } - } -} - -DEF_TEST(FlattenableFactoryToName, r) { - SkIRect rects[2]; - rects[0] = SkIRect::MakeXYWH(0, 150, 500, 200); - rects[1] = SkIRect::MakeXYWH(150, 0, 200, 500); - SkRegion region; - region.setRects(rects, 2); - SkAutoTUnref<SkImageFilter> filter( SkAlphaThresholdFilter::Create(region, 0.2f, 0.7f)); - test_flattenable(r, filter, "SkAlphaThresholdFilter()"); - - SkBitmap bm; - bm.allocN32Pixels(8, 8); - bm.eraseColor(SK_ColorCYAN); - SkAutoTUnref<SkImage> image(SkImage::NewFromBitmap(bm)); - SkAutoTUnref<SkShader> shader(image->newShader(SkShader::kClamp_TileMode, - SkShader::kClamp_TileMode)); - test_flattenable(r, shader, "SkImage::newShader()"); -} |