Mercurial > hg > orthanc-stone
comparison Framework/Viewport/WebAssemblyViewport.h @ 1054:3c9529edf5fd
fixing WebAssemblyViewport
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 10 Oct 2019 15:55:54 +0200 |
parents | 6a9300ecfa13 |
children | af456106576c |
comparison
equal
deleted
inserted
replaced
1053:32b403a47b19 | 1054:3c9529edf5fd |
---|---|
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() ORTHANC_OVERRIDE | 61 virtual bool HasCompositor() const ORTHANC_OVERRIDE |
62 { | 62 { |
63 return compositor_.get(); | 63 return (compositor_.get() != NULL); |
64 } | 64 } |
65 | |
66 virtual ICompositor& GetCompositor() ORTHANC_OVERRIDE; | |
65 | 67 |
66 virtual void Refresh() ORTHANC_OVERRIDE; | 68 virtual void Refresh() ORTHANC_OVERRIDE; |
67 | 69 |
68 // this does NOT return whether the context is lost! This is called to | 70 // this does NOT return whether the context is lost! This is called to |
69 // tell Stone that the context has been lost | 71 // tell Stone that the context has been lost |
91 WebAssemblyCairoViewport(const std::string& canvas, | 93 WebAssemblyCairoViewport(const std::string& canvas, |
92 boost::shared_ptr<Scene2D>& scene); | 94 boost::shared_ptr<Scene2D>& scene); |
93 | 95 |
94 void UpdateSize(); | 96 void UpdateSize(); |
95 | 97 |
96 virtual void Refresh(); | 98 virtual void Refresh() ORTHANC_OVERRIDE; |
97 | 99 |
98 virtual ICompositor* GetCompositor() | 100 virtual bool HasCompositor() const ORTHANC_OVERRIDE |
99 { | 101 { |
100 return &compositor_; | 102 return true; |
103 } | |
104 | |
105 virtual ICompositor& GetCompositor() ORTHANC_OVERRIDE | |
106 { | |
107 return compositor_; | |
101 } | 108 } |
102 }; | 109 }; |
103 } | 110 } |