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

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

Issue 2807073002: Removed local RefPtr objects created from PassRefPtr arguments. (Closed)
Patch Set: Created 3 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
Index: third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
index cd31bdac1ecc6d344094d77234923d3feed57a3b..8f60425291892f34cd97029e6b84b83b09ffec28 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
@@ -58,12 +58,10 @@ struct DeferredFrameData {
};
std::unique_ptr<DeferredImageDecoder> DeferredImageDecoder::Create(
- PassRefPtr<SharedBuffer> pass_data,
+ RefPtr<SharedBuffer> data,
bool data_complete,
ImageDecoder::AlphaOption alpha_option,
const ColorBehavior& color_behavior) {
- RefPtr<SharedBuffer> data = pass_data;
-
std::unique_ptr<ImageDecoder> actual_decoder =
ImageDecoder::Create(data, data_complete, alpha_option, color_behavior);
if (!actual_decoder)
@@ -146,10 +144,9 @@ void DeferredImageDecoder::SetData(PassRefPtr<SharedBuffer> data,
SetDataInternal(std::move(data), all_data_received, true);
}
-void DeferredImageDecoder::SetDataInternal(PassRefPtr<SharedBuffer> pass_data,
+void DeferredImageDecoder::SetDataInternal(RefPtr<SharedBuffer> data,
bool all_data_received,
bool push_data_to_decoder) {
- RefPtr<SharedBuffer> data = pass_data;
if (actual_decoder_) {
all_data_received_ = all_data_received;
if (push_data_to_decoder)

Powered by Google App Engine
This is Rietveld 408576698