summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
diff options
context:
space:
mode:
authorkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 18:39:05 +0000
committerkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 18:39:05 +0000
commit304b4a5c92e957f089bf9366445d43f610b25571 (patch)
tree1930e84332e9d09cc200b9d6098e40ba74e0cbf9 /gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
parentaefdb477a4fb4ee11b85d2e8fa265aea531d8bf5 (diff)
downloadchromium_src-304b4a5c92e957f089bf9366445d43f610b25571.zip
chromium_src-304b4a5c92e957f089bf9366445d43f610b25571.tar.gz
chromium_src-304b4a5c92e957f089bf9366445d43f610b25571.tar.bz2
Fixed GPU unit tests on Mac.
- Added mocks for Mac-specific methods - Conditionally declared storage for static const integer values in classes - Deleted unused variables BUG=none TEST=ran GPU unit tests on Mac Review URL: http://codereview.chromium.org/1376002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc69
1 files changed, 69 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
index 10acd1b..ffe6cf0 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -219,6 +219,37 @@ void GLES2DecoderTestBase::DoTexImage2D(
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
}
+// GCC requires these declarations, but MSVC requires they not be present
+#ifndef COMPILER_MSVC
+const GLint GLES2DecoderTestBase::kMaxTextureSize;
+const GLint GLES2DecoderTestBase::kMaxCubeMapTextureSize;
+const GLint GLES2DecoderTestBase::kNumVertexAttribs;
+const GLint GLES2DecoderTestBase::kNumTextureUnits;
+
+const GLuint GLES2DecoderTestBase::kServiceBlackTexture2dId;
+const GLuint GLES2DecoderTestBase::kServiceBlackTextureCubemapId;
+
+const GLuint GLES2DecoderTestBase::kServiceBufferId;
+const GLuint GLES2DecoderTestBase::kServiceFramebufferId;
+const GLuint GLES2DecoderTestBase::kServiceRenderbufferId;
+const GLuint GLES2DecoderTestBase::kServiceTextureId;
+const GLuint GLES2DecoderTestBase::kServiceProgramId;
+const GLuint GLES2DecoderTestBase::kServiceShaderId;
+const GLuint GLES2DecoderTestBase::kServiceElementBufferId;
+
+const int32 GLES2DecoderTestBase::kSharedMemoryId;
+const size_t GLES2DecoderTestBase::kSharedBufferSize;
+const uint32 GLES2DecoderTestBase::kSharedMemoryOffset;
+const int32 GLES2DecoderTestBase::kInvalidSharedMemoryId;
+const uint32 GLES2DecoderTestBase::kInvalidSharedMemoryOffset;
+const uint32 GLES2DecoderTestBase::kInitialResult;
+const uint8 GLES2DecoderTestBase::kInitialMemoryValue;
+
+const uint32 GLES2DecoderTestBase::kNewClientId;
+const uint32 GLES2DecoderTestBase::kNewServiceId;
+const uint32 GLES2DecoderTestBase::kInvalidClientId;
+#endif
+
void GLES2DecoderWithShaderTestBase::SetUp() {
GLES2DecoderTestBase::SetUp();
@@ -448,6 +479,44 @@ void GLES2DecoderWithShaderTestBase::DeleteIndexBuffer() {
DoDeleteBuffer(client_element_buffer_id_, kServiceElementBufferId);
}
+// GCC requires these declarations, but MSVC requires they not be present
+#ifndef COMPILER_MSVC
+const GLsizei GLES2DecoderWithShaderTestBase::kNumVertices;
+const GLsizei GLES2DecoderWithShaderTestBase::kNumIndices;
+const int GLES2DecoderWithShaderTestBase::kValidIndexRangeStart;
+const int GLES2DecoderWithShaderTestBase::kValidIndexRangeCount;
+const int GLES2DecoderWithShaderTestBase::kInvalidIndexRangeStart;
+const int GLES2DecoderWithShaderTestBase::kInvalidIndexRangeCount;
+const int GLES2DecoderWithShaderTestBase::kOutOfRangeIndexRangeEnd;
+
+const GLint GLES2DecoderWithShaderTestBase::kMaxAttribLength;
+const GLint GLES2DecoderWithShaderTestBase::kAttrib1Size;
+const GLint GLES2DecoderWithShaderTestBase::kAttrib2Size;
+const GLint GLES2DecoderWithShaderTestBase::kAttrib3Size;
+const GLint GLES2DecoderWithShaderTestBase::kAttrib1Location;
+const GLint GLES2DecoderWithShaderTestBase::kAttrib2Location;
+const GLint GLES2DecoderWithShaderTestBase::kAttrib3Location;
+const GLenum GLES2DecoderWithShaderTestBase::kAttrib1Type;
+const GLenum GLES2DecoderWithShaderTestBase::kAttrib2Type;
+const GLenum GLES2DecoderWithShaderTestBase::kAttrib3Type;
+const GLint GLES2DecoderWithShaderTestBase::kInvalidAttribLocation;
+const GLint GLES2DecoderWithShaderTestBase::kBadAttribIndex;
+
+const GLint GLES2DecoderWithShaderTestBase::kMaxUniformLength;
+const GLint GLES2DecoderWithShaderTestBase::kUniform1Size;
+const GLint GLES2DecoderWithShaderTestBase::kUniform2Size;
+const GLint GLES2DecoderWithShaderTestBase::kUniform3Size;
+const GLint GLES2DecoderWithShaderTestBase::kUniform1Location;
+const GLint GLES2DecoderWithShaderTestBase::kUniform2Location;
+const GLint GLES2DecoderWithShaderTestBase::kUniform2ElementLocation;
+const GLint GLES2DecoderWithShaderTestBase::kUniform3Location;
+const GLenum GLES2DecoderWithShaderTestBase::kUniform1Type;
+const GLenum GLES2DecoderWithShaderTestBase::kUniform2Type;
+const GLenum GLES2DecoderWithShaderTestBase::kUniform3Type;
+const GLint GLES2DecoderWithShaderTestBase::kInvalidUniformLocation;
+const GLint GLES2DecoderWithShaderTestBase::kBadUniformIndex;
+#endif
+
const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1";
const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2";
const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3";