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

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

Issue 1878253003: Allow explicit conversion operators and implement WTF::OwnPtr::operator bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 size_t ImagePlanes::rowBytes(int i) const 268 size_t ImagePlanes::rowBytes(int i) const
269 { 269 {
270 ASSERT((i >= 0) && i < 3); 270 ASSERT((i >= 0) && i < 3);
271 return m_rowBytes[i]; 271 return m_rowBytes[i];
272 } 272 }
273 273
274 bool ImageDecoder::hasColorProfile() const 274 bool ImageDecoder::hasColorProfile() const
275 { 275 {
276 #if USE(QCMSLIB) 276 #if USE(QCMSLIB)
277 return m_sourceToOutputDeviceColorTransform; 277 return m_sourceToOutputDeviceColorTransform.get();
278 #else 278 #else
279 return false; 279 return false;
280 #endif 280 #endif
281 } 281 }
282 282
283 #if USE(QCMSLIB) 283 #if USE(QCMSLIB)
284 namespace { 284 namespace {
285 285
286 const unsigned kIccColorProfileHeaderLength = 128; 286 const unsigned kIccColorProfileHeaderLength = 128;
287 287
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 qcms_data_type dataFormat = hasAlpha ? QCMS_DATA_RGBA_8 : QCMS_DATA_RGB_8; 359 qcms_data_type dataFormat = hasAlpha ? QCMS_DATA_RGBA_8 : QCMS_DATA_RGB_8;
360 360
361 // FIXME: Don't force perceptual intent if the image profile contains an int ent. 361 // FIXME: Don't force perceptual intent if the image profile contains an int ent.
362 m_sourceToOutputDeviceColorTransform = adoptPtr(qcms_transform_create(inputP rofile.get(), dataFormat, gOutputDeviceProfile, QCMS_DATA_RGBA_8, QCMS_INTENT_PE RCEPTUAL)); 362 m_sourceToOutputDeviceColorTransform = adoptPtr(qcms_transform_create(inputP rofile.get(), dataFormat, gOutputDeviceProfile, QCMS_DATA_RGBA_8, QCMS_INTENT_PE RCEPTUAL));
363 } 363 }
364 364
365 #endif // USE(QCMSLIB) 365 #endif // USE(QCMSLIB)
366 366
367 } // namespace blink 367 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698