diff options
author | David 'Digit' Turner <digit@google.com> | 2014-02-27 14:44:51 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2014-03-11 18:03:08 +0100 |
commit | 0863e159faa8c8bf7c47deb92a109961e8653e52 (patch) | |
tree | a2815aa64c73aae43ab7e54e02bcc0d72bb5a316 /emulator/opengl/shared/OpenglCodecCommon | |
parent | bfc6160fecf9af96c659ab2474098275af9f042c (diff) | |
download | sdk-0863e159faa8c8bf7c47deb92a109961e8653e52.zip sdk-0863e159faa8c8bf7c47deb92a109961e8653e52.tar.gz sdk-0863e159faa8c8bf7c47deb92a109961e8653e52.tar.bz2 |
emulator/opengl: Remove android::Vector<> usage.
This remove the use of android::Vector<> by providing an
alternative vector implementation (emugl::PodVector<>) which
is heavily based on the emulator version under
external/qemu/android/base/containers/PodVector.h.
Ultimately the GPU emulation libraries will move under
external/qemu/, and the code will be changed to use
android::base::PodVector<> instead of emugl::PodVector<>.
Change-Id: I9836ed961795c0791115c61e731d15d17f036972
Diffstat (limited to 'emulator/opengl/shared/OpenglCodecCommon')
-rw-r--r-- | emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp | 6 | ||||
-rw-r--r-- | emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp b/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp index a054562..a03f8c9 100644 --- a/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp +++ b/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp @@ -204,9 +204,7 @@ bool ProgramData::attachShader(GLuint shader) return false; } } - // AKA m_shaders.push_back(), but that has an ambiguous call to insertAt() - // due to the default parameters. This is the desired insertAt() overload. - m_shaders.insertAt(shader, m_shaders.size(), 1); + m_shaders.append(shader); return true; } @@ -215,7 +213,7 @@ bool ProgramData::detachShader(GLuint shader) size_t n = m_shaders.size(); for (size_t i = 0; i < n; i++) { if (m_shaders[i] == shader) { - m_shaders.removeAt(i); + m_shaders.remove(i); return true; } } diff --git a/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h b/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h index 02278a2..713e17e 100644 --- a/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h +++ b/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h @@ -16,6 +16,10 @@ #ifndef _GL_SHARED_GROUP_H_ #define _GL_SHARED_GROUP_H_ +#include "emugl/common/mutex.h" +#include "emugl/common/pod_vector.h" +#include "emugl/common/smart_ptr.h" + #define GL_API #ifndef ANDROID #define GL_APIENTRY @@ -34,14 +38,12 @@ #include <utils/List.h> #include <utils/String8.h> #include "FixedBuffer.h" -#include "emugl/common/mutex.h" -#include "emugl/common/smart_ptr.h" struct BufferData { BufferData(); BufferData(GLsizeiptr size, void * data); GLsizeiptr m_size; - FixedBuffer m_fixedBuffer; + FixedBuffer m_fixedBuffer; }; class ProgramData { @@ -61,7 +63,7 @@ private: bool m_initialized; bool m_locShiftWAR; - android::Vector<GLuint> m_shaders; + emugl::PodVector<GLuint> m_shaders; public: enum { |