| 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.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 1222 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 1223 EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); | 1223 EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); |
| 1224 EXPECT_EQ(64u, memory_tracker->GetPoolSize()); | 1224 EXPECT_EQ(64u, memory_tracker->GetPoolSize()); |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 TEST_P(GLES2DecoderManualInitTest, MemoryTrackerTexStorage2DEXT) { | 1227 TEST_P(GLES2DecoderManualInitTest, MemoryTrackerTexStorage2DEXT) { |
| 1228 scoped_refptr<SizeOnlyMemoryTracker> memory_tracker = | 1228 scoped_refptr<SizeOnlyMemoryTracker> memory_tracker = |
| 1229 new SizeOnlyMemoryTracker(); | 1229 new SizeOnlyMemoryTracker(); |
| 1230 set_memory_tracker(memory_tracker.get()); | 1230 set_memory_tracker(memory_tracker.get()); |
| 1231 InitState init; | 1231 InitState init; |
| 1232 init.extensions = "GL_EXT_texture_storage"; |
| 1232 init.bind_generates_resource = true; | 1233 init.bind_generates_resource = true; |
| 1233 InitDecoder(init); | 1234 InitDecoder(init); |
| 1234 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); | 1235 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); |
| 1235 // Check we get out of memory and no call to glTexStorage2DEXT | 1236 // Check we get out of memory and no call to glTexStorage2DEXT |
| 1236 // if Ensure fails. | 1237 // if Ensure fails. |
| 1237 EXPECT_CALL(*memory_tracker.get(), EnsureGPUMemoryAvailable(128)) | 1238 EXPECT_CALL(*memory_tracker.get(), EnsureGPUMemoryAvailable(128)) |
| 1238 .WillOnce(Return(false)) | 1239 .WillOnce(Return(false)) |
| 1239 .RetiresOnSaturation(); | 1240 .RetiresOnSaturation(); |
| 1240 TexStorage2DEXT cmd; | 1241 TexStorage2DEXT cmd; |
| 1241 cmd.Init(GL_TEXTURE_2D, 1, GL_RGBA8, 8, 4); | 1242 cmd.Init(GL_TEXTURE_2D, 1, GL_RGBA8, 8, 4); |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderDoCommandsTest, ::testing::Bool()); | 1711 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderDoCommandsTest, ::testing::Bool()); |
| 1711 | 1712 |
| 1712 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest, ::testing::Bool()); | 1713 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest, ::testing::Bool()); |
| 1713 | 1714 |
| 1714 INSTANTIATE_TEST_CASE_P(Service, | 1715 INSTANTIATE_TEST_CASE_P(Service, |
| 1715 GLES3DecoderWithESSL3ShaderTest, | 1716 GLES3DecoderWithESSL3ShaderTest, |
| 1716 ::testing::Bool()); | 1717 ::testing::Bool()); |
| 1717 | 1718 |
| 1718 } // namespace gles2 | 1719 } // namespace gles2 |
| 1719 } // namespace gpu | 1720 } // namespace gpu |
| OLD | NEW |