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(mat
rix); } | 32 void SkLiteRecorder::didConcat (const SkMatrix& matrix) { fDL-> concat(matri
x); } |
33 void SkLiteRecorder::didSetMatrix(const SkMatrix& matrix) { fDL->setMatrix(mat
rix); } | 33 void SkLiteRecorder::didSetMatrix(const SkMatrix& matrix) { fDL->setMatrix(matri
x); } |
34 void SkLiteRecorder::didTranslate(SkScalar dx, SkScalar dy) { fDL->translate(dx,
dy); } | |
35 | 34 |
36 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) { |
37 fDL->clipRect(rect, op, style==kSoft_ClipEdgeStyle); | 36 fDL->clipRect(rect, op, style==kSoft_ClipEdgeStyle); |
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 } | 40 } |
42 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) { |
43 fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); | 42 fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); |
44 } | 43 } |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } | 180 } |
182 | 181 |
183 void SkLiteRecorder::didTranslateZ(SkScalar dz) { | 182 void SkLiteRecorder::didTranslateZ(SkScalar dz) { |
184 fDL->translateZ(dz); | 183 fDL->translateZ(dz); |
185 } | 184 } |
186 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, | 185 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, |
187 const SkMatrix* matrix, | 186 const SkMatrix* matrix, |
188 const SkPaint* paint) { | 187 const SkPaint* paint) { |
189 fDL->drawShadowedPicture(picture, matrix, paint); | 188 fDL->drawShadowedPicture(picture, matrix, paint); |
190 } | 189 } |
OLD | NEW |