aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GrMipMappedTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-06-21 17:00:26 -0400
committerGravatar Brian Salomon <bsalomon@google.com>2018-06-21 22:17:04 +0000
commit9457546761a40c96f586b34b755fef47a7ad006a (patch)
tree5c2ac4e758e3694f8aaa3fc65f893e74747cc9a6 /tests/GrMipMappedTest.cpp
parentcd224b17e8f91fb4c44553226055325d46df3a46 (diff)
Alternative fix for stale MIP maps on texture export/import.
This change assumes imported textures in SkImages have dirty mip levels and disables regenerating the MIP levels on export (added in https://skia.googlesource.com/skia/+/930f939c48af1be6005af12bb6f709ca5da9d118). This is being done temporarily because it is a simpler change to cherry pick to earlier branches than https://skia.googlesource.com/skia/+/930f939c48af1be6005af12bb6f709ca5da9d118 Bug: chromium:850617 Change-Id: I7c90da782a0ed9014acd6a54ffdee1a0b34fa00c Reviewed-on: https://skia-review.googlesource.com/136788 Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests/GrMipMappedTest.cpp')
-rw-r--r--tests/GrMipMappedTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp
index 5c303633ec..e7c98633d7 100644
--- a/tests/GrMipMappedTest.cpp
+++ b/tests/GrMipMappedTest.cpp
@@ -87,7 +87,13 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrWrappedMipMappedTest, reporter, ctxInfo) {
if (isRT) {
REPORTER_ASSERT(reporter, texture->texturePriv().mipMapsAreDirty());
} else {
+#if 1
+ // This is temporarily checks that the new image DOES have dirty MIP levels. See
+ // comment in SkImage_Gpu.cpp, new_wrapped_texture_common().
+ REPORTER_ASSERT(reporter, texture->texturePriv().mipMapsAreDirty());
+#else
REPORTER_ASSERT(reporter, !texture->texturePriv().mipMapsAreDirty());
+#endif
}
} else {
REPORTER_ASSERT(reporter, GrMipMapped::kNo == texture->texturePriv().mipMapped());