Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: gpu/command_buffer/service/gpu_tracer_unittest.cc

Issue 1687353002: Force time elapsed queries on certain drivers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor tests Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 base::Time::kNanosecondsPerMicrosecond); 267 base::Time::kNanosecondsPerMicrosecond);
268 g_fakeCPUTime = expect_end_time - 1; 268 g_fakeCPUTime = expect_end_time - 1;
269 if (tracing_device) 269 if (tracing_device)
270 EXPECT_FALSE(trace->IsAvailable()); 270 EXPECT_FALSE(trace->IsAvailable());
271 271
272 // Now it should be available 272 // Now it should be available
273 gl_fake_queries_.SetCurrentGLTime(end_timestamp); 273 gl_fake_queries_.SetCurrentGLTime(end_timestamp);
274 g_fakeCPUTime = expect_end_time; 274 g_fakeCPUTime = expect_end_time;
275 EXPECT_TRUE(trace->IsAvailable()); 275 EXPECT_TRUE(trace->IsAvailable());
276 276
277 // Proces should output expected Trace results to MockOutputter 277 // Process should output expected Trace results to MockOutputter
278 trace->Process(); 278 trace->Process();
279 279
280 // Destroy trace after we are done. 280 // Destroy trace after we are done.
281 trace->Destroy(true); 281 trace->Destroy(true);
282 282
283 outputter_ref_ = NULL; 283 outputter_ref_ = NULL;
284 } 284 }
285 }; 285 };
286 286
287 class GpuARBTimerTraceTest : public BaseGpuTraceTest { 287 class GpuARBTimerTraceTest : public BaseGpuTraceTest {
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 scoped_refptr<gfx::GPUTimingClient> client3 = 804 scoped_refptr<gfx::GPUTimingClient> client3 =
805 GetGLContext()->CreateGPUTimingClient(); 805 GetGLContext()->CreateGPUTimingClient();
806 ASSERT_TRUE(client1->CheckAndResetTimerErrors()); 806 ASSERT_TRUE(client1->CheckAndResetTimerErrors());
807 ASSERT_TRUE(client2->CheckAndResetTimerErrors()); 807 ASSERT_TRUE(client2->CheckAndResetTimerErrors());
808 ASSERT_FALSE(client3->CheckAndResetTimerErrors()); 808 ASSERT_FALSE(client3->CheckAndResetTimerErrors());
809 } 809 }
810 810
811 } // namespace 811 } // namespace
812 } // namespace gles2 812 } // namespace gles2
813 } // namespace gpu 813 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698