Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Unified Diff: src/core/SkLiteDL.cpp

Issue 2264433002: Revert of Fast path translate() in SkCanvas and SkLiteDL. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkLiteDL.h ('k') | src/core/SkLiteRecorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLiteDL.cpp
diff --git a/src/core/SkLiteDL.cpp b/src/core/SkLiteDL.cpp
index c3bf976a888d61e6abaac0293ccfc06fa26282d1..c634d4825a33a724fa230444fbe7e2466351eeaf 100644
--- a/src/core/SkLiteDL.cpp
+++ b/src/core/SkLiteDL.cpp
@@ -52,7 +52,7 @@
namespace {
#define TYPES(M) \
M(Save) M(Restore) M(SaveLayer) \
- M(Concat) M(SetMatrix) M(Translate) M(TranslateZ) \
+ M(Concat) M(SetMatrix) 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) \
@@ -114,14 +114,6 @@
c->setMatrix(SkMatrix::Concat(original, matrix));
}
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;
@@ -547,9 +539,8 @@
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::translate(SkScalar dx, SkScalar dy) { this->push<Translate>(0, dx, dy); }
+void SkLiteDL:: concat(const SkMatrix& matrix) { this->push <Concat>(0, matrix); }
+void SkLiteDL::setMatrix(const SkMatrix& matrix) { this->push<SetMatrix>(0, matrix); }
void SkLiteDL::translateZ(SkScalar dz) { this->push<TranslateZ>(0, dz); }
void SkLiteDL::clipPath(const SkPath& path, SkRegion::Op op, bool aa) {
« no previous file with comments | « src/core/SkLiteDL.h ('k') | src/core/SkLiteRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698