diff options
author | 2017-01-20 09:11:37 -0500 | |
---|---|---|
committer | 2017-01-20 16:47:34 +0000 | |
commit | 77505da16093695f717ad34ff100ec11ffb2835b (patch) | |
tree | 2eae3106223c6b484606d5b74f139039027a5eba /tools/gpu | |
parent | 80a08dd2e5cc379100ae944b3f3fadf887d518f0 (diff) |
Remove GrTestTarget
Change-Id: I4d2e1aa54732ff75b44a197255035c0e04548219
Reviewed-on: https://skia-review.googlesource.com/7327
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tools/gpu')
-rw-r--r-- | tools/gpu/GrTest.cpp | 17 | ||||
-rw-r--r-- | tools/gpu/GrTest.h | 18 |
2 files changed, 0 insertions, 35 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp index cc34f21682..975d1ecf94 100644 --- a/tools/gpu/GrTest.cpp +++ b/tools/gpu/GrTest.cpp @@ -55,13 +55,6 @@ void SetupAlwaysEvictAtlas(GrContext* context) { } }; -void GrTestTarget::init(GrContext* ctx, sk_sp<GrRenderTargetContext> renderTargetContext) { - SkASSERT(!fContext); - - fContext.reset(SkRef(ctx)); - fRenderTargetContext = renderTargetContext; -} - bool GrSurfaceProxy::isWrapped_ForTesting() const { return SkToBool(fTarget); } @@ -70,16 +63,6 @@ bool GrRenderTargetContext::isWrapped_ForTesting() const { return fRenderTargetProxy->isWrapped_ForTesting(); } -void GrContext::getTestTarget(GrTestTarget* tar, sk_sp<GrRenderTargetContext> renderTargetContext) { - this->flush(); - SkASSERT(renderTargetContext); - // We could create a proxy GrOpList that passes through to fGpu until ~GrTextTarget() and - // then disconnects. This would help prevent test writers from mixing using the returned - // GrOpList and regular drawing. We could also assert or fail in GrContext drawing methods - // until ~GrTestTarget(). - tar->init(this, std::move(renderTargetContext)); -} - void GrContext::setTextBlobCacheLimit_ForTesting(size_t bytes) { fTextBlobCache->setBudget(bytes); } diff --git a/tools/gpu/GrTest.h b/tools/gpu/GrTest.h index 0ef2140389..db4c4515b3 100644 --- a/tools/gpu/GrTest.h +++ b/tools/gpu/GrTest.h @@ -9,7 +9,6 @@ #define GrTest_DEFINED #include "GrContext.h" -#include "GrRenderTargetContext.h" namespace GrTest { /** @@ -19,21 +18,4 @@ namespace GrTest { void SetupAlwaysEvictAtlas(GrContext*); }; -/** TODO Please do not use this if you can avoid it. We are in the process of deleting it. - Allows a test to temporarily draw to a GrOpList owned by a GrContext. Tests that use this - should be careful not to mix using the GrOpList directly and drawing via SkCanvas or - GrContext. In the future this object may provide some guards to prevent this. */ -class GrTestTarget { -public: - GrTestTarget() {} - - void init(GrContext*, sk_sp<GrRenderTargetContext>); - - GrResourceProvider* resourceProvider() { return fContext->resourceProvider(); } - -private: - sk_sp<GrContext> fContext; - sk_sp<GrRenderTargetContext> fRenderTargetContext; -}; - #endif |