From 2c4e75cc3c0302e0e151d90c74b4c476bfa8a8b5 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Mon, 21 Apr 2014 21:08:14 +0000 Subject: 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 --- tests/MallocPixelRefTest.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/MallocPixelRefTest.cpp') 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 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(dataPtr->bytes() + 4) == pr->pixels()); + REPORTER_ASSERT(reporter, dataPtr->data() == pr->pixels()); } } -- cgit v1.2.3