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

Side by Side Diff: skia/ext/cdl_picture_recording_canvas.h

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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 | « skia/ext/cdl_picture_recorder.cc ('k') | skia/ext/cdl_picture_recording_canvas.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 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SKIA_EXT_CDL_PICTURE_RECORDING_CANVAS_H_
9 #define SKIA_EXT_CDL_PICTURE_RECORDING_CANVAS_H_
10
11 #include "cdl_common.h"
12
13 #if CDL_ENABLED
14
15 #include "third_party/skia/include/core/SkCanvas.h"
16 #include "third_party/skia/include/core/SkColorFilter.h"
17 #include "third_party/skia/include/core/SkDrawLooper.h"
18 #include "third_party/skia/include/core/SkImageFilter.h"
19 #include "third_party/skia/include/core/SkPaint.h"
20 #include "third_party/skia/include/core/SkPathEffect.h"
21 #include "cdl_no_draw_canvas.h"
22
23 class CdlPictureBuffer;
24
25 class CdlPictureRecordingCanvas final : public CdlNoDrawCanvas {
26 public:
27 CdlPictureRecordingCanvas(CdlPictureBuffer*, const SkRect& bounds);
28 ~CdlPictureRecordingCanvas() override;
29
30 void reset(CdlPictureBuffer*, const SkRect& bounds);
31
32 int onSave() override;
33 int onSaveLayer(const SaveLayerRec&) override;
34 void onRestore() override;
35
36 void onConcat(const SkMatrix&) override;
37 void onSetMatrix(const SkMatrix&) override;
38 void onTranslate(SkScalar, SkScalar) override;
39
40 void onClipRect(const SkRect&, SkCanvas::ClipOp, ClipEdgeStyle) override;
41 void onClipRRect(const SkRRect&, SkCanvas::ClipOp, ClipEdgeStyle) override;
42 void onClipPath(const SkPath&, SkCanvas::ClipOp, ClipEdgeStyle) override;
43 void onClipRegion(const SkRegion&, SkCanvas::ClipOp) override;
44
45 void onDrawPaint(const CdlPaint&) override;
46 void onDrawPath(const SkPath&, const CdlPaint&) override;
47 void onDrawRect(const SkRect&, const CdlPaint&) override;
48 void onDrawRRect(const SkRRect&, const CdlPaint&) override;
49 void onDrawDRRect(const SkRRect&, const SkRRect&, const CdlPaint&) override;
50 void onDrawOval(const SkRect&, const CdlPaint&) override;
51
52 void onDrawPicture(const CdlPicture* picture,
53 const SkMatrix* matrix,
54 const CdlPaint* paint) override;
55
56 void onDrawAnnotation(const SkRect&, const char[], SkData*) override;
57
58 void onDrawText(const void*,
59 size_t,
60 SkScalar x,
61 SkScalar y,
62 const CdlPaint&) override;
63 void onDrawPosText(const void*,
64 size_t,
65 const SkPoint[],
66 const CdlPaint&) override;
67 void onDrawTextBlob(const SkTextBlob*,
68 SkScalar,
69 SkScalar,
70 const CdlPaint&) override;
71
72 void onDrawImage(const SkImage*,
73 SkScalar,
74 SkScalar,
75 const CdlPaint*) override;
76 void onDrawImageRect(const SkImage*,
77 const SkRect*,
78 const SkRect&,
79 const CdlPaint*,
80 SkCanvas::SrcRectConstraint) override;
81 void onDrawPoints(SkCanvas::PointMode,
82 size_t count,
83 const SkPoint pts[],
84 const CdlPaint&) override;
85
86 private:
87 typedef CdlNoDrawCanvas INHERITED;
88
89 CdlPictureBuffer* fDL;
90 bool fComputeClips;
91 };
92
93 #endif // CDL_ENABLED
94
95 #endif // SKIA_EXT_CDL_PICTURE_RECORDING_CANVAS_H_
OLDNEW
« no previous file with comments | « skia/ext/cdl_picture_recorder.cc ('k') | skia/ext/cdl_picture_recording_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698