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

Side by Side Diff: bench/SKPBench.h

Issue 1541983002: Add tileSKP option to nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix scales Created 4 years, 11 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
« no previous file with comments | « bench/SKPAnimationBench.cpp ('k') | bench/SKPBench.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef SKPBench_DEFINED 8 #ifndef SKPBench_DEFINED
9 #define SKPBench_DEFINED 9 #define SKPBench_DEFINED
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 protected: 33 protected:
34 const char* onGetName() override; 34 const char* onGetName() override;
35 const char* onGetUniqueName() override; 35 const char* onGetUniqueName() override;
36 void onPerCanvasPreDraw(SkCanvas*) override; 36 void onPerCanvasPreDraw(SkCanvas*) override;
37 void onPerCanvasPostDraw(SkCanvas*) override; 37 void onPerCanvasPostDraw(SkCanvas*) override;
38 bool isSuitableFor(Backend backend) override; 38 bool isSuitableFor(Backend backend) override;
39 void onDraw(int loops, SkCanvas* canvas) override; 39 void onDraw(int loops, SkCanvas* canvas) override;
40 SkIPoint onGetSize() override; 40 SkIPoint onGetSize() override;
41 41
42 virtual void drawPicture(SkCanvas*);
42 virtual void drawMPDPicture(); 43 virtual void drawMPDPicture();
43 virtual void drawPicture(); 44 virtual void drawPictureTiled();
44 45
45 const SkPicture* picture() const { return fPic; } 46 const SkPicture* picture() const { return fPic; }
47 SkScalar scale() const { return fScale; }
46 const SkTDArray<SkSurface*>& surfaces() const { return fSurfaces; } 48 const SkTDArray<SkSurface*>& surfaces() const { return fSurfaces; }
47 const SkTDArray<SkIRect>& tileRects() const { return fTileRects; } 49 const SkTDArray<SkIRect>& tileRects() const { return fTileRects; }
48 50
49 private: 51 private:
50 SkAutoTUnref<const SkPicture> fPic; 52 SkAutoTUnref<const SkPicture> fPic;
51 const SkIRect fClip; 53 const SkIRect fClip;
52 const SkScalar fScale; 54 const SkScalar fScale;
53 SkString fName; 55 SkString fName;
54 SkString fUniqueName; 56 SkString fUniqueName;
55 57
56 const bool fUseMultiPictureDraw; 58 const bool fUseMultiPictureDraw;
57 SkTDArray<SkSurface*> fSurfaces; // for MultiPictureDraw 59 SkTDArray<SkSurface*> fSurfaces; // for MultiPictureDraw
58 SkTDArray<SkIRect> fTileRects; // for MultiPictureDraw 60 SkTDArray<SkIRect> fTileRects; // for MultiPictureDraw
59 61
60 const bool fDoLooping; 62 const bool fDoLooping;
61 63
62 typedef Benchmark INHERITED; 64 typedef Benchmark INHERITED;
63 }; 65 };
64 66
65 #endif 67 #endif
OLDNEW
« no previous file with comments | « bench/SKPAnimationBench.cpp ('k') | bench/SKPBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698