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

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

Issue 2011783002: Rename OwnPtr::clear() to reset() in platform/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 266
267 // The last lazy decoded frame created from previous call might be 267 // The last lazy decoded frame created from previous call might be
268 // incomplete so update its state. 268 // incomplete so update its state.
269 if (previousSize) { 269 if (previousSize) {
270 const size_t lastFrame = previousSize - 1; 270 const size_t lastFrame = previousSize - 1;
271 m_frameData[lastFrame].m_isComplete = m_actualDecoder->frameIsCompleteAt Index(lastFrame); 271 m_frameData[lastFrame].m_isComplete = m_actualDecoder->frameIsCompleteAt Index(lastFrame);
272 } 272 }
273 273
274 if (m_allDataReceived) { 274 if (m_allDataReceived) {
275 m_repetitionCount = m_actualDecoder->repetitionCount(); 275 m_repetitionCount = m_actualDecoder->repetitionCount();
276 m_actualDecoder.clear(); 276 m_actualDecoder.reset();
277 // Hold on to m_rwBuffer, which is still needed by createFrameAtIndex. 277 // Hold on to m_rwBuffer, which is still needed by createFrameAtIndex.
278 } 278 }
279 } 279 }
280 280
281 inline SkImageInfo imageInfoFrom(const SkISize& decodedSize, bool knownToBeOpaqu e) 281 inline SkImageInfo imageInfoFrom(const SkISize& decodedSize, bool knownToBeOpaqu e)
282 { 282 {
283 return SkImageInfo::MakeN32(decodedSize.width(), decodedSize.height(), known ToBeOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType); 283 return SkImageInfo::MakeN32(decodedSize.width(), decodedSize.height(), known ToBeOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType);
284 } 284 }
285 285
286 PassRefPtr<SkImage> DeferredImageDecoder::createFrameImageAtIndex(size_t index, bool knownToBeOpaque) const 286 PassRefPtr<SkImage> DeferredImageDecoder::createFrameImageAtIndex(size_t index, bool knownToBeOpaque) const
(...skipping 14 matching lines...) Expand all
301 return image.release(); 301 return image.release();
302 } 302 }
303 303
304 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const 304 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const
305 { 305 {
306 // TODO: Implement. 306 // TODO: Implement.
307 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; 307 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false;
308 } 308 }
309 309
310 } // namespace blink 310 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698