aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/MallocPixelRefTest.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-21 21:08:14 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-21 21:08:14 +0000
commit2c4e75cc3c0302e0e151d90c74b4c476bfa8a8b5 (patch)
tree31f9c18cd261ca0afed29436b2a116e51e5c77e6 /tests/MallocPixelRefTest.cpp
parent855e88edfafe4b3892e99f932c38fa7433b2fcbe (diff)
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
Diffstat (limited to 'tests/MallocPixelRefTest.cpp')
-rw-r--r--tests/MallocPixelRefTest.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/MallocPixelRefTest.cpp b/tests/MallocPixelRefTest.cpp
index 5c28ac89cb..cf5e054220 100644
--- a/tests/MallocPixelRefTest.cpp
+++ b/tests/MallocPixelRefTest.cpp
@@ -104,11 +104,10 @@ DEF_TEST(MallocPixelRef, reporter) {
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());
}
}