Index: src/gpu/GrTest.cpp |
diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp |
index 448c1f44b5edaecba604404055b6b58eb5ec9f0d..6e9df211fa93c4e8abcee595c37b9f5aa13f3a63 100644 |
--- a/src/gpu/GrTest.cpp |
+++ b/src/gpu/GrTest.cpp |
@@ -44,12 +44,11 @@ |
} |
}; |
-void GrTestTarget::init(GrContext* ctx, GrDrawTarget* target, GrRenderTarget* rt) { |
+void GrTestTarget::init(GrContext* ctx, GrDrawTarget* target) { |
SkASSERT(!fContext); |
fContext.reset(SkRef(ctx)); |
fDrawTarget.reset(SkRef(target)); |
- fRenderTarget.reset(SkRef(rt)); |
} |
void GrContext::getTestTarget(GrTestTarget* tar) { |
@@ -58,22 +57,8 @@ |
// then disconnects. This would help prevent test writers from mixing using the returned |
// GrDrawTarget and regular drawing. We could also assert or fail in GrContext drawing methods |
// until ~GrTestTarget(). |
- GrSurfaceDesc desc; |
- desc.fFlags = kRenderTarget_GrSurfaceFlag; |
- desc.fWidth = 32; |
- desc.fHeight = 32; |
- desc.fConfig = kRGBA_8888_GrPixelConfig; |
- desc.fSampleCnt = 0; |
- |
- GrTexture* texture = this->textureProvider()->createTexture(desc, false, nullptr, 0); |
- if (nullptr == texture) { |
- return; |
- } |
- SkASSERT(nullptr != texture->asRenderTarget()); |
- GrRenderTarget* rt = texture->asRenderTarget(); |
- |
- SkAutoTUnref<GrDrawTarget> dt(fDrawingManager->newDrawTarget(rt)); |
- tar->init(this, dt, rt); |
+ SkAutoTUnref<GrDrawTarget> dt(fDrawingManager->newDrawTarget(nullptr)); |
+ tar->init(this, dt); |
} |
void GrContext::setTextBlobCacheLimit_ForTesting(size_t bytes) { |