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/gles2_cmd_decoder_mock.h" | 8 #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" |
9 #include "gpu/command_buffer/service/gpu_service_test.h" | 9 #include "gpu/command_buffer/service/gpu_service_test.h" |
10 #include "gpu/command_buffer/service/gpu_tracer.h" | 10 #include "gpu/command_buffer/service/gpu_tracer.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
218 }; | 218 }; |
219 | 219 |
220 class BaseGpuTest : public GpuServiceTest { | 220 class BaseGpuTest : public GpuServiceTest { |
221 public: | 221 public: |
222 BaseGpuTest(GpuTracerType test_tracer_type) | 222 BaseGpuTest(GpuTracerType test_tracer_type) |
223 : test_tracer_type_(test_tracer_type) { | 223 : test_tracer_type_(test_tracer_type) { |
224 } | 224 } |
225 | 225 |
226 protected: | 226 protected: |
227 void SetUp() override { | 227 void SetUp() override { |
228 GpuServiceTest::SetUp(); | 228 // TODO: The tracer code is wrong and assumes that getInteger64v |
229 // is available when timer_query or disjoint_timer exists. | |
piman
2015/01/23 01:38:16
GL_ARB_timer_query requires GL 3.2
GL_EXT_disjoin
| |
230 GpuServiceTest::SetUpWithGLVersion( | |
231 "3.2", "GL_EXT_disjoint_timer_query GL_ARB_timer_query"); | |
229 gl_fake_queries_.Reset(); | 232 gl_fake_queries_.Reset(); |
230 gl_surface_ = new gfx::GLSurfaceStub(); | 233 gl_surface_ = new gfx::GLSurfaceStub(); |
231 gl_context_ = new gfx::GLContextStub(); | 234 gl_context_ = new gfx::GLContextStub(); |
232 gl_context_->MakeCurrent(gl_surface_.get()); | 235 gl_context_->MakeCurrent(gl_surface_.get()); |
233 | 236 |
234 outputter_ref_ = new MockOutputter(); | 237 outputter_ref_ = new MockOutputter(); |
235 cpu_time_ref_ = new FakeCPUTime; | 238 cpu_time_ref_ = new FakeCPUTime; |
236 } | 239 } |
237 | 240 |
238 void TearDown() override { | 241 void TearDown() override { |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
689 kTraceGroupMarker)); | 692 kTraceGroupMarker)); |
690 | 693 |
691 ASSERT_TRUE(tracer_tester.BeginDecoding()); | 694 ASSERT_TRUE(tracer_tester.BeginDecoding()); |
692 EXPECT_TRUE(tracer_tester.Begin(category_name, trace_name, | 695 EXPECT_TRUE(tracer_tester.Begin(category_name, trace_name, |
693 kTraceGroupMarker)); | 696 kTraceGroupMarker)); |
694 ASSERT_TRUE(tracer_tester.EndDecoding()); | 697 ASSERT_TRUE(tracer_tester.EndDecoding()); |
695 } | 698 } |
696 | 699 |
697 } // namespace gles2 | 700 } // namespace gles2 |
698 } // namespace gpu | 701 } // namespace gpu |
OLD | NEW |