OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "components/surfaces/display_factory_impl.h" | |
6 | |
7 #include "cc/surfaces/surface_id.h" | |
8 | |
9 namespace surfaces { | |
10 | |
11 DisplayFactoryImpl::DisplayFactoryImpl( | |
12 SurfacesServiceApplication* application, | |
13 cc::SurfaceManager* manager, | |
14 uint32_t id_namespace, | |
15 SurfacesScheduler* scheduler, | |
16 mojo::InterfaceRequest<mojo::DisplayFactory> request) | |
17 : id_namespace_(id_namespace), | |
18 next_local_id_(1u), | |
19 application_(application), | |
20 scheduler_(scheduler), | |
21 manager_(manager), | |
22 binding_(this, request.Pass()) { | |
23 } | |
24 | |
25 DisplayFactoryImpl::~DisplayFactoryImpl() { | |
26 } | |
27 | |
28 void DisplayFactoryImpl::Create( | |
29 mojo::ContextProviderPtr context_provider, | |
30 mojo::ResourceReturnerPtr returner, | |
31 mojo::InterfaceRequest<mojo::Display> display_request) { | |
32 cc::SurfaceId cc_id(static_cast<uint64_t>(id_namespace_) << 32 | | |
33 next_local_id_++); | |
34 new DisplayImpl(application_, manager_, cc_id, scheduler_, | |
35 context_provider.Pass(), returner.Pass(), | |
36 display_request.Pass()); | |
37 } | |
38 | |
39 } // namespace surfaces | |
OLD | NEW |