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

Side by Side Diff: bench/SKPBench.cpp

Issue 540963002: Change SkPicture::draw to playback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "SKPBench.h" 8 #include "SKPBench.h"
9 9
10 SKPBench::SKPBench(const char* name, const SkPicture* pic, const SkIRect& clip, SkScalar scale) 10 SKPBench::SKPBench(const char* name, const SkPicture* pic, const SkIRect& clip, SkScalar scale)
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 SkIPoint SKPBench::onGetSize() { 25 SkIPoint SKPBench::onGetSize() {
26 return SkIPoint::Make(fClip.width(), fClip.height()); 26 return SkIPoint::Make(fClip.width(), fClip.height());
27 } 27 }
28 28
29 void SKPBench::onDraw(const int loops, SkCanvas* canvas) { 29 void SKPBench::onDraw(const int loops, SkCanvas* canvas) {
30 canvas->save(); 30 canvas->save();
31 canvas->scale(fScale, fScale); 31 canvas->scale(fScale, fScale);
32 for (int i = 0; i < loops; i++) { 32 for (int i = 0; i < loops; i++) {
33 fPic->draw(canvas); 33 fPic->playback(canvas);
34 canvas->flush(); 34 canvas->flush();
35 } 35 }
36 canvas->restore(); 36 canvas->restore();
37 } 37 }
OLDNEW
« no previous file with comments | « bench/PicturePlaybackBench.cpp ('k') | bench/nanobench.cpp » ('j') | include/core/SkPicture.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698