OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 { | 392 { |
393 if (m_frames.size() <= index) | 393 if (m_frames.size() <= index) |
394 return DefaultImageOrientation; | 394 return DefaultImageOrientation; |
395 | 395 |
396 if (m_frames[index].m_haveMetadata) | 396 if (m_frames[index].m_haveMetadata) |
397 return m_frames[index].m_orientation; | 397 return m_frames[index].m_orientation; |
398 | 398 |
399 return m_source.orientationAtIndex(index); | 399 return m_source.orientationAtIndex(index); |
400 } | 400 } |
401 | 401 |
402 #if !ASSERT_DISABLED | 402 #if ASSERT_ENABLED |
403 bool BitmapImage::notSolidColor() | 403 bool BitmapImage::notSolidColor() |
404 { | 404 { |
405 return size().width() != 1 || size().height() != 1 || frameCount() > 1; | 405 return size().width() != 1 || size().height() != 1 || frameCount() > 1; |
406 } | 406 } |
407 #endif | 407 #endif |
408 | 408 |
409 | 409 |
410 | 410 |
411 int BitmapImage::repetitionCount(bool imageKnownToBeComplete) | 411 int BitmapImage::repetitionCount(bool imageKnownToBeComplete) |
412 { | 412 { |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 } | 624 } |
625 return m_isSolidColor && !m_currentFrame; | 625 return m_isSolidColor && !m_currentFrame; |
626 } | 626 } |
627 | 627 |
628 Color BitmapImage::solidColor() const | 628 Color BitmapImage::solidColor() const |
629 { | 629 { |
630 return m_solidColor; | 630 return m_solidColor; |
631 } | 631 } |
632 | 632 |
633 } | 633 } |
OLD | NEW |