Remove offset to SkMallocPixelRef::NewWithData - use SkData::NewSubset instead.
R=scroggo@google.com, mtklein@google.com, reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/243483002
git-svn-id: http://skia.googlecode.com/svn/trunk@14289 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/MallocPixelRefTest.cpp b/tests/MallocPixelRefTest.cpp
index 5c28ac8..cf5e054 100644
--- a/tests/MallocPixelRefTest.cpp
+++ b/tests/MallocPixelRefTest.cpp
@@ -104,11 +104,10 @@
SkData* dataPtr = data.get();
REPORTER_ASSERT(reporter, dataPtr->unique());
SkAutoTUnref<SkMallocPixelRef> pr(
- SkMallocPixelRef::NewWithData(info, rowBytes, NULL, data.get(), 4));
+ SkMallocPixelRef::NewWithData(info, rowBytes, NULL, data.get()));
REPORTER_ASSERT(reporter, !(dataPtr->unique()));
data.reset(NULL);
REPORTER_ASSERT(reporter, dataPtr->unique());
- REPORTER_ASSERT(reporter,
- static_cast<const void*>(dataPtr->bytes() + 4) == pr->pixels());
+ REPORTER_ASSERT(reporter, dataPtr->data() == pr->pixels());
}
}