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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.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 * 3 *
4 * Portions are Copyright (C) 2001-6 mozilla.org 4 * Portions are Copyright (C) 2001-6 mozilla.org
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Stuart Parmenter <stuart@mozilla.com> 7 * Stuart Parmenter <stuart@mozilla.com>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 return true; 990 return true;
991 991
992 return decoder->frameIsCompleteAtIndex(0); 992 return decoder->frameIsCompleteAtIndex(0);
993 } 993 }
994 994
995 void JPEGImageDecoder::decode(bool onlySize) { 995 void JPEGImageDecoder::decode(bool onlySize) {
996 if (failed()) 996 if (failed())
997 return; 997 return;
998 998
999 if (!m_reader) { 999 if (!m_reader) {
1000 m_reader = makeUnique<JPEGImageReader>(this); 1000 m_reader = WTF::makeUnique<JPEGImageReader>(this);
1001 m_reader->setData(m_data.get()); 1001 m_reader->setData(m_data.get());
1002 } 1002 }
1003 1003
1004 // If we couldn't decode the image but have received all the data, decoding 1004 // If we couldn't decode the image but have received all the data, decoding
1005 // has failed. 1005 // has failed.
1006 if (!m_reader->decode(onlySize) && isAllDataReceived()) 1006 if (!m_reader->decode(onlySize) && isAllDataReceived())
1007 setFailed(); 1007 setFailed();
1008 1008
1009 // If decoding is done or failed, we don't need the JPEGImageReader anymore. 1009 // If decoding is done or failed, we don't need the JPEGImageReader anymore.
1010 if (isComplete(this, onlySize) || failed()) 1010 if (isComplete(this, onlySize) || failed())
1011 m_reader.reset(); 1011 m_reader.reset();
1012 } 1012 }
1013 1013
1014 } // namespace blink 1014 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698