| 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 return m_source.frameIsCompleteAtIndex(index); | 343 return m_source.frameIsCompleteAtIndex(index); |
| 344 } | 344 } |
| 345 | 345 |
| 346 float BitmapImage::frameDurationAtIndex(size_t index) | 346 float BitmapImage::frameDurationAtIndex(size_t index) |
| 347 { | 347 { |
| 348 if (index < m_frames.size() && m_frames[index].m_haveMetadata) | 348 if (index < m_frames.size() && m_frames[index].m_haveMetadata) |
| 349 return m_frames[index].m_duration; | 349 return m_frames[index].m_duration; |
| 350 return m_source.frameDurationAtIndex(index); | 350 return m_source.frameDurationAtIndex(index); |
| 351 } | 351 } |
| 352 | 352 |
| 353 PassRefPtr<NativeImageSkia> BitmapImage::nativeImageForCurrentFrame() | 353 PassRefPtr<NativeImageSkia> BitmapImage::nativeImageForCurrentFrame(ScaleHint hi
nt) |
| 354 { | 354 { |
| 355 return frameAtIndex(currentFrame()); | 355 return frameAtIndex(currentFrame()); |
| 356 } | 356 } |
| 357 | 357 |
| 358 bool BitmapImage::frameHasAlphaAtIndex(size_t index) | 358 bool BitmapImage::frameHasAlphaAtIndex(size_t index) |
| 359 { | 359 { |
| 360 if (m_frames.size() <= index) | 360 if (m_frames.size() <= index) |
| 361 return true; | 361 return true; |
| 362 | 362 |
| 363 if (m_frames[index].m_haveMetadata) | 363 if (m_frames[index].m_haveMetadata) |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 } | 603 } |
| 604 return m_isSolidColor && !m_currentFrame; | 604 return m_isSolidColor && !m_currentFrame; |
| 605 } | 605 } |
| 606 | 606 |
| 607 Color BitmapImage::solidColor() const | 607 Color BitmapImage::solidColor() const |
| 608 { | 608 { |
| 609 return m_solidColor; | 609 return m_solidColor; |
| 610 } | 610 } |
| 611 | 611 |
| 612 } | 612 } |
| OLD | NEW |