Chromium Code Reviews| Index: cc/paint/paint_image.h |
| diff --git a/cc/paint/paint_image.h b/cc/paint/paint_image.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cab5c36f7e2b99c99ac1d711644f02ff968a412b |
| --- /dev/null |
| +++ b/cc/paint/paint_image.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CC_PAINT_PAINT_IMAGE_H_ |
| +#define CC_PAINT_PAINT_IMAGE_H_ |
| + |
| +#include "cc/paint/paint_export.h" |
| + |
| +#include "third_party/skia/include/core/SkImage.h" |
| + |
| +namespace cc { |
| + |
| +class CC_PAINT_EXPORT PaintImage { |
|
Khushal
2017/04/11 02:19:46
Add a TODO for a persistent id for PaintImage, whi
vmpstr
2017/04/11 18:58:33
Done.
|
| + public: |
| + // TODO(vmpstr): Work towards removing "UNKNOWN" value. |
| + enum class AnimationType { UNKNOWN, ANIMATED, STATIC }; |
|
Khushal
2017/04/11 02:19:46
Do you think we actually need the animation and co
vmpstr
2017/04/11 18:58:33
I'd rather keep the logic for deciding that in cc.
Khushal
2017/04/11 20:55:01
We are using ANIMATED here for the frames in skcan
|
| + |
| + // TODO(vmpstr): Work towards removing "UNKNOWN" value. |
| + enum class CompletionState { UNKNOWN, DONE, PARTIALLY_DONE }; |
| + |
| + PaintImage(sk_sp<const SkImage> sk_image, |
| + AnimationType animation_type, |
| + CompletionState completion_state); |
| + ~PaintImage(); |
| + |
| + const sk_sp<const SkImage>& sk_image() const { return sk_image_; } |
| + AnimationType animation_type() const { return animation_type_; } |
| + CompletionState completion_state() const { return completion_state_; } |
| + |
| + private: |
| + sk_sp<const SkImage> sk_image_; |
| + AnimationType animation_type_; |
| + CompletionState completion_state_; |
| +}; |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_PAINT_PAINT_IMAGE_H_ |