don't rely on canvas->readPixels

Bug: skia:3216
Change-Id: I01a8d0083c79c0fe71fbc4d8cfdde4fa6e48b636
Reviewed-on: https://skia-review.googlesource.com/25741
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tests/DrawPathTest.cpp b/tests/DrawPathTest.cpp
index 2434bdf..3893981 100644
--- a/tests/DrawPathTest.cpp
+++ b/tests/DrawPathTest.cpp
@@ -26,7 +26,7 @@
     int y = SkScalarRoundToInt(r.top());
 
     // check that the pixel in question starts as transparent (by the surface)
-    if (canvas->readPixels(output, x, y)) {
+    if (surf->readPixels(output, x, y)) {
         REPORTER_ASSERT(reporter, 0 == pixel[0]);
     } else {
         REPORTER_ASSERT_MESSAGE(reporter, false, "readPixels failed");
@@ -39,7 +39,7 @@
     canvas->drawRect(r, paint);
 
     // Now check that it is BLACK
-    if (canvas->readPixels(output, x, y)) {
+    if (surf->readPixels(output, x, y)) {
         // don't know what swizzling PMColor did, but white should always
         // appear the same.
         REPORTER_ASSERT(reporter, 0xFFFFFFFF == pixel[0]);