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