diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-07-04 01:03:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-04 01:03:35 -0400 |
commit | b32bff3b9737ac6b6905cb85685a88dc31dc6739 (patch) | |
tree | 339ea3843451b1ada831d630bc2f7a0273119304 /support/hololens/OpenGLESPage.xaml.h | |
parent | e2441b27bb072b1c39a4f346074ade6c42bb27f2 (diff) | |
parent | 71abf1375de44fa9a599411f00ab0fdc64bfebf5 (diff) | |
download | servo-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/OpenGLESPage.xaml.h')
-rw-r--r-- | support/hololens/OpenGLESPage.xaml.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/support/hololens/OpenGLESPage.xaml.h b/support/hololens/OpenGLESPage.xaml.h new file mode 100644 index 00000000000..ab2c8c2fd80 --- /dev/null +++ b/support/hololens/OpenGLESPage.xaml.h @@ -0,0 +1,37 @@ +/* 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/. */ + +#pragma once + +#include "OpenGLES.h" +#include "OpenGLESPage.g.h" +#include "Servo.h" + +namespace hlservo { +public +ref class OpenGLESPage sealed { +public: + OpenGLESPage(); + virtual ~OpenGLESPage(); + + internal : OpenGLESPage(OpenGLES* openGLES); + +private: + void OnPageLoaded(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e); + void OnVisibilityChanged(Windows::UI::Core::CoreWindow ^ sender, + Windows::UI::Core::VisibilityChangedEventArgs ^ args); + void CreateRenderSurface(); + void DestroyRenderSurface(); + void RecoverFromLostDevice(); + void StartRenderLoop(); + void StopRenderLoop(); + + OpenGLES* mOpenGLES; + + EGLSurface mRenderSurface; + Concurrency::critical_section mRenderSurfaceCriticalSection; + Windows::Foundation::IAsyncAction ^ mRenderLoopWorker; + Servo* mServo; +}; +} |