| 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/renderbuffer_manager.h" | 5 #include "gpu/command_buffer/service/renderbuffer_manager.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/common/gl_mock.h" | 7 #include "gpu/command_buffer/common/gl_mock.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace gpu { | 10 namespace gpu { |
| 11 namespace gles2 { | 11 namespace gles2 { |
| 12 | 12 |
| 13 class RenderbufferManagerTest : public testing::Test { | 13 class RenderbufferManagerTest : public testing::Test { |
| 14 public: | 14 public: |
| 15 static const GLint kMaxSize = 128; | 15 static const GLint kMaxSize = 128; |
| 16 static const GLint kMaxSamples = 4; | 16 static const GLint kMaxSamples = 4; |
| 17 | 17 |
| 18 RenderbufferManagerTest() | 18 RenderbufferManagerTest() |
| 19 : manager_(kMaxSize, kMaxSamples) { | 19 : manager_(NULL, kMaxSize, kMaxSamples) { |
| 20 } | 20 } |
| 21 ~RenderbufferManagerTest() { | 21 ~RenderbufferManagerTest() { |
| 22 manager_.Destroy(false); | 22 manager_.Destroy(false); |
| 23 } | 23 } |
| 24 | 24 |
| 25 protected: | 25 protected: |
| 26 virtual void SetUp() { | 26 virtual void SetUp() { |
| 27 gl_.reset(new ::testing::StrictMock<gfx::MockGLInterface>()); | 27 gl_.reset(new ::testing::StrictMock<gfx::MockGLInterface>()); |
| 28 ::gfx::GLInterface::SetGLInterface(gl_.get()); | 28 ::gfx::GLInterface::SetGLInterface(gl_.get()); |
| 29 } | 29 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 EXPECT_CALL(*gl_, DeleteRenderbuffersEXT(1, ::testing::Pointee(kService1Id))) | 162 EXPECT_CALL(*gl_, DeleteRenderbuffersEXT(1, ::testing::Pointee(kService1Id))) |
| 163 .Times(1) | 163 .Times(1) |
| 164 .RetiresOnSaturation(); | 164 .RetiresOnSaturation(); |
| 165 info1 = NULL; | 165 info1 = NULL; |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace gles2 | 168 } // namespace gles2 |
| 169 } // namespace gpu | 169 } // namespace gpu |
| 170 | 170 |
| 171 | 171 |
| OLD | NEW |