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

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

Issue 1493633004: Make platform/image-decoders to use USING_FAST_MALLOC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 void PNGAPI pngFailed(png_structp png, png_const_charp) 78 void PNGAPI pngFailed(png_structp png, png_const_charp)
79 { 79 {
80 longjmp(JMPBUF(png), 1); 80 longjmp(JMPBUF(png), 1);
81 } 81 }
82 82
83 } // anonymous 83 } // anonymous
84 84
85 namespace blink { 85 namespace blink {
86 86
87 class PNGImageReader { 87 class PNGImageReader final {
88 USING_FAST_MALLOC(PNGImageReader); 88 USING_FAST_MALLOC(PNGImageReader);
89 WTF_MAKE_NONCOPYABLE(PNGImageReader);
89 public: 90 public:
90 PNGImageReader(PNGImageDecoder* decoder, unsigned readOffset) 91 PNGImageReader(PNGImageDecoder* decoder, unsigned readOffset)
91 : m_decoder(decoder) 92 : m_decoder(decoder)
92 , m_readOffset(readOffset) 93 , m_readOffset(readOffset)
93 , m_currentBufferSize(0) 94 , m_currentBufferSize(0)
94 , m_decodingSizeOnly(false) 95 , m_decodingSizeOnly(false)
95 , m_hasAlpha(false) 96 , m_hasAlpha(false)
96 #if USE(QCMSLIB) 97 #if USE(QCMSLIB)
97 , m_transform(0) 98 , m_transform(0)
98 , m_rowBuffer() 99 , m_rowBuffer()
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 // has failed. 496 // has failed.
496 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived()) 497 if (!m_reader->decode(*m_data, onlySize) && isAllDataReceived())
497 setFailed(); 498 setFailed();
498 499
499 // If decoding is done or failed, we don't need the PNGImageReader anymore. 500 // If decoding is done or failed, we don't need the PNGImageReader anymore.
500 if (isComplete(this) || failed()) 501 if (isComplete(this) || failed())
501 m_reader.clear(); 502 m_reader.clear();
502 } 503 }
503 504
504 } // namespace blink 505 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698