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

Unified Diff: bench/GrResourceCacheBench.cpp

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gm/gmmain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/GrResourceCacheBench.cpp
diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp
index 6a7c89acf8925fbe6045da3daf4512fb4ea259d4..30d4cd410c1b9ebcf0eb5cccbd5a2d8502dc65af 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -63,7 +63,7 @@ public:
return 100 + ((fID % 1 == 0) ? -40 : 33);
}
- static GrResourceKey ComputeKey(const GrTextureDesc& desc) {
+ static GrResourceKey ComputeKey(const GrSurfaceDesc& desc) {
GrCacheID::Key key;
memset(&key, 0, sizeof(key));
key.fData32[0] = (desc.fWidth) | (desc.fHeight << 16);
@@ -86,9 +86,9 @@ static void get_stencil(int i, int* w, int* h, int* s) {
*s = i % 1 == 0 ? 0 : 4;
}
-static void get_texture_desc(int i, GrTextureDesc* desc) {
- desc->fFlags = kRenderTarget_GrTextureFlagBit |
- kNoStencil_GrTextureFlagBit;
+static void get_texture_desc(int i, GrSurfaceDesc* desc) {
+ desc->fFlags = kRenderTarget_GrSurfaceFlag |
+ kNoStencil_GrSurfaceFlag;
desc->fWidth = i % 1024;
desc->fHeight = i * 2 % 1024;
desc->fConfig = static_cast<GrPixelConfig>(i % (kLast_GrPixelConfig + 1));
@@ -107,7 +107,7 @@ static void populate_cache(GrResourceCache* cache, GrGpu* gpu, int resourceCount
}
for (int i = 0; i < resourceCount; ++i) {
- GrTextureDesc desc;
+ GrSurfaceDesc desc;
get_texture_desc(i, &desc);
GrResourceKey key = TextureResource::ComputeKey(desc);
GrGpuResource* resource = SkNEW_ARGS(TextureResource, (gpu, i));
@@ -120,7 +120,7 @@ static void populate_cache(GrResourceCache* cache, GrGpu* gpu, int resourceCount
static void check_cache_contents_or_die(GrResourceCache* cache, int k) {
// Benchmark find calls that succeed.
{
- GrTextureDesc desc;
+ GrSurfaceDesc desc;
get_texture_desc(k, &desc);
GrResourceKey key = TextureResource::ComputeKey(desc);
GrGpuResource* item = cache->find(key);
@@ -150,7 +150,7 @@ static void check_cache_contents_or_die(GrResourceCache* cache, int k) {
// Benchmark also find calls that always fail.
{
- GrTextureDesc desc;
+ GrSurfaceDesc desc;
get_texture_desc(k, &desc);
desc.fHeight |= 1;
GrResourceKey key = TextureResource::ComputeKey(desc);
« no previous file with comments | « no previous file | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698