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 "base/macros.h" |
5 #include "base/thread_task_runner_handle.h" | 6 #include "base/thread_task_runner_handle.h" |
6 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
7 #include "cc/test/fake_output_surface_client.h" | 8 #include "cc/test/fake_output_surface_client.h" |
8 #include "content/browser/compositor/software_browser_compositor_output_surface.
h" | 9 #include "content/browser/compositor/software_browser_compositor_output_surface.
h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "ui/compositor/compositor.h" | 11 #include "ui/compositor/compositor.h" |
11 #include "ui/compositor/test/context_factories_for_test.h" | 12 #include "ui/compositor/test/context_factories_for_test.h" |
12 #include "ui/gfx/vsync_provider.h" | 13 #include "ui/gfx/vsync_provider.h" |
13 | 14 |
14 namespace { | 15 namespace { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 FakeVSyncProvider* vsync_provider = static_cast<FakeVSyncProvider*>( | 134 FakeVSyncProvider* vsync_provider = static_cast<FakeVSyncProvider*>( |
134 output_surface_->software_device()->GetVSyncProvider()); | 135 output_surface_->software_device()->GetVSyncProvider()); |
135 EXPECT_EQ(0, vsync_provider->call_count()); | 136 EXPECT_EQ(0, vsync_provider->call_count()); |
136 | 137 |
137 cc::CompositorFrame frame; | 138 cc::CompositorFrame frame; |
138 output_surface_->SwapBuffers(&frame); | 139 output_surface_->SwapBuffers(&frame); |
139 | 140 |
140 EXPECT_EQ(1, output_surface_client.swap_count()); | 141 EXPECT_EQ(1, output_surface_client.swap_count()); |
141 EXPECT_EQ(1, vsync_provider->call_count()); | 142 EXPECT_EQ(1, vsync_provider->call_count()); |
142 } | 143 } |
OLD | NEW |