| Index: gpu/command_buffer/client/gles2_implementation.h
|
| diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
|
| index 1c55b8367ccbbb737ad0311535f991252ab88138..eb55550b634a2e342226e5c528bfbbf3432192b8 100644
|
| --- a/gpu/command_buffer/client/gles2_implementation.h
|
| +++ b/gpu/command_buffer/client/gles2_implementation.h
|
| @@ -5,6 +5,9 @@
|
| #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
|
| #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
|
|
|
| +#include <stddef.h>
|
| +#include <stdint.h>
|
| +
|
| #include <list>
|
| #include <map>
|
| #include <queue>
|
| @@ -13,7 +16,6 @@
|
| #include <utility>
|
| #include <vector>
|
|
|
| -#include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| @@ -143,7 +145,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| };
|
|
|
| // The maxiumum result size from simple GL get commands.
|
| - static const size_t kMaxSizeOfSimpleResult = 16 * sizeof(uint32); // NOLINT.
|
| + static const size_t kMaxSizeOfSimpleResult =
|
| + 16 * sizeof(uint32_t); // NOLINT.
|
|
|
| // used for testing only. If more things are reseved add them here.
|
| static const unsigned int kStartingOffset = kMaxSizeOfSimpleResult;
|
| @@ -152,7 +155,7 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| static const unsigned int kSizeToFlush = 256 * 1024;
|
|
|
| // The bucket used for results. Public for testing only.
|
| - static const uint32 kResultBucketId = 1;
|
| + static const uint32_t kResultBucketId = 1;
|
|
|
| // Alignment of allocations.
|
| static const unsigned int kAlignment = 4;
|
| @@ -212,7 +215,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| void RetireSyncPointCHROMIUM(GLuint sync_point) override;
|
| uint64_t ShareGroupTracingGUID() const override;
|
|
|
| - void GetProgramInfoCHROMIUMHelper(GLuint program, std::vector<int8>* result);
|
| + void GetProgramInfoCHROMIUMHelper(GLuint program,
|
| + std::vector<int8_t>* result);
|
| GLint GetAttribLocationHelper(GLuint program, const char* name);
|
| GLint GetUniformLocationHelper(GLuint program, const char* name);
|
| GLint GetFragDataIndexEXTHelper(GLuint program, const char* name);
|
| @@ -223,18 +227,18 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| bool GetActiveUniformHelper(
|
| GLuint program, GLuint index, GLsizei bufsize, GLsizei* length,
|
| GLint* size, GLenum* type, char* name);
|
| - void GetUniformBlocksCHROMIUMHelper(
|
| - GLuint program, std::vector<int8>* result);
|
| - void GetUniformsES3CHROMIUMHelper(
|
| - GLuint program, std::vector<int8>* result);
|
| + void GetUniformBlocksCHROMIUMHelper(GLuint program,
|
| + std::vector<int8_t>* result);
|
| + void GetUniformsES3CHROMIUMHelper(GLuint program,
|
| + std::vector<int8_t>* result);
|
| GLuint GetUniformBlockIndexHelper(GLuint program, const char* name);
|
| bool GetActiveUniformBlockNameHelper(
|
| GLuint program, GLuint index, GLsizei bufsize,
|
| GLsizei* length, char* name);
|
| bool GetActiveUniformBlockivHelper(
|
| GLuint program, GLuint index, GLenum pname, GLint* params);
|
| - void GetTransformFeedbackVaryingsCHROMIUMHelper(
|
| - GLuint program, std::vector<int8>* result);
|
| + void GetTransformFeedbackVaryingsCHROMIUMHelper(GLuint program,
|
| + std::vector<int8_t>* result);
|
| bool GetTransformFeedbackVaryingHelper(
|
| GLuint program, GLuint index, GLsizei bufsize, GLsizei* length,
|
| GLint* size, GLenum* type, char* name);
|
| @@ -253,11 +257,11 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| void FreeEverything();
|
|
|
| // ContextSupport implementation.
|
| - void SignalSyncPoint(uint32 sync_point,
|
| + void SignalSyncPoint(uint32_t sync_point,
|
| const base::Closure& callback) override;
|
| void SignalSyncToken(const gpu::SyncToken& sync_token,
|
| const base::Closure& callback) override;
|
| - void SignalQuery(uint32 query, const base::Closure& callback) override;
|
| + void SignalQuery(uint32_t query, const base::Closure& callback) override;
|
| void SetAggressivelyFreeResources(bool aggressively_free_resources) override;
|
|
|
| // base::trace_event::MemoryDumpProvider implementation.
|
| @@ -413,8 +417,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| }
|
|
|
| void* GetResultBuffer();
|
| - int32 GetResultShmId();
|
| - uint32 GetResultShmOffset();
|
| + int32_t GetResultShmId();
|
| + uint32_t GetResultShmOffset();
|
|
|
| // Lazily determines if GL_ANGLE_pack_reverse_row_order is available
|
| bool IsAnglePackReverseRowOrderAvailable();
|
| @@ -444,20 +448,20 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| // a transfer buffer to function which is currently managed by this class.
|
|
|
| // Gets the contents of a bucket.
|
| - bool GetBucketContents(uint32 bucket_id, std::vector<int8>* data);
|
| + bool GetBucketContents(uint32_t bucket_id, std::vector<int8_t>* data);
|
|
|
| // Sets the contents of a bucket.
|
| - void SetBucketContents(uint32 bucket_id, const void* data, size_t size);
|
| + void SetBucketContents(uint32_t bucket_id, const void* data, size_t size);
|
|
|
| // Sets the contents of a bucket as a string.
|
| - void SetBucketAsCString(uint32 bucket_id, const char* str);
|
| + void SetBucketAsCString(uint32_t bucket_id, const char* str);
|
|
|
| // Gets the contents of a bucket as a string. Returns false if there is no
|
| // string available which is a separate case from the empty string.
|
| - bool GetBucketAsString(uint32 bucket_id, std::string* str);
|
| + bool GetBucketAsString(uint32_t bucket_id, std::string* str);
|
|
|
| // Sets the contents of a bucket as a string.
|
| - void SetBucketAsString(uint32 bucket_id, const std::string& str);
|
| + void SetBucketAsString(uint32_t bucket_id, const std::string& str);
|
|
|
| // Returns true if id is reserved.
|
| bool IsBufferReservedId(GLuint id);
|
| @@ -549,7 +553,7 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| GLenum usage);
|
|
|
| // Helper for GetVertexAttrib
|
| - bool GetVertexAttribHelper(GLuint index, GLenum pname, uint32* param);
|
| + bool GetVertexAttribHelper(GLuint index, GLenum pname, uint32_t* param);
|
|
|
| GLuint GetMaxValueInBufferCHROMIUMHelper(
|
| GLuint buffer_id, GLsizei count, GLenum type, GLuint offset);
|
| @@ -561,17 +565,36 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
|
|
| // The pixels pointer should already account for unpack skip
|
| // images/rows/pixels.
|
| - void TexSubImage2DImpl(
|
| - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
|
| - GLsizei height, GLenum format, GLenum type, uint32 unpadded_row_size,
|
| - const void* pixels, uint32 pixels_padded_row_size, GLboolean internal,
|
| - ScopedTransferBufferPtr* buffer, uint32 buffer_padded_row_size);
|
| - void TexSubImage3DImpl(
|
| - GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
| - GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
|
| - uint32 unpadded_row_size, const void* pixels,
|
| - uint32 pixels_padded_row_size, GLboolean internal,
|
| - ScopedTransferBufferPtr* buffer, uint32 buffer_padded_row_size);
|
| + void TexSubImage2DImpl(GLenum target,
|
| + GLint level,
|
| + GLint xoffset,
|
| + GLint yoffset,
|
| + GLsizei width,
|
| + GLsizei height,
|
| + GLenum format,
|
| + GLenum type,
|
| + uint32_t unpadded_row_size,
|
| + const void* pixels,
|
| + uint32_t pixels_padded_row_size,
|
| + GLboolean internal,
|
| + ScopedTransferBufferPtr* buffer,
|
| + uint32_t buffer_padded_row_size);
|
| + void TexSubImage3DImpl(GLenum target,
|
| + GLint level,
|
| + GLint xoffset,
|
| + GLint yoffset,
|
| + GLint zoffset,
|
| + GLsizei width,
|
| + GLsizei height,
|
| + GLsizei depth,
|
| + GLenum format,
|
| + GLenum type,
|
| + uint32_t unpadded_row_size,
|
| + const void* pixels,
|
| + uint32_t pixels_padded_row_size,
|
| + GLboolean internal,
|
| + ScopedTransferBufferPtr* buffer,
|
| + uint32_t buffer_padded_row_size);
|
|
|
| // Helpers for query functions.
|
| bool GetHelper(GLenum pname, GLint* params);
|
| @@ -655,9 +678,9 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| GLenum transform_type,
|
| const GLfloat* transform_values,
|
| ScopedTransferBufferPtr* buffer,
|
| - uint32* out_paths_shm_id,
|
| + uint32_t* out_paths_shm_id,
|
| size_t* out_paths_offset,
|
| - uint32* out_transforms_shm_id,
|
| + uint32_t* out_transforms_shm_id,
|
| size_t* out_transforms_offset);
|
| #if defined(GL_CLIENT_FAIL_GL_ERRORS)
|
| void CheckGLError();
|
| @@ -681,8 +704,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| DebugMarkerManager debug_marker_manager_;
|
| std::string this_in_hex_;
|
|
|
| - std::queue<int32> swap_buffers_tokens_;
|
| - std::queue<int32> rate_limit_tokens_;
|
| + std::queue<int32_t> swap_buffers_tokens_;
|
| + std::queue<int32_t> rate_limit_tokens_;
|
|
|
| ExtensionStatus angle_pack_reverse_row_order_status_;
|
| ExtensionStatus chromium_framebuffer_multisample_;
|
| @@ -755,7 +778,7 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
| GLuint reserved_ids_[2];
|
|
|
| // Current GL error bits.
|
| - uint32 error_bits_;
|
| + uint32_t error_bits_;
|
|
|
| // Whether or not to print debugging info.
|
| bool debug_;
|
| @@ -777,7 +800,7 @@ class GLES2_IMPL_EXPORT GLES2Implementation
|
|
|
| // Map of GLenum to Strings for glGetString. We need to cache these because
|
| // the pointer passed back to the client has to remain valid for eternity.
|
| - typedef std::map<uint32, std::set<std::string> > GLStringMap;
|
| + typedef std::map<uint32_t, std::set<std::string>> GLStringMap;
|
| GLStringMap gl_strings_;
|
|
|
| // Similar cache for glGetRequestableExtensionsCHROMIUM. We don't
|
|
|