Mercurial > hg > orthanc-stone
comparison Framework/Viewport/WebAssemblyViewport.h @ 947:1091b2adeb5a toa2019081001
Fixed animation frame stopping when returning false + big work on the OpenGL
objects to make them lost context-safe + debug code to forcefully tag a
context as lost + debug macros
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Sat, 10 Aug 2019 13:07:31 +0200 |
parents | 685c9a2d115f |
children | a7351ad54960 |
comparison
equal
deleted
inserted
replaced
946:dbe3e1e47019 | 947:1091b2adeb5a |
---|---|
56 boost::shared_ptr<Scene2D>& scene); | 56 boost::shared_ptr<Scene2D>& scene); |
57 | 57 |
58 // This function must be called each time the browser window is resized | 58 // This function must be called each time the browser window is resized |
59 void UpdateSize(); | 59 void UpdateSize(); |
60 | 60 |
61 virtual ICompositor& GetCompositor() | 61 virtual ICompositor* GetCompositor() ORTHANC_OVERRIDE |
62 { | 62 { |
63 return *compositor_; | 63 return compositor_.get(); |
64 } | 64 } |
65 | |
66 virtual void Refresh() ORTHANC_OVERRIDE; | |
65 | 67 |
66 bool OpenGLContextLost(); | 68 bool OpenGLContextLost(); |
67 bool OpenGLContextRestored(); | 69 bool OpenGLContextRestored(); |
68 | 70 |
69 private: | 71 private: |
72 virtual void DisableCompositor() ORTHANC_OVERRIDE; | |
73 virtual void RestoreCompositor() ORTHANC_OVERRIDE; | |
74 | |
70 void RegisterContextCallbacks(); | 75 void RegisterContextCallbacks(); |
71 }; | 76 }; |
72 | 77 |
73 class WebAssemblyCairoViewport : public WebAssemblyViewport | 78 class WebAssemblyCairoViewport : public WebAssemblyViewport |
74 { | 79 { |
84 | 89 |
85 void UpdateSize(); | 90 void UpdateSize(); |
86 | 91 |
87 virtual void Refresh(); | 92 virtual void Refresh(); |
88 | 93 |
89 virtual ICompositor& GetCompositor() | 94 virtual ICompositor* GetCompositor() |
90 { | 95 { |
91 return compositor_; | 96 return &compositor_; |
92 } | 97 } |
93 }; | 98 }; |
94 | 99 |
95 } | 100 } |