| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 <gflags/gflags.h> | 5 #include <gflags/gflags.h> |
| 6 #include <stdio.h> | 6 #include <stdio.h> |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 glbench::TestBase* tests[] = { | 59 glbench::TestBase* tests[] = { |
| 60 glbench::GetSwapTest(), | 60 glbench::GetSwapTest(), |
| 61 glbench::GetClearTest(), | 61 glbench::GetClearTest(), |
| 62 glbench::GetFillRateTest(), | 62 glbench::GetFillRateTest(), |
| 63 #if defined(USE_OPENGL) | 63 #if defined(USE_OPENGL) |
| 64 glbench::GetWindowManagerCompositingTest(false), | 64 glbench::GetWindowManagerCompositingTest(false), |
| 65 glbench::GetWindowManagerCompositingTest(true), | 65 glbench::GetWindowManagerCompositingTest(true), |
| 66 #endif | 66 #endif |
| 67 glbench::GetTriangleSetupTest(), | 67 glbench::GetTriangleSetupTest(), |
| 68 #if !defined(DISABLE_SOME_TESTS_FOR_INTEL_DRIVER) |
| 68 glbench::GetYuvToRgbTest(), | 69 glbench::GetYuvToRgbTest(), |
| 70 #endif |
| 69 glbench::GetReadPixelTest(), | 71 glbench::GetReadPixelTest(), |
| 70 glbench::GetAttributeFetchShaderTest(), | 72 glbench::GetAttributeFetchShaderTest(), |
| 71 glbench::GetVaryingsAndDdxyShaderTest(), | 73 glbench::GetVaryingsAndDdxyShaderTest(), |
| 72 glbench::GetTextureUpdateTest(), | 74 glbench::GetTextureUpdateTest(), |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 uint64_t done = GetUTime() + 1000000ULL * FLAGS_duration; | 77 uint64_t done = GetUTime() + 1000000ULL * FLAGS_duration; |
| 76 do { | 78 do { |
| 77 for (unsigned int i = 0; i < arraysize(tests); i++) { | 79 for (unsigned int i = 0; i < arraysize(tests); i++) { |
| 78 if (!test_is_enabled(tests[i], enabled_tests)) | 80 if (!test_is_enabled(tests[i], enabled_tests)) |
| 79 continue; | 81 continue; |
| 80 InitContext(); | 82 InitContext(); |
| 81 tests[i]->Run(); | 83 tests[i]->Run(); |
| 82 DestroyContext(); | 84 DestroyContext(); |
| 83 } | 85 } |
| 84 } while (GetUTime() < done); | 86 } while (GetUTime() < done); |
| 85 | 87 |
| 86 for (unsigned int i = 0; i < arraysize(tests); i++) { | 88 for (unsigned int i = 0; i < arraysize(tests); i++) { |
| 87 delete tests[i]; | 89 delete tests[i]; |
| 88 tests[i] = NULL; | 90 tests[i] = NULL; |
| 89 } | 91 } |
| 90 | 92 |
| 91 return 0; | 93 return 0; |
| 92 } | 94 } |
| OLD | NEW |