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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 2001 mozilla.org 5 * Portions are Copyright (C) 2001 mozilla.org
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Stuart Parmenter <stuart@mozilla.com> 8 * Stuart Parmenter <stuart@mozilla.com>
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 inline bool isComplete(const PNGImageDecoder* decoder) { 369 inline bool isComplete(const PNGImageDecoder* decoder) {
370 return decoder->frameIsCompleteAtIndex(0); 370 return decoder->frameIsCompleteAtIndex(0);
371 } 371 }
372 372
373 void PNGImageDecoder::decode(bool onlySize) { 373 void PNGImageDecoder::decode(bool onlySize) {
374 if (failed()) 374 if (failed())
375 return; 375 return;
376 376
377 if (!m_reader) 377 if (!m_reader)
378 m_reader = makeUnique<PNGImageReader>(this, m_offset); 378 m_reader = WTF::makeUnique<PNGImageReader>(this, m_offset);
379 379
380 // If we couldn't decode the image but have received all the data, decoding 380 // If we couldn't decode the image but have received all the data, decoding
381 // has failed. 381 // has failed.
382 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived()) 382 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived())
383 setFailed(); 383 setFailed();
384 384
385 // If decoding is done or failed, we don't need the PNGImageReader anymore. 385 // If decoding is done or failed, we don't need the PNGImageReader anymore.
386 if (isComplete(this) || failed()) 386 if (isComplete(this) || failed())
387 m_reader.reset(); 387 m_reader.reset();
388 } 388 }
389 389
390 } // namespace blink 390 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698