aboutsummaryrefslogtreecommitdiffstats
path: root/support/hololens/App.xaml.cpp
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-07-04 01:03:35 -0400
committerGitHub <noreply@github.com>2019-07-04 01:03:35 -0400
commitb32bff3b9737ac6b6905cb85685a88dc31dc6739 (patch)
tree339ea3843451b1ada831d630bc2f7a0273119304 /support/hololens/App.xaml.cpp
parente2441b27bb072b1c39a4f346074ade6c42bb27f2 (diff)
parent71abf1375de44fa9a599411f00ab0fdc64bfebf5 (diff)
downloadservo-b32bff3b9737ac6b6905cb85685a88dc31dc6739.tar.gz
servo-b32bff3b9737ac6b6905cb85685a88dc31dc6739.zip
Auto merge of #23696 - servo:hl, r=jdm
Add UWP port - bis This is #23658 with some fixes: - removed nspr from DLL dependencies (was breaking VS build) - exclude symbols from header file (was breaking VS build) - rebased Before merging: - please check the rebased commit that introduces the `--uwp` option (things moved around since https://github.com/servo/servo/commit/7c85dc09b59e653caf60cb18d3b3fdea2ba4d4ae) - should we wait until the WR fix lands upstream? <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23696) <!-- Reviewable:end -->
Diffstat (limited to 'support/hololens/App.xaml.cpp')
-rw-r--r--support/hololens/App.xaml.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/support/hololens/App.xaml.cpp b/support/hololens/App.xaml.cpp
new file mode 100644
index 00000000000..e084de34b43
--- /dev/null
+++ b/support/hololens/App.xaml.cpp
@@ -0,0 +1,29 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
+
+#include "pch.h"
+#include "App.xaml.h"
+
+using namespace hlservo;
+
+App::App()
+{
+ InitializeComponent();
+}
+
+void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs ^ e)
+{
+#if _DEBUG
+ if (IsDebuggerPresent()) {
+ DebugSettings->EnableFrameRateCounter = true;
+ }
+#endif
+
+ if (mPage == nullptr) {
+ mPage = ref new OpenGLESPage(&mOpenGLES);
+ }
+
+ Windows::UI::Xaml::Window::Current->Content = mPage;
+ Windows::UI::Xaml::Window::Current->Activate();
+}