Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
|
tfarina
2014/09/03 17:06:42
tests/ResourceCacheTest.cpp
As Mike likes to remi
Rémi Piotaix
2014/09/03 17:26:17
ResourceCacheTest.cpp already exists but it is for
| |
| 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 "Test.h" | 7 #include "Test.h" |
| 8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 9 #include "SkGraphics.h" | 9 #include "SkGraphics.h" |
| 10 #include "SkBitmapCache.h" | 10 #include "SkBitmapCache.h" |
| 11 | 11 |
| 12 static const int kCanvasSize = 1; | 12 static const int kCanvasSize = 1; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 | 65 |
| 66 SkGraphics::SetResourceCacheTotalByteLimit(0); // clear cache | 66 SkGraphics::SetResourceCacheTotalByteLimit(0); // clear cache |
| 67 SkGraphics::SetResourceCacheTotalByteLimit(2 * size); | 67 SkGraphics::SetResourceCacheTotalByteLimit(2 * size); |
| 68 SkGraphics::SetResourceCacheSingleAllocationByteLimit(size / 2); // too sma ll | 68 SkGraphics::SetResourceCacheSingleAllocationByteLimit(size / 2); // too sma ll |
| 69 | 69 |
| 70 REPORTER_ASSERT(reporter, !test_scaled_image_cache_useage()); | 70 REPORTER_ASSERT(reporter, !test_scaled_image_cache_useage()); |
| 71 | 71 |
| 72 SkGraphics::SetResourceCacheSingleAllocationByteLimit(originalAllocationLimi t); | 72 SkGraphics::SetResourceCacheSingleAllocationByteLimit(originalAllocationLimi t); |
| 73 SkGraphics::SetResourceCacheTotalByteLimit(originalByteLimit); | 73 SkGraphics::SetResourceCacheTotalByteLimit(originalByteLimit); |
| 74 } | 74 } |
| OLD | NEW |