| OLD | NEW |
| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 EXPECT_CALL(*gl_, GetIntegerv(GL_ALPHA_BITS, _)) | 178 EXPECT_CALL(*gl_, GetIntegerv(GL_ALPHA_BITS, _)) |
| 179 .WillOnce(SetArgumentPointee<1>(has_alpha ? 8 : 0)) | 179 .WillOnce(SetArgumentPointee<1>(has_alpha ? 8 : 0)) |
| 180 .RetiresOnSaturation(); | 180 .RetiresOnSaturation(); |
| 181 EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) | 181 EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) |
| 182 .WillOnce(SetArgumentPointee<1>(has_depth ? 24 : 0)) | 182 .WillOnce(SetArgumentPointee<1>(has_depth ? 24 : 0)) |
| 183 .RetiresOnSaturation(); | 183 .RetiresOnSaturation(); |
| 184 EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) | 184 EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) |
| 185 .WillOnce(SetArgumentPointee<1>(has_stencil ? 8 : 0)) | 185 .WillOnce(SetArgumentPointee<1>(has_stencil ? 8 : 0)) |
| 186 .RetiresOnSaturation(); | 186 .RetiresOnSaturation(); |
| 187 | 187 |
| 188 EXPECT_CALL(*gl_, Clear( | |
| 189 GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)) | |
| 190 .Times(1) | |
| 191 .RetiresOnSaturation(); | |
| 192 | |
| 193 EXPECT_CALL(*gl_, Enable(GL_VERTEX_PROGRAM_POINT_SIZE)) | 188 EXPECT_CALL(*gl_, Enable(GL_VERTEX_PROGRAM_POINT_SIZE)) |
| 194 .Times(1) | 189 .Times(1) |
| 195 .RetiresOnSaturation(); | 190 .RetiresOnSaturation(); |
| 196 | 191 |
| 197 EXPECT_CALL(*gl_, Enable(GL_POINT_SPRITE)) | 192 EXPECT_CALL(*gl_, Enable(GL_POINT_SPRITE)) |
| 198 .Times(1) | 193 .Times(1) |
| 199 .RetiresOnSaturation(); | 194 .RetiresOnSaturation(); |
| 200 | 195 |
| 201 static GLint max_viewport_dims[] = { | 196 static GLint max_viewport_dims[] = { |
| 202 kMaxViewportWidth, | 197 kMaxViewportWidth, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 229 EXPECT_CALL(*gl_, BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0)) | 224 EXPECT_CALL(*gl_, BindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0)) |
| 230 .Times(1) | 225 .Times(1) |
| 231 .RetiresOnSaturation(); | 226 .RetiresOnSaturation(); |
| 232 EXPECT_CALL(*gl_, BindFramebufferEXT(GL_FRAMEBUFFER, 0)) | 227 EXPECT_CALL(*gl_, BindFramebufferEXT(GL_FRAMEBUFFER, 0)) |
| 233 .Times(1) | 228 .Times(1) |
| 234 .RetiresOnSaturation(); | 229 .RetiresOnSaturation(); |
| 235 EXPECT_CALL(*gl_, BindRenderbufferEXT(GL_RENDERBUFFER, 0)) | 230 EXPECT_CALL(*gl_, BindRenderbufferEXT(GL_RENDERBUFFER, 0)) |
| 236 .Times(1) | 231 .Times(1) |
| 237 .RetiresOnSaturation(); | 232 .RetiresOnSaturation(); |
| 238 | 233 |
| 234 EXPECT_CALL(*gl_, Clear( |
| 235 GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)) |
| 236 .Times(1) |
| 237 .RetiresOnSaturation(); |
| 238 |
| 239 engine_.reset(new StrictMock<MockCommandBufferEngine>()); | 239 engine_.reset(new StrictMock<MockCommandBufferEngine>()); |
| 240 gpu::Buffer buffer = engine_->GetSharedMemoryBuffer(kSharedMemoryId); | 240 gpu::Buffer buffer = engine_->GetSharedMemoryBuffer(kSharedMemoryId); |
| 241 shared_memory_offset_ = kSharedMemoryOffset; | 241 shared_memory_offset_ = kSharedMemoryOffset; |
| 242 shared_memory_address_ = reinterpret_cast<int8*>(buffer.ptr) + | 242 shared_memory_address_ = reinterpret_cast<int8*>(buffer.ptr) + |
| 243 shared_memory_offset_; | 243 shared_memory_offset_; |
| 244 shared_memory_id_ = kSharedMemoryId; | 244 shared_memory_id_ = kSharedMemoryId; |
| 245 shared_memory_base_ = buffer.ptr; | 245 shared_memory_base_ = buffer.ptr; |
| 246 | 246 |
| 247 surface_ = new gfx::GLSurfaceStub; | 247 surface_ = new gfx::GLSurfaceStub; |
| 248 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); | 248 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1384 SetupDefaultProgram(); | 1384 SetupDefaultProgram(); |
| 1385 } | 1385 } |
| 1386 | 1386 |
| 1387 // Include the auto-generated part of this file. We split this because it means | 1387 // Include the auto-generated part of this file. We split this because it means |
| 1388 // we can easily edit the non-auto generated parts right here in this file | 1388 // we can easily edit the non-auto generated parts right here in this file |
| 1389 // instead of having to edit some template or the code generator. | 1389 // instead of having to edit some template or the code generator. |
| 1390 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1390 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
| 1391 | 1391 |
| 1392 } // namespace gles2 | 1392 } // namespace gles2 |
| 1393 } // namespace gpu | 1393 } // namespace gpu |
| OLD | NEW |