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

Side by Side Diff: bench/GrResourceCacheBench.cpp

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | bench/RefCntBench.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 #if SK_SUPPORT_GPU 9 #if SK_SUPPORT_GPU
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 static GrResourceKey ComputeKey(const GrTextureDesc& desc) { 64 static GrResourceKey ComputeKey(const GrTextureDesc& desc) {
65 return GrTexture::ComputeScratchKey(desc); 65 return GrTexture::ComputeScratchKey(desc);
66 } 66 }
67 67
68 int fID; 68 int fID;
69 69
70 private: 70 private:
71 typedef GrResource INHERITED; 71 typedef GrResource INHERITED;
72 }; 72 };
73 73
74 SK_DEFINE_INST_COUNT(StencilResource)
75 SK_DEFINE_INST_COUNT(TextureResource)
76
77 static void get_stencil(int i, int* w, int* h, int* s) { 74 static void get_stencil(int i, int* w, int* h, int* s) {
78 *w = i % 1024; 75 *w = i % 1024;
79 *h = i * 2 % 1024; 76 *h = i * 2 % 1024;
80 *s = i % 1 == 0 ? 0 : 4; 77 *s = i % 1 == 0 ? 0 : 4;
81 } 78 }
82 79
83 static void get_texture_desc(int i, GrTextureDesc* desc) { 80 static void get_texture_desc(int i, GrTextureDesc* desc) {
84 desc->fFlags = kRenderTarget_GrTextureFlagBit | 81 desc->fFlags = kRenderTarget_GrTextureFlagBit |
85 kNoStencil_GrTextureFlagBit; 82 kNoStencil_GrTextureFlagBit;
86 desc->fWidth = i % 1024; 83 desc->fWidth = i % 1024;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 230 }
234 231
235 private: 232 private:
236 typedef SkBenchmark INHERITED; 233 typedef SkBenchmark INHERITED;
237 }; 234 };
238 235
239 DEF_BENCH( return new GrResourceCacheBenchAdd(); ) 236 DEF_BENCH( return new GrResourceCacheBenchAdd(); )
240 DEF_BENCH( return new GrResourceCacheBenchFind(); ) 237 DEF_BENCH( return new GrResourceCacheBenchFind(); )
241 238
242 #endif 239 #endif
OLDNEW
« no previous file with comments | « no previous file | bench/RefCntBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698