Index: ui/gl/gpu_timing_fake.cc |
diff --git a/ui/gl/gpu_timing_fake.cc b/ui/gl/gpu_timing_fake.cc |
index 03f4af3d6ea06256a8c2d21d292d3e47545cd219..86c40e38197bbe9432a9e72112f37622567403c6 100644 |
--- a/ui/gl/gpu_timing_fake.cc |
+++ b/ui/gl/gpu_timing_fake.cc |
@@ -16,6 +16,9 @@ using ::testing::AtMost; |
using ::testing::Exactly; |
using ::testing::Invoke; |
using ::testing::NotNull; |
+using ::testing::DoAll; |
+using ::testing::Return; |
+using ::testing::SetArgPointee; |
int64_t GPUTimingFake::fake_cpu_time_ = 0; |
@@ -75,13 +78,14 @@ void GPUTimingFake::ExpectNoDisjointCalls(MockGLInterface& gl) { |
EXPECT_CALL(gl, GetIntegerv(GL_GPU_DISJOINT_EXT, _)).Times(Exactly(0)); |
} |
-void GPUTimingFake::ExpectGPUTimeStampQuery( |
- MockGLInterface& gl, bool elapsed_query) { |
+void GPUTimingFake::ExpectGPUTimeStampQuery(MockGLInterface& gl, |
+ bool elapsed_query) { |
EXPECT_CALL(gl, GenQueries(1, NotNull())).Times(Exactly(1)) |
.WillRepeatedly(Invoke(this, &GPUTimingFake::FakeGLGenQueries)); |
+ EXPECT_CALL(gl, GetQueryiv(GL_TIMESTAMP, GL_QUERY_COUNTER_BITS, NotNull())) |
+ .WillRepeatedly(DoAll(SetArgPointee<2>(64), Return())); |
if (!elapsed_query) { |
- // Time Stamp based queries. |
David Yen
2016/02/17 21:16:43
Was this accidentally deleted?
|
EXPECT_CALL(gl, GetInteger64v(GL_TIMESTAMP, _)) |
.WillRepeatedly( |
Invoke(this, &GPUTimingFake::FakeGLGetInteger64v)); |
@@ -121,6 +125,10 @@ void GPUTimingFake::ExpectGPUTimerQuery( |
if (!elapsed_query) { |
// Time Stamp based queries. |
+ EXPECT_CALL(gl, GetQueryiv(GL_TIMESTAMP, GL_QUERY_COUNTER_BITS, NotNull())) |
+ .Times(Exactly(1)) |
David Yen
2016/02/17 21:16:43
nit: Also remove this ".Times(Exactly(1))"
|
+ .WillRepeatedly(DoAll(SetArgPointee<2>(64), Return())); |
+ |
EXPECT_CALL(gl, GetInteger64v(GL_TIMESTAMP, _)) |
.WillRepeatedly( |
Invoke(this, &GPUTimingFake::FakeGLGetInteger64v)); |