| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Alp Toker <alp.toker@collabora.co.uk> | 3 * Copyright (C) 2007 Alp Toker <alp.toker@collabora.co.uk> |
| 4 * Copyright (C) 2008, Google Inc. All rights reserved. | 4 * Copyright (C) 2008, Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 int ImageSource::repetitionCount() | 108 int ImageSource::repetitionCount() |
| 109 { | 109 { |
| 110 return m_decoder ? m_decoder->repetitionCount() : cAnimationNone; | 110 return m_decoder ? m_decoder->repetitionCount() : cAnimationNone; |
| 111 } | 111 } |
| 112 | 112 |
| 113 size_t ImageSource::frameCount() const | 113 size_t ImageSource::frameCount() const |
| 114 { | 114 { |
| 115 return m_decoder ? m_decoder->frameCount() : 0; | 115 return m_decoder ? m_decoder->frameCount() : 0; |
| 116 } | 116 } |
| 117 | 117 |
| 118 PassRefPtr<SkImage> ImageSource::createFrameAtIndex(size_t index) | 118 sk_sp<SkImage> ImageSource::createFrameAtIndex(size_t index) |
| 119 { | 119 { |
| 120 if (!m_decoder) | 120 if (!m_decoder) |
| 121 return nullptr; | 121 return nullptr; |
| 122 | 122 |
| 123 return m_decoder->createFrameAtIndex(index); | 123 return m_decoder->createFrameAtIndex(index); |
| 124 } | 124 } |
| 125 | 125 |
| 126 float ImageSource::frameDurationAtIndex(size_t index) const | 126 float ImageSource::frameDurationAtIndex(size_t index) const |
| 127 { | 127 { |
| 128 if (!m_decoder) | 128 if (!m_decoder) |
| (...skipping 23 matching lines...) Expand all Loading... |
| 152 { | 152 { |
| 153 return m_decoder && m_decoder->frameIsCompleteAtIndex(index); | 153 return m_decoder && m_decoder->frameIsCompleteAtIndex(index); |
| 154 } | 154 } |
| 155 | 155 |
| 156 size_t ImageSource::frameBytesAtIndex(size_t index) const | 156 size_t ImageSource::frameBytesAtIndex(size_t index) const |
| 157 { | 157 { |
| 158 return m_decoder ? m_decoder->frameBytesAtIndex(index) : 0; | 158 return m_decoder ? m_decoder->frameBytesAtIndex(index) : 0; |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace blink | 161 } // namespace blink |
| OLD | NEW |