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

Side by Side Diff: bench/ColorCubeBench.cpp

Issue 1379853003: Fix for nexus 5 crashing in GL benches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 2 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/CodecBench.cpp ('k') | bench/ColorPrivBench.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 #include "Benchmark.h" 7 #include "Benchmark.h"
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkColorCubeFilter.h" 9 #include "SkColorCubeFilter.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 13 matching lines...) Expand all
24 24
25 ~ColorCubeBench() { 25 ~ColorCubeBench() {
26 SkSafeUnref(fCubeData); 26 SkSafeUnref(fCubeData);
27 } 27 }
28 28
29 protected: 29 protected:
30 const char* onGetName() override { 30 const char* onGetName() override {
31 return "colorcube"; 31 return "colorcube";
32 } 32 }
33 33
34 void onPreDraw() override { 34 void onDelayedSetup() override {
35 if (!SkToBool(fCubeData)) { 35 if (!SkToBool(fCubeData)) {
36 this->makeCubeData(); 36 this->makeCubeData();
37 this->make_bitmap(); 37 this->make_bitmap();
38 } 38 }
39 } 39 }
40 40
41 void onDraw(const int loops, SkCanvas* canvas) override { 41 void onDraw(const int loops, SkCanvas* canvas) override {
42 this->test(loops, canvas); 42 this->test(loops, canvas);
43 } 43 }
44 44
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 canvas->drawBitmap(fBitmap, 0, 0, &paint); 102 canvas->drawBitmap(fBitmap, 0, 0, &paint);
103 } 103 }
104 } 104 }
105 105
106 typedef Benchmark INHERITED; 106 typedef Benchmark INHERITED;
107 }; 107 };
108 108
109 /////////////////////////////////////////////////////////////////////////////// 109 ///////////////////////////////////////////////////////////////////////////////
110 110
111 DEF_BENCH( return new ColorCubeBench(); ) 111 DEF_BENCH( return new ColorCubeBench(); )
OLDNEW
« no previous file with comments | « bench/CodecBench.cpp ('k') | bench/ColorPrivBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698