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

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

Issue 2106223002: Ensure that input to qcms_profile_precache_output_transform is non-null (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 310
311 // Take a lock around initializing and accessing the global device color pro file. 311 // Take a lock around initializing and accessing the global device color pro file.
312 SpinLock::Guard guard(gTargetColorProfileLock); 312 SpinLock::Guard guard(gTargetColorProfileLock);
313 313
314 // Layout tests expect that only the first call will take effect. 314 // Layout tests expect that only the first call will take effect.
315 if (gTargetColorProfile) 315 if (gTargetColorProfile)
316 return; 316 return;
317 317
318 // FIXME: Add optional ICCv4 support and support for multiple monitors. 318 // FIXME: Add optional ICCv4 support and support for multiple monitors.
319 gTargetColorProfile = qcms_profile_from_memory(profile.data(), profile.size( )); 319 gTargetColorProfile = qcms_profile_from_memory(profile.data(), profile.size( ));
320 if (!gTargetColorProfile)
321 return;
320 322
321 if (gTargetColorProfile && qcms_profile_is_bogus(gTargetColorProfile)) { 323 if (qcms_profile_is_bogus(gTargetColorProfile)) {
322 qcms_profile_release(gTargetColorProfile); 324 qcms_profile_release(gTargetColorProfile);
323 gTargetColorProfile = nullptr; 325 gTargetColorProfile = nullptr;
324 return; 326 return;
325 } 327 }
326 328
327 qcms_profile_precache_output_transform(gTargetColorProfile); 329 qcms_profile_precache_output_transform(gTargetColorProfile);
328 } 330 }
329 331
330 bool ImageDecoder::hasColorProfile() const 332 bool ImageDecoder::hasColorProfile() const
331 { 333 {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 383 }
382 384
383 bool ImageDecoder::hasColorProfile() const 385 bool ImageDecoder::hasColorProfile() const
384 { 386 {
385 return false; 387 return false;
386 } 388 }
387 389
388 #endif // USE(QCMSLIB) 390 #endif // USE(QCMSLIB)
389 391
390 } // namespace blink 392 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698