| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 status_ = next_frame_status_; | 82 status_ = next_frame_status_; |
| 83 return current_status; | 83 return current_status; |
| 84 } | 84 } |
| 85 | 85 |
| 86 void ClearCacheExceptFrameRequested(size_t clear_except_frame) override { | 86 void ClearCacheExceptFrameRequested(size_t clear_except_frame) override { |
| 87 requested_clear_except_frame_ = clear_except_frame; | 87 requested_clear_except_frame_ = clear_except_frame; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 size_t FrameCount() override { return frame_count_; } | 90 size_t FrameCount() override { return frame_count_; } |
| 91 int RepetitionCount() const override { | 91 int RepetitionCount() const override { |
| 92 return frame_count_ == 1 ? kAnimationNone : kAnimationLoopOnce; | 92 return frame_count_ == 1 ? kCAnimationNone : kCAnimationLoopOnce; |
| 93 } | 93 } |
| 94 float FrameDuration() const override { return 0; } | 94 float FrameDuration() const override { return 0; } |
| 95 | 95 |
| 96 protected: | 96 protected: |
| 97 void UseMockImageDecoderFactory() { | 97 void UseMockImageDecoderFactory() { |
| 98 generator_->SetImageDecoderFactory( | 98 generator_->SetImageDecoderFactory( |
| 99 MockImageDecoderFactory::Create(this, FullSize())); | 99 MockImageDecoderFactory::Create(this, FullSize())); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void AddNewData() { data_->Append("g", 1u); } | 102 void AddNewData() { data_->Append("g", 1u); } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 // ImageFrameGenerator::tryToResumeDecode(). | 267 // ImageFrameGenerator::tryToResumeDecode(). |
| 268 generator_->DecodeAndScale(segment_reader_.Get(), true, 2, ImageInfo(), | 268 generator_->DecodeAndScale(segment_reader_.Get(), true, 2, ImageInfo(), |
| 269 buffer, 100 * 4, | 269 buffer, 100 * 4, |
| 270 ImageDecoder::kAlphaPremultiplied); | 270 ImageDecoder::kAlphaPremultiplied); |
| 271 EXPECT_EQ(3, decode_request_count_); | 271 EXPECT_EQ(3, decode_request_count_); |
| 272 EXPECT_EQ(0, decoders_destroyed_); | 272 EXPECT_EQ(0, decoders_destroyed_); |
| 273 EXPECT_EQ(kNotFound, requested_clear_except_frame_); | 273 EXPECT_EQ(kNotFound, requested_clear_except_frame_); |
| 274 } | 274 } |
| 275 | 275 |
| 276 } // namespace blink | 276 } // namespace blink |
| OLD | NEW |