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

Unified Diff: tests/SurfaceTest.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/SRGBReadWritePixelsTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tests/SRGBReadWritePixelsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698