From 308150821517a4dc73e43db1022d3e8bd589d2db Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Fri, 9 Feb 2018 16:08:30 -0500 Subject: Remove unused code resulted from deleting DeferredTextureImage Bug: skia: Change-Id: Iaedc09880bd6a2d8fda4ce52f1644a944dd72605 Reviewed-on: https://skia-review.googlesource.com/106266 Reviewed-by: Brian Salomon Commit-Queue: Greg Daniel --- tests/GrSurfaceTest.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'tests/GrSurfaceTest.cpp') diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp index 9c4359af2c..1a8072f3b0 100644 --- a/tests/GrSurfaceTest.cpp +++ b/tests/GrSurfaceTest.cpp @@ -104,16 +104,6 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) { desc.fWidth = 64; desc.fHeight = 64; - // Enough space for the first mip of our largest pixel config - const size_t pixelBufferSize = desc.fWidth * desc.fHeight * - GrBytesPerPixel(kRGBA_float_GrPixelConfig); - std::unique_ptr pixelData(new char[pixelBufferSize]); - memset(pixelData.get(), 0, pixelBufferSize); - - // We re-use the same mip level objects (with updated pointers and rowBytes) for each config - const int levelCount = SkMipMap::ComputeLevelCount(desc.fWidth, desc.fHeight) + 1; - std::unique_ptr texels(new GrMipLevel[levelCount]); - for (GrPixelConfig config : configs) { for (GrSurfaceOrigin origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin }) { desc.fFlags = kNone_GrSurfaceFlags; @@ -126,15 +116,8 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(GrSurfaceRenderability, reporter, ctxInfo) { REPORTER_ASSERT(reporter, SkToBool(tex) == ict, "config:%d, tex:%d, isConfigTexturable:%d", config, SkToBool(tex), ict); - size_t rowBytes = desc.fWidth * GrBytesPerPixel(desc.fConfig); - for (int i = 0; i < levelCount; ++i) { - texels[i].fPixels = pixelData.get(); - texels[i].fRowBytes = rowBytes >> i; - } - sk_sp proxy = proxyProvider->createMipMapProxy( - desc, SkBudgeted::kNo, - texels.get(), levelCount); + desc, SkBudgeted::kNo); REPORTER_ASSERT(reporter, SkToBool(proxy.get()) == (caps->isConfigTexturable(desc.fConfig) && caps->mipMapSupport())); -- cgit v1.2.3