aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkLiteRecorder.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-08-19 09:05:27 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-19 09:05:27 -0700
commitcbdf007bc2eb85056a1a5c75c088202becba2d16 (patch)
treee5ad582ba81b2c6b113195f64ab584c8376567a1 /src/core/SkLiteRecorder.cpp
parent68d952cf4061dc455d6a6040ce1e4625e4f2ab29 (diff)
Fast path translate() in SkCanvas and SkLiteDL.
This adds didTranslate() so that SkLiteDL (and other canvas recorders) can record the translate rather than the full concat. It also adds a case to SkMatrix::preTranslate() to fast path translate x translate -> translate (i.e. +=). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002 Committed: https://skia.googlesource.com/skia/+/5fa47f4fd13b3158de4599414c86d17649c2dd1c Misc bots failing in pictureimagefilter replay modes. https://luci-milo.appspot.com/swarming/task/30b8e53f3a1f4f10/steps/dm/0/stdout Problem is FMA vs. not. CQ_INCLUDE_TRYBOTS=master.client.skia: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast-Trybot Review-Url: https://codereview.chromium.org/2255283002
Diffstat (limited to 'src/core/SkLiteRecorder.cpp')
-rw-r--r--src/core/SkLiteRecorder.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkLiteRecorder.cpp b/src/core/SkLiteRecorder.cpp
index b61dd8f582..049ccd1afe 100644
--- a/src/core/SkLiteRecorder.cpp
+++ b/src/core/SkLiteRecorder.cpp
@@ -29,8 +29,9 @@ SkCanvas::SaveLayerStrategy SkLiteRecorder::getSaveLayerStrategy(const SaveLayer
}
void SkLiteRecorder::willRestore() { fDL->restore(); }
-void SkLiteRecorder::didConcat (const SkMatrix& matrix) { fDL-> concat(matrix); }
-void SkLiteRecorder::didSetMatrix(const SkMatrix& matrix) { fDL->setMatrix(matrix); }
+void SkLiteRecorder::didConcat (const SkMatrix& matrix) { fDL-> concat(matrix); }
+void SkLiteRecorder::didSetMatrix(const SkMatrix& matrix) { fDL->setMatrix(matrix); }
+void SkLiteRecorder::didTranslate(SkScalar dx, SkScalar dy) { fDL->translate(dx, dy); }
void SkLiteRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle style) {
fDL->clipRect(rect, op, style==kSoft_ClipEdgeStyle);