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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp

Issue 2306293002: Replaced PassRefPtr copies with moves in Source/platform. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(); 136 RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create();
137 SkROBuffer::Iter it(roBuffer.get()); 137 SkROBuffer::Iter it(roBuffer.get());
138 do { 138 do {
139 sharedBuffer->append(static_cast<const char*>(it.data()), it.size()); 139 sharedBuffer->append(static_cast<const char*>(it.data()), it.size());
140 } while (it.next()); 140 } while (it.next());
141 return sharedBuffer.release(); 141 return sharedBuffer.release();
142 } 142 }
143 143
144 void DeferredImageDecoder::setData(PassRefPtr<SharedBuffer> data, bool allDataRe ceived) 144 void DeferredImageDecoder::setData(PassRefPtr<SharedBuffer> data, bool allDataRe ceived)
145 { 145 {
146 setDataInternal(data, allDataReceived, true); 146 setDataInternal(std::move(data), allDataReceived, true);
147 } 147 }
148 148
149 void DeferredImageDecoder::setDataInternal(PassRefPtr<SharedBuffer> passData, bo ol allDataReceived, bool pushDataToDecoder) 149 void DeferredImageDecoder::setDataInternal(PassRefPtr<SharedBuffer> passData, bo ol allDataReceived, bool pushDataToDecoder)
150 { 150 {
151 RefPtr<SharedBuffer> data = passData; 151 RefPtr<SharedBuffer> data = passData;
152 if (m_actualDecoder) { 152 if (m_actualDecoder) {
153 m_allDataReceived = allDataReceived; 153 m_allDataReceived = allDataReceived;
154 if (pushDataToDecoder) 154 if (pushDataToDecoder)
155 m_actualDecoder->setData(data, allDataReceived); 155 m_actualDecoder->setData(data, allDataReceived);
156 prepareLazyDecodedFrames(); 156 prepareLazyDecodedFrames();
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 354 }
355 355
356 } // namespace blink 356 } // namespace blink
357 357
358 namespace WTF { 358 namespace WTF {
359 template<> struct VectorTraits<blink::DeferredFrameData> : public SimpleClassVec torTraits<blink::DeferredFrameData> { 359 template<> struct VectorTraits<blink::DeferredFrameData> : public SimpleClassVec torTraits<blink::DeferredFrameData> {
360 STATIC_ONLY(VectorTraits); 360 STATIC_ONLY(VectorTraits);
361 static const bool canInitializeWithMemset = false; // Not all DeferredFrameD ata members initialize to 0. 361 static const bool canInitializeWithMemset = false; // Not all DeferredFrameD ata members initialize to 0.
362 }; 362 };
363 } 363 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698