| Index: cc/scoped_resource.h
|
| diff --git a/cc/scoped_texture.h b/cc/scoped_resource.h
|
| similarity index 54%
|
| rename from cc/scoped_texture.h
|
| rename to cc/scoped_resource.h
|
| index 4fe1394d62096bf77ae5dd778d84d8fec6b02b3c..1ad5cc755503edb2edeeb1a43f4507bf9a5ac930 100644
|
| --- a/cc/scoped_texture.h
|
| +++ b/cc/scoped_resource.h
|
| @@ -2,14 +2,14 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CC_SCOPED_TEXTURE_H_
|
| -#define CC_SCOPED_TEXTURE_H_
|
| +#ifndef CC_SCOPED_RESOURCE_H_
|
| +#define CC_SCOPED_RESOURCE_H_
|
|
|
| #include "base/basictypes.h"
|
| #include "base/logging.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "cc/cc_export.h"
|
| -#include "cc/texture.h"
|
| +#include "cc/resource.h"
|
|
|
| #ifndef NDEBUG
|
| #include "base/threading/platform_thread.h"
|
| @@ -17,22 +17,22 @@
|
|
|
| namespace cc {
|
|
|
| -class CC_EXPORT ScopedTexture : protected Texture {
|
| +class CC_EXPORT ScopedResource : protected Resource {
|
| public:
|
| - static scoped_ptr<ScopedTexture> create(ResourceProvider* resourceProvider) { return make_scoped_ptr(new ScopedTexture(resourceProvider)); }
|
| - virtual ~ScopedTexture();
|
| + static scoped_ptr<ScopedResource> create(ResourceProvider* resourceProvider) { return make_scoped_ptr(new ScopedResource(resourceProvider)); }
|
| + virtual ~ScopedResource();
|
|
|
| - using Texture::id;
|
| - using Texture::size;
|
| - using Texture::format;
|
| - using Texture::bytes;
|
| + using Resource::id;
|
| + using Resource::size;
|
| + using Resource::format;
|
| + using Resource::bytes;
|
|
|
| bool allocate(int pool, const gfx::Size&, GLenum format, ResourceProvider::TextureUsageHint);
|
| void free();
|
| void leak();
|
|
|
| protected:
|
| - explicit ScopedTexture(ResourceProvider*);
|
| + explicit ScopedResource(ResourceProvider*);
|
|
|
| private:
|
| ResourceProvider* m_resourceProvider;
|
| @@ -41,9 +41,9 @@ private:
|
| base::PlatformThreadId m_allocateThreadIdentifier;
|
| #endif
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(ScopedTexture);
|
| + DISALLOW_COPY_AND_ASSIGN(ScopedResource);
|
| };
|
|
|
| }
|
|
|
| -#endif // CC_SCOPED_TEXTURE_H_
|
| +#endif // CC_SCOPED_RESOURCE_H_
|
|
|