| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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()), |
| 62 surface_display_output_surface_(&surface_manager_, | 62 surface_display_output_surface_(&surface_manager_, |
| 63 &allocator_, | 63 &allocator_, |
| 64 context_provider_, | 64 context_provider_, |
| 65 nullptr) { | 65 nullptr) { |
| 66 surface_manager_.RegisterSurfaceIdNamespace(allocator_.id_namespace()); |
| 66 output_surface_ = display_client_.output_surface(); | 67 output_surface_ = display_client_.output_surface(); |
| 67 display_client_.set_surface_output_surface( | 68 display_client_.set_surface_output_surface( |
| 68 &surface_display_output_surface_); | 69 &surface_display_output_surface_); |
| 69 surface_display_output_surface_.set_display_client(&display_client_); | 70 surface_display_output_surface_.set_display_client(&display_client_); |
| 70 surface_display_output_surface_.BindToClient( | 71 surface_display_output_surface_.BindToClient( |
| 71 &surface_display_output_surface_client_); | 72 &surface_display_output_surface_client_); |
| 72 display_client_.display()->Resize(display_size_); | 73 display_client_.display()->Resize(display_size_); |
| 73 | 74 |
| 74 EXPECT_FALSE(surface_display_output_surface_client_ | 75 EXPECT_FALSE(surface_display_output_surface_client_ |
| 75 .did_lose_output_surface_called()); | 76 .did_lose_output_surface_called()); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 158 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
| 158 | 159 |
| 159 SwapBuffersWithDamage(gfx::Rect()); | 160 SwapBuffersWithDamage(gfx::Rect()); |
| 160 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 161 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
| 161 task_runner_->RunUntilIdle(); | 162 task_runner_->RunUntilIdle(); |
| 162 EXPECT_EQ(1u, output_surface_->num_sent_frames()); | 163 EXPECT_EQ(1u, output_surface_->num_sent_frames()); |
| 163 } | 164 } |
| 164 | 165 |
| 165 } // namespace | 166 } // namespace |
| 166 } // namespace cc | 167 } // namespace cc |
| OLD | NEW |