| 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); |
| 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); |
| 41 SkCanvas::onClipRRect(rrect, op, style); |
| 40 } | 42 } |
| 41 void SkLiteRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeSty
le style) { | 43 void SkLiteRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeSty
le style) { |
| 42 fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); | 44 fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); |
| 45 SkCanvas::onClipPath(path, op, style); |
| 43 } | 46 } |
| 44 void SkLiteRecorder::onClipRegion(const SkRegion& region, SkRegion::Op op) { | 47 void SkLiteRecorder::onClipRegion(const SkRegion& region, SkRegion::Op op) { |
| 45 fDL->clipRegion(region, op); | 48 fDL->clipRegion(region, op); |
| 49 SkCanvas::onClipRegion(region, op); |
| 46 } | 50 } |
| 47 | 51 |
| 48 void SkLiteRecorder::onDrawPaint(const SkPaint& paint) { | 52 void SkLiteRecorder::onDrawPaint(const SkPaint& paint) { |
| 49 fDL->drawPaint(paint); | 53 fDL->drawPaint(paint); |
| 50 } | 54 } |
| 51 void SkLiteRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { | 55 void SkLiteRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { |
| 52 fDL->drawPath(path, paint); | 56 fDL->drawPath(path, paint); |
| 53 } | 57 } |
| 54 void SkLiteRecorder::onDrawRect(const SkRect& rect, const SkPaint& paint) { | 58 void SkLiteRecorder::onDrawRect(const SkRect& rect, const SkPaint& paint) { |
| 55 fDL->drawRect(rect, paint); | 59 fDL->drawRect(rect, paint); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 179 } |
| 176 | 180 |
| 177 void SkLiteRecorder::didTranslateZ(SkScalar dz) { | 181 void SkLiteRecorder::didTranslateZ(SkScalar dz) { |
| 178 fDL->translateZ(dz); | 182 fDL->translateZ(dz); |
| 179 } | 183 } |
| 180 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, | 184 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, |
| 181 const SkMatrix* matrix, | 185 const SkMatrix* matrix, |
| 182 const SkPaint* paint) { | 186 const SkPaint* paint) { |
| 183 fDL->drawShadowedPicture(picture, matrix, paint); | 187 fDL->drawShadowedPicture(picture, matrix, paint); |
| 184 } | 188 } |
| OLD | NEW |