Fix issues related to backend texture/rendertarget creation
Change-Id: I640ea5f316e9e4aba778f450655e74636199e0b1
Reviewed-on: https://skia-review.googlesource.com/76440
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index dfde098..8b36bad 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -77,7 +77,7 @@
SkDestinationSurfaceColorMode mipColorMode) {
ASSERT_SINGLE_OWNER
- SkASSERT(mipLevelCount > 1);
+ SkASSERT(mipLevelCount > 0);
if (this->isAbandoned()) {
return nullptr;
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index 83e5aa7..47f98a6 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -90,8 +90,9 @@
}
#endif
case kOpenGL_GrBackend: {
- GrGLFramebufferInfo* glInfo = (GrGLFramebufferInfo*)(handle);
- return GrBackendRenderTarget(width, height, sampleCnt, stencilBits, config, *glInfo);
+ GrGLFramebufferInfo glInfo;
+ glInfo.fFBOID = handle;
+ return GrBackendRenderTarget(width, height, sampleCnt, stencilBits, config, glInfo);
}
case kMock_GrBackend: // fall through
default: