Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: tests/ReadWriteAlphaTest.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698