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

Unified Diff: cc/resource.cc

Issue 11377055: cc: Rename Texture class to Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 1 month 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 | « cc/resource.h ('k') | cc/scoped_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resource.cc
diff --git a/cc/texture.cc b/cc/resource.cc
similarity index 77%
rename from cc/texture.cc
rename to cc/resource.cc
index af74f319a85cd5fa02eae838ef596101a7a4cb89..09957930592886c259caf8d285f871e31ea72086 100644
--- a/cc/texture.cc
+++ b/cc/resource.cc
@@ -4,18 +4,18 @@
#include "config.h"
-#include "cc/texture.h"
+#include "cc/resource.h"
#include "third_party/khronos/GLES2/gl2ext.h"
namespace cc {
-void Texture::setDimensions(const gfx::Size& size, GLenum format)
+void Resource::setDimensions(const gfx::Size& size, GLenum format)
{
m_size = size;
m_format = format;
}
-size_t Texture::bytes() const
+size_t Resource::bytes() const
{
if (m_size.IsEmpty())
return 0u;
@@ -23,7 +23,7 @@ size_t Texture::bytes() const
return memorySizeBytes(m_size, m_format);
}
-size_t Texture::bytesPerPixel(GLenum format)
+size_t Resource::bytesPerPixel(GLenum format)
{
unsigned int componentsPerPixel = 0;
unsigned int bytesPerComponent = 1;
@@ -41,7 +41,7 @@ size_t Texture::bytesPerPixel(GLenum format)
return componentsPerPixel * bytesPerComponent;
}
-size_t Texture::memorySizeBytes(const gfx::Size& size, GLenum format)
+size_t Resource::memorySizeBytes(const gfx::Size& size, GLenum format)
{
return bytesPerPixel(format) * size.width() * size.height();
}
« no previous file with comments | « cc/resource.h ('k') | cc/scoped_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698