OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/ui/surfaces/display_compositor.h" | 5 #include "services/ui/surfaces/display_compositor.h" |
6 | 6 |
7 #include "cc/output/copy_output_request.h" | 7 #include "cc/output/copy_output_request.h" |
8 #include "cc/output/output_surface.h" | 8 #include "cc/output/output_surface.h" |
9 #include "cc/output/renderer_settings.h" | 9 #include "cc/output/renderer_settings.h" |
10 #include "cc/output/texture_mailbox_deleter.h" | 10 #include "cc/output/texture_mailbox_deleter.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 new cc::DisplayScheduler(synthetic_begin_frame_source.get(), | 65 new cc::DisplayScheduler(synthetic_begin_frame_source.get(), |
66 task_runner_.get(), max_frames_pending)); | 66 task_runner_.get(), max_frames_pending)); |
67 | 67 |
68 display_.reset(new cc::Display( | 68 display_.reset(new cc::Display( |
69 nullptr /* bitmap_manager */, nullptr /* gpu_memory_buffer_manager */, | 69 nullptr /* bitmap_manager */, nullptr /* gpu_memory_buffer_manager */, |
70 cc::RendererSettings(), std::move(synthetic_begin_frame_source), | 70 cc::RendererSettings(), std::move(synthetic_begin_frame_source), |
71 std::move(display_output_surface), std::move(scheduler), | 71 std::move(display_output_surface), std::move(scheduler), |
72 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get()))); | 72 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get()))); |
73 display_->Initialize(this, surfaces_state_->manager(), | 73 display_->Initialize(this, surfaces_state_->manager(), |
74 allocator_.client_id()); | 74 allocator_.client_id()); |
| 75 display_->SetVisible(true); |
75 } | 76 } |
76 | 77 |
77 DisplayCompositor::~DisplayCompositor() { | 78 DisplayCompositor::~DisplayCompositor() { |
78 surfaces_state_->manager()->UnregisterSurfaceFactoryClient( | 79 surfaces_state_->manager()->UnregisterSurfaceFactoryClient( |
79 allocator_.client_id()); | 80 allocator_.client_id()); |
80 surfaces_state_->manager()->InvalidateSurfaceClientId(allocator_.client_id()); | 81 surfaces_state_->manager()->InvalidateSurfaceClientId(allocator_.client_id()); |
81 } | 82 } |
82 | 83 |
83 void DisplayCompositor::SubmitCompositorFrame( | 84 void DisplayCompositor::SubmitCompositorFrame( |
84 cc::CompositorFrame frame, | 85 cc::CompositorFrame frame, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // This notification is not relevant to our client outside of tests. | 128 // This notification is not relevant to our client outside of tests. |
128 } | 129 } |
129 | 130 |
130 void DisplayCompositor::DisplayDidDrawAndSwap() { | 131 void DisplayCompositor::DisplayDidDrawAndSwap() { |
131 // This notification is not relevant to our client outside of tests. We | 132 // This notification is not relevant to our client outside of tests. We |
132 // unblock the client from the DrawCallback when the surface is going to | 133 // unblock the client from the DrawCallback when the surface is going to |
133 // be drawn. | 134 // be drawn. |
134 } | 135 } |
135 | 136 |
136 } // namespace ui | 137 } // namespace ui |
OLD | NEW |