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 11 matching lines...) Expand all Loading... |
22 return nullptr; | 22 return nullptr; |
23 } | 23 } |
24 | 24 |
25 void SkLiteRecorder::willSave() { fDL->save(); } | 25 void SkLiteRecorder::willSave() { fDL->save(); } |
26 SkCanvas::SaveLayerStrategy SkLiteRecorder::getSaveLayerStrategy(const SaveLayer
Rec& rec) { | 26 SkCanvas::SaveLayerStrategy SkLiteRecorder::getSaveLayerStrategy(const SaveLayer
Rec& rec) { |
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(mat
rix); } |
33 void SkLiteRecorder::didSetMatrix(const SkMatrix& matrix) { fDL->setMatrix(matri
x); } | 33 void SkLiteRecorder::didSetMatrix(const SkMatrix& matrix) { fDL->setMatrix(mat
rix); } |
| 34 void SkLiteRecorder::didTranslate(SkScalar dx, SkScalar dy) { fDL->translate(dx,
dy); } |
34 | 35 |
35 void SkLiteRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeSty
le style) { | 36 void SkLiteRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeSty
le style) { |
36 fDL->clipRect(rect, op, style==kSoft_ClipEdgeStyle); | 37 fDL->clipRect(rect, op, style==kSoft_ClipEdgeStyle); |
37 } | 38 } |
38 void SkLiteRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdge
Style style) { | 39 void SkLiteRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdge
Style style) { |
39 fDL->clipRRect(rrect, op, style==kSoft_ClipEdgeStyle); | 40 fDL->clipRRect(rrect, op, style==kSoft_ClipEdgeStyle); |
40 } | 41 } |
41 void SkLiteRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeSty
le style) { | 42 void SkLiteRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeSty
le style) { |
42 fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); | 43 fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); |
43 } | 44 } |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 181 } |
181 | 182 |
182 void SkLiteRecorder::didTranslateZ(SkScalar dz) { | 183 void SkLiteRecorder::didTranslateZ(SkScalar dz) { |
183 fDL->translateZ(dz); | 184 fDL->translateZ(dz); |
184 } | 185 } |
185 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, | 186 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, |
186 const SkMatrix* matrix, | 187 const SkMatrix* matrix, |
187 const SkPaint* paint) { | 188 const SkPaint* paint) { |
188 fDL->drawShadowedPicture(picture, matrix, paint); | 189 fDL->drawShadowedPicture(picture, matrix, paint); |
189 } | 190 } |
OLD | NEW |