Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 1542513002: Switch to standard integer types in gpu/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
9
7 #include <algorithm> 10 #include <algorithm>
8 #include <string> 11 #include <string>
9 #include <vector> 12 #include <vector>
10 13
11 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_split.h" 15 #include "base/strings/string_split.h"
13 #include "gpu/command_buffer/common/gles2_cmd_format.h" 16 #include "gpu/command_buffer/common/gles2_cmd_format.h"
14 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 17 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
15 #include "gpu/command_buffer/common/value_state.h" 18 #include "gpu/command_buffer/common/value_state.h"
16 #include "gpu/command_buffer/service/cmd_buffer_engine.h" 19 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } else { 80 } else {
78 // Make sure we don't set up an invalid InitState. 81 // Make sure we don't set up an invalid InitState.
79 CHECK(!contains_vao_extension); 82 CHECK(!contains_vao_extension);
80 } 83 }
81 84
82 if (!init->extensions.empty()) 85 if (!init->extensions.empty())
83 init->extensions += " "; 86 init->extensions += " ";
84 init->extensions += "GL_EXT_framebuffer_object "; 87 init->extensions += "GL_EXT_framebuffer_object ";
85 } 88 }
86 89
87 const uint32 kMaxColorAttachments = 16; 90 const uint32_t kMaxColorAttachments = 16;
88 const uint32 kMaxDrawBuffers = 16; 91 const uint32_t kMaxDrawBuffers = 16;
89 92
90 } // namespace Anonymous 93 } // namespace Anonymous
91 94
92 namespace gpu { 95 namespace gpu {
93 namespace gles2 { 96 namespace gles2 {
94 97
95 GLES2DecoderTestBase::GLES2DecoderTestBase() 98 GLES2DecoderTestBase::GLES2DecoderTestBase()
96 : surface_(NULL), 99 : surface_(NULL),
97 context_(NULL), 100 context_(NULL),
98 memory_tracker_(NULL), 101 memory_tracker_(NULL),
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (normalized_init.has_alpha && !normalized_init.request_alpha) { 396 if (normalized_init.has_alpha && !normalized_init.request_alpha) {
394 EXPECT_CALL(*gl_, ClearColor(0, 0, 0, 0)).Times(1).RetiresOnSaturation(); 397 EXPECT_CALL(*gl_, ClearColor(0, 0, 0, 0)).Times(1).RetiresOnSaturation();
395 } 398 }
396 #endif 399 #endif
397 400
398 engine_.reset(new StrictMock<MockCommandBufferEngine>()); 401 engine_.reset(new StrictMock<MockCommandBufferEngine>());
399 scoped_refptr<gpu::Buffer> buffer = 402 scoped_refptr<gpu::Buffer> buffer =
400 engine_->GetSharedMemoryBuffer(kSharedMemoryId); 403 engine_->GetSharedMemoryBuffer(kSharedMemoryId);
401 shared_memory_offset_ = kSharedMemoryOffset; 404 shared_memory_offset_ = kSharedMemoryOffset;
402 shared_memory_address_ = 405 shared_memory_address_ =
403 reinterpret_cast<int8*>(buffer->memory()) + shared_memory_offset_; 406 reinterpret_cast<int8_t*>(buffer->memory()) + shared_memory_offset_;
404 shared_memory_id_ = kSharedMemoryId; 407 shared_memory_id_ = kSharedMemoryId;
405 shared_memory_base_ = buffer->memory(); 408 shared_memory_base_ = buffer->memory();
406 409
407 static const int32 kLoseContextWhenOutOfMemory = 0x10002; 410 static const int32_t kLoseContextWhenOutOfMemory = 0x10002;
408 static const int32 kWebGLVersion = 0x10003; 411 static const int32_t kWebGLVersion = 0x10003;
409 412
410 int32 attributes[] = {EGL_ALPHA_SIZE, 413 int32_t attributes[] = {
411 normalized_init.request_alpha ? 8 : 0, 414 EGL_ALPHA_SIZE,
412 EGL_DEPTH_SIZE, 415 normalized_init.request_alpha ? 8 : 0,
413 normalized_init.request_depth ? 24 : 0, 416 EGL_DEPTH_SIZE,
414 EGL_STENCIL_SIZE, 417 normalized_init.request_depth ? 24 : 0,
415 normalized_init.request_stencil ? 8 : 0, 418 EGL_STENCIL_SIZE,
416 kLoseContextWhenOutOfMemory, 419 normalized_init.request_stencil ? 8 : 0,
417 normalized_init.lose_context_when_out_of_memory ? 1 : 0, 420 kLoseContextWhenOutOfMemory,
418 kWebGLVersion, 421 normalized_init.lose_context_when_out_of_memory ? 1 : 0,
419 init.context_type}; 422 kWebGLVersion,
420 std::vector<int32> attribs(attributes, attributes + arraysize(attributes)); 423 init.context_type};
424 std::vector<int32_t> attribs(attributes, attributes + arraysize(attributes));
421 425
422 decoder_.reset(GLES2Decoder::Create(group_.get())); 426 decoder_.reset(GLES2Decoder::Create(group_.get()));
423 decoder_->SetIgnoreCachedStateForTest(ignore_cached_state_for_test_); 427 decoder_->SetIgnoreCachedStateForTest(ignore_cached_state_for_test_);
424 decoder_->GetLogger()->set_log_synthesized_gl_errors(false); 428 decoder_->GetLogger()->set_log_synthesized_gl_errors(false);
425 ASSERT_TRUE(decoder_->Initialize(surface_, context_, false, 429 ASSERT_TRUE(decoder_->Initialize(surface_, context_, false,
426 surface_->GetSize(), DisallowedFeatures(), 430 surface_->GetSize(), DisallowedFeatures(),
427 attribs)); 431 attribs));
428 432
429 EXPECT_CALL(*context_, MakeCurrent(surface_.get())).WillOnce(Return(true)); 433 EXPECT_CALL(*context_, MakeCurrent(surface_.get())).WillOnce(Return(true));
430 if (context_->WasAllocatedUsingRobustnessExtension()) { 434 if (context_->WasAllocatedUsingRobustnessExtension()) {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); 615 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1));
612 if (data) { 616 if (data) {
613 memcpy(shared_memory_address_, data, data_size); 617 memcpy(shared_memory_address_, data, data_size);
614 cmd::SetBucketData cmd2; 618 cmd::SetBucketData cmd2;
615 cmd2.Init(bucket_id, 0, data_size, kSharedMemoryId, kSharedMemoryOffset); 619 cmd2.Init(bucket_id, 0, data_size, kSharedMemoryId, kSharedMemoryOffset);
616 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); 620 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2));
617 ClearSharedMemory(); 621 ClearSharedMemory();
618 } 622 }
619 } 623 }
620 624
621 void GLES2DecoderTestBase::SetBucketAsCString( 625 void GLES2DecoderTestBase::SetBucketAsCString(uint32_t bucket_id,
622 uint32 bucket_id, const char* str) { 626 const char* str) {
623 SetBucketData(bucket_id, str, str ? (strlen(str) + 1) : 0); 627 SetBucketData(bucket_id, str, str ? (strlen(str) + 1) : 0);
624 } 628 }
625 629
626 void GLES2DecoderTestBase::SetBucketAsCStrings( 630 void GLES2DecoderTestBase::SetBucketAsCStrings(uint32_t bucket_id,
627 uint32 bucket_id, GLsizei count, const char** str, 631 GLsizei count,
628 GLsizei count_in_header, char str_end) { 632 const char** str,
633 GLsizei count_in_header,
634 char str_end) {
629 uint32_t header_size = sizeof(GLint) * (count + 1); 635 uint32_t header_size = sizeof(GLint) * (count + 1);
630 uint32_t total_size = header_size; 636 uint32_t total_size = header_size;
631 scoped_ptr<GLint[]> header(new GLint[count + 1]); 637 scoped_ptr<GLint[]> header(new GLint[count + 1]);
632 header[0] = static_cast<GLint>(count_in_header); 638 header[0] = static_cast<GLint>(count_in_header);
633 for (GLsizei ii = 0; ii < count; ++ii) { 639 for (GLsizei ii = 0; ii < count; ++ii) {
634 header[ii + 1] = str && str[ii] ? strlen(str[ii]) : 0; 640 header[ii + 1] = str && str[ii] ? strlen(str[ii]) : 0;
635 total_size += header[ii + 1] + 1; 641 total_size += header[ii + 1] + 1;
636 } 642 }
637 cmd::SetBucketSize cmd1; 643 cmd::SetBucketSize cmd1;
638 cmd1.Init(bucket_id, total_size); 644 cmd1.Init(bucket_id, total_size);
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 cmds::BindTexImage2DCHROMIUM bind_tex_image_2d_cmd; 1166 cmds::BindTexImage2DCHROMIUM bind_tex_image_2d_cmd;
1161 bind_tex_image_2d_cmd.Init(target, image_id); 1167 bind_tex_image_2d_cmd.Init(target, image_id);
1162 EXPECT_CALL(*gl_, GetError()) 1168 EXPECT_CALL(*gl_, GetError())
1163 .WillOnce(Return(GL_NO_ERROR)) 1169 .WillOnce(Return(GL_NO_ERROR))
1164 .WillOnce(Return(GL_NO_ERROR)) 1170 .WillOnce(Return(GL_NO_ERROR))
1165 .RetiresOnSaturation(); 1171 .RetiresOnSaturation();
1166 EXPECT_EQ(error::kNoError, ExecuteCmd(bind_tex_image_2d_cmd)); 1172 EXPECT_EQ(error::kNoError, ExecuteCmd(bind_tex_image_2d_cmd));
1167 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 1173 EXPECT_EQ(GL_NO_ERROR, GetGLError());
1168 } 1174 }
1169 1175
1170 void GLES2DecoderTestBase::DoTexImage2D( 1176 void GLES2DecoderTestBase::DoTexImage2D(GLenum target,
1171 GLenum target, GLint level, GLenum internal_format, 1177 GLint level,
1172 GLsizei width, GLsizei height, GLint border, 1178 GLenum internal_format,
1173 GLenum format, GLenum type, 1179 GLsizei width,
1174 uint32 shared_memory_id, uint32 shared_memory_offset) { 1180 GLsizei height,
1181 GLint border,
1182 GLenum format,
1183 GLenum type,
1184 uint32_t shared_memory_id,
1185 uint32_t shared_memory_offset) {
1175 EXPECT_CALL(*gl_, GetError()) 1186 EXPECT_CALL(*gl_, GetError())
1176 .WillOnce(Return(GL_NO_ERROR)) 1187 .WillOnce(Return(GL_NO_ERROR))
1177 .RetiresOnSaturation(); 1188 .RetiresOnSaturation();
1178 EXPECT_CALL(*gl_, TexImage2D(target, level, internal_format, 1189 EXPECT_CALL(*gl_, TexImage2D(target, level, internal_format,
1179 width, height, border, format, type, _)) 1190 width, height, border, format, type, _))
1180 .Times(1) 1191 .Times(1)
1181 .RetiresOnSaturation(); 1192 .RetiresOnSaturation();
1182 EXPECT_CALL(*gl_, GetError()) 1193 EXPECT_CALL(*gl_, GetError())
1183 .WillOnce(Return(GL_NO_ERROR)) 1194 .WillOnce(Return(GL_NO_ERROR))
1184 .RetiresOnSaturation(); 1195 .RetiresOnSaturation();
1185 cmds::TexImage2D cmd; 1196 cmds::TexImage2D cmd;
1186 cmd.Init(target, level, internal_format, width, height, format, 1197 cmd.Init(target, level, internal_format, width, height, format,
1187 type, shared_memory_id, shared_memory_offset); 1198 type, shared_memory_id, shared_memory_offset);
1188 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1199 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1189 } 1200 }
1190 1201
1191 void GLES2DecoderTestBase::DoTexImage2DConvertInternalFormat( 1202 void GLES2DecoderTestBase::DoTexImage2DConvertInternalFormat(
1192 GLenum target, GLint level, GLenum requested_internal_format, 1203 GLenum target,
1193 GLsizei width, GLsizei height, GLint border, 1204 GLint level,
1194 GLenum format, GLenum type, 1205 GLenum requested_internal_format,
1195 uint32 shared_memory_id, uint32 shared_memory_offset, 1206 GLsizei width,
1207 GLsizei height,
1208 GLint border,
1209 GLenum format,
1210 GLenum type,
1211 uint32_t shared_memory_id,
1212 uint32_t shared_memory_offset,
1196 GLenum expected_internal_format) { 1213 GLenum expected_internal_format) {
1197 EXPECT_CALL(*gl_, GetError()) 1214 EXPECT_CALL(*gl_, GetError())
1198 .WillOnce(Return(GL_NO_ERROR)) 1215 .WillOnce(Return(GL_NO_ERROR))
1199 .RetiresOnSaturation(); 1216 .RetiresOnSaturation();
1200 EXPECT_CALL(*gl_, TexImage2D(target, level, expected_internal_format, 1217 EXPECT_CALL(*gl_, TexImage2D(target, level, expected_internal_format,
1201 width, height, border, format, type, _)) 1218 width, height, border, format, type, _))
1202 .Times(1) 1219 .Times(1)
1203 .RetiresOnSaturation(); 1220 .RetiresOnSaturation();
1204 EXPECT_CALL(*gl_, GetError()) 1221 EXPECT_CALL(*gl_, GetError())
1205 .WillOnce(Return(GL_NO_ERROR)) 1222 .WillOnce(Return(GL_NO_ERROR))
1206 .RetiresOnSaturation(); 1223 .RetiresOnSaturation();
1207 cmds::TexImage2D cmd; 1224 cmds::TexImage2D cmd;
1208 cmd.Init(target, level, requested_internal_format, width, height, 1225 cmd.Init(target, level, requested_internal_format, width, height,
1209 format, type, shared_memory_id, shared_memory_offset); 1226 format, type, shared_memory_id, shared_memory_offset);
1210 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1227 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1211 } 1228 }
1212 1229
1213 void GLES2DecoderTestBase::DoCompressedTexImage2D( 1230 void GLES2DecoderTestBase::DoCompressedTexImage2D(GLenum target,
1214 GLenum target, GLint level, GLenum format, 1231 GLint level,
1215 GLsizei width, GLsizei height, GLint border, 1232 GLenum format,
1216 GLsizei size, uint32 bucket_id) { 1233 GLsizei width,
1234 GLsizei height,
1235 GLint border,
1236 GLsizei size,
1237 uint32_t bucket_id) {
1217 EXPECT_CALL(*gl_, GetError()) 1238 EXPECT_CALL(*gl_, GetError())
1218 .WillOnce(Return(GL_NO_ERROR)) 1239 .WillOnce(Return(GL_NO_ERROR))
1219 .RetiresOnSaturation(); 1240 .RetiresOnSaturation();
1220 EXPECT_CALL(*gl_, CompressedTexImage2D( 1241 EXPECT_CALL(*gl_, CompressedTexImage2D(
1221 target, level, format, width, height, border, size, _)) 1242 target, level, format, width, height, border, size, _))
1222 .Times(1) 1243 .Times(1)
1223 .RetiresOnSaturation(); 1244 .RetiresOnSaturation();
1224 EXPECT_CALL(*gl_, GetError()) 1245 EXPECT_CALL(*gl_, GetError())
1225 .WillOnce(Return(GL_NO_ERROR)) 1246 .WillOnce(Return(GL_NO_ERROR))
1226 .RetiresOnSaturation(); 1247 .RetiresOnSaturation();
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 AddExpectationsForDeleteVertexArraysOES(); 1357 AddExpectationsForDeleteVertexArraysOES();
1337 AddExpectationsForBindVertexArrayOES(); 1358 AddExpectationsForBindVertexArrayOES();
1338 } 1359 }
1339 1360
1340 void GLES2DecoderTestBase::AddExpectationsForBindVertexArrayOES() { 1361 void GLES2DecoderTestBase::AddExpectationsForBindVertexArrayOES() {
1341 if (group_->feature_info()->feature_flags().native_vertex_array_object) { 1362 if (group_->feature_info()->feature_flags().native_vertex_array_object) {
1342 EXPECT_CALL(*gl_, BindVertexArrayOES(_)) 1363 EXPECT_CALL(*gl_, BindVertexArrayOES(_))
1343 .Times(1) 1364 .Times(1)
1344 .RetiresOnSaturation(); 1365 .RetiresOnSaturation();
1345 } else { 1366 } else {
1346 for (uint32 vv = 0; vv < group_->max_vertex_attribs(); ++vv) { 1367 for (uint32_t vv = 0; vv < group_->max_vertex_attribs(); ++vv) {
1347 AddExpectationsForRestoreAttribState(vv); 1368 AddExpectationsForRestoreAttribState(vv);
1348 } 1369 }
1349 1370
1350 EXPECT_CALL(*gl_, BindBuffer(GL_ELEMENT_ARRAY_BUFFER, _)) 1371 EXPECT_CALL(*gl_, BindBuffer(GL_ELEMENT_ARRAY_BUFFER, _))
1351 .Times(1) 1372 .Times(1)
1352 .RetiresOnSaturation(); 1373 .RetiresOnSaturation();
1353 } 1374 }
1354 } 1375 }
1355 1376
1356 void GLES2DecoderTestBase::AddExpectationsForRestoreAttribState(GLuint attrib) { 1377 void GLES2DecoderTestBase::AddExpectationsForRestoreAttribState(GLuint attrib) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 const GLuint GLES2DecoderTestBase::kServiceSamplerId; 1436 const GLuint GLES2DecoderTestBase::kServiceSamplerId;
1416 const GLuint GLES2DecoderTestBase::kServiceTextureId; 1437 const GLuint GLES2DecoderTestBase::kServiceTextureId;
1417 const GLuint GLES2DecoderTestBase::kServiceProgramId; 1438 const GLuint GLES2DecoderTestBase::kServiceProgramId;
1418 const GLuint GLES2DecoderTestBase::kServiceShaderId; 1439 const GLuint GLES2DecoderTestBase::kServiceShaderId;
1419 const GLuint GLES2DecoderTestBase::kServiceElementBufferId; 1440 const GLuint GLES2DecoderTestBase::kServiceElementBufferId;
1420 const GLuint GLES2DecoderTestBase::kServiceQueryId; 1441 const GLuint GLES2DecoderTestBase::kServiceQueryId;
1421 const GLuint GLES2DecoderTestBase::kServiceVertexArrayId; 1442 const GLuint GLES2DecoderTestBase::kServiceVertexArrayId;
1422 const GLuint GLES2DecoderTestBase::kServiceTransformFeedbackId; 1443 const GLuint GLES2DecoderTestBase::kServiceTransformFeedbackId;
1423 const GLuint GLES2DecoderTestBase::kServiceSyncId; 1444 const GLuint GLES2DecoderTestBase::kServiceSyncId;
1424 1445
1425 const int32 GLES2DecoderTestBase::kSharedMemoryId; 1446 const int32_t GLES2DecoderTestBase::kSharedMemoryId;
1426 const size_t GLES2DecoderTestBase::kSharedBufferSize; 1447 const size_t GLES2DecoderTestBase::kSharedBufferSize;
1427 const uint32 GLES2DecoderTestBase::kSharedMemoryOffset; 1448 const uint32_t GLES2DecoderTestBase::kSharedMemoryOffset;
1428 const int32 GLES2DecoderTestBase::kInvalidSharedMemoryId; 1449 const int32_t GLES2DecoderTestBase::kInvalidSharedMemoryId;
1429 const uint32 GLES2DecoderTestBase::kInvalidSharedMemoryOffset; 1450 const uint32_t GLES2DecoderTestBase::kInvalidSharedMemoryOffset;
1430 const uint32 GLES2DecoderTestBase::kInitialResult; 1451 const uint32_t GLES2DecoderTestBase::kInitialResult;
1431 const uint8 GLES2DecoderTestBase::kInitialMemoryValue; 1452 const uint8_t GLES2DecoderTestBase::kInitialMemoryValue;
1432 1453
1433 const uint32 GLES2DecoderTestBase::kNewClientId; 1454 const uint32_t GLES2DecoderTestBase::kNewClientId;
1434 const uint32 GLES2DecoderTestBase::kNewServiceId; 1455 const uint32_t GLES2DecoderTestBase::kNewServiceId;
1435 const uint32 GLES2DecoderTestBase::kInvalidClientId; 1456 const uint32_t GLES2DecoderTestBase::kInvalidClientId;
1436 1457
1437 const GLuint GLES2DecoderTestBase::kServiceVertexShaderId; 1458 const GLuint GLES2DecoderTestBase::kServiceVertexShaderId;
1438 const GLuint GLES2DecoderTestBase::kServiceFragmentShaderId; 1459 const GLuint GLES2DecoderTestBase::kServiceFragmentShaderId;
1439 1460
1440 const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumShaderId; 1461 const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumShaderId;
1441 const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumProgramId; 1462 const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumProgramId;
1442 1463
1443 const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumTextureBufferId; 1464 const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumTextureBufferId;
1444 const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumVertexBufferId; 1465 const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumVertexBufferId;
1445 const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumFBOId; 1466 const GLuint GLES2DecoderTestBase::kServiceCopyTextureChromiumFBOId;
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 valid_buffer_ = MakeBufferFromSharedMemory(std::move(shm), kSharedBufferSize); 1932 valid_buffer_ = MakeBufferFromSharedMemory(std::move(shm), kSharedBufferSize);
1912 1933
1913 ClearSharedMemory(); 1934 ClearSharedMemory();
1914 } 1935 }
1915 1936
1916 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine:: 1937 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::
1917 ~MockCommandBufferEngine() {} 1938 ~MockCommandBufferEngine() {}
1918 1939
1919 scoped_refptr<gpu::Buffer> 1940 scoped_refptr<gpu::Buffer>
1920 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::GetSharedMemoryBuffer( 1941 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::GetSharedMemoryBuffer(
1921 int32 shm_id) { 1942 int32_t shm_id) {
1922 return shm_id == kSharedMemoryId ? valid_buffer_ : invalid_buffer_; 1943 return shm_id == kSharedMemoryId ? valid_buffer_ : invalid_buffer_;
1923 } 1944 }
1924 1945
1925 void GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::set_token( 1946 void GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::set_token(
1926 int32 token) { 1947 int32_t token) {
1927 DCHECK(false); 1948 DCHECK(false);
1928 } 1949 }
1929 1950
1930 bool GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::SetGetBuffer( 1951 bool GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::SetGetBuffer(
1931 int32 /* transfer_buffer_id */) { 1952 int32_t /* transfer_buffer_id */) {
1932 DCHECK(false); 1953 DCHECK(false);
1933 return false; 1954 return false;
1934 } 1955 }
1935 1956
1936 bool GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::SetGetOffset( 1957 bool GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::SetGetOffset(
1937 int32 offset) { 1958 int32_t offset) {
1938 DCHECK(false); 1959 DCHECK(false);
1939 return false; 1960 return false;
1940 } 1961 }
1941 1962
1942 int32 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::GetGetOffset() { 1963 int32_t
1964 GLES2DecoderWithShaderTestBase::MockCommandBufferEngine::GetGetOffset() {
1943 DCHECK(false); 1965 DCHECK(false);
1944 return 0; 1966 return 0;
1945 } 1967 }
1946 1968
1947 void GLES2DecoderWithShaderTestBase::SetUp() { 1969 void GLES2DecoderWithShaderTestBase::SetUp() {
1948 GLES2DecoderTestBase::SetUp(); 1970 GLES2DecoderTestBase::SetUp();
1949 SetupDefaultProgram(); 1971 SetupDefaultProgram();
1950 } 1972 }
1951 1973
1952 // Include the auto-generated part of this file. We split this because it means 1974 // Include the auto-generated part of this file. We split this because it means
1953 // we can easily edit the non-auto generated parts right here in this file 1975 // we can easily edit the non-auto generated parts right here in this file
1954 // instead of having to edit some template or the code generator. 1976 // instead of having to edit some template or the code generator.
1955 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 1977 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
1956 1978
1957 } // namespace gles2 1979 } // namespace gles2
1958 } // namespace gpu 1980 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698