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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h

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. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
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 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 #if USE(QCMSLIB) 44 #if USE(QCMSLIB)
45 #include "qcms.h" 45 #include "qcms.h"
46 #endif 46 #endif
47 47
48 typedef Vector<char> ColorProfile; 48 typedef Vector<char> ColorProfile;
49 49
50 namespace blink { 50 namespace blink {
51 51
52 // ImagePlanes can be used to decode color components into provided buffers inst ead of using an ImageFrame. 52 // ImagePlanes can be used to decode color components into provided buffers inst ead of using an ImageFrame.
53 class PLATFORM_EXPORT ImagePlanes { 53 class PLATFORM_EXPORT ImagePlanes final {
54 USING_FAST_MALLOC(ImagePlanes);
55 WTF_MAKE_NONCOPYABLE(ImagePlanes);
54 public: 56 public:
55 ImagePlanes(); 57 ImagePlanes();
56 ImagePlanes(void* planes[3], size_t rowBytes[3]); 58 ImagePlanes(void* planes[3], size_t rowBytes[3]);
57 59
58 void* plane(int); 60 void* plane(int);
59 size_t rowBytes(int) const; 61 size_t rowBytes(int) const;
60 62
61 private: 63 private:
62 void* m_planes[3]; 64 void* m_planes[3];
63 size_t m_rowBytes[3]; 65 size_t m_rowBytes[3];
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 return !memcmp(&profileData[16], "RGB ", 4); 207 return !memcmp(&profileData[16], "RGB ", 4);
206 } 208 }
207 209
208 static bool inputDeviceColorProfile(const char* profileData, unsigned profil eLength) 210 static bool inputDeviceColorProfile(const char* profileData, unsigned profil eLength)
209 { 211 {
210 ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLengt h); 212 ASSERT_UNUSED(profileLength, profileLength >= iccColorProfileHeaderLengt h);
211 213
212 return !memcmp(&profileData[12], "mntr", 4) || !memcmp(&profileData[12], "scnr", 4); 214 return !memcmp(&profileData[12], "mntr", 4) || !memcmp(&profileData[12], "scnr", 4);
213 } 215 }
214 216
215 class OutputDeviceProfile { 217 class OutputDeviceProfile final {
218 USING_FAST_MALLOC(OutputDeviceProfile);
219 WTF_MAKE_NONCOPYABLE(OutputDeviceProfile);
216 public: 220 public:
217 OutputDeviceProfile() 221 OutputDeviceProfile()
218 : m_outputDeviceProfile(0) 222 : m_outputDeviceProfile(0)
219 { 223 {
220 ColorProfile profile = screenColorProfile(); 224 ColorProfile profile = screenColorProfile();
221 if (!profile.isEmpty()) 225 if (!profile.isEmpty())
222 m_outputDeviceProfile = qcms_profile_from_memory(profile.data(), profile.size()); 226 m_outputDeviceProfile = qcms_profile_from_memory(profile.data(), profile.size());
223 227
224 if (m_outputDeviceProfile && qcms_profile_is_bogus(m_outputDevicePro file)) { 228 if (m_outputDeviceProfile && qcms_profile_is_bogus(m_outputDevicePro file)) {
225 qcms_profile_release(m_outputDeviceProfile); 229 qcms_profile_release(m_outputDeviceProfile);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 359
356 IntSize m_size; 360 IntSize m_size;
357 bool m_sizeAvailable; 361 bool m_sizeAvailable;
358 bool m_isAllDataReceived; 362 bool m_isAllDataReceived;
359 bool m_failed; 363 bool m_failed;
360 }; 364 };
361 365
362 } // namespace blink 366 } // namespace blink
363 367
364 #endif 368 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698