diff options
author | reed <reed@chromium.org> | 2014-09-21 10:25:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-21 10:25:07 -0700 |
commit | 29c857d0f3a1cb837f73406eeb6ba9771879b5e7 (patch) | |
tree | 135d517cf36f82b7f6f02fd81bfef92eb8befe34 /tests | |
parent | 3716fd067a5621bb94a6cb08d72afec8bf3aceda (diff) |
Revert of introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/)
Reason for revert:
Broke call site in WebKit
Original issue's description:
> introduce Props to surface (work in progress)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3716fd067a5621bb94a6cb08d72afec8bf3aceda
R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@google.com
TBR=bsalomon@google.com, bungeman@google.com, fmalita@google.com, jvanverth@google.com, reed@google.com, robertphillips@google.com, vangelis@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/583773004
Diffstat (limited to 'tests')
-rw-r--r-- | tests/DeferredCanvasTest.cpp | 8 | ||||
-rw-r--r-- | tests/GpuDrawPathTest.cpp | 3 | ||||
-rw-r--r-- | tests/ImageFilterTest.cpp | 6 | ||||
-rw-r--r-- | tests/PremulAlphaRoundTripTest.cpp | 3 | ||||
-rw-r--r-- | tests/ReadWriteAlphaTest.cpp | 3 | ||||
-rw-r--r-- | tests/ResourceCacheTest.cpp | 2 | ||||
-rw-r--r-- | tests/SurfaceTest.cpp | 2 |
7 files changed, 9 insertions, 18 deletions
diff --git a/tests/DeferredCanvasTest.cpp b/tests/DeferredCanvasTest.cpp index d234c8ca27..2938326aba 100644 --- a/tests/DeferredCanvasTest.cpp +++ b/tests/DeferredCanvasTest.cpp @@ -51,7 +51,7 @@ static SkPMColor read_pixel(SkSurface* surface, int x, int y) { class MockSurface : public SkSurface_Base { public: - MockSurface(int width, int height) : SkSurface_Base(width, height, NULL) { + MockSurface(int width, int height) : SkSurface_Base(width, height) { clearCounts(); fBitmap.allocN32Pixels(width, height); } @@ -706,7 +706,7 @@ static void TestDeferredCanvasSurface(skiatest::Reporter* reporter, GrContextFac return; } - surface = SkSurface::NewRenderTarget(context, imageSpec, 0, NULL); + surface = SkSurface::NewRenderTarget(context, imageSpec); } else #endif { @@ -788,8 +788,8 @@ static void TestDeferredCanvasSetSurface(skiatest::Reporter* reporter, GrContext if (NULL == context) { continue; } - surface = SkSurface::NewRenderTarget(context, imageSpec, 0, NULL); - alternateSurface = SkSurface::NewRenderTarget(context, imageSpec, 0, NULL); + surface = SkSurface::NewRenderTarget(context, imageSpec); + alternateSurface = SkSurface::NewRenderTarget(context, imageSpec); } else #endif { diff --git a/tests/GpuDrawPathTest.cpp b/tests/GpuDrawPathTest.cpp index 3e47a05ba3..f0148ba9a2 100644 --- a/tests/GpuDrawPathTest.cpp +++ b/tests/GpuDrawPathTest.cpp @@ -56,8 +56,7 @@ DEF_GPUTEST(GpuDrawPath, reporter, factory) { for (size_t i = 0; i < SK_ARRAY_COUNT(sampleCounts); ++i) { SkImageInfo info = SkImageInfo::MakeN32Premul(255, 255); - SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(grContext, info, - sampleCounts[i], NULL)); + SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(grContext, info, sampleCounts[i])); test_drawPathEmpty(reporter, surface->getCanvas()); } } diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp index b1d087825b..8b6e4285ca 100644 --- a/tests/ImageFilterTest.cpp +++ b/tests/ImageFilterTest.cpp @@ -1000,13 +1000,10 @@ DEF_TEST(XfermodeImageFilterCroppedInput, reporter) { } #if SK_SUPPORT_GPU -const SkSurfaceProps gProps = SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType); - DEF_GPUTEST(ImageFilterCropRectGPU, reporter, factory) { GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0)); SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, SkImageInfo::MakeN32Premul(100, 100), - gProps, 0)); test_crop_rects(device, reporter); } @@ -1015,7 +1012,6 @@ DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) { GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0)); SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, SkImageInfo::MakeN32Premul(100, 100), - gProps, 0)); test_huge_blur(device, reporter); } @@ -1024,7 +1020,6 @@ DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) { GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0)); SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, SkImageInfo::MakeN32Premul(1, 1), - gProps, 0)); test_xfermode_cropped_input(device, reporter); } @@ -1033,7 +1028,6 @@ DEF_GPUTEST(TestNegativeBlurSigmaGPU, reporter, factory) { GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0)); SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, SkImageInfo::MakeN32Premul(1, 1), - gProps, 0)); test_negative_blur_sigma(device, reporter); } diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp index ce45f16258..8bdb77012a 100644 --- a/tests/PremulAlphaRoundTripTest.cpp +++ b/tests/PremulAlphaRoundTripTest.cpp @@ -90,8 +90,7 @@ DEF_GPUTEST(PremulAlphaRoundTrip, reporter, factory) { continue; } - device.reset(SkGpuDevice::Create(context, info, - SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType), 0)); + device.reset(SkGpuDevice::Create(context, info, 0)); #else continue; #endif diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp index 385a17ead0..a320347637 100644 --- a/tests/ReadWriteAlphaTest.cpp +++ b/tests/ReadWriteAlphaTest.cpp @@ -81,8 +81,7 @@ DEF_GPUTEST(ReadWriteAlpha, reporter, factory) { REPORTER_ASSERT(reporter, match); // Now try writing on the single channel texture - SkAutoTUnref<SkBaseDevice> device(SkGpuDevice::Create(texture->asRenderTarget(), - SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType))); + SkAutoTUnref<SkBaseDevice> device(SkGpuDevice::Create(texture->asRenderTarget())); SkCanvas canvas(device); SkPaint paint; diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index f9f94d1b27..9a4a129c7f 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp @@ -298,7 +298,7 @@ DEF_GPUTEST(ResourceCache, reporter, factory) { desc.fWidth = gWidth; desc.fHeight = gHeight; SkImageInfo info = SkImageInfo::MakeN32Premul(gWidth, gHeight); - SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(context, info)); + SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(context, info, 0)); test_cache(reporter, context, surface->getCanvas()); test_purge_invalidated(reporter, context); diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index 69c8b845ec..63e47f1997 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp @@ -52,7 +52,7 @@ static SkSurface* createSurface(SurfaceType surfaceType, GrContext* context, } case kGpu_SurfaceType: #if SK_SUPPORT_GPU - return context ? SkSurface::NewRenderTarget(context, info, 0, NULL) : NULL; + return context ? SkSurface::NewRenderTarget(context, info) : NULL; #endif break; case kGpuScratch_SurfaceType: |