Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3671)

Unified Diff: cc/paint/paint_image.h

Issue 2835373003: Plumb PaintImage to the PictureImageLayer. (Closed)
Patch Set: update Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_image_layer_unittest.cc ('k') | cc/paint/paint_image.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/paint/paint_image.h
diff --git a/cc/paint/paint_image.h b/cc/paint/paint_image.h
index 0ed1edd7a768e1467ac79cdc4132a648f38e2b0c..df0f82ee01de703947b0abf1a2ff24759513a6e2 100644
--- a/cc/paint/paint_image.h
+++ b/cc/paint/paint_image.h
@@ -5,8 +5,8 @@
#ifndef CC_PAINT_PAINT_IMAGE_H_
#define CC_PAINT_PAINT_IMAGE_H_
+#include "base/logging.h"
#include "cc/paint/paint_export.h"
-
#include "third_party/skia/include/core/SkImage.h"
namespace cc {
@@ -20,19 +20,27 @@ class CC_PAINT_EXPORT PaintImage {
// 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();
+ explicit PaintImage(sk_sp<const SkImage> sk_image,
+ AnimationType animation_type = AnimationType::STATIC,
+ CompletionState completion_state = CompletionState::DONE);
+ PaintImage(const PaintImage& other);
+ PaintImage(PaintImage&& other);
~PaintImage();
+ PaintImage& operator=(const PaintImage& other);
+ PaintImage& operator=(PaintImage&& other);
+
+ bool operator==(const PaintImage& other);
+
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_;
+ AnimationType animation_type_ = AnimationType::UNKNOWN;
+ CompletionState completion_state_ = CompletionState::UNKNOWN;
};
} // namespace cc
« no previous file with comments | « cc/layers/picture_image_layer_unittest.cc ('k') | cc/paint/paint_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698