aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/GrTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpu/GrTest.cpp')
-rw-r--r--tools/gpu/GrTest.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index e1a7924062..dfb8c2d4f6 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -56,26 +56,32 @@ void SetupAlwaysEvictAtlas(GrContext* context, int dim) {
GrBackendTexture CreateBackendTexture(GrBackend backend, int width, int height,
GrPixelConfig config, GrMipMapped mipMapped,
GrBackendObject handle) {
+ GrBackendTexture beTex;
switch (backend) {
#ifdef SK_VULKAN
case kVulkan_GrBackend: {
GrVkImageInfo* vkInfo = (GrVkImageInfo*)(handle);
SkASSERT((GrMipMapped::kYes == mipMapped) == (vkInfo->fLevelCount > 1));
- return GrBackendTexture(width, height, *vkInfo);
+ beTex = GrBackendTexture(width, height, *vkInfo);
+ break;
}
#endif
case kOpenGL_GrBackend: {
GrGLTextureInfo* glInfo = (GrGLTextureInfo*)(handle);
SkASSERT(glInfo->fFormat);
- return GrBackendTexture(width, height, mipMapped, *glInfo);
+ beTex = GrBackendTexture(width, height, mipMapped, *glInfo);
+ break;
}
case kMock_GrBackend: {
GrMockTextureInfo* mockInfo = (GrMockTextureInfo*)(handle);
- return GrBackendTexture(width, height, mipMapped, *mockInfo);
+ beTex = GrBackendTexture(width, height, mipMapped, *mockInfo);
+ break;
}
default:
return GrBackendTexture();
}
+ beTex.setPixelConfig(config);
+ return beTex;
}
GrBackendFormat CreateBackendFormatFromTexture(const GrBackendTexture& tex) {
@@ -338,16 +344,6 @@ void GrDrawingManager::testingOnly_removeOnFlushCallbackObject(GrOnFlushCallback
//////////////////////////////////////////////////////////////////////////////
-GrPixelConfig GrBackendTexture::testingOnly_getPixelConfig() const {
- return fConfig;
-}
-
-GrPixelConfig GrBackendRenderTarget::testingOnly_getPixelConfig() const {
- return fConfig;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
#define DRAW_OP_TEST_EXTERN(Op) \
extern std::unique_ptr<GrDrawOp> Op##__Test(GrPaint&&, SkRandom*, GrContext*, GrFSAAType)
#define DRAW_OP_TEST_ENTRY(Op) Op##__Test