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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp

Issue 1981823002: Remove OwnPtr::release() calls in platform/ (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
index 3efd86e288d4a8722043643e3f577765c13b2fc7..faf1444149966d4a3ee2162dcf4274f1cad25473 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
@@ -165,7 +165,7 @@ bool ImageFrameGenerator::decodeToYUV(SegmentReader* data, size_t index, const S
decoder->setData(data, true);
OwnPtr<ImagePlanes> imagePlanes = adoptPtr(new ImagePlanes(planes, rowBytes));
- decoder->setImagePlanes(imagePlanes.release());
+ decoder->setImagePlanes(std::move(imagePlanes));
ASSERT(decoder->canDecodeToYUV());
@@ -234,7 +234,7 @@ SkBitmap ImageFrameGenerator::tryToResumeDecode(SegmentReader* data, bool allDat
else
ImageDecodingStore::instance().unlockDecoder(this, decoder);
} else if (!removeDecoder) {
- ImageDecodingStore::instance().insertDecoder(this, decoderContainer.release());
+ ImageDecodingStore::instance().insertDecoder(this, std::move(decoderContainer));
}
return fullSizeImage;
}
@@ -332,7 +332,7 @@ bool ImageFrameGenerator::getYUVComponentSizes(SegmentReader* data, SkYUVSizeInf
// Setting a dummy ImagePlanes object signals to the decoder that we want to do YUV decoding.
decoder->setData(data, true);
OwnPtr<ImagePlanes> dummyImagePlanes = adoptPtr(new ImagePlanes);
- decoder->setImagePlanes(dummyImagePlanes.release());
+ decoder->setImagePlanes(std::move(dummyImagePlanes));
return updateYUVComponentSizes(decoder.get(), sizeInfo->fSizes, sizeInfo->fWidthBytes);
}

Powered by Google App Engine
This is Rietveld 408576698