| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 if (!has_histogrammed_color_space_) { | 143 if (!has_histogrammed_color_space_) { |
| 144 BitmapImageMetrics::CountImageGammaAndGamut(embedded_color_space_.get()); | 144 BitmapImageMetrics::CountImageGammaAndGamut(embedded_color_space_.get()); |
| 145 has_histogrammed_color_space_ = true; | 145 has_histogrammed_color_space_ = true; |
| 146 } | 146 } |
| 147 | 147 |
| 148 frame->NotifyBitmapIfPixelsChanged(); | 148 frame->NotifyBitmapIfPixelsChanged(); |
| 149 return frame; | 149 return frame; |
| 150 } | 150 } |
| 151 | 151 |
| 152 bool ImageDecoder::FrameHasAlphaAtIndex(size_t index) const { | 152 bool ImageDecoder::FrameHasAlphaAtIndex(size_t index) const { |
| 153 return !FrameIsCompleteAtIndex(index) || | 153 return !FrameIsReceivedAtIndex(index) || |
| 154 frame_buffer_cache_[index].HasAlpha(); | 154 frame_buffer_cache_[index].HasAlpha(); |
| 155 } | 155 } |
| 156 | 156 |
| 157 bool ImageDecoder::FrameIsCompleteAtIndex(size_t index) const { | 157 bool ImageDecoder::FrameIsReceivedAtIndex(size_t index) const { |
| 158 // Animated images override this method to return the status based on the data | 158 // Animated images override this method to return the status based on the data |
| 159 // received for the queried frame. | 159 // received for the queried frame. |
| 160 return IsAllDataReceived(); | 160 return IsAllDataReceived(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 bool ImageDecoder::FrameIsDecodedAtIndex(size_t index) const { | 163 bool ImageDecoder::FrameIsDecodedAtIndex(size_t index) const { |
| 164 return index < frame_buffer_cache_.size() && | 164 return index < frame_buffer_cache_.size() && |
| 165 frame_buffer_cache_[index].GetStatus() == ImageFrame::kFrameComplete; | 165 frame_buffer_cache_[index].GetStatus() == ImageFrame::kFrameComplete; |
| 166 } | 166 } |
| 167 | 167 |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 } | 558 } |
| 559 | 559 |
| 560 // For color spaces without an identifiable gamut, just fall through to | 560 // For color spaces without an identifiable gamut, just fall through to |
| 561 // sRGB. | 561 // sRGB. |
| 562 } | 562 } |
| 563 | 563 |
| 564 return SkColorSpace::MakeSRGB(); | 564 return SkColorSpace::MakeSRGB(); |
| 565 } | 565 } |
| 566 | 566 |
| 567 } // namespace blink | 567 } // namespace blink |
| OLD | NEW |