| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 ASSERT(m_private); | 91 ASSERT(m_private); |
| 92 return m_private->frameCount(); | 92 return m_private->frameCount(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 bool WebImageDecoder::isFrameCompleteAtIndex(int index) const | 95 bool WebImageDecoder::isFrameCompleteAtIndex(int index) const |
| 96 { | 96 { |
| 97 ASSERT(m_private); | 97 ASSERT(m_private); |
| 98 ImageFrame* const frameBuffer = m_private->frameBufferAtIndex(index); | 98 ImageFrame* const frameBuffer = m_private->frameBufferAtIndex(index); |
| 99 if (!frameBuffer) | 99 if (!frameBuffer) |
| 100 return false; | 100 return false; |
| 101 return frameBuffer->status() == ImageFrame::FrameComplete; | 101 return frameBuffer->getStatus() == ImageFrame::FrameComplete; |
| 102 } | 102 } |
| 103 | 103 |
| 104 WebImage WebImageDecoder::getFrameAtIndex(int index = 0) const | 104 WebImage WebImageDecoder::getFrameAtIndex(int index = 0) const |
| 105 { | 105 { |
| 106 ASSERT(m_private); | 106 ASSERT(m_private); |
| 107 ImageFrame* const frameBuffer = m_private->frameBufferAtIndex(index); | 107 ImageFrame* const frameBuffer = m_private->frameBufferAtIndex(index); |
| 108 if (!frameBuffer) | 108 if (!frameBuffer) |
| 109 return WebImage(); | 109 return WebImage(); |
| 110 return WebImage(frameBuffer->bitmap()); | 110 return WebImage(frameBuffer->bitmap()); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace blink | 113 } // namespace blink |
| OLD | NEW |