OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 "sky/compositor/display_delegate.h" | |
6 | |
7 namespace sky { | |
8 | |
9 static CreateDisplayDelegate createDisplayDelegateFunction = 0; | |
10 | |
11 void DisplayDelegate::setDisplayDelegateCreateFunction(CreateDisplayDelegate cre
ateFunction) | |
12 { | |
13 DCHECK(createFunction); | |
14 DCHECK(!createDisplayDelegateFunction); | |
15 createDisplayDelegateFunction = createFunction; | |
16 } | |
17 | |
18 DisplayDelegate* DisplayDelegate::create(LayerClient* client) | |
19 { | |
20 DCHECK(createDisplayDelegateFunction); | |
21 return createDisplayDelegateFunction(client); | |
22 } | |
23 | |
24 } // namespace sky | |
OLD | NEW |