aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-10-23 16:05:23 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-23 20:25:59 +0000
commite252f08982b0c747cd4d34c00ce413ab1005e99a (patch)
tree1fde0a4ac30cf4dc1fc752ef39fc2a0b905be210 /tests
parent33397f279393a33eff8e32d47fc56be86b86c9bc (diff)
Add hint to SkSurface::MakeRenderTarget that we will use mips
Additionally this changed triggered a cascade of plumbing GrMipMapped down throughout Ganesh. Bug: skia: Change-Id: I4181f44d9046d66139bb491c7abf86703305aaeb Reviewed-on: https://skia-review.googlesource.com/63000 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/DeviceTest.cpp1
-rw-r--r--tests/GrMipMappedTest.cpp4
-rw-r--r--tests/GrTextureMipMapInvalidationTest.cpp3
3 files changed, 5 insertions, 3 deletions
diff --git a/tests/DeviceTest.cpp b/tests/DeviceTest.cpp
index 55c9421dbb..64b83fcb3c 100644
--- a/tests/DeviceTest.cpp
+++ b/tests/DeviceTest.cpp
@@ -82,6 +82,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_GPUDevice, reporter, ctxInfo) {
sk_sp<SkBaseDevice> gpuDev(SkGpuDevice::Make(context, SkBudgeted::kNo, ii,
0, kBottomLeft_GrSurfaceOrigin, nullptr,
+ GrMipMapped::kNo,
SkGpuDevice::kClear_InitContents));
SkBitmap bm;
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp
index 143e902a7e..aad3b60d8d 100644
--- a/tests/GrMipMappedTest.cpp
+++ b/tests/GrMipMappedTest.cpp
@@ -86,14 +86,14 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrWrappedMipMappedTest, reporter, ctxInfo) {
}
if (GrMipMapped::kYes == mipMapped) {
- REPORTER_ASSERT(reporter, texture->texturePriv().hasMipMaps());
+ REPORTER_ASSERT(reporter, GrMipMapped::kYes == texture->texturePriv().mipMapped());
if (isRT) {
REPORTER_ASSERT(reporter, texture->texturePriv().mipMapsAreDirty());
} else {
REPORTER_ASSERT(reporter, !texture->texturePriv().mipMapsAreDirty());
}
} else {
- REPORTER_ASSERT(reporter, !texture->texturePriv().hasMipMaps());
+ REPORTER_ASSERT(reporter, GrMipMapped::kNo == texture->texturePriv().mipMapped());
}
context->getGpu()->deleteTestingOnlyBackendTexture(backendHandle);
}
diff --git a/tests/GrTextureMipMapInvalidationTest.cpp b/tests/GrTextureMipMapInvalidationTest.cpp
index 8b2d95faad..cfb6853806 100644
--- a/tests/GrTextureMipMapInvalidationTest.cpp
+++ b/tests/GrTextureMipMapInvalidationTest.cpp
@@ -19,7 +19,8 @@
// 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 surf->makeImageSnapshot()->getTexture()->texturePriv().hasMipMaps();
+ const GrTexture* texture = surf->makeImageSnapshot()->getTexture();
+ return GrMipMapped::kYes == texture->texturePriv().mipMapped();
};
auto mipsAreDirty = [] (SkSurface* surf) {