Chromium Code Reviews| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 229 .RetiresOnSaturation(); | 229 .RetiresOnSaturation(); |
| 230 EXPECT_CALL(*gl_, BindRenderbufferEXT(GL_RENDERBUFFER, 0)) | 230 EXPECT_CALL(*gl_, BindRenderbufferEXT(GL_RENDERBUFFER, 0)) |
| 231 .Times(1) | 231 .Times(1) |
| 232 .RetiresOnSaturation(); | 232 .RetiresOnSaturation(); |
| 233 | 233 |
| 234 EXPECT_CALL(*gl_, Clear( | 234 EXPECT_CALL(*gl_, Clear( |
| 235 GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)) | 235 GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)) |
| 236 .Times(1) | 236 .Times(1) |
| 237 .RetiresOnSaturation(); | 237 .RetiresOnSaturation(); |
| 238 | 238 |
| 239 #if defined(OS_ANDROID) | |
|
epenner
2013/05/23 18:13:42
You can get rid of this by making a function IsQua
| |
| 240 // The Android AsyncPixelTransferDelegate can disable itself based on the GL | |
| 241 // vendor. | |
| 242 EXPECT_CALL(*gl_, GetString(GL_VENDOR)) | |
| 243 .WillOnce(Return(reinterpret_cast<const uint8*>(""))) | |
| 244 .RetiresOnSaturation(); | |
| 245 #endif | |
| 246 | |
| 239 engine_.reset(new StrictMock<MockCommandBufferEngine>()); | 247 engine_.reset(new StrictMock<MockCommandBufferEngine>()); |
| 240 gpu::Buffer buffer = engine_->GetSharedMemoryBuffer(kSharedMemoryId); | 248 gpu::Buffer buffer = engine_->GetSharedMemoryBuffer(kSharedMemoryId); |
| 241 shared_memory_offset_ = kSharedMemoryOffset; | 249 shared_memory_offset_ = kSharedMemoryOffset; |
| 242 shared_memory_address_ = reinterpret_cast<int8*>(buffer.ptr) + | 250 shared_memory_address_ = reinterpret_cast<int8*>(buffer.ptr) + |
| 243 shared_memory_offset_; | 251 shared_memory_offset_; |
| 244 shared_memory_id_ = kSharedMemoryId; | 252 shared_memory_id_ = kSharedMemoryId; |
| 245 shared_memory_base_ = buffer.ptr; | 253 shared_memory_base_ = buffer.ptr; |
| 246 | 254 |
| 247 surface_ = new gfx::GLSurfaceStub; | 255 surface_ = new gfx::GLSurfaceStub; |
| 248 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); | 256 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1384 SetupDefaultProgram(); | 1392 SetupDefaultProgram(); |
| 1385 } | 1393 } |
| 1386 | 1394 |
| 1387 // Include the auto-generated part of this file. We split this because it means | 1395 // 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 | 1396 // 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. | 1397 // instead of having to edit some template or the code generator. |
| 1390 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1398 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
| 1391 | 1399 |
| 1392 } // namespace gles2 | 1400 } // namespace gles2 |
| 1393 } // namespace gpu | 1401 } // namespace gpu |
| OLD | NEW |