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

Unified Diff: tests/MallocPixelRefTest.cpp

Issue 243483002: Remove offset to SkMallocPixelRef::NewWithData - use SkData::NewSubset instead. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: AnotherPatchSet Created 6 years, 8 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 | « src/core/SkMallocPixelRef.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MallocPixelRefTest.cpp
diff --git a/tests/MallocPixelRefTest.cpp b/tests/MallocPixelRefTest.cpp
index 5c28ac89cb2f6935c41e503765c99b943d9e5534..cf5e054220e3390f68987de8eebd40e54930d64e 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());
}
}
« no previous file with comments | « src/core/SkMallocPixelRef.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698