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

Unified Diff: tests/SurfaceTest.cpp

Issue 1244143004: Remove test of illegal behavior that modifies a texture backing an SkImage. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « include/core/SkImage.h ('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 b1e233fa3afb3a5af929620544d9066977ff6627..3d6e59ed356572f8bf0ec632c90df3a7f05913ee 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -979,8 +979,12 @@ DEF_GPUTEST(SkImage_NewFromTexture, reporter, factory) {
sk_memset32(storage, expected1, w * h);
tex->writePixels(0, 0, w, h, kSkia8888_GrPixelConfig, storage, GrContext::kFlushWrites_PixelOp);
- // We expect the ref'd image to see the new color, but cpy'd one should still see the old color
+ // The cpy'd one should still see the old color
+#if 0
+ // There is no guarantee that refImg sees the new color. We are free to have made a copy. Our
+ // write pixels call violated the contract with refImg and refImg is now undefined.
test_image_color(reporter, refImg, expected1);
+#endif
test_image_color(reporter, cpyImg, expected0);
// Now exercise the release proc
« no previous file with comments | « include/core/SkImage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698