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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 display_size_(1920, 1080), | 53 display_size_(1920, 1080), |
54 display_rect_(display_size_), | 54 display_rect_(display_size_), |
55 display_client_(&surface_manager_, | 55 display_client_(&surface_manager_, |
56 &bitmap_manager_, | 56 &bitmap_manager_, |
57 &gpu_memory_buffer_manager_, | 57 &gpu_memory_buffer_manager_, |
58 renderer_settings_, | 58 renderer_settings_, |
59 task_runner_), | 59 task_runner_), |
60 context_provider_(TestContextProvider::Create()), | 60 context_provider_(TestContextProvider::Create()), |
61 surface_display_output_surface_(&surface_manager_, | 61 surface_display_output_surface_(&surface_manager_, |
62 &allocator_, | 62 &allocator_, |
63 context_provider_, | 63 context_provider_) { |
64 nullptr) { | |
65 output_surface_ = display_client_.output_surface(); | 64 output_surface_ = display_client_.output_surface(); |
66 display_client_.set_surface_output_surface( | 65 display_client_.set_surface_output_surface( |
67 &surface_display_output_surface_); | 66 &surface_display_output_surface_); |
68 surface_display_output_surface_.set_display_client(&display_client_); | 67 surface_display_output_surface_.set_display_client(&display_client_); |
69 surface_display_output_surface_.BindToClient( | 68 surface_display_output_surface_.BindToClient( |
70 &surface_display_output_surface_client_); | 69 &surface_display_output_surface_client_); |
71 display_client_.display()->Resize(display_size_); | 70 display_client_.display()->Resize(display_size_); |
72 | 71 |
73 EXPECT_FALSE(surface_display_output_surface_client_ | 72 EXPECT_FALSE(surface_display_output_surface_client_ |
74 .did_lose_output_surface_called()); | 73 .did_lose_output_surface_called()); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 155 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
157 | 156 |
158 SwapBuffersWithDamage(gfx::Rect()); | 157 SwapBuffersWithDamage(gfx::Rect()); |
159 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 158 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
160 task_runner_->RunUntilIdle(); | 159 task_runner_->RunUntilIdle(); |
161 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 160 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
162 } | 161 } |
163 | 162 |
164 } // namespace | 163 } // namespace |
165 } // namespace cc | 164 } // namespace cc |
OLD | NEW |