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