Remove SkPixmap::release

No longer need this for ImageFilters

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1821303002

Review URL: https://codereview.chromium.org/1821303002
This commit is contained in:
robertphillips 2016-03-22 12:20:15 -07:00 committed by Commit bot
parent 343a63d082
commit 4413e662a3
3 changed files with 0 additions and 25 deletions

View File

@ -58,7 +58,3 @@ const SkData* SkAutoPixmapStorage::detachPixelsAsData() {
return data.release();
}
void SkAutoPixmapStorage::release() {
fStorage = nullptr;
this->INHERITED::reset();
}

View File

@ -46,14 +46,6 @@ public:
*/
const SkData* SK_WARN_UNUSED_RESULT detachPixelsAsData();
/**
* Whereas 'reset' frees the backing memory and then clears the SkPixmap,
* this entry point disowns the backing memory before clearing so the memory
* isn't freed. It can be used when the Pixmap has been installed into
* an SkBitmap and the SkBitmap should manage the memory's lifetime.
*/
void release();
// We wrap these so we can clear our internal storage
void reset() {

View File

@ -183,23 +183,10 @@ DEF_TEST(SpecialImage_Pixmap, reporter) {
pixmap.erase(SK_ColorRED, subset);
{
// The SkAutoPixmapStorage keeps hold of the memory
sk_sp<SkSpecialImage> img(SkSpecialImage::MakeFromPixmap(nullptr, subset, pixmap,
nullptr, nullptr));
test_image(img, reporter, true, false, kPad, kFullSize);
}
{
// The image takes ownership of the memory
sk_sp<SkSpecialImage> img(SkSpecialImage::MakeFromPixmap(
nullptr, subset, pixmap,
[] (void* addr, void*) -> void {
sk_free(addr);
},
nullptr));
pixmap.release();
test_image(img, reporter, true, false, kPad, kFullSize);
}
}