OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "cc/surfaces/surface_display_output_surface.h" | 5 #include "cc/surfaces/surface_display_output_surface.h" |
6 | 6 |
7 #include "cc/surfaces/onscreen_display_client.h" | 7 #include "cc/surfaces/onscreen_display_client.h" |
8 #include "cc/surfaces/surface_id_allocator.h" | 8 #include "cc/surfaces/surface_id_allocator.h" |
9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
10 #include "cc/test/fake_output_surface.h" | 10 #include "cc/test/fake_output_surface.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 FakeOutputSurface* output_surface() { return fake_output_surface_; } | 42 FakeOutputSurface* output_surface() { return fake_output_surface_; } |
43 | 43 |
44 protected: | 44 protected: |
45 FakeOutputSurface* fake_output_surface_; | 45 FakeOutputSurface* fake_output_surface_; |
46 }; | 46 }; |
47 | 47 |
48 class SurfaceDisplayOutputSurfaceTest : public testing::Test { | 48 class SurfaceDisplayOutputSurfaceTest : public testing::Test { |
49 public: | 49 public: |
50 SurfaceDisplayOutputSurfaceTest() | 50 SurfaceDisplayOutputSurfaceTest() |
51 : now_src_(new base::SimpleTestTickClock()), | 51 : now_src_(new base::SimpleTestTickClock(base::TimeTicks())), |
52 task_runner_(new OrderedSimpleTaskRunner(now_src_.get(), true)), | 52 task_runner_(new OrderedSimpleTaskRunner(now_src_.get(), true)), |
53 allocator_(0), | 53 allocator_(0), |
54 display_size_(1920, 1080), | 54 display_size_(1920, 1080), |
55 display_rect_(display_size_), | 55 display_rect_(display_size_), |
56 display_client_(&surface_manager_, | 56 display_client_(&surface_manager_, |
57 &bitmap_manager_, | 57 &bitmap_manager_, |
58 &gpu_memory_buffer_manager_, | 58 &gpu_memory_buffer_manager_, |
59 renderer_settings_, | 59 renderer_settings_, |
60 task_runner_), | 60 task_runner_), |
61 context_provider_(TestContextProvider::Create()), | 61 context_provider_(TestContextProvider::Create()), |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 157 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
158 | 158 |
159 SwapBuffersWithDamage(gfx::Rect()); | 159 SwapBuffersWithDamage(gfx::Rect()); |
160 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 160 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
161 task_runner_->RunUntilIdle(); | 161 task_runner_->RunUntilIdle(); |
162 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 162 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
163 } | 163 } |
164 | 164 |
165 } // namespace | 165 } // namespace |
166 } // namespace cc | 166 } // namespace cc |
OLD | NEW |