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

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

Issue 2812763002: paint: Introduce PaintImage that wraps SkImage in paint calls. (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_canvas.h ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_PAINT_PAINT_IMAGE_H_
6 #define CC_PAINT_PAINT_IMAGE_H_
7
8 #include "cc/paint/paint_export.h"
9
10 #include "third_party/skia/include/core/SkImage.h"
11
12 namespace cc {
13
14 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.
15 public:
16 // TODO(vmpstr): Work towards removing "UNKNOWN" value.
17 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
18
19 // TODO(vmpstr): Work towards removing "UNKNOWN" value.
20 enum class CompletionState { UNKNOWN, DONE, PARTIALLY_DONE };
21
22 PaintImage(sk_sp<const SkImage> sk_image,
23 AnimationType animation_type,
24 CompletionState completion_state);
25 ~PaintImage();
26
27 const sk_sp<const SkImage>& sk_image() const { return sk_image_; }
28 AnimationType animation_type() const { return animation_type_; }
29 CompletionState completion_state() const { return completion_state_; }
30
31 private:
32 sk_sp<const SkImage> sk_image_;
33 AnimationType animation_type_;
34 CompletionState completion_state_;
35 };
36
37 } // namespace cc
38
39 #endif // CC_PAINT_PAINT_IMAGE_H_
OLDNEW
« no previous file with comments | « cc/paint/paint_canvas.h ('k') | cc/paint/paint_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698