| OLD | NEW |
| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 void ImageDecoder::clearFrameBuffer(size_t frameIndex) { | 266 void ImageDecoder::clearFrameBuffer(size_t frameIndex) { |
| 267 m_frameBufferCache[frameIndex].clearPixelData(); | 267 m_frameBufferCache[frameIndex].clearPixelData(); |
| 268 } | 268 } |
| 269 | 269 |
| 270 Vector<size_t> ImageDecoder::findFramesToDecode(size_t index) const { | 270 Vector<size_t> ImageDecoder::findFramesToDecode(size_t index) const { |
| 271 DCHECK(index < m_frameBufferCache.size()); | 271 DCHECK(index < m_frameBufferCache.size()); |
| 272 | 272 |
| 273 Vector<size_t> framesToDecode; | 273 Vector<size_t> framesToDecode; |
| 274 do { | 274 do { |
| 275 framesToDecode.append(index); | 275 framesToDecode.push_back(index); |
| 276 index = m_frameBufferCache[index].requiredPreviousFrameIndex(); | 276 index = m_frameBufferCache[index].requiredPreviousFrameIndex(); |
| 277 } while (index != kNotFound && | 277 } while (index != kNotFound && |
| 278 m_frameBufferCache[index].getStatus() != ImageFrame::FrameComplete); | 278 m_frameBufferCache[index].getStatus() != ImageFrame::FrameComplete); |
| 279 return framesToDecode; | 279 return framesToDecode; |
| 280 } | 280 } |
| 281 | 281 |
| 282 bool ImageDecoder::postDecodeProcessing(size_t index) { | 282 bool ImageDecoder::postDecodeProcessing(size_t index) { |
| 283 DCHECK(index < m_frameBufferCache.size()); | 283 DCHECK(index < m_frameBufferCache.size()); |
| 284 | 284 |
| 285 if (m_frameBufferCache[index].getStatus() != ImageFrame::FrameComplete) | 285 if (m_frameBufferCache[index].getStatus() != ImageFrame::FrameComplete) |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 sk_sp<SkColorSpace> ImageDecoder::colorSpaceForSkImages() const { | 542 sk_sp<SkColorSpace> ImageDecoder::colorSpaceForSkImages() const { |
| 543 if (!m_colorBehavior.isTag()) | 543 if (!m_colorBehavior.isTag()) |
| 544 return nullptr; | 544 return nullptr; |
| 545 | 545 |
| 546 if (m_embeddedColorSpace) | 546 if (m_embeddedColorSpace) |
| 547 return m_embeddedColorSpace; | 547 return m_embeddedColorSpace; |
| 548 return SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named); | 548 return SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named); |
| 549 } | 549 } |
| 550 | 550 |
| 551 } // namespace blink | 551 } // namespace blink |
| OLD | NEW |