aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GrSurfaceTest.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-02-09 16:08:30 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-10 01:22:11 +0000
commit308150821517a4dc73e43db1022d3e8bd589d2db (patch)
tree1f2f2ffe45959de562eaeeda8033bde3779e9bdb /tests/GrSurfaceTest.cpp
parentdfb3a169605dc340658070fbeb3c5490c7f3ded6 (diff)
Remove unused code resulted from deleting DeferredTextureImage
Bug: skia: Change-Id: Iaedc09880bd6a2d8fda4ce52f1644a944dd72605 Reviewed-on: https://skia-review.googlesource.com/106266 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests/GrSurfaceTest.cpp')
-rw-r--r--tests/GrSurfaceTest.cpp19
1 files changed, 1 insertions, 18 deletions
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<char[]> 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<GrMipLevel[]> 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<GrTextureProxy> proxy = proxyProvider->createMipMapProxy(
- desc, SkBudgeted::kNo,
- texels.get(), levelCount);
+ desc, SkBudgeted::kNo);
REPORTER_ASSERT(reporter, SkToBool(proxy.get()) ==
(caps->isConfigTexturable(desc.fConfig) &&
caps->mipMapSupport()));