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

Unified Diff: bench/SKPAnimationBench.cpp

Issue 1541983002: Add tileSKP option to nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix scales Created 4 years, 12 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 | « bench/SKPAnimationBench.h ('k') | bench/SKPBench.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SKPAnimationBench.cpp
diff --git a/bench/SKPAnimationBench.cpp b/bench/SKPAnimationBench.cpp
index 1a1ca447e506e2bbc63330426eb02d90907ed977..89a43ddc9c4f99d6c544567c848f368b7e37fe88 100644
--- a/bench/SKPAnimationBench.cpp
+++ b/bench/SKPAnimationBench.cpp
@@ -27,7 +27,17 @@ void SKPAnimationBench::onPerCanvasPreDraw(SkCanvas* canvas) {
fAnimationTimer.start();
}
-void SKPAnimationBench::drawPicture() {
+void SKPAnimationBench::drawPicture(SkCanvas* canvas) {
+ SkMatrix m;
+ m.setScale(this->scale(), this->scale());
+ fAnimation->preConcatFrameMatrix(fAnimationTimer.fWall, fDevBounds, &m);
+ canvas->save();
+ canvas->concat(m);
+ canvas->drawPicture(this->picture());
+ canvas->restore();
+}
+
+void SKPAnimationBench::drawPictureTiled() {
fAnimationTimer.end();
for (int j = 0; j < this->tileRects().count(); ++j) {
« no previous file with comments | « bench/SKPAnimationBench.h ('k') | bench/SKPBench.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698