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

Unified Diff: bench/GrResourceCacheBench.cpp

Issue 418143004: Rename GrGpuObject to GrGpuResource (Closed) Base URL: https://skia.googlesource.com/skia.git@compact
Patch Set: Fix indents Created 6 years, 5 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 | gyp/gpu.gypi » ('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 b8eacd639eeb0f27955523e0af9d82147fec97b9..84e0e5d4c8164d936dbd9c4890abd4bf3fcdf86c 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -9,7 +9,7 @@
#if SK_SUPPORT_GPU
#include "Benchmark.h"
-#include "GrGpuObject.h"
+#include "GrGpuResource.h"
#include "GrContext.h"
#include "GrResourceCache.h"
#include "GrStencilBuffer.h"
@@ -21,7 +21,7 @@ enum {
CACHE_SIZE_BYTES = 2 * 1024 * 1024,
};
-class StencilResource : public GrGpuObject {
+class StencilResource : public GrGpuResource {
public:
SK_DECLARE_INST_COUNT(StencilResource);
StencilResource(GrGpu* gpu, int id)
@@ -42,10 +42,10 @@ public:
int fID;
private:
- typedef GrGpuObject INHERITED;
+ typedef GrGpuResource INHERITED;
};
-class TextureResource : public GrGpuObject {
+class TextureResource : public GrGpuResource {
public:
SK_DECLARE_INST_COUNT(TextureResource);
TextureResource(GrGpu* gpu, int id)
@@ -66,7 +66,7 @@ public:
int fID;
private:
- typedef GrGpuObject INHERITED;
+ typedef GrGpuResource INHERITED;
};
static void get_stencil(int i, int* w, int* h, int* s) {
@@ -89,7 +89,7 @@ static void populate_cache(GrResourceCache* cache, GrGpu* gpu, int resourceCount
int w, h, s;
get_stencil(i, &w, &h, &s);
GrResourceKey key = GrStencilBuffer::ComputeKey(w, h, s);
- GrGpuObject* resource = SkNEW_ARGS(StencilResource, (gpu, i));
+ GrGpuResource* resource = SkNEW_ARGS(StencilResource, (gpu, i));
cache->purgeAsNeeded(1, resource->gpuMemorySize());
cache->addResource(key, resource);
resource->unref();
@@ -99,7 +99,7 @@ static void populate_cache(GrResourceCache* cache, GrGpu* gpu, int resourceCount
GrTextureDesc desc;
get_texture_desc(i, &desc);
GrResourceKey key = TextureResource::ComputeKey(desc);
- GrGpuObject* resource = SkNEW_ARGS(TextureResource, (gpu, i));
+ GrGpuResource* resource = SkNEW_ARGS(TextureResource, (gpu, i));
cache->purgeAsNeeded(1, resource->gpuMemorySize());
cache->addResource(key, resource);
resource->unref();
@@ -112,7 +112,7 @@ static void check_cache_contents_or_die(GrResourceCache* cache, int k) {
GrTextureDesc desc;
get_texture_desc(k, &desc);
GrResourceKey key = TextureResource::ComputeKey(desc);
- GrGpuObject* item = cache->find(key);
+ GrGpuResource* item = cache->find(key);
if (NULL == item) {
SkFAIL("cache add does not work as expected");
return;
@@ -126,7 +126,7 @@ static void check_cache_contents_or_die(GrResourceCache* cache, int k) {
int w, h, s;
get_stencil(k, &w, &h, &s);
GrResourceKey key = StencilResource::ComputeKey(w, h, s);
- GrGpuObject* item = cache->find(key);
+ GrGpuResource* item = cache->find(key);
if (NULL == item) {
SkFAIL("cache add does not work as expected");
return;
@@ -143,7 +143,7 @@ static void check_cache_contents_or_die(GrResourceCache* cache, int k) {
get_texture_desc(k, &desc);
desc.fHeight |= 1;
GrResourceKey key = TextureResource::ComputeKey(desc);
- GrGpuObject* item = cache->find(key);
+ GrGpuResource* item = cache->find(key);
if (NULL != item) {
SkFAIL("cache add does not work as expected");
return;
@@ -154,7 +154,7 @@ static void check_cache_contents_or_die(GrResourceCache* cache, int k) {
get_stencil(k, &w, &h, &s);
h |= 1;
GrResourceKey key = StencilResource::ComputeKey(w, h, s);
- GrGpuObject* item = cache->find(key);
+ GrGpuResource* item = cache->find(key);
if (NULL != item) {
SkFAIL("cache add does not work as expected");
return;
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698