OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkLiteDL.h" | 8 #include "SkLiteDL.h" |
9 #include "SkLiteRecorder.h" | 9 #include "SkLiteRecorder.h" |
10 #include "SkSurface.h" | 10 #include "SkSurface.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 SkCanvas::SaveLayerStrategy SkLiteRecorder::getSaveLayerStrategy(const SaveLayer
Rec& rec) { | 33 SkCanvas::SaveLayerStrategy SkLiteRecorder::getSaveLayerStrategy(const SaveLayer
Rec& rec) { |
34 fDL->saveLayer(rec.fBounds, rec.fPaint, rec.fBackdrop, rec.fSaveLayerFlags); | 34 fDL->saveLayer(rec.fBounds, rec.fPaint, rec.fBackdrop, rec.fSaveLayerFlags); |
35 return SkCanvas::kNoLayer_SaveLayerStrategy; | 35 return SkCanvas::kNoLayer_SaveLayerStrategy; |
36 } | 36 } |
37 void SkLiteRecorder::willRestore() { fDL->restore(); } | 37 void SkLiteRecorder::willRestore() { fDL->restore(); } |
38 | 38 |
39 void SkLiteRecorder::didConcat (const SkMatrix& matrix) { fDL-> concat(mat
rix); } | 39 void SkLiteRecorder::didConcat (const SkMatrix& matrix) { fDL-> concat(mat
rix); } |
40 void SkLiteRecorder::didSetMatrix(const SkMatrix& matrix) { fDL->setMatrix(mat
rix); } | 40 void SkLiteRecorder::didSetMatrix(const SkMatrix& matrix) { fDL->setMatrix(mat
rix); } |
41 void SkLiteRecorder::didTranslate(SkScalar dx, SkScalar dy) { fDL->translate(dx,
dy); } | 41 void SkLiteRecorder::didTranslate(SkScalar dx, SkScalar dy) { fDL->translate(dx,
dy); } |
42 | 42 |
43 void SkLiteRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeSty
le style) { | 43 void SkLiteRecorder::onClipRect(const SkRect& rect, ClipOp op, ClipEdgeStyle sty
le) { |
44 fDL->clipRect(rect, op, style==kSoft_ClipEdgeStyle); | 44 fDL->clipRect(rect, op, style==kSoft_ClipEdgeStyle); |
45 SkCanvas::onClipRect(rect, op, style); | 45 SkCanvas::onClipRect(rect, op, style); |
46 } | 46 } |
47 void SkLiteRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdge
Style style) { | 47 void SkLiteRecorder::onClipRRect(const SkRRect& rrect, ClipOp op, ClipEdgeStyle
style) { |
48 fDL->clipRRect(rrect, op, style==kSoft_ClipEdgeStyle); | 48 fDL->clipRRect(rrect, op, style==kSoft_ClipEdgeStyle); |
49 SkCanvas::onClipRRect(rrect, op, style); | 49 SkCanvas::onClipRRect(rrect, op, style); |
50 } | 50 } |
51 void SkLiteRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeSty
le style) { | 51 void SkLiteRecorder::onClipPath(const SkPath& path, ClipOp op, ClipEdgeStyle sty
le) { |
52 fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); | 52 fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); |
53 SkCanvas::onClipPath(path, op, style); | 53 SkCanvas::onClipPath(path, op, style); |
54 } | 54 } |
55 void SkLiteRecorder::onClipRegion(const SkRegion& region, SkRegion::Op op) { | 55 void SkLiteRecorder::onClipRegion(const SkRegion& region, ClipOp op) { |
56 fDL->clipRegion(region, op); | 56 fDL->clipRegion(region, op); |
57 SkCanvas::onClipRegion(region, op); | 57 SkCanvas::onClipRegion(region, op); |
58 } | 58 } |
59 | 59 |
60 void SkLiteRecorder::onDrawPaint(const SkPaint& paint) { | 60 void SkLiteRecorder::onDrawPaint(const SkPaint& paint) { |
61 fDL->drawPaint(paint); | 61 fDL->drawPaint(paint); |
62 } | 62 } |
63 void SkLiteRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { | 63 void SkLiteRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { |
64 fDL->drawPath(path, paint); | 64 fDL->drawPath(path, paint); |
65 } | 65 } |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 | 200 |
201 void SkLiteRecorder::didTranslateZ(SkScalar dz) { | 201 void SkLiteRecorder::didTranslateZ(SkScalar dz) { |
202 fDL->translateZ(dz); | 202 fDL->translateZ(dz); |
203 } | 203 } |
204 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, | 204 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, |
205 const SkMatrix* matrix, | 205 const SkMatrix* matrix, |
206 const SkPaint* paint, | 206 const SkPaint* paint, |
207 const SkShadowParams& params) { | 207 const SkShadowParams& params) { |
208 fDL->drawShadowedPicture(picture, matrix, paint, params); | 208 fDL->drawShadowedPicture(picture, matrix, paint, params); |
209 } | 209 } |
OLD | NEW |