diff options
author | bungeman <bungeman@google.com> | 2016-03-18 05:36:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-18 05:36:20 -0700 |
commit | 92701ab7836124e8a57eacab17b26c567ad20dd7 (patch) | |
tree | daea856d5a7804f753abb63686e1e0f11a03452f /tests | |
parent | 6f0749cfc7f93880bd6b8acfdc61900cda4a81fe (diff) |
Revert of Add SkSpecialImage::makeTextureImage entry point & update filterInput (patchset #3 id:40001 of https://codereview.chromium.org/1813813002/ )
Reason for revert:
Suspected cause of layout test css3/filters/effect-reference-tile-hw.htmlto crash.
https://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/83847/steps/webkit_tests%20%28with%20patch%29/logs/stdio
It could also be the previous change (but it appears this one depends on that one).
Original issue's description:
> Add SkSpecialImage::makeTextureImage entry point
>
> This is calved off of: https://codereview.chromium.org/1785643003 (Switch SkBlurImageFilter over to new onFilterImage interface)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813813002
>
> Committed: https://skia.googlesource.com/skia/+/05849018c85403a34b88819db1c4bcf713b70a2b
TBR=bsalomon@google.com,senorblanco@google.com,senorblanco@chromium.org,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1811973005
Diffstat (limited to 'tests')
-rw-r--r-- | tests/SpecialImageTest.cpp | 78 |
1 files changed, 1 insertions, 77 deletions
diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp index 3240fbd3a7..233ce2cee1 100644 --- a/tests/SpecialImageTest.cpp +++ b/tests/SpecialImageTest.cpp @@ -174,81 +174,6 @@ DEF_TEST(SpecialImage_Pixmap, reporter) { #if SK_SUPPORT_GPU - -static void test_texture_backed(skiatest::Reporter* reporter, - const sk_sp<SkSpecialImage>& orig, - const sk_sp<SkSpecialImage>& gpuBacked) { - REPORTER_ASSERT(reporter, gpuBacked); - REPORTER_ASSERT(reporter, gpuBacked->peekTexture()); - REPORTER_ASSERT(reporter, gpuBacked->uniqueID() == orig->uniqueID()); - REPORTER_ASSERT(reporter, gpuBacked->subset().width() == orig->subset().width() && - gpuBacked->subset().height() == orig->subset().height()); -} - -// Test out the SkSpecialImage::makeTextureImage entry point -DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_MakeTexture, reporter, context) { - SkBitmap bm = create_bm(); - - const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); - - { - // raster - sk_sp<SkSpecialImage> rasterImage(SkSpecialImage::MakeFromRaster( - nullptr, - SkIRect::MakeWH(kFullSize, - kFullSize), - bm)); - - { - sk_sp<SkSpecialImage> fromRaster(rasterImage->makeTextureImage(nullptr, context)); - test_texture_backed(reporter, rasterImage, fromRaster); - } - - { - sk_sp<SkSpecialImage> subRasterImage(rasterImage->makeSubset(subset)); - - sk_sp<SkSpecialImage> fromSubRaster(subRasterImage->makeTextureImage(nullptr, context)); - test_texture_backed(reporter, subRasterImage, fromSubRaster); - } - } - - { - // gpu - GrSurfaceDesc desc; - desc.fConfig = kSkia8888_GrPixelConfig; - desc.fFlags = kNone_GrSurfaceFlags; - desc.fWidth = kFullSize; - desc.fHeight = kFullSize; - - SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(desc, - SkBudgeted::kNo, - bm.getPixels(), - 0)); - if (!texture) { - return; - } - - sk_sp<SkSpecialImage> gpuImage(SkSpecialImage::MakeFromGpu( - nullptr, - SkIRect::MakeWH(kFullSize, - kFullSize), - kNeedNewImageUniqueID_SpecialImage, - texture)); - - { - sk_sp<SkSpecialImage> fromGPU(gpuImage->makeTextureImage(nullptr, context)); - test_texture_backed(reporter, gpuImage, fromGPU); - } - - { - sk_sp<SkSpecialImage> subGPUImage(gpuImage->makeSubset(subset)); - - sk_sp<SkSpecialImage> fromSubGPU(subGPUImage->makeTextureImage(nullptr, context)); - test_texture_backed(reporter, subGPUImage, fromSubGPU); - } - } -} - DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_Gpu, reporter, context) { SkBitmap bm = create_bm(); @@ -258,8 +183,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_Gpu, reporter, context) { desc.fWidth = kFullSize; desc.fHeight = kFullSize; - SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(desc, - SkBudgeted::kNo, + SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(desc, SkBudgeted::kNo, bm.getPixels(), 0)); if (!texture) { return; |