OLD | NEW |
---|---|
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_CANVAS_H_ | 5 #ifndef CC_PAINT_PAINT_CANVAS_H_ |
6 #define CC_PAINT_PAINT_CANVAS_H_ | 6 #define CC_PAINT_PAINT_CANVAS_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 | 189 |
190 // For GraphicsContextCanvas only. Maybe this could be rewritten? | 190 // For GraphicsContextCanvas only. Maybe this could be rewritten? |
191 virtual void temporary_internal_describeTopLayer(SkMatrix* matrix, | 191 virtual void temporary_internal_describeTopLayer(SkMatrix* matrix, |
192 SkIRect* clip_bounds) = 0; | 192 SkIRect* clip_bounds) = 0; |
193 | 193 |
194 virtual bool ToPixmap(SkPixmap* output) = 0; | 194 virtual bool ToPixmap(SkPixmap* output) = 0; |
195 virtual void AnnotateRectWithURL(const SkRect& rect, SkData* data) = 0; | 195 virtual void AnnotateRectWithURL(const SkRect& rect, SkData* data) = 0; |
196 virtual void AnnotateNamedDestination(const SkPoint& point, SkData* data) = 0; | 196 virtual void AnnotateNamedDestination(const SkPoint& point, SkData* data) = 0; |
197 virtual void AnnotateLinkToDestination(const SkRect& rect, SkData* data) = 0; | 197 virtual void AnnotateLinkToDestination(const SkRect& rect, SkData* data) = 0; |
198 | 198 |
199 // TODO(enne): ideally this should live on PaintRecord, but that's not | |
danakj
2017/03/20 14:53:54
Or, more like this shouldn't exist really and PLS
enne (OOO)
2017/03/20 17:41:26
The cleanup here is just moving one function from
| |
200 // possible when PaintRecord is a typedef. | |
201 virtual void PlaybackPaintRecord(PaintRecord* record) = 0; | |
danakj
2017/03/20 14:53:54
Can it be an sk_sp<PaintRecord> like the drawPictu
enne (OOO)
2017/03/20 17:41:26
Done done done.
| |
202 | |
199 protected: | 203 protected: |
200 friend class PaintSurface; | 204 friend class PaintSurface; |
201 friend class PaintRecorder; | 205 friend class PaintRecorder; |
202 friend CC_PAINT_EXPORT void PaintCanvasAnnotateRectWithURL( | 206 friend CC_PAINT_EXPORT void PaintCanvasAnnotateRectWithURL( |
203 PaintCanvas* canvas, | 207 PaintCanvas* canvas, |
204 const SkRect& rect, | 208 const SkRect& rect, |
205 SkData* data); | 209 SkData* data); |
206 friend CC_PAINT_EXPORT void PaintCanvasAnnotateNamedDestination( | 210 friend CC_PAINT_EXPORT void PaintCanvasAnnotateNamedDestination( |
207 PaintCanvas* canvas, | 211 PaintCanvas* canvas, |
208 const SkPoint& point, | 212 const SkPoint& point, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
266 const SkPoint& point, | 270 const SkPoint& point, |
267 SkData* data); | 271 SkData* data); |
268 | 272 |
269 CC_PAINT_EXPORT void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas, | 273 CC_PAINT_EXPORT void PaintCanvasAnnotateLinkToDestination(PaintCanvas* canvas, |
270 const SkRect& rect, | 274 const SkRect& rect, |
271 SkData* data); | 275 SkData* data); |
272 | 276 |
273 } // namespace cc | 277 } // namespace cc |
274 | 278 |
275 #endif // CC_PAINT_PAINT_CANVAS_H_ | 279 #endif // CC_PAINT_PAINT_CANVAS_H_ |
OLD | NEW |