| Index: src/core/SkLiteDL.cpp
|
| diff --git a/src/core/SkLiteDL.cpp b/src/core/SkLiteDL.cpp
|
| index c634d4825a33a724fa230444fbe7e2466351eeaf..c3bf976a888d61e6abaac0293ccfc06fa26282d1 100644
|
| --- a/src/core/SkLiteDL.cpp
|
| +++ b/src/core/SkLiteDL.cpp
|
| @@ -52,7 +52,7 @@ static void make_threadsafe(SkPath* path, SkMatrix* matrix) {
|
| namespace {
|
| #define TYPES(M) \
|
| M(Save) M(Restore) M(SaveLayer) \
|
| - M(Concat) M(SetMatrix) M(TranslateZ) \
|
| + M(Concat) M(SetMatrix) M(Translate) M(TranslateZ) \
|
| M(ClipPath) M(ClipRect) M(ClipRRect) M(ClipRegion) \
|
| M(DrawPaint) M(DrawPath) M(DrawRect) M(DrawOval) M(DrawRRect) M(DrawDRRect) \
|
| M(DrawAnnotation) M(DrawDrawable) M(DrawPicture) M(DrawShadowedPicture) \
|
| @@ -115,6 +115,14 @@ namespace {
|
| }
|
| void makeThreadsafe() { make_threadsafe(nullptr, &matrix); }
|
| };
|
| + struct Translate final : Op {
|
| + static const auto kType = Type::Translate;
|
| + Translate(SkScalar dx, SkScalar dy) : dx(dx), dy(dy) {}
|
| + SkScalar dx,dy;
|
| + void draw(SkCanvas* c, const SkMatrix&) {
|
| + c->translate(dx, dy);
|
| + }
|
| + };
|
| struct TranslateZ final : Op {
|
| static const auto kType = Type::TranslateZ;
|
| TranslateZ(SkScalar dz) : dz(dz) {}
|
| @@ -539,8 +547,9 @@ void SkLiteDL::saveLayer(const SkRect* bounds, const SkPaint* paint,
|
| this->push<SaveLayer>(0, bounds, paint, backdrop, flags);
|
| }
|
|
|
| -void SkLiteDL:: concat(const SkMatrix& matrix) { this->push <Concat>(0, matrix); }
|
| -void SkLiteDL::setMatrix(const SkMatrix& matrix) { this->push<SetMatrix>(0, matrix); }
|
| +void SkLiteDL:: concat(const SkMatrix& matrix) { this->push <Concat>(0, matrix); }
|
| +void SkLiteDL::setMatrix(const SkMatrix& matrix) { this->push<SetMatrix>(0, matrix); }
|
| +void SkLiteDL::translate(SkScalar dx, SkScalar dy) { this->push<Translate>(0, dx, dy); }
|
| void SkLiteDL::translateZ(SkScalar dz) { this->push<TranslateZ>(0, dz); }
|
|
|
| void SkLiteDL::clipPath(const SkPath& path, SkRegion::Op op, bool aa) {
|
|
|