OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_HOST_HOST_ATTRIBUTES_WIN_H_ | |
6 #define REMOTING_HOST_HOST_ATTRIBUTES_WIN_H_ | |
7 | |
8 #include "remoting/host/host_attributes.h" | |
9 #include "third_party/webrtc/modules/desktop_capture/win/screen_capturer_win_dir ectx.h" | |
10 | |
11 namespace remoting { | |
12 | |
13 namespace { | |
14 | |
15 inline constexpr bool IsDebug() { | |
Sergey Ulanov
2016/11/07 20:11:33
I don't think that putting this in the per-platfor
Hzj_jie
2016/11/08 01:29:54
Done.
| |
16 #if defined(NDEBUG) | |
17 return false; | |
18 #else | |
19 return true; | |
20 #endif | |
21 } | |
22 | |
23 } // namespace | |
24 | |
25 // TODO(zijiehe): Add DirectX version attributes. Blocked by change | |
26 // https://codereview.chromium.org/2468083002/. | |
27 static StaticAttribute kStaticAttributes[] = { | |
Hzj_jie
2016/11/05 05:29:28
MSVC does not allow to change the value of a const
| |
28 StaticAttribute::Create( { "Debug-Build", &IsDebug } ), | |
Hzj_jie
2016/11/05 05:29:28
MSVC does not allow sizeof(int[0]), i.e. size of a
Sergey Ulanov
2016/11/07 20:11:33
StaticAttribute::Create() is not constexpr, so thi
Hzj_jie
2016/11/08 01:29:54
I think requiring static initializer or not depend
Sergey Ulanov
2016/11/08 20:11:05
I think if an attributes cannot be evaluated in co
Hzj_jie
2016/11/09 02:37:52
Yes, that's a good opinion, for expensive but cach
| |
29 }; | |
30 static constexpr DynamicAttribute kDynamicAttributes[] = { | |
31 { "DirectX-Capturer", &webrtc::ScreenCapturerWinDirectx::IsSupported }, | |
32 }; | |
33 | |
34 } // namespace remoting | |
35 | |
36 #endif // REMOTING_HOST_HOST_ATTRIBUTES_WIN_H_ | |
OLD | NEW |