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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.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) Research In Motion Limited 2009-2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 299
300 // The output device color profile is global and shared across multiple threads. 300 // The output device color profile is global and shared across multiple threads.
301 SpinLock gOutputDeviceProfileLock; 301 SpinLock gOutputDeviceProfileLock;
302 qcms_profile* gOutputDeviceProfile = nullptr; 302 qcms_profile* gOutputDeviceProfile = nullptr;
303 303
304 } // namespace 304 } // namespace
305 305
306 // static 306 // static
307 void ImageDecoder::setColorProfileAndTransform(const char* iccData, unsigned icc Length, bool hasAlpha, bool useSRGB) 307 void ImageDecoder::setColorProfileAndTransform(const char* iccData, unsigned icc Length, bool hasAlpha, bool useSRGB)
308 { 308 {
309 m_sourceToOutputDeviceColorTransform.clear(); 309 m_sourceToOutputDeviceColorTransform.reset();
310 310
311 // Create the input profile 311 // Create the input profile
312 OwnPtr<qcms_profile> inputProfile; 312 OwnPtr<qcms_profile> inputProfile;
313 if (useSRGB) { 313 if (useSRGB) {
314 inputProfile = adoptPtr(qcms_profile_sRGB()); 314 inputProfile = adoptPtr(qcms_profile_sRGB());
315 } else { 315 } else {
316 // Only accept RGB color profiles from input class devices. 316 // Only accept RGB color profiles from input class devices.
317 if (iccLength < kIccColorProfileHeaderLength) 317 if (iccLength < kIccColorProfileHeaderLength)
318 return; 318 return;
319 if (!rgbColorProfile(iccData, iccLength)) 319 if (!rgbColorProfile(iccData, iccLength))
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 qcms_data_type dataFormat = hasAlpha ? QCMS_DATA_RGBA_8 : QCMS_DATA_RGB_8; 357 qcms_data_type dataFormat = hasAlpha ? QCMS_DATA_RGBA_8 : QCMS_DATA_RGB_8;
358 358
359 // FIXME: Don't force perceptual intent if the image profile contains an int ent. 359 // FIXME: Don't force perceptual intent if the image profile contains an int ent.
360 m_sourceToOutputDeviceColorTransform = adoptPtr(qcms_transform_create(inputP rofile.get(), dataFormat, gOutputDeviceProfile, QCMS_DATA_RGBA_8, QCMS_INTENT_PE RCEPTUAL)); 360 m_sourceToOutputDeviceColorTransform = adoptPtr(qcms_transform_create(inputP rofile.get(), dataFormat, gOutputDeviceProfile, QCMS_DATA_RGBA_8, QCMS_INTENT_PE RCEPTUAL));
361 } 361 }
362 362
363 #endif // USE(QCMSLIB) 363 #endif // USE(QCMSLIB)
364 364
365 } // namespace blink 365 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698