Add flag on GrBackendTexture to say whether texture is mipped or not

Bug: skia:
Change-Id: Ia684e3daf779ec2feaaec64c04dabf5cb03cd07a
Reviewed-on: https://skia-review.googlesource.com/57821
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index 3a74b6f..32e2cfa 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -55,21 +55,23 @@
 }
 
 GrBackendTexture CreateBackendTexture(GrBackend backend, int width, int height,
-                                      GrPixelConfig config, GrBackendObject handle) {
+                                      GrPixelConfig config, GrMipMapped mipMapped,
+                                      GrBackendObject handle) {
     switch (backend) {
 #ifdef SK_VULKAN
         case kVulkan_GrBackend: {
             GrVkImageInfo* vkInfo = (GrVkImageInfo*)(handle);
+            SkASSERT((GrMipMapped::kYes == mipMapped) == (vkInfo->fLevelCount > 1));
             return GrBackendTexture(width, height, *vkInfo);
         }
 #endif
         case kOpenGL_GrBackend: {
             GrGLTextureInfo* glInfo = (GrGLTextureInfo*)(handle);
-            return GrBackendTexture(width, height, config, *glInfo);
+            return GrBackendTexture(width, height, config, mipMapped, *glInfo);
         }
         case kMock_GrBackend: {
             GrMockTextureInfo* mockInfo = (GrMockTextureInfo*)(handle);
-            return GrBackendTexture(width, height, config, *mockInfo);
+            return GrBackendTexture(width, height, config, mipMapped, *mockInfo);
         }
         default:
             return GrBackendTexture();