| Index: tests/SurfaceTest.cpp
|
| diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
|
| index a6739e3308166bed3b0155e038ac90763eff9583..99040b0ee195def82a42a5be520a11b72c4c46ee 100644
|
| --- a/tests/SurfaceTest.cpp
|
| +++ b/tests/SurfaceTest.cpp
|
| @@ -1002,6 +1002,15 @@ DEF_GPUTEST(SkImage_NewFromTexture, reporter, factory) {
|
| REPORTER_ASSERT(reporter, false);
|
| return;
|
| }
|
| +
|
| + // TODO: this should actually be okay
|
| + tex->setFromRawPixels(false);
|
| +
|
| + SkAutoTUnref<GrDrawContext> dc(ctx->drawContext(tex->asRenderTarget()));
|
| + if (!dc) {
|
| + REPORTER_ASSERT(reporter, false);
|
| + return;
|
| + }
|
|
|
| GrBackendObject srcTex = tex->getTextureHandle();
|
| ReleaseTextureContext releaseCtx(reporter);
|
| @@ -1015,7 +1024,7 @@ DEF_GPUTEST(SkImage_NewFromTexture, reporter, factory) {
|
| // Now lets jam new colors into our "external" texture, and see if the images notice
|
| const SkPMColor expected1 = SkPreMultiplyColor(SK_ColorBLUE);
|
| sk_memset32(storage, expected1, w * h);
|
| - tex->writePixels(0, 0, w, h, kSkia8888_GrPixelConfig, storage, GrContext::kFlushWrites_PixelOp);
|
| + tex->writePixels(dc, 0, 0, w, h, kSkia8888_GrPixelConfig, storage, GrContext::kFlushWrites_PixelOp);
|
|
|
| // The cpy'd one should still see the old color
|
| #if 0
|
|
|