| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // This file defines tests that implementations of GLImage should pass in order | 5 // This file defines tests that implementations of GLImage should pass in order |
| 6 // to be conformant. | 6 // to be conformant. |
| 7 | 7 |
| 8 #ifndef UI_GL_TEST_GL_IMAGE_TEST_TEMPLATE_H_ | 8 #ifndef UI_GL_TEST_GL_IMAGE_TEST_TEMPLATE_H_ |
| 9 #define UI_GL_TEST_GL_IMAGE_TEST_TEMPLATE_H_ | 9 #define UI_GL_TEST_GL_IMAGE_TEST_TEMPLATE_H_ |
| 10 | 10 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 template <typename GLImageTestDelegate> | 217 template <typename GLImageTestDelegate> |
| 218 class GLImageZeroInitializeTest : public GLImageTest<GLImageTestDelegate> {}; | 218 class GLImageZeroInitializeTest : public GLImageTest<GLImageTestDelegate> {}; |
| 219 | 219 |
| 220 // This test verifies that if an uninitialized image is bound to a texture, the | 220 // This test verifies that if an uninitialized image is bound to a texture, the |
| 221 // result is zero-initialized. | 221 // result is zero-initialized. |
| 222 TYPED_TEST_CASE_P(GLImageZeroInitializeTest); | 222 TYPED_TEST_CASE_P(GLImageZeroInitializeTest); |
| 223 | 223 |
| 224 TYPED_TEST_P(GLImageZeroInitializeTest, ZeroInitialize) { | 224 TYPED_TEST_P(GLImageZeroInitializeTest, ZeroInitialize) { |
| 225 #if defined(OS_MACOSX) | 225 #if defined(OS_MACOSX) |
| 226 // This functionality is disabled on Mavericks because it breaks PDF | 226 // This functionality is disabled on Mavericks and Yosemite because… |
| 227 // rendering. https://crbug.com/594343. | 227 // - On Mavericks, it breaks PDF rendering: https://crbug.com/594343. |
| 228 if (base::mac::IsOS10_9()) | 228 // - On Yosemite, it is suspected of causing performance regressions on old |
| 229 return; | 229 // hardware: https://crbug.com/606850. |
| 230 | 230 if (!base::mac::IsAtLeastOS10_11()) |
| 231 // This functionality is disabled on Yosemite because it is suspected of | |
| 232 // causing performance regressions on old hardware. https://crbug.com/606850. | |
| 233 if (base::mac::IsOS10_10()) | |
| 234 return; | 231 return; |
| 235 #endif | 232 #endif |
| 236 | 233 |
| 237 const gfx::Size image_size(256, 256); | 234 const gfx::Size image_size(256, 256); |
| 238 | 235 |
| 239 GLuint framebuffer = | 236 GLuint framebuffer = |
| 240 GLTestHelper::SetupFramebuffer(image_size.width(), image_size.height()); | 237 GLTestHelper::SetupFramebuffer(image_size.width(), image_size.height()); |
| 241 ASSERT_TRUE(framebuffer); | 238 ASSERT_TRUE(framebuffer); |
| 242 glBindFramebufferEXT(GL_FRAMEBUFFER, framebuffer); | 239 glBindFramebufferEXT(GL_FRAMEBUFFER, framebuffer); |
| 243 glViewport(0, 0, image_size.width(), image_size.height()); | 240 glViewport(0, 0, image_size.width(), image_size.height()); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 } | 380 } |
| 384 } | 381 } |
| 385 | 382 |
| 386 // The GLImageCopyTest test case verifies that the GLImage implementation | 383 // The GLImageCopyTest test case verifies that the GLImage implementation |
| 387 // handles CopyTexImage correctly. | 384 // handles CopyTexImage correctly. |
| 388 REGISTER_TYPED_TEST_CASE_P(GLImageCopyTest, CopyTexImage); | 385 REGISTER_TYPED_TEST_CASE_P(GLImageCopyTest, CopyTexImage); |
| 389 | 386 |
| 390 } // namespace gl | 387 } // namespace gl |
| 391 | 388 |
| 392 #endif // UI_GL_TEST_GL_IMAGE_TEST_TEMPLATE_H_ | 389 #endif // UI_GL_TEST_GL_IMAGE_TEST_TEMPLATE_H_ |
| OLD | NEW |