diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-11 18:50:00 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-11 18:50:00 +0000 |
commit | fa883c335b4a61e6749e9098d3883c1a16a42513 (patch) | |
tree | df27beac32fc8305c627e51ee3e3ff04d831c141 /gpu | |
parent | d8ea977258cef32228032f48076bbfd9746cb13a (diff) | |
download | chromium_src-fa883c335b4a61e6749e9098d3883c1a16a42513.zip chromium_src-fa883c335b4a61e6749e9098d3883c1a16a42513.tar.gz chromium_src-fa883c335b4a61e6749e9098d3883c1a16a42513.tar.bz2 |
Fixes for Clang.
Note: These errors make no sense to me. I have tons of other
code exactly like this. I don't know why those work in clang
and this doesn't
TEST=compiled on clang
BUG=none
TBR=apatrick@chromium.org
Move VertexAttribManager to another file.
Just trying to slowly pair down gles2_cmd_decoder.cc
TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/7333012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92033 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/vertex_attrib_manager.cc | 27 | ||||
-rw-r--r-- | gpu/command_buffer/service/vertex_attrib_manager.h | 23 |
2 files changed, 31 insertions, 19 deletions
diff --git a/gpu/command_buffer/service/vertex_attrib_manager.cc b/gpu/command_buffer/service/vertex_attrib_manager.cc index 831c543..7ba709b 100644 --- a/gpu/command_buffer/service/vertex_attrib_manager.cc +++ b/gpu/command_buffer/service/vertex_attrib_manager.cc @@ -17,6 +17,25 @@ namespace gpu { namespace gles2 { +VertexAttribManager::VertexAttribInfo::VertexAttribInfo() + : index_(0), + enabled_(false), + size_(4), + type_(GL_FLOAT), + offset_(0), + normalized_(GL_FALSE), + gl_stride_(0), + real_stride_(16), + list_(NULL) { + value_.v[0] = 0.0f; + value_.v[1] = 0.0f; + value_.v[2] = 0.0f; + value_.v[3] = 1.0f; +} + +VertexAttribManager::VertexAttribInfo::~VertexAttribInfo() { +} + bool VertexAttribManager::VertexAttribInfo::CanAccess(GLuint index) const { if (!enabled_) { return true; @@ -39,6 +58,13 @@ bool VertexAttribManager::VertexAttribInfo::CanAccess(GLuint index) const { return index < num_elements; } +VertexAttribManager::VertexAttribManager() + : max_vertex_attribs_(0), + num_fixed_attribs_(0) { +} + +VertexAttribManager::~VertexAttribManager() { +} void VertexAttribManager::Initialize(uint32 max_vertex_attribs) { max_vertex_attribs_ = max_vertex_attribs; @@ -62,5 +88,6 @@ bool VertexAttribManager::Enable(GLuint index, bool enable) { return true; } + } // namespace gles2 } // namespace gpu diff --git a/gpu/command_buffer/service/vertex_attrib_manager.h b/gpu/command_buffer/service/vertex_attrib_manager.h index a26457d..ef24696 100644 --- a/gpu/command_buffer/service/vertex_attrib_manager.h +++ b/gpu/command_buffer/service/vertex_attrib_manager.h @@ -25,21 +25,8 @@ class VertexAttribManager { float v[4]; }; - VertexAttribInfo() - : index_(0), - enabled_(false), - size_(4), - type_(GL_FLOAT), - offset_(0), - normalized_(GL_FALSE), - gl_stride_(0), - real_stride_(16), - list_(NULL) { - value_.v[0] = 0.0f; - value_.v[1] = 0.0f; - value_.v[2] = 0.0f; - value_.v[3] = 1.0f; - } + VertexAttribInfo(); + ~VertexAttribInfo(); // Returns true if this VertexAttrib can access index. bool CanAccess(GLuint index) const; @@ -164,10 +151,8 @@ class VertexAttribManager { typedef std::list<VertexAttribInfo*> VertexAttribInfoList; - VertexAttribManager() - : max_vertex_attribs_(0), - num_fixed_attribs_(0) { - } + VertexAttribManager(); + ~VertexAttribManager(); void Initialize(uint32 num_vertex_attribs); |