| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_PAINT_PAINT_IMAGE_H_ | 5 #ifndef CC_PAINT_PAINT_IMAGE_H_ |
| 6 #define CC_PAINT_PAINT_IMAGE_H_ | 6 #define CC_PAINT_PAINT_IMAGE_H_ |
| 7 | 7 |
| 8 #include "base/atomic_sequence_num.h" | 8 #include "base/atomic_sequence_num.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "cc/paint/paint_export.h" | 10 #include "cc/paint/paint_export.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 sk_sp<SkImage> sk_image, | 35 sk_sp<SkImage> sk_image, |
| 36 AnimationType animation_type = AnimationType::STATIC, | 36 AnimationType animation_type = AnimationType::STATIC, |
| 37 CompletionState completion_state = CompletionState::DONE); | 37 CompletionState completion_state = CompletionState::DONE); |
| 38 PaintImage(const PaintImage& other); | 38 PaintImage(const PaintImage& other); |
| 39 PaintImage(PaintImage&& other); | 39 PaintImage(PaintImage&& other); |
| 40 ~PaintImage(); | 40 ~PaintImage(); |
| 41 | 41 |
| 42 PaintImage& operator=(const PaintImage& other); | 42 PaintImage& operator=(const PaintImage& other); |
| 43 PaintImage& operator=(PaintImage&& other); | 43 PaintImage& operator=(PaintImage&& other); |
| 44 | 44 |
| 45 bool operator==(const PaintImage& other); | 45 bool operator==(const PaintImage& other) const; |
| 46 explicit operator bool() const { return sk_image_; } | 46 explicit operator bool() const { return sk_image_; } |
| 47 | 47 |
| 48 Id stable_id() const { return id_; } | 48 Id stable_id() const { return id_; } |
| 49 const sk_sp<SkImage>& sk_image() const { return sk_image_; } | 49 const sk_sp<SkImage>& sk_image() const { return sk_image_; } |
| 50 AnimationType animation_type() const { return animation_type_; } | 50 AnimationType animation_type() const { return animation_type_; } |
| 51 CompletionState completion_state() const { return completion_state_; } | 51 CompletionState completion_state() const { return completion_state_; } |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 static base::AtomicSequenceNumber s_next_id_; | 54 static base::AtomicSequenceNumber s_next_id_; |
| 55 | 55 |
| 56 Id id_; | 56 Id id_; |
| 57 sk_sp<SkImage> sk_image_; | 57 sk_sp<SkImage> sk_image_; |
| 58 AnimationType animation_type_ = AnimationType::UNKNOWN; | 58 AnimationType animation_type_ = AnimationType::UNKNOWN; |
| 59 CompletionState completion_state_ = CompletionState::UNKNOWN; | 59 CompletionState completion_state_ = CompletionState::UNKNOWN; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace cc | 62 } // namespace cc |
| 63 | 63 |
| 64 #endif // CC_PAINT_PAINT_IMAGE_H_ | 64 #endif // CC_PAINT_PAINT_IMAGE_H_ |
| OLD | NEW |