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

Side by Side Diff: bench/GrResourceCacheBench.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 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
« no previous file with comments | « bench/GameBench.cpp ('k') | bench/ImageCacheBench.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "Benchmark.h" 9 #include "Benchmark.h"
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 private: 39 private:
40 size_t onGpuMemorySize() const override { return 100; } 40 size_t onGpuMemorySize() const override { return 100; }
41 typedef GrGpuResource INHERITED; 41 typedef GrGpuResource INHERITED;
42 }; 42 };
43 43
44 static void populate_cache(GrGpu* gpu, int resourceCount, int keyData32Count) { 44 static void populate_cache(GrGpu* gpu, int resourceCount, int keyData32Count) {
45 for (int i = 0; i < resourceCount; ++i) { 45 for (int i = 0; i < resourceCount; ++i) {
46 GrUniqueKey key; 46 GrUniqueKey key;
47 BenchResource::ComputeKey(i, keyData32Count, &key); 47 BenchResource::ComputeKey(i, keyData32Count, &key);
48 GrGpuResource* resource = SkNEW_ARGS(BenchResource, (gpu)); 48 GrGpuResource* resource = new BenchResource(gpu);
49 resource->resourcePriv().setUniqueKey(key); 49 resource->resourcePriv().setUniqueKey(key);
50 resource->unref(); 50 resource->unref();
51 } 51 }
52 } 52 }
53 53
54 class GrResourceCacheBenchAdd : public Benchmark { 54 class GrResourceCacheBenchAdd : public Benchmark {
55 public: 55 public:
56 GrResourceCacheBenchAdd(int keyData32Count) 56 GrResourceCacheBenchAdd(int keyData32Count)
57 : fFullName("grresourcecache_add") 57 : fFullName("grresourcecache_add")
58 , fKeyData32Count(keyData32Count) { 58 , fKeyData32Count(keyData32Count) {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 DEF_BENCH( return new GrResourceCacheBenchFind(4); ) 178 DEF_BENCH( return new GrResourceCacheBenchFind(4); )
179 DEF_BENCH( return new GrResourceCacheBenchFind(5); ) 179 DEF_BENCH( return new GrResourceCacheBenchFind(5); )
180 DEF_BENCH( return new GrResourceCacheBenchFind(10); ) 180 DEF_BENCH( return new GrResourceCacheBenchFind(10); )
181 DEF_BENCH( return new GrResourceCacheBenchFind(25); ) 181 DEF_BENCH( return new GrResourceCacheBenchFind(25); )
182 DEF_BENCH( return new GrResourceCacheBenchFind(54); ) 182 DEF_BENCH( return new GrResourceCacheBenchFind(54); )
183 DEF_BENCH( return new GrResourceCacheBenchFind(55); ) 183 DEF_BENCH( return new GrResourceCacheBenchFind(55); )
184 DEF_BENCH( return new GrResourceCacheBenchFind(56); ) 184 DEF_BENCH( return new GrResourceCacheBenchFind(56); )
185 #endif 185 #endif
186 186
187 #endif 187 #endif
OLDNEW
« no previous file with comments | « bench/GameBench.cpp ('k') | bench/ImageCacheBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698