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 16 matching lines...) Expand all Loading... |
27 fDL->saveLayer(rec.fBounds, rec.fPaint, rec.fBackdrop, rec.fSaveLayerFlags); | 27 fDL->saveLayer(rec.fBounds, rec.fPaint, rec.fBackdrop, rec.fSaveLayerFlags); |
28 return SkCanvas::kNoLayer_SaveLayerStrategy; | 28 return SkCanvas::kNoLayer_SaveLayerStrategy; |
29 } | 29 } |
30 void SkLiteRecorder::willRestore() { fDL->restore(); } | 30 void SkLiteRecorder::willRestore() { fDL->restore(); } |
31 | 31 |
32 void SkLiteRecorder::didConcat (const SkMatrix& matrix) { fDL-> concat(matri
x); } | 32 void SkLiteRecorder::didConcat (const SkMatrix& matrix) { fDL-> concat(matri
x); } |
33 void SkLiteRecorder::didSetMatrix(const SkMatrix& matrix) { fDL->setMatrix(matri
x); } | 33 void SkLiteRecorder::didSetMatrix(const SkMatrix& matrix) { fDL->setMatrix(matri
x); } |
34 | 34 |
35 void SkLiteRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeSty
le style) { | 35 void SkLiteRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeSty
le style) { |
36 fDL->clipRect(rect, op, style==kSoft_ClipEdgeStyle); | 36 fDL->clipRect(rect, op, style==kSoft_ClipEdgeStyle); |
37 SkCanvas::onClipRect(rect, op, style); | |
38 } | 37 } |
39 void SkLiteRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdge
Style style) { | 38 void SkLiteRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdge
Style style) { |
40 fDL->clipRRect(rrect, op, style==kSoft_ClipEdgeStyle); | 39 fDL->clipRRect(rrect, op, style==kSoft_ClipEdgeStyle); |
41 SkCanvas::onClipRRect(rrect, op, style); | |
42 } | 40 } |
43 void SkLiteRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeSty
le style) { | 41 void SkLiteRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeSty
le style) { |
44 fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); | 42 fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); |
45 SkCanvas::onClipPath(path, op, style); | |
46 } | 43 } |
47 void SkLiteRecorder::onClipRegion(const SkRegion& region, SkRegion::Op op) { | 44 void SkLiteRecorder::onClipRegion(const SkRegion& region, SkRegion::Op op) { |
48 fDL->clipRegion(region, op); | 45 fDL->clipRegion(region, op); |
49 SkCanvas::onClipRegion(region, op); | |
50 } | 46 } |
51 | 47 |
52 void SkLiteRecorder::onDrawPaint(const SkPaint& paint) { | 48 void SkLiteRecorder::onDrawPaint(const SkPaint& paint) { |
53 fDL->drawPaint(paint); | 49 fDL->drawPaint(paint); |
54 } | 50 } |
55 void SkLiteRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { | 51 void SkLiteRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { |
56 fDL->drawPath(path, paint); | 52 fDL->drawPath(path, paint); |
57 } | 53 } |
58 void SkLiteRecorder::onDrawRect(const SkRect& rect, const SkPaint& paint) { | 54 void SkLiteRecorder::onDrawRect(const SkRect& rect, const SkPaint& paint) { |
59 fDL->drawRect(rect, paint); | 55 fDL->drawRect(rect, paint); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } | 175 } |
180 | 176 |
181 void SkLiteRecorder::didTranslateZ(SkScalar dz) { | 177 void SkLiteRecorder::didTranslateZ(SkScalar dz) { |
182 fDL->translateZ(dz); | 178 fDL->translateZ(dz); |
183 } | 179 } |
184 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, | 180 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, |
185 const SkMatrix* matrix, | 181 const SkMatrix* matrix, |
186 const SkPaint* paint) { | 182 const SkPaint* paint) { |
187 fDL->drawShadowedPicture(picture, matrix, paint); | 183 fDL->drawShadowedPicture(picture, matrix, paint); |
188 } | 184 } |
OLD | NEW |