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

Side by Side Diff: bench/GrResourceCacheBench.cpp

Issue 275903002: Factor GrTexture into public GrTexture and private GrTextureImpl. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Move functions called by Chrome back to GrTexture Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | include/gpu/GrContext.h » ('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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 virtual size_t gpuMemorySize() const SK_OVERRIDE { 56 virtual size_t gpuMemorySize() const SK_OVERRIDE {
57 return 100 + ((fID % 1 == 0) ? -40 : 33); 57 return 100 + ((fID % 1 == 0) ? -40 : 33);
58 } 58 }
59 59
60 virtual bool isValidOnGpu() const SK_OVERRIDE { 60 virtual bool isValidOnGpu() const SK_OVERRIDE {
61 return true; 61 return true;
62 } 62 }
63 63
64 static GrResourceKey ComputeKey(const GrTextureDesc& desc) { 64 static GrResourceKey ComputeKey(const GrTextureDesc& desc) {
65 return GrTexture::ComputeScratchKey(desc); 65 return GrTextureImpl::ComputeScratchKey(desc);
66 } 66 }
67 67
68 int fID; 68 int fID;
69 69
70 private: 70 private:
71 typedef GrCacheable INHERITED; 71 typedef GrCacheable INHERITED;
72 }; 72 };
73 73
74 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) {
75 *w = i % 1024; 75 *w = i % 1024;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 231
232 private: 232 private:
233 typedef SkBenchmark INHERITED; 233 typedef SkBenchmark INHERITED;
234 }; 234 };
235 235
236 DEF_BENCH( return new GrResourceCacheBenchAdd(); ) 236 DEF_BENCH( return new GrResourceCacheBenchAdd(); )
237 DEF_BENCH( return new GrResourceCacheBenchFind(); ) 237 DEF_BENCH( return new GrResourceCacheBenchFind(); )
238 238
239 #endif 239 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698