Commit 1eabcf41 by Corentin Wallez

Replace '> >' with '>>'

BUG=angleproject:1308 Change-Id: I00bd2ea939b633817662205eb7879efb7f99965f Reviewed-on: https://chromium-review.googlesource.com/326400Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 2a63b3f8
...@@ -60,18 +60,21 @@ inline TString* NewPoolTString(const char* s) ...@@ -60,18 +60,21 @@ inline TString* NewPoolTString(const char* s)
// //
// Pool allocator versions of vectors, lists, and maps // Pool allocator versions of vectors, lists, and maps
// //
template <class T> class TVector : public std::vector<T, pool_allocator<T> > { template <class T>
public: class TVector : public std::vector<T, pool_allocator<T>>
typedef typename std::vector<T, pool_allocator<T> >::size_type size_type; {
TVector() : std::vector<T, pool_allocator<T> >() {} public:
TVector(const pool_allocator<T>& a) : std::vector<T, pool_allocator<T> >(a) {} typedef typename std::vector<T, pool_allocator<T>>::size_type size_type;
TVector(size_type i): std::vector<T, pool_allocator<T> >(i) {} TVector() : std::vector<T, pool_allocator<T>>() {}
TVector(const pool_allocator<T> &a) : std::vector<T, pool_allocator<T>>(a) {}
TVector(size_type i) : std::vector<T, pool_allocator<T>>(i) {}
}; };
template <class K, class D, class CMP = std::less<K> > template <class K, class D, class CMP = std::less<K>>
class TMap : public std::map<K, D, CMP, pool_allocator<std::pair<const K, D> > > { class TMap : public std::map<K, D, CMP, pool_allocator<std::pair<const K, D>>>
public: {
typedef pool_allocator<std::pair<const K, D> > tAllocator; public:
typedef pool_allocator<std::pair<const K, D>> tAllocator;
TMap() : std::map<K, D, CMP, tAllocator>() {} TMap() : std::map<K, D, CMP, tAllocator>() {}
// use correct two-stage name lookup supported in gcc 3.4 and above // use correct two-stage name lookup supported in gcc 3.4 and above
......
...@@ -31,7 +31,7 @@ class Context; ...@@ -31,7 +31,7 @@ class Context;
struct Caps; struct Caps;
struct Data; struct Data;
typedef std::map< GLenum, BindingPointer<Texture> > TextureMap; typedef std::map<GLenum, BindingPointer<Texture>> TextureMap;
class State : angle::NonCopyable class State : angle::NonCopyable
{ {
...@@ -415,18 +415,18 @@ class State : angle::NonCopyable ...@@ -415,18 +415,18 @@ class State : angle::NonCopyable
// Texture and sampler bindings // Texture and sampler bindings
size_t mActiveSampler; // Active texture unit selector - GL_TEXTURE0 size_t mActiveSampler; // Active texture unit selector - GL_TEXTURE0
typedef std::vector< BindingPointer<Texture> > TextureBindingVector; typedef std::vector<BindingPointer<Texture>> TextureBindingVector;
typedef std::map<GLenum, TextureBindingVector> TextureBindingMap; typedef std::map<GLenum, TextureBindingVector> TextureBindingMap;
TextureBindingMap mSamplerTextures; TextureBindingMap mSamplerTextures;
typedef std::vector< BindingPointer<Sampler> > SamplerBindingVector; typedef std::vector<BindingPointer<Sampler>> SamplerBindingVector;
SamplerBindingVector mSamplers; SamplerBindingVector mSamplers;
typedef std::map< GLenum, BindingPointer<Query> > ActiveQueryMap; typedef std::map<GLenum, BindingPointer<Query>> ActiveQueryMap;
ActiveQueryMap mActiveQueries; ActiveQueryMap mActiveQueries;
BindingPointer<Buffer> mGenericUniformBuffer; BindingPointer<Buffer> mGenericUniformBuffer;
typedef std::vector< OffsetBindingPointer<Buffer> > BufferVector; typedef std::vector<OffsetBindingPointer<Buffer>> BufferVector;
BufferVector mUniformBuffers; BufferVector mUniformBuffers;
BindingPointer<TransformFeedback> mTransformFeedback; BindingPointer<TransformFeedback> mTransformFeedback;
......
...@@ -526,7 +526,7 @@ gl::Error Image11::createStagingTexture() ...@@ -526,7 +526,7 @@ gl::Error Image11::createStagingTexture()
if (d3d11::GetTextureFormatInfo(mInternalFormat, mRenderer->getRenderer11DeviceCaps()).dataInitializerFunction != NULL) if (d3d11::GetTextureFormatInfo(mInternalFormat, mRenderer->getRenderer11DeviceCaps()).dataInitializerFunction != NULL)
{ {
std::vector<D3D11_SUBRESOURCE_DATA> initialData; std::vector<D3D11_SUBRESOURCE_DATA> initialData;
std::vector< std::vector<BYTE> > textureData; std::vector<std::vector<BYTE>> textureData;
d3d11::GenerateInitialTextureData(mInternalFormat, mRenderer->getRenderer11DeviceCaps(), width, height, mDepth, d3d11::GenerateInitialTextureData(mInternalFormat, mRenderer->getRenderer11DeviceCaps(), width, height, mDepth,
lodOffset + 1, &initialData, &textureData); lodOffset + 1, &initialData, &textureData);
...@@ -566,7 +566,7 @@ gl::Error Image11::createStagingTexture() ...@@ -566,7 +566,7 @@ gl::Error Image11::createStagingTexture()
if (d3d11::GetTextureFormatInfo(mInternalFormat, mRenderer->getRenderer11DeviceCaps()).dataInitializerFunction != NULL) if (d3d11::GetTextureFormatInfo(mInternalFormat, mRenderer->getRenderer11DeviceCaps()).dataInitializerFunction != NULL)
{ {
std::vector<D3D11_SUBRESOURCE_DATA> initialData; std::vector<D3D11_SUBRESOURCE_DATA> initialData;
std::vector< std::vector<BYTE> > textureData; std::vector<std::vector<BYTE>> textureData;
d3d11::GenerateInitialTextureData(mInternalFormat, mRenderer->getRenderer11DeviceCaps(), width, height, 1, d3d11::GenerateInitialTextureData(mInternalFormat, mRenderer->getRenderer11DeviceCaps(), width, height, 1,
lodOffset + 1, &initialData, &textureData); lodOffset + 1, &initialData, &textureData);
......
...@@ -1344,9 +1344,14 @@ void MakeValidSize(bool isImage, DXGI_FORMAT format, GLsizei *requestWidth, GLsi ...@@ -1344,9 +1344,14 @@ void MakeValidSize(bool isImage, DXGI_FORMAT format, GLsizei *requestWidth, GLsi
*levelOffset = upsampleCount; *levelOffset = upsampleCount;
} }
void GenerateInitialTextureData(GLint internalFormat, const Renderer11DeviceCaps &renderer11DeviceCaps, GLuint width, GLuint height, GLuint depth, void GenerateInitialTextureData(GLint internalFormat,
GLuint mipLevels, std::vector<D3D11_SUBRESOURCE_DATA> *outSubresourceData, const Renderer11DeviceCaps &renderer11DeviceCaps,
std::vector< std::vector<BYTE> > *outData) GLuint width,
GLuint height,
GLuint depth,
GLuint mipLevels,
std::vector<D3D11_SUBRESOURCE_DATA> *outSubresourceData,
std::vector<std::vector<BYTE>> *outData)
{ {
const d3d11::TextureFormat &d3dFormatInfo = d3d11::GetTextureFormatInfo(internalFormat, renderer11DeviceCaps); const d3d11::TextureFormat &d3dFormatInfo = d3d11::GetTextureFormatInfo(internalFormat, renderer11DeviceCaps);
ASSERT(d3dFormatInfo.dataInitializerFunction != NULL); ASSERT(d3dFormatInfo.dataInitializerFunction != NULL);
......
...@@ -81,9 +81,14 @@ ANGLED3D11DeviceType GetDeviceType(ID3D11Device *device); ...@@ -81,9 +81,14 @@ ANGLED3D11DeviceType GetDeviceType(ID3D11Device *device);
void MakeValidSize(bool isImage, DXGI_FORMAT format, GLsizei *requestWidth, GLsizei *requestHeight, int *levelOffset); void MakeValidSize(bool isImage, DXGI_FORMAT format, GLsizei *requestWidth, GLsizei *requestHeight, int *levelOffset);
void GenerateInitialTextureData(GLint internalFormat, const Renderer11DeviceCaps &renderer11DeviceCaps, GLuint width, GLuint height, GLuint depth, void GenerateInitialTextureData(GLint internalFormat,
GLuint mipLevels, std::vector<D3D11_SUBRESOURCE_DATA> *outSubresourceData, const Renderer11DeviceCaps &renderer11DeviceCaps,
std::vector< std::vector<BYTE> > *outData); GLuint width,
GLuint height,
GLuint depth,
GLuint mipLevels,
std::vector<D3D11_SUBRESOURCE_DATA> *outSubresourceData,
std::vector<std::vector<BYTE>> *outData);
UINT GetPrimitiveRestartIndex(); UINT GetPrimitiveRestartIndex();
......
...@@ -475,16 +475,25 @@ template <class T> struct UseFallback { enum { type = T::fallback }; }; ...@@ -475,16 +475,25 @@ template <class T> struct UseFallback { enum { type = T::fallback }; };
// and the D3DDECLTYPE member needed for the vertex declaration in declflag. // and the D3DDECLTYPE member needed for the vertex declaration in declflag.
template <GLenum fromType, bool normalized, int size, template <class T> class PreferenceRule> template <GLenum fromType, bool normalized, int size, template <class T> class PreferenceRule>
struct Converter struct Converter
: VertexDataConverter<typename GLToCType<fromType>::type, : VertexDataConverter<
WidenRule<PreferenceRule< VertexTypeMapping<fromType, normalized> >::type, size>, typename GLToCType<fromType>::type,
ConversionRule<fromType, WidenRule<PreferenceRule<VertexTypeMapping<fromType, normalized>>::type, size>,
normalized, ConversionRule<fromType,
PreferenceRule< VertexTypeMapping<fromType, normalized> >::type>, normalized,
DefaultVertexValues<typename D3DToCType<PreferenceRule< VertexTypeMapping<fromType, normalized> >::type>::type, normalized > > PreferenceRule<VertexTypeMapping<fromType, normalized>>::type>,
DefaultVertexValues<typename D3DToCType<PreferenceRule<
VertexTypeMapping<fromType, normalized>>::type>::type,
normalized>>
{ {
private: private:
enum { d3dtype = PreferenceRule< VertexTypeMapping<fromType, normalized> >::type }; enum
enum { d3dsize = WidenRule<d3dtype, size>::finalWidth }; {
d3dtype = PreferenceRule<VertexTypeMapping<fromType, normalized>>::type
};
enum
{
d3dsize = WidenRule<d3dtype, size>::finalWidth
};
public: public:
enum { capflag = VertexTypeFlags<d3dtype, d3dsize>::capflag }; enum { capflag = VertexTypeFlags<d3dtype, d3dsize>::capflag };
......
...@@ -149,7 +149,10 @@ struct NormalizedDefaultValues ...@@ -149,7 +149,10 @@ struct NormalizedDefaultValues
// static const std::size_t finalSize: number of bytes per output vertex // static const std::size_t finalSize: number of bytes per output vertex
// static void convertArray(const void *in, std::size_t stride, std::size_t n, void *out): convert an array of vertices. Input may be strided, but output will be unstrided. // static void convertArray(const void *in, std::size_t stride, std::size_t n, void *out): convert an array of vertices. Input may be strided, but output will be unstrided.
template <class InT, class WidenRule, class Converter, class DefaultValueRule = SimpleDefaultValues<InT> > template <class InT,
class WidenRule,
class Converter,
class DefaultValueRule = SimpleDefaultValues<InT>>
struct VertexDataConverter struct VertexDataConverter
{ {
typedef typename Converter::OutputType OutputType; typedef typename Converter::OutputType OutputType;
......
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