| 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 "components/mus/surfaces/top_level_display_client.h" | 5 #include "components/mus/surfaces/top_level_display_client.h" |
| 6 | 6 |
| 7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
| 8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
| 9 #include "cc/scheduler/begin_frame_source.h" | 9 #include "cc/scheduler/begin_frame_source.h" |
| 10 #include "cc/surfaces/display.h" | 10 #include "cc/surfaces/display.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| 29 TopLevelDisplayClient::TopLevelDisplayClient( | 29 TopLevelDisplayClient::TopLevelDisplayClient( |
| 30 gfx::AcceleratedWidget widget, | 30 gfx::AcceleratedWidget widget, |
| 31 const scoped_refptr<GpuState>& gpu_state, | 31 const scoped_refptr<GpuState>& gpu_state, |
| 32 const scoped_refptr<SurfacesState>& surfaces_state) | 32 const scoped_refptr<SurfacesState>& surfaces_state) |
| 33 : task_runner_(base::ThreadTaskRunnerHandle::Get()), | 33 : task_runner_(base::ThreadTaskRunnerHandle::Get()), |
| 34 surfaces_state_(surfaces_state), | 34 surfaces_state_(surfaces_state), |
| 35 factory_(surfaces_state->manager(), this), | 35 factory_(surfaces_state->manager(), this), |
| 36 cc_id_(static_cast<uint64_t>(surfaces_state->next_id_namespace()) << 32) { | 36 cc_id_(cc::SurfaceId::FromUnsafeValue( |
| 37 static_cast<uint64_t>(surfaces_state->next_id_namespace()) << 32)) { |
| 37 factory_.Create(cc_id_); | 38 factory_.Create(cc_id_); |
| 38 | 39 |
| 39 display_.reset(new cc::Display(this, surfaces_state_->manager(), nullptr, | 40 display_.reset(new cc::Display(this, surfaces_state_->manager(), nullptr, |
| 40 nullptr, cc::RendererSettings())); | 41 nullptr, cc::RendererSettings())); |
| 41 | 42 |
| 42 scoped_ptr<cc::OutputSurface> output_surface = | 43 scoped_ptr<cc::OutputSurface> output_surface = |
| 43 make_scoped_ptr(new DirectOutputSurface( | 44 make_scoped_ptr(new DirectOutputSurface( |
| 44 new SurfacesContextProvider(this, widget, gpu_state))); | 45 new SurfacesContextProvider(this, widget, gpu_state))); |
| 45 | 46 |
| 46 int max_frames_pending = output_surface->capabilities().max_frames_pending; | 47 int max_frames_pending = output_surface->capabilities().max_frames_pending; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // TODO(fsamuel): Implement this. | 113 // TODO(fsamuel): Implement this. |
| 113 } | 114 } |
| 114 | 115 |
| 115 void TopLevelDisplayClient::SetBeginFrameSource( | 116 void TopLevelDisplayClient::SetBeginFrameSource( |
| 116 cc::SurfaceId surface_id, | 117 cc::SurfaceId surface_id, |
| 117 cc::BeginFrameSource* begin_frame_source) { | 118 cc::BeginFrameSource* begin_frame_source) { |
| 118 // TODO(tansell): Implement this. | 119 // TODO(tansell): Implement this. |
| 119 } | 120 } |
| 120 | 121 |
| 121 } // namespace mus | 122 } // namespace mus |
| OLD | NEW |