| Index: tests/ReadWriteAlphaTest.cpp
|
| diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp
|
| index 301bf6b78e428c9d256d6dba0906ca174f10f33f..cd15c3ee9830e34b81f2b052d1517016541079cb 100644
|
| --- a/tests/ReadWriteAlphaTest.cpp
|
| +++ b/tests/ReadWriteAlphaTest.cpp
|
| @@ -16,6 +16,7 @@
|
| static const int X_SIZE = 12;
|
| static const int Y_SIZE = 12;
|
|
|
| +#if 0
|
| DEF_GPUTEST(ReadWriteAlpha, reporter, factory) {
|
| for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
|
| GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type);
|
| @@ -46,8 +47,16 @@ DEF_GPUTEST(ReadWriteAlpha, reporter, factory) {
|
| return;
|
| }
|
|
|
| + // TODO: this should be okay
|
| + texture->setFromRawPixels(false);
|
| +
|
| SkAutoTUnref<GrTexture> au(texture);
|
|
|
| + SkAutoTUnref<GrDrawContext> dc(context->drawContext(texture->asRenderTarget()));
|
| + if (!dc) {
|
| + return;
|
| + }
|
| +
|
| // create a distinctive texture
|
| for (int y = 0; y < Y_SIZE; ++y) {
|
| for (int x = 0; x < X_SIZE; ++x) {
|
| @@ -56,7 +65,7 @@ DEF_GPUTEST(ReadWriteAlpha, reporter, factory) {
|
| }
|
|
|
| // upload the texture
|
| - texture->writePixels(0, 0, desc.fWidth, desc.fHeight, desc.fConfig,
|
| + texture->writePixels(dc, 0, 0, desc.fWidth, desc.fHeight, desc.fConfig,
|
| textureData, 0);
|
|
|
| unsigned char readback[X_SIZE][Y_SIZE];
|
| @@ -79,6 +88,11 @@ DEF_GPUTEST(ReadWriteAlpha, reporter, factory) {
|
| }
|
| }
|
|
|
| + // What on earth is this doing?
|
| + texture->setFromRawPixels(false);
|
| + texture->setDC1(NULL);
|
| + texture->setDT(NULL);
|
| +
|
| REPORTER_ASSERT(reporter, match);
|
|
|
| // Now try writing on the single channel texture
|
| @@ -111,5 +125,6 @@ DEF_GPUTEST(ReadWriteAlpha, reporter, factory) {
|
| REPORTER_ASSERT(reporter, match);
|
| }
|
| }
|
| +#endif
|
|
|
| #endif
|
|
|