Chromium Code Reviews| Index: tests/GLProgramsTest.cpp |
| diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp |
| index 171ed613163a2993a113cebc5dc3e2839e100f44..16a259207852daa8cb4e8035a132d299d8f993cd 100644 |
| --- a/tests/GLProgramsTest.cpp |
| +++ b/tests/GLProgramsTest.cpp |
| @@ -154,33 +154,12 @@ static sk_sp<GrDrawContext> random_draw_context(GrContext* context, |
| : kBottomLeft_GrSurfaceOrigin; |
| int sampleCnt = random->nextBool() ? SkTMin(4, caps->maxSampleCount()) : 0; |
| - GrUniqueKey key; |
|
bsalomon
2016/07/19 15:04:29
I presume this keying was preserved from pre-DC da
|
| - static const GrUniqueKey::Domain kDomain = GrUniqueKey::GenerateDomain(); |
| - GrUniqueKey::Builder builder(&key, kDomain, 2); |
| - builder[0] = origin; |
| - builder[1] = sampleCnt; |
| - builder.finish(); |
| - |
| - sk_sp<GrTexture> texture(context->textureProvider()->findAndRefTextureByUniqueKey(key)); |
| - if (texture) { |
| - sk_sp<GrRenderTarget> rt(sk_ref_sp(texture->asRenderTarget())); |
| - return context->drawContext(std::move(rt)); |
| - } |
| - |
| sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kExact, |
| kRenderTargetWidth, |
| kRenderTargetHeight, |
| kRGBA_8888_GrPixelConfig, |
| sampleCnt, |
| origin)); |
| - if (!drawContext) { |
| - return nullptr; |
| - } |
| - |
| - // TODO: need a real way to do this via the drawContext |
| - texture = drawContext->asTexture(); |
| - context->textureProvider()->assignUniqueKeyToTexture(key, texture.get()); |
| - |
| return drawContext; |
| } |