| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 2001 mozilla.org | 5 * Portions are Copyright (C) 2001 mozilla.org |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Stuart Parmenter <stuart@mozilla.com> | 8 * Stuart Parmenter <stuart@mozilla.com> |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 ReadAsConstPngBytep(reader, read_offset_, 8, read_buffer); | 528 ReadAsConstPngBytep(reader, read_offset_, 8, read_buffer); |
| 529 length = png_get_uint_32(chunk); | 529 length = png_get_uint_32(chunk); |
| 530 | 530 |
| 531 if (IsChunk(chunk, "IDAT")) { | 531 if (IsChunk(chunk, "IDAT")) { |
| 532 // Done with header chunks. | 532 // Done with header chunks. |
| 533 idat_offset_ = read_offset_; | 533 idat_offset_ = read_offset_; |
| 534 fctl_needs_dat_chunk_ = false; | 534 fctl_needs_dat_chunk_ = false; |
| 535 if (ignore_animation_) | 535 if (ignore_animation_) |
| 536 is_animated_ = false; | 536 is_animated_ = false; |
| 537 if (!is_animated_ || 1 == reported_frame_count_) | 537 if (!is_animated_ || 1 == reported_frame_count_) |
| 538 decoder_->SetRepetitionCount(kAnimationNone); | 538 decoder_->SetRepetitionCount(kCAnimationNone); |
| 539 if (!decoder_->SetSize(width_, height_)) | 539 if (!decoder_->SetSize(width_, height_)) |
| 540 return false; | 540 return false; |
| 541 decoder_->SetColorSpace(); | 541 decoder_->SetColorSpace(); |
| 542 decoder_->HeaderAvailable(); | 542 decoder_->HeaderAvailable(); |
| 543 return true; | 543 return true; |
| 544 } | 544 } |
| 545 | 545 |
| 546 // Wait until the entire chunk is available for parsing simplicity. | 546 // Wait until the entire chunk is available for parsing simplicity. |
| 547 if (reader.size() < read_offset_ + length + 12) | 547 if (reader.size() < read_offset_ + length + 12) |
| 548 break; | 548 break; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 break; | 681 break; |
| 682 default: | 682 default: |
| 683 return false; | 683 return false; |
| 684 } | 684 } |
| 685 | 685 |
| 686 fctl_needs_dat_chunk_ = true; | 686 fctl_needs_dat_chunk_ = true; |
| 687 return true; | 687 return true; |
| 688 } | 688 } |
| 689 | 689 |
| 690 } // namespace blink | 690 } // namespace blink |
| OLD | NEW |