| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |