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)
//
// Pool allocator versions of vectors, lists, and maps
//
template <class T> class TVector : public std::vector<T, pool_allocator<T> > {
public:
typedef typename std::vector<T, pool_allocator<T> >::size_type size_type;
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 T>
class TVector : public std::vector<T, pool_allocator<T>>
{
public:
typedef typename std::vector<T, pool_allocator<T>>::size_type size_type;
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> >
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;
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>>>
{
public:
typedef pool_allocator<std::pair<const K, D>> tAllocator;
TMap() : std::map<K, D, CMP, tAllocator>() {}
// use correct two-stage name lookup supported in gcc 3.4 and above
......
......@@ -31,7 +31,7 @@ class Context;
struct Caps;
struct Data;
typedef std::map< GLenum, BindingPointer<Texture> > TextureMap;
typedef std::map<GLenum, BindingPointer<Texture>> TextureMap;
class State : angle::NonCopyable
{
......@@ -415,18 +415,18 @@ class State : angle::NonCopyable
// Texture and sampler bindings
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;
TextureBindingMap mSamplerTextures;
typedef std::vector< BindingPointer<Sampler> > SamplerBindingVector;
typedef std::vector<BindingPointer<Sampler>> SamplerBindingVector;
SamplerBindingVector mSamplers;
typedef std::map< GLenum, BindingPointer<Query> > ActiveQueryMap;
typedef std::map<GLenum, BindingPointer<Query>> ActiveQueryMap;
ActiveQueryMap mActiveQueries;
BindingPointer<Buffer> mGenericUniformBuffer;
typedef std::vector< OffsetBindingPointer<Buffer> > BufferVector;
typedef std::vector<OffsetBindingPointer<Buffer>> BufferVector;
BufferVector mUniformBuffers;
BindingPointer<TransformFeedback> mTransformFeedback;
......
......@@ -526,7 +526,7 @@ gl::Error Image11::createStagingTexture()
if (d3d11::GetTextureFormatInfo(mInternalFormat, mRenderer->getRenderer11DeviceCaps()).dataInitializerFunction != NULL)
{
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,
lodOffset + 1, &initialData, &textureData);
......@@ -566,7 +566,7 @@ gl::Error Image11::createStagingTexture()
if (d3d11::GetTextureFormatInfo(mInternalFormat, mRenderer->getRenderer11DeviceCaps()).dataInitializerFunction != NULL)
{
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,
lodOffset + 1, &initialData, &textureData);
......
......@@ -1344,9 +1344,14 @@ void MakeValidSize(bool isImage, DXGI_FORMAT format, GLsizei *requestWidth, GLsi
*levelOffset = upsampleCount;
}
void GenerateInitialTextureData(GLint internalFormat, const Renderer11DeviceCaps &renderer11DeviceCaps, GLuint width, GLuint height, GLuint depth,
GLuint mipLevels, std::vector<D3D11_SUBRESOURCE_DATA> *outSubresourceData,
std::vector< std::vector<BYTE> > *outData)
void GenerateInitialTextureData(GLint internalFormat,
const Renderer11DeviceCaps &renderer11DeviceCaps,
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);
ASSERT(d3dFormatInfo.dataInitializerFunction != NULL);
......
......@@ -81,9 +81,14 @@ ANGLED3D11DeviceType GetDeviceType(ID3D11Device *device);
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,
GLuint mipLevels, std::vector<D3D11_SUBRESOURCE_DATA> *outSubresourceData,
std::vector< std::vector<BYTE> > *outData);
void GenerateInitialTextureData(GLint internalFormat,
const Renderer11DeviceCaps &renderer11DeviceCaps,
GLuint width,
GLuint height,
GLuint depth,
GLuint mipLevels,
std::vector<D3D11_SUBRESOURCE_DATA> *outSubresourceData,
std::vector<std::vector<BYTE>> *outData);
UINT GetPrimitiveRestartIndex();
......
......@@ -475,16 +475,25 @@ template <class T> struct UseFallback { enum { type = T::fallback }; };
// and the D3DDECLTYPE member needed for the vertex declaration in declflag.
template <GLenum fromType, bool normalized, int size, template <class T> class PreferenceRule>
struct Converter
: VertexDataConverter<typename GLToCType<fromType>::type,
WidenRule<PreferenceRule< VertexTypeMapping<fromType, normalized> >::type, size>,
ConversionRule<fromType,
normalized,
PreferenceRule< VertexTypeMapping<fromType, normalized> >::type>,
DefaultVertexValues<typename D3DToCType<PreferenceRule< VertexTypeMapping<fromType, normalized> >::type>::type, normalized > >
: VertexDataConverter<
typename GLToCType<fromType>::type,
WidenRule<PreferenceRule<VertexTypeMapping<fromType, normalized>>::type, size>,
ConversionRule<fromType,
normalized,
PreferenceRule<VertexTypeMapping<fromType, normalized>>::type>,
DefaultVertexValues<typename D3DToCType<PreferenceRule<
VertexTypeMapping<fromType, normalized>>::type>::type,
normalized>>
{
private:
enum { d3dtype = PreferenceRule< VertexTypeMapping<fromType, normalized> >::type };
enum { d3dsize = WidenRule<d3dtype, size>::finalWidth };
enum
{
d3dtype = PreferenceRule<VertexTypeMapping<fromType, normalized>>::type
};
enum
{
d3dsize = WidenRule<d3dtype, size>::finalWidth
};
public:
enum { capflag = VertexTypeFlags<d3dtype, d3dsize>::capflag };
......
......@@ -149,7 +149,10 @@ struct NormalizedDefaultValues
// 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.
template <class InT, class WidenRule, class Converter, class DefaultValueRule = SimpleDefaultValues<InT> >
template <class InT,
class WidenRule,
class Converter,
class DefaultValueRule = SimpleDefaultValues<InT>>
struct VertexDataConverter
{
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