| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <map> | 5 #include <map> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "gpu/command_buffer/service/gpu_service_test.h" | 8 #include "gpu/command_buffer/service/gpu_service_test.h" |
| 9 #include "gpu/command_buffer/service/gpu_tracer.h" | 9 #include "gpu/command_buffer/service/gpu_tracer.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 Invoke(&gl_fake_queries_, &GlFakeQueries::DeleteQueriesARB)); | 200 Invoke(&gl_fake_queries_, &GlFakeQueries::DeleteQueriesARB)); |
| 201 } | 201 } |
| 202 | 202 |
| 203 virtual GpuTracerType GetTracerType() = 0; | 203 virtual GpuTracerType GetTracerType() = 0; |
| 204 | 204 |
| 205 GlFakeQueries gl_fake_queries_; | 205 GlFakeQueries gl_fake_queries_; |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 class GpuARBTimerTracerTest : public BaseGpuTracerTest { | 208 class GpuARBTimerTracerTest : public BaseGpuTracerTest { |
| 209 protected: | 209 protected: |
| 210 virtual GpuTracerType GetTracerType() override { | 210 GpuTracerType GetTracerType() override { return kTracerTypeARBTimer; } |
| 211 return kTracerTypeARBTimer; | |
| 212 } | |
| 213 }; | 211 }; |
| 214 | 212 |
| 215 class GpuDisjointTimerTracerTest : public BaseGpuTracerTest { | 213 class GpuDisjointTimerTracerTest : public BaseGpuTracerTest { |
| 216 protected: | 214 protected: |
| 217 virtual GpuTracerType GetTracerType() override { | 215 GpuTracerType GetTracerType() override { return kTracerTypeDisjointTimer; } |
| 218 return kTracerTypeDisjointTimer; | |
| 219 } | |
| 220 }; | 216 }; |
| 221 | 217 |
| 222 TEST_F(GpuARBTimerTracerTest, GPUTrace) { | 218 TEST_F(GpuARBTimerTracerTest, GPUTrace) { |
| 223 // Test basic timer query functionality | 219 // Test basic timer query functionality |
| 224 { | 220 { |
| 225 DoTraceTest(); | 221 DoTraceTest(); |
| 226 } | 222 } |
| 227 } | 223 } |
| 228 | 224 |
| 229 TEST_F(GpuDisjointTimerTracerTest, GPUTrace) { | 225 TEST_F(GpuDisjointTimerTracerTest, GPUTrace) { |
| 230 // Test basic timer query functionality | 226 // Test basic timer query functionality |
| 231 { | 227 { |
| 232 DoTraceTest(); | 228 DoTraceTest(); |
| 233 } | 229 } |
| 234 } | 230 } |
| 235 | 231 |
| 236 } // namespace gles2 | 232 } // namespace gles2 |
| 237 } // namespace gpu | 233 } // namespace gpu |
| OLD | NEW |