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

Side by Side Diff: cc/paint/paint_image.h

Issue 2820133005: Revert of Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « cc/paint/paint_flags.cc ('k') | cc/paint/paint_image.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "cc/paint/paint_export.h" 8 #include "cc/paint/paint_export.h"
9 9
10 #include "third_party/skia/include/core/SkImage.h" 10 #include "third_party/skia/include/core/SkImage.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 // TODO(vmpstr): Add a persistent id to the paint image. 14 // TODO(vmpstr): Add a persistent id to the paint image.
15 class CC_PAINT_EXPORT PaintImage { 15 class CC_PAINT_EXPORT PaintImage {
16 public: 16 public:
17 // TODO(vmpstr): Work towards removing "UNKNOWN" value. 17 // TODO(vmpstr): Work towards removing "UNKNOWN" value.
18 enum class AnimationType { UNKNOWN, ANIMATED, VIDEO, STATIC }; 18 enum class AnimationType { UNKNOWN, ANIMATED, VIDEO, STATIC };
19 19
20 // TODO(vmpstr): Work towards removing "UNKNOWN" value. 20 // TODO(vmpstr): Work towards removing "UNKNOWN" value.
21 enum class CompletionState { UNKNOWN, DONE, PARTIALLY_DONE }; 21 enum class CompletionState { UNKNOWN, DONE, PARTIALLY_DONE };
22 22
23 PaintImage(sk_sp<const SkImage> sk_image, 23 PaintImage(sk_sp<const SkImage> sk_image,
24 AnimationType animation_type, 24 AnimationType animation_type,
25 CompletionState completion_state); 25 CompletionState completion_state);
26 PaintImage(const PaintImage& image);
27 ~PaintImage(); 26 ~PaintImage();
28 27
29 const sk_sp<const SkImage>& sk_image() const { return sk_image_; } 28 const sk_sp<const SkImage>& sk_image() const { return sk_image_; }
30 AnimationType animation_type() const { return animation_type_; } 29 AnimationType animation_type() const { return animation_type_; }
31 CompletionState completion_state() const { return completion_state_; } 30 CompletionState completion_state() const { return completion_state_; }
32 31
33 private: 32 private:
34 sk_sp<const SkImage> sk_image_; 33 sk_sp<const SkImage> sk_image_;
35 AnimationType animation_type_; 34 AnimationType animation_type_;
36 CompletionState completion_state_; 35 CompletionState completion_state_;
37 }; 36 };
38 37
39 } // namespace cc 38 } // namespace cc
40 39
41 #endif // CC_PAINT_PAINT_IMAGE_H_ 40 #endif // CC_PAINT_PAINT_IMAGE_H_
OLDNEW
« no previous file with comments | « cc/paint/paint_flags.cc ('k') | cc/paint/paint_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698