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