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

Side by Side Diff: tools/VisualBench/VisualSKPBench.h

Issue 1443263002: Optimize visualbench offscreen blits (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix msvc warnings Created 5 years 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 | « tools/VisualBench/VisualBenchmarkStream.cpp ('k') | tools/VisualBench/VisualSKPBench.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 2015 Google Inc. 2 * Copyright 2015 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 8
9 #ifndef VisualSKPBench_DEFINED 9 #ifndef VisualSKPBench_DEFINED
10 #define VisualSKPBench_DEFINED 10 #define VisualSKPBench_DEFINED
11 11
12 #include "Benchmark.h" 12 #include "Benchmark.h"
13 #include "SkCanvas.h" 13 #include "SkCanvas.h"
14 #include "SkPicture.h" 14 #include "SkPicture.h"
15 15
16 /** 16 /**
17 * Runs an SkPicture as a benchmark by repeatedly drawing it 17 * Runs an SkPicture as a benchmark by repeatedly drawing it
18 */ 18 */
19 class VisualSKPBench : public Benchmark { 19 class VisualSKPBench : public Benchmark {
20 public: 20 public:
21 VisualSKPBench(const char* name, const SkPicture*); 21 VisualSKPBench(const char* name, const SkPicture*);
22 22
23 protected: 23 protected:
24 const char* onGetName() override; 24 const char* onGetName() override;
25 const char* onGetUniqueName() override; 25 const char* onGetUniqueName() override;
26 bool isSuitableFor(Backend backend) override; 26 bool isSuitableFor(Backend backend) override;
27 SkIPoint onGetSize() override;
27 void onDraw(int loops, SkCanvas* canvas) override; 28 void onDraw(int loops, SkCanvas* canvas) override;
28 29
29 private: 30 private:
30 SkAutoTUnref<const SkPicture> fPic; 31 SkAutoTUnref<const SkPicture> fPic;
32 SkIRect fCullRect;
31 SkString fName; 33 SkString fName;
32 SkString fUniqueName; 34 SkString fUniqueName;
33 35
34 typedef Benchmark INHERITED; 36 typedef Benchmark INHERITED;
35 }; 37 };
36 38
37 #endif 39 #endif
OLDNEW
« no previous file with comments | « tools/VisualBench/VisualBenchmarkStream.cpp ('k') | tools/VisualBench/VisualSKPBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698