Commit cd1db9e6 by Jamie Madill

Avoid using std::unordered_map on OSX.

This c++11 standard library class isn't available on Chromium/OSX. For now we can replace it with std::map. BUG=angle:773 Change-Id: I0b8ab0de5192a23408755d03df2b9f738f28d762 Reviewed-on: https://chromium-review.googlesource.com/238445Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent b78b42dd
......@@ -8,11 +8,12 @@
#define LIBANGLE_CAPS_H_
#include "angle_gl.h"
#include "libANGLE/angletypes.h"
#include <map>
#include <set>
#include <unordered_map>
#include <vector>
#include <string>
#include <vector>
namespace gl
{
......@@ -45,7 +46,7 @@ struct TextureCaps
class TextureCapsMap
{
public:
typedef std::unordered_map<GLenum, TextureCaps>::const_iterator const_iterator;
typedef std::map<GLenum, TextureCaps>::const_iterator const_iterator;
void insert(GLenum internalFormat, const TextureCaps &caps);
void remove(GLenum internalFormat);
......@@ -58,7 +59,7 @@ class TextureCapsMap
size_t size() const;
private:
typedef std::unordered_map<GLenum, TextureCaps> InternalFormatToCapsMap;
typedef std::map<GLenum, TextureCaps> InternalFormatToCapsMap;
InternalFormatToCapsMap mCapsMap;
};
......
......@@ -25,8 +25,6 @@
#include <string>
#include <set>
#include <map>
#include <unordered_map>
#include <array>
namespace rx
{
......@@ -237,24 +235,24 @@ class Context
TextureMap mZeroTextures;
typedef std::unordered_map<GLuint, Framebuffer*> FramebufferMap;
typedef std::map<GLuint, Framebuffer*> FramebufferMap;
FramebufferMap mFramebufferMap;
HandleAllocator mFramebufferHandleAllocator;
typedef std::unordered_map<GLuint, FenceNV*> FenceNVMap;
typedef std::map<GLuint, FenceNV*> FenceNVMap;
FenceNVMap mFenceNVMap;
HandleAllocator mFenceNVHandleAllocator;
typedef std::unordered_map<GLuint, Query*> QueryMap;
typedef std::map<GLuint, Query*> QueryMap;
QueryMap mQueryMap;
HandleAllocator mQueryHandleAllocator;
typedef std::unordered_map<GLuint, VertexArray*> VertexArrayMap;
typedef std::map<GLuint, VertexArray*> VertexArrayMap;
VertexArrayMap mVertexArrayMap;
HandleAllocator mVertexArrayHandleAllocator;
BindingPointer<TransformFeedback> mTransformFeedbackZero;
typedef std::unordered_map<GLuint, TransformFeedback*> TransformFeedbackMap;
typedef std::map<GLuint, TransformFeedback*> TransformFeedbackMap;
TransformFeedbackMap mTransformFeedbackMap;
HandleAllocator mTransformFeedbackAllocator;
......
......@@ -10,13 +10,12 @@
#ifndef LIBANGLE_RESOURCEMANAGER_H_
#define LIBANGLE_RESOURCEMANAGER_H_
#include "angle_gl.h"
#include "common/angleutils.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/HandleAllocator.h"
#include "angle_gl.h"
#include <unordered_map>
#include <map>
namespace rx
{
......@@ -82,30 +81,30 @@ class ResourceManager
rx::Renderer *mRenderer;
std::size_t mRefCount;
typedef std::unordered_map<GLuint, Buffer*> BufferMap;
typedef std::map<GLuint, Buffer*> BufferMap;
BufferMap mBufferMap;
HandleAllocator mBufferHandleAllocator;
typedef std::unordered_map<GLuint, Shader*> ShaderMap;
typedef std::map<GLuint, Shader*> ShaderMap;
ShaderMap mShaderMap;
typedef std::unordered_map<GLuint, Program*> ProgramMap;
typedef std::map<GLuint, Program*> ProgramMap;
ProgramMap mProgramMap;
HandleAllocator mProgramShaderHandleAllocator;
typedef std::unordered_map<GLuint, Texture*> TextureMap;
typedef std::map<GLuint, Texture*> TextureMap;
TextureMap mTextureMap;
HandleAllocator mTextureHandleAllocator;
typedef std::unordered_map<GLuint, Renderbuffer*> RenderbufferMap;
typedef std::map<GLuint, Renderbuffer*> RenderbufferMap;
RenderbufferMap mRenderbufferMap;
HandleAllocator mRenderbufferHandleAllocator;
typedef std::unordered_map<GLuint, Sampler*> SamplerMap;
typedef std::map<GLuint, Sampler*> SamplerMap;
SamplerMap mSamplerMap;
HandleAllocator mSamplerHandleAllocator;
typedef std::unordered_map<GLuint, FenceSync*> FenceMap;
typedef std::map<GLuint, FenceSync*> FenceMap;
FenceMap mFenceSyncMap;
HandleAllocator mFenceSyncHandleAllocator;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment