From 9e9188f84b15a25e27f63d5f8de3ccd393d9a173 Mon Sep 17 00:00:00 2001 From: Yuqian Li Date: Thu, 16 Mar 2017 15:04:53 +0000 Subject: Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot" This reverts commit b64bcbdc3a5aa7b9e3ff216e4617ddc1db9260b5. Reason for revert: Android build failed as shown below. frameworks/base/libs/hwui/VkLayer.cpp:32:41: error: too many arguments to function call, expected 0, have 1 mImage = surface->makeImageSnapshot(SkBudgeted::kNo); Original change's description: > Remove budgeted parameter from SkSurface::makeImageSnapshot > > This unused feature complicates MDB. > > Chrome compiles locally for me with this CL. > > Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72 > Reviewed-on: https://skia-review.googlesource.com/9734 > Reviewed-by: Brian Salomon > Commit-Queue: Robert Phillips > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Iae6e313c15b2352bd0d4fc7b5629de0a51ac398e Reviewed-on: https://skia-review.googlesource.com/9788 Reviewed-by: Yuqian Li Commit-Queue: Yuqian Li --- tests/GrTextureMipMapInvalidationTest.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/GrTextureMipMapInvalidationTest.cpp') diff --git a/tests/GrTextureMipMapInvalidationTest.cpp b/tests/GrTextureMipMapInvalidationTest.cpp index e7573dc010..166c57c066 100644 --- a/tests/GrTextureMipMapInvalidationTest.cpp +++ b/tests/GrTextureMipMapInvalidationTest.cpp @@ -20,11 +20,13 @@ // Tests that MIP maps are created and invalidated as expected when drawing to and from GrTextures. DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrTextureMipMapInvalidationTest, reporter, ctxInfo) { auto isMipped = [] (SkSurface* surf) { - return as_IB(surf->makeImageSnapshot())->peekTexture()->texturePriv().hasMipMaps(); + return as_IB(surf->makeImageSnapshot(SkBudgeted::kYes))-> + peekTexture()->texturePriv().hasMipMaps(); }; auto mipsAreDirty = [] (SkSurface* surf) { - return as_IB(surf->makeImageSnapshot())->peekTexture()->texturePriv().mipMapsAreDirty(); + return as_IB(surf->makeImageSnapshot(SkBudgeted::kYes))-> + peekTexture()->texturePriv().mipMapsAreDirty(); }; GrContext* context = ctxInfo.grContext(); @@ -42,7 +44,7 @@ DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrTextureMipMapInvalidationTest, reporter, ctxInf SkPaint paint; paint.setFilterQuality(kMedium_SkFilterQuality); surf2->getCanvas()->scale(0.2f, 0.2f); - surf2->getCanvas()->drawImage(surf1->makeImageSnapshot(), 0, 0, &paint); + surf2->getCanvas()->drawImage(surf1->makeImageSnapshot(SkBudgeted::kYes), 0, 0, &paint); surf2->getCanvas()->flush(); REPORTER_ASSERT(reporter, isMipped(surf1.get())); REPORTER_ASSERT(reporter, !mipsAreDirty(surf1.get())); -- cgit v1.2.3