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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 return decoder; | 77 return decoder; |
78 } | 78 } |
79 | 79 |
80 std::unique_ptr<DeferredImageDecoder> DeferredImageDecoder::CreateForTesting( | 80 std::unique_ptr<DeferredImageDecoder> DeferredImageDecoder::CreateForTesting( |
81 std::unique_ptr<ImageDecoder> actual_decoder) { | 81 std::unique_ptr<ImageDecoder> actual_decoder) { |
82 return WTF::WrapUnique(new DeferredImageDecoder(std::move(actual_decoder))); | 82 return WTF::WrapUnique(new DeferredImageDecoder(std::move(actual_decoder))); |
83 } | 83 } |
84 | 84 |
85 DeferredImageDecoder::DeferredImageDecoder( | 85 DeferredImageDecoder::DeferredImageDecoder( |
86 std::unique_ptr<ImageDecoder> actual_decoder) | 86 std::unique_ptr<ImageDecoder> actual_decoder) |
87 : all_data_received_(false), | 87 : actual_decoder_(std::move(actual_decoder)), |
88 actual_decoder_(std::move(actual_decoder)), | |
89 repetition_count_(kCAnimationNone), | 88 repetition_count_(kCAnimationNone), |
| 89 all_data_received_(false), |
90 can_yuv_decode_(false), | 90 can_yuv_decode_(false), |
91 has_hot_spot_(false) {} | 91 has_hot_spot_(false) {} |
92 | 92 |
93 DeferredImageDecoder::~DeferredImageDecoder() {} | 93 DeferredImageDecoder::~DeferredImageDecoder() {} |
94 | 94 |
95 String DeferredImageDecoder::FilenameExtension() const { | 95 String DeferredImageDecoder::FilenameExtension() const { |
96 return actual_decoder_ ? actual_decoder_->FilenameExtension() | 96 return actual_decoder_ ? actual_decoder_->FilenameExtension() |
97 : filename_extension_; | 97 : filename_extension_; |
98 } | 98 } |
99 | 99 |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 358 |
359 namespace WTF { | 359 namespace WTF { |
360 template <> | 360 template <> |
361 struct VectorTraits<blink::DeferredFrameData> | 361 struct VectorTraits<blink::DeferredFrameData> |
362 : public SimpleClassVectorTraits<blink::DeferredFrameData> { | 362 : public SimpleClassVectorTraits<blink::DeferredFrameData> { |
363 STATIC_ONLY(VectorTraits); | 363 STATIC_ONLY(VectorTraits); |
364 static const bool kCanInitializeWithMemset = | 364 static const bool kCanInitializeWithMemset = |
365 false; // Not all DeferredFrameData members initialize to 0. | 365 false; // Not all DeferredFrameData members initialize to 0. |
366 }; | 366 }; |
367 } | 367 } |
OLD | NEW |