diff options
| author | David 'Digit' Turner <digit@google.com> | 2014-03-11 19:58:51 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-03-11 19:58:51 +0000 |
| commit | 84b68033f6b92a3c35ac1d3ab7f8278c54744cff (patch) | |
| tree | ba6e795703570bd83fbfcdf92216359452ebb358 /emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h | |
| parent | 81431aae3aaf95209a606511b3a81f6aa06ffe9f (diff) | |
| parent | 56b89bc863d1a5da6234f05923f63b5466e1ce3f (diff) | |
| download | sdk-84b68033f6b92a3c35ac1d3ab7f8278c54744cff.zip sdk-84b68033f6b92a3c35ac1d3ab7f8278c54744cff.tar.gz sdk-84b68033f6b92a3c35ac1d3ab7f8278c54744cff.tar.bz2 | |
Merge changes I205392bd,I84a058bb,I22c67f11,Id18319e8,I9836ed96, ... into idea133
* changes:
emulator/opengl: Allow standalone build.
emulator/opengl: Remove libcutils/libutils/liblog
emulator/opengl: Remove <utils/List.h> + <utils/String8.h>
emulator/opengl: Remove android::KeyedVector usage.
emulator/opengl: Remove android::Vector<> usage.
emulator/opengl: Remove <cutils/sockets.h>
Diffstat (limited to 'emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h')
| -rw-r--r-- | emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h b/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h index 02278a2..f111f99 100644 --- a/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h +++ b/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.h @@ -16,6 +16,11 @@ #ifndef _GL_SHARED_GROUP_H_ #define _GL_SHARED_GROUP_H_ +#include "emugl/common/id_to_object_map.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 @@ -30,18 +35,13 @@ #include <stdio.h> #include <stdlib.h> #include "ErrorLog.h" -#include <utils/KeyedVector.h> -#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 +61,7 @@ private: bool m_initialized; bool m_locShiftWAR; - android::Vector<GLuint> m_shaders; + emugl::PodVector<GLuint> m_shaders; public: enum { @@ -92,20 +92,22 @@ public: }; struct ShaderData { +#if 0 // TODO(digit): Undertand why this is never used? typedef android::List<android::String8> StringList; StringList samplerExternalNames; +#endif int refcount; }; class GLSharedGroup { private: - android::DefaultKeyedVector<GLuint, BufferData*> m_buffers; - android::DefaultKeyedVector<GLuint, ProgramData*> m_programs; - android::DefaultKeyedVector<GLuint, ShaderData*> m_shaders; + emugl::IdToObjectMap<BufferData> m_buffers; + emugl::IdToObjectMap<ProgramData> m_programs; + emugl::IdToObjectMap<ShaderData> m_shaders; mutable emugl::Mutex m_lock; - void refShaderDataLocked(ssize_t shaderIdx); - void unrefShaderDataLocked(ssize_t shaderIdx); + void refShaderDataLocked(GLuint shader); + void unrefShaderDataLocked(GLuint shader); public: GLSharedGroup(); |
