enne | 34f6084c | 2017-02-02 22:39:08 | [diff] [blame] | 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_CANVAS_H_ |
| 6 | #define CC_PAINT_PAINT_CANVAS_H_ |
| 7 | |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 8 | #include "base/compiler_specific.h" |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame] | 9 | #include "base/memory/raw_ptr.h" |
enne | ea15ddb | 2017-03-22 01:49:08 | [diff] [blame] | 10 | #include "base/memory/ref_counted.h" |
enne | 7b64edf3 | 2017-02-16 20:10:02 | [diff] [blame] | 11 | #include "build/build_config.h" |
Tao Bai | 1e1deb41 | 2019-07-21 16:14:00 | [diff] [blame] | 12 | #include "cc/paint/node_id.h" |
enne | 34f6084c | 2017-02-02 22:39:08 | [diff] [blame] | 13 | #include "cc/paint/paint_export.h" |
vmpstr | 94cfa88 | 2017-04-14 01:19:35 | [diff] [blame] | 14 | #include "cc/paint/paint_image.h" |
Avery Musbach | dc01059f | 2022-01-12 22:10:59 | [diff] [blame] | 15 | #include "cc/paint/skottie_color_map.h" |
Eric Sum | 4cf51cc | 2021-11-09 02:21:38 | [diff] [blame] | 16 | #include "cc/paint/skottie_frame_data.h" |
Eric Sum | c743571 | 2022-02-22 18:33:44 | [diff] [blame^] | 17 | #include "cc/paint/skottie_text_property_value.h" |
enne | 34f6084c | 2017-02-02 22:39:08 | [diff] [blame] | 18 | #include "third_party/skia/include/core/SkCanvas.h" |
Peter Kasting | 73ee7ef | 2021-07-20 19:47:56 | [diff] [blame] | 19 | |
| 20 | class SkTextBlob; |
enne | 34f6084c | 2017-02-02 22:39:08 | [diff] [blame] | 21 | |
Florin Malita | 1593577 | 2019-02-06 21:52:24 | [diff] [blame] | 22 | namespace printing { |
| 23 | class MetafileSkia; |
| 24 | } // namespace printing |
| 25 | |
ckitagawa | 53eeaef | 2019-11-08 15:17:34 | [diff] [blame] | 26 | namespace paint_preview { |
| 27 | class PaintPreviewTracker; |
| 28 | } // namespace paint_preview |
| 29 | |
enne | 34f6084c | 2017-02-02 22:39:08 | [diff] [blame] | 30 | namespace cc { |
Malay Keshav | cf4ceef1 | 2018-10-19 17:56:51 | [diff] [blame] | 31 | class SkottieWrapper; |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 32 | class PaintFlags; |
enne | 59df29de | 2017-05-02 03:23:37 | [diff] [blame] | 33 | class PaintOpBuffer; |
| 34 | |
Justin Novosad | 2756a7d5 | 2021-06-09 15:50:38 | [diff] [blame] | 35 | enum class UsePaintCache { kDisabled = 0, kEnabled }; |
| 36 | |
enne | 59df29de | 2017-05-02 03:23:37 | [diff] [blame] | 37 | using PaintRecord = PaintOpBuffer; |
enne | 34f6084c | 2017-02-02 22:39:08 | [diff] [blame] | 38 | |
Adrienne Walker | 26aac6e5 | 2018-10-23 19:23:37 | [diff] [blame] | 39 | // PaintCanvas is the cc/paint wrapper of SkCanvas. It has a more restricted |
| 40 | // interface than SkCanvas (trimmed back to only what Chrome uses). Its reason |
| 41 | // for existence is so that it can do custom serialization logic into a |
| 42 | // PaintOpBuffer which (unlike SkPicture) is mutable, handles image replacement, |
| 43 | // and can be serialized in custom ways (such as using the transfer cache). |
| 44 | // |
| 45 | // PaintCanvas is usually implemented by either: |
| 46 | // (1) SkiaPaintCanvas, which is backed by an SkCanvas, usually for rasterizing. |
| 47 | // (2) RecordPaintCanvas, which records paint commands into a PaintOpBuffer. |
| 48 | // |
| 49 | // SkiaPaintCanvas allows callers to go from PaintCanvas to SkCanvas (or |
| 50 | // PaintRecord to SkPicture), but this is a one way trip. There is no way to go |
| 51 | // from SkCanvas to PaintCanvas or from SkPicture back into PaintRecord. |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 52 | class CC_PAINT_EXPORT PaintCanvas { |
enne | 34f6084c | 2017-02-02 22:39:08 | [diff] [blame] | 53 | public: |
Vladimir Levin | f06d1cd7 | 2019-03-13 18:24:10 | [diff] [blame] | 54 | PaintCanvas() = default; |
| 55 | PaintCanvas(const PaintCanvas&) = delete; |
| 56 | virtual ~PaintCanvas() = default; |
| 57 | |
| 58 | PaintCanvas& operator=(const PaintCanvas&) = delete; |
khushalsagar | b74f912 | 2017-03-22 04:37:47 | [diff] [blame] | 59 | |
enne | 59df29de | 2017-05-02 03:23:37 | [diff] [blame] | 60 | // TODO(enne): this only appears to mostly be used to determine if this is |
| 61 | // recording or not, so could be simplified or removed. |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 62 | virtual SkImageInfo imageInfo() const = 0; |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 63 | |
Tom Anderson | bec0951 | 2019-09-16 20:32:16 | [diff] [blame] | 64 | virtual void* accessTopLayerPixels(SkImageInfo* info, |
| 65 | size_t* rowBytes, |
| 66 | SkIPoint* origin = nullptr) = 0; |
| 67 | |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 68 | // TODO(enne): It would be nice to get rid of flush() entirely, as it |
| 69 | // doesn't really make sense for recording. However, this gets used by |
zhuoyu.qian | 4689dde2 | 2017-10-16 04:11:48 | [diff] [blame] | 70 | // PaintCanvasVideoRenderer which takes a PaintCanvas to paint both |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 71 | // software and hardware video. This is super entangled with ImageBuffer |
| 72 | // and canvas/video painting in Blink where the same paths are used for |
| 73 | // both recording and gpu work. |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 74 | virtual void flush() = 0; |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 75 | |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 76 | virtual int save() = 0; |
| 77 | virtual int saveLayer(const SkRect* bounds, const PaintFlags* flags) = 0; |
Peter Kasting | fe4ba93 | 2019-01-07 20:21:05 | [diff] [blame] | 78 | virtual int saveLayerAlpha(const SkRect* bounds, uint8_t alpha) = 0; |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 79 | |
| 80 | virtual void restore() = 0; |
| 81 | virtual int getSaveCount() const = 0; |
| 82 | virtual void restoreToCount(int save_count) = 0; |
| 83 | virtual void translate(SkScalar dx, SkScalar dy) = 0; |
| 84 | virtual void scale(SkScalar sx, SkScalar sy) = 0; |
Vladimir Levin | 32c16e13 | 2021-11-19 20:26:48 | [diff] [blame] | 85 | void scale(SkScalar s) { scale(s, s); } |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 86 | virtual void rotate(SkScalar degrees) = 0; |
Aaron Krajeski | 5e542c8 | 2020-12-05 01:50:21 | [diff] [blame] | 87 | // TODO(aaronhk): crbug.com/1153330 deprecate these in favor of the SkM44 |
Aaron Krajeski | 8a128e23 | 2020-12-15 21:47:06 | [diff] [blame] | 88 | // versions. |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 89 | virtual void concat(const SkMatrix& matrix) = 0; |
| 90 | virtual void setMatrix(const SkMatrix& matrix) = 0; |
Aaron Krajeski | 8a128e23 | 2020-12-15 21:47:06 | [diff] [blame] | 91 | virtual void concat(const SkM44& matrix) = 0; |
Aaron Krajeski | 5e542c8 | 2020-12-05 01:50:21 | [diff] [blame] | 92 | virtual void setMatrix(const SkM44& matrix) = 0; |
| 93 | |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 94 | virtual void clipRect(const SkRect& rect, |
| 95 | SkClipOp op, |
| 96 | bool do_anti_alias) = 0; |
| 97 | void clipRect(const SkRect& rect, SkClipOp op) { clipRect(rect, op, false); } |
| 98 | void clipRect(const SkRect& rect, bool do_anti_alias) { |
| 99 | clipRect(rect, SkClipOp::kIntersect, do_anti_alias); |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 100 | } |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 101 | void clipRect(const SkRect& rect) { |
| 102 | clipRect(rect, SkClipOp::kIntersect, false); |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 103 | } |
| 104 | |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 105 | virtual void clipRRect(const SkRRect& rrect, |
| 106 | SkClipOp op, |
| 107 | bool do_anti_alias) = 0; |
| 108 | void clipRRect(const SkRRect& rrect, bool do_anti_alias) { |
| 109 | clipRRect(rrect, SkClipOp::kIntersect, do_anti_alias); |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 110 | } |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 111 | void clipRRect(const SkRRect& rrect, SkClipOp op) { |
| 112 | clipRRect(rrect, op, false); |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 113 | } |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 114 | void clipRRect(const SkRRect& rrect) { |
| 115 | clipRRect(rrect, SkClipOp::kIntersect, false); |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 116 | } |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 117 | |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 118 | virtual void clipPath(const SkPath& path, |
| 119 | SkClipOp op, |
Justin Novosad | 2756a7d5 | 2021-06-09 15:50:38 | [diff] [blame] | 120 | bool do_anti_alias, |
| 121 | UsePaintCache) = 0; |
| 122 | void clipPath(const SkPath& path, SkClipOp op, bool do_anti_alias) { |
| 123 | clipPath(path, op, do_anti_alias, UsePaintCache::kEnabled); |
| 124 | } |
| 125 | void clipPath(const SkPath& path, SkClipOp op) { |
| 126 | clipPath(path, op, /*do_anti_alias=*/false, UsePaintCache::kEnabled); |
| 127 | } |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 128 | void clipPath(const SkPath& path, bool do_anti_alias) { |
Justin Novosad | 2756a7d5 | 2021-06-09 15:50:38 | [diff] [blame] | 129 | clipPath(path, SkClipOp::kIntersect, do_anti_alias, |
| 130 | UsePaintCache::kEnabled); |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 131 | } |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 132 | |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 133 | virtual SkRect getLocalClipBounds() const = 0; |
| 134 | virtual bool getLocalClipBounds(SkRect* bounds) const = 0; |
| 135 | virtual SkIRect getDeviceClipBounds() const = 0; |
| 136 | virtual bool getDeviceClipBounds(SkIRect* bounds) const = 0; |
| 137 | virtual void drawColor(SkColor color, SkBlendMode mode) = 0; |
| 138 | void drawColor(SkColor color) { drawColor(color, SkBlendMode::kSrcOver); } |
enne | 59df29de | 2017-05-02 03:23:37 | [diff] [blame] | 139 | |
| 140 | // TODO(enne): This is a synonym for drawColor with kSrc. Remove it. |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 141 | virtual void clear(SkColor color) = 0; |
| 142 | |
| 143 | virtual void drawLine(SkScalar x0, |
| 144 | SkScalar y0, |
| 145 | SkScalar x1, |
| 146 | SkScalar y1, |
| 147 | const PaintFlags& flags) = 0; |
| 148 | virtual void drawRect(const SkRect& rect, const PaintFlags& flags) = 0; |
| 149 | virtual void drawIRect(const SkIRect& rect, const PaintFlags& flags) = 0; |
| 150 | virtual void drawOval(const SkRect& oval, const PaintFlags& flags) = 0; |
| 151 | virtual void drawRRect(const SkRRect& rrect, const PaintFlags& flags) = 0; |
| 152 | virtual void drawDRRect(const SkRRect& outer, |
| 153 | const SkRRect& inner, |
| 154 | const PaintFlags& flags) = 0; |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 155 | virtual void drawRoundRect(const SkRect& rect, |
| 156 | SkScalar rx, |
| 157 | SkScalar ry, |
| 158 | const PaintFlags& flags) = 0; |
Justin Novosad | 2756a7d5 | 2021-06-09 15:50:38 | [diff] [blame] | 159 | virtual void drawPath(const SkPath& path, |
| 160 | const PaintFlags& flags, |
| 161 | UsePaintCache) = 0; |
| 162 | void drawPath(const SkPath& path, const PaintFlags& flags) { |
| 163 | drawPath(path, flags, UsePaintCache::kEnabled); |
| 164 | } |
vmpstr | 94cfa88 | 2017-04-14 01:19:35 | [diff] [blame] | 165 | virtual void drawImage(const PaintImage& image, |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 166 | SkScalar left, |
| 167 | SkScalar top, |
Mike Reed | 859086a | 2021-01-23 18:19:15 | [diff] [blame] | 168 | const SkSamplingOptions&, |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 169 | const PaintFlags* flags) = 0; |
vmpstr | 94cfa88 | 2017-04-14 01:19:35 | [diff] [blame] | 170 | void drawImage(const PaintImage& image, SkScalar left, SkScalar top) { |
Mike Reed | 859086a | 2021-01-23 18:19:15 | [diff] [blame] | 171 | drawImage(image, left, top, SkSamplingOptions(), nullptr); |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 172 | } |
| 173 | |
vmpstr | 94cfa88 | 2017-04-14 01:19:35 | [diff] [blame] | 174 | virtual void drawImageRect(const PaintImage& image, |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 175 | const SkRect& src, |
| 176 | const SkRect& dst, |
Mike Reed | 859086a | 2021-01-23 18:19:15 | [diff] [blame] | 177 | const SkSamplingOptions&, |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 178 | const PaintFlags* flags, |
jongdeok.kim | 50b37707 | 2020-05-15 22:16:12 | [diff] [blame] | 179 | SkCanvas::SrcRectConstraint constraint) = 0; |
Mike Reed | 859086a | 2021-01-23 18:19:15 | [diff] [blame] | 180 | void drawImageRect(const PaintImage& image, |
| 181 | const SkRect& src, |
| 182 | const SkRect& dst, |
| 183 | SkCanvas::SrcRectConstraint constraint) { |
| 184 | drawImageRect(image, src, dst, SkSamplingOptions(), nullptr, constraint); |
| 185 | } |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 186 | |
Malay Keshav | cf4ceef1 | 2018-10-19 17:56:51 | [diff] [blame] | 187 | // Draws the frame of the |skottie| animation specified by the normalized time |
| 188 | // t [0->first frame..1->last frame] at the destination bounds given by |dst| |
Eric Sum | 4cf51cc | 2021-11-09 02:21:38 | [diff] [blame] | 189 | // onto the canvas. |images| is a map from asset id to the corresponding image |
| 190 | // to use when rendering this frame; it may be empty if this animation frame |
| 191 | // does not contain any images in it. |
Malay Keshav | cf4ceef1 | 2018-10-19 17:56:51 | [diff] [blame] | 192 | virtual void drawSkottie(scoped_refptr<SkottieWrapper> skottie, |
| 193 | const SkRect& dst, |
Eric Sum | 4cf51cc | 2021-11-09 02:21:38 | [diff] [blame] | 194 | float t, |
Avery Musbach | dc01059f | 2022-01-12 22:10:59 | [diff] [blame] | 195 | SkottieFrameDataMap images, |
Eric Sum | c743571 | 2022-02-22 18:33:44 | [diff] [blame^] | 196 | const SkottieColorMap& color_map, |
| 197 | SkottieTextPropertyValueMap text_map) = 0; |
Malay Keshav | cf4ceef1 | 2018-10-19 17:56:51 | [diff] [blame] | 198 | |
Khushal | 464808c9 | 2018-10-19 23:45:59 | [diff] [blame] | 199 | virtual void drawTextBlob(sk_sp<SkTextBlob> blob, |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 200 | SkScalar x, |
| 201 | SkScalar y, |
| 202 | const PaintFlags& flags) = 0; |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 203 | |
Tao Bai | edaf8709 | 2019-01-30 23:12:54 | [diff] [blame] | 204 | virtual void drawTextBlob(sk_sp<SkTextBlob> blob, |
| 205 | SkScalar x, |
| 206 | SkScalar y, |
Tao Bai | 1e1deb41 | 2019-07-21 16:14:00 | [diff] [blame] | 207 | NodeId node_id, |
| 208 | const PaintFlags& flags) = 0; |
Tao Bai | edaf8709 | 2019-01-30 23:12:54 | [diff] [blame] | 209 | |
Adrienne Walker | 15ce2350 | 2017-05-08 18:08:15 | [diff] [blame] | 210 | // Unlike SkCanvas::drawPicture, this only plays back the PaintRecord and does |
| 211 | // not add an additional clip. This is closer to SkPicture::playback. |
enne | dffda50 | 2017-03-23 20:46:43 | [diff] [blame] | 212 | virtual void drawPicture(sk_sp<const PaintRecord> record) = 0; |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 213 | |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 214 | virtual bool isClipEmpty() const = 0; |
Mike Reed | f97e2d16 | 2020-01-07 15:26:43 | [diff] [blame] | 215 | virtual SkMatrix getTotalMatrix() const = 0; |
Aaron Krajeski | e18de51 | 2021-04-15 15:17:03 | [diff] [blame] | 216 | virtual SkM44 getLocalToDevice() const = 0; |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 217 | |
Justin Novosad | dae42507 | 2021-11-11 19:50:43 | [diff] [blame] | 218 | virtual bool NeedsFlush() const = 0; |
| 219 | |
Florin Malita | 1593577 | 2019-02-06 21:52:24 | [diff] [blame] | 220 | // Used for printing |
enne | 5fa117a | 2017-04-04 20:56:58 | [diff] [blame] | 221 | enum class AnnotationType { |
| 222 | URL, |
| 223 | NAMED_DESTINATION, |
| 224 | LINK_TO_DESTINATION, |
| 225 | }; |
| 226 | virtual void Annotate(AnnotationType type, |
| 227 | const SkRect& rect, |
| 228 | sk_sp<SkData> data) = 0; |
Florin Malita | 1593577 | 2019-02-06 21:52:24 | [diff] [blame] | 229 | printing::MetafileSkia* GetPrintingMetafile() const { return metafile_; } |
| 230 | void SetPrintingMetafile(printing::MetafileSkia* metafile) { |
| 231 | metafile_ = metafile; |
| 232 | } |
ckitagawa | 53eeaef | 2019-11-08 15:17:34 | [diff] [blame] | 233 | paint_preview::PaintPreviewTracker* GetPaintPreviewTracker() const { |
| 234 | return tracker_; |
| 235 | } |
| 236 | void SetPaintPreviewTracker(paint_preview::PaintPreviewTracker* tracker) { |
| 237 | tracker_ = tracker; |
| 238 | } |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 239 | |
Wei Li | 2a9bfe4 | 2018-01-13 05:42:56 | [diff] [blame] | 240 | // Subclasses can override to handle custom data. |
| 241 | virtual void recordCustomData(uint32_t id) {} |
| 242 | |
Dominic Mazzoni | cf5d6b0 | 2020-03-06 19:49:12 | [diff] [blame] | 243 | // Used for marked content in PDF files. |
| 244 | virtual void setNodeId(int) = 0; |
| 245 | |
enne | 59df29de | 2017-05-02 03:23:37 | [diff] [blame] | 246 | private: |
Florin Malita | 1593577 | 2019-02-06 21:52:24 | [diff] [blame] | 247 | printing::MetafileSkia* metafile_ = nullptr; |
ckitagawa | 53eeaef | 2019-11-08 15:17:34 | [diff] [blame] | 248 | paint_preview::PaintPreviewTracker* tracker_ = nullptr; |
enne | 34f6084c | 2017-02-02 22:39:08 | [diff] [blame] | 249 | }; |
| 250 | |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 251 | class CC_PAINT_EXPORT PaintCanvasAutoRestore { |
| 252 | public: |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 253 | PaintCanvasAutoRestore(PaintCanvas* canvas, bool save) : canvas_(canvas) { |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 254 | if (canvas_) { |
| 255 | save_count_ = canvas_->getSaveCount(); |
| 256 | if (save) { |
| 257 | canvas_->save(); |
| 258 | } |
| 259 | } |
| 260 | } |
| 261 | |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 262 | ~PaintCanvasAutoRestore() { |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 263 | if (canvas_) { |
| 264 | canvas_->restoreToCount(save_count_); |
| 265 | } |
| 266 | } |
| 267 | |
enne | 98c9f805 | 2017-03-15 19:38:22 | [diff] [blame] | 268 | void restore() { |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 269 | if (canvas_) { |
| 270 | canvas_->restoreToCount(save_count_); |
| 271 | canvas_ = nullptr; |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | private: |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame] | 276 | raw_ptr<PaintCanvas> canvas_ = nullptr; |
enne | d250157 | 2017-03-09 19:59:17 | [diff] [blame] | 277 | int save_count_ = 0; |
| 278 | }; |
| 279 | |
enne | 34f6084c | 2017-02-02 22:39:08 | [diff] [blame] | 280 | } // namespace cc |
| 281 | |
| 282 | #endif // CC_PAINT_PAINT_CANVAS_H_ |