changeset 1565:b8b4cb58a874

removed unnecessary include
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 17 Sep 2020 15:19:48 +0200
parents e731e62692a9
children a80363b15235
files Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp	Thu Sep 17 15:18:21 2020 +0200
+++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp	Thu Sep 17 15:19:48 2020 +0200
@@ -56,7 +56,6 @@
 // Orthanc framework includes
 #include <Cache/MemoryObjectCache.h>
 #include <DicomFormat/DicomArray.h>
-#include <DicomParsing/Internals/DicomImageDecoder.h>
 #include <DicomParsing/ParsedDicomFile.h>
 #include <Images/Image.h>
 #include <Images/ImageProcessing.h>
--- a/OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp	Thu Sep 17 15:18:21 2020 +0200
+++ b/OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp	Thu Sep 17 15:19:48 2020 +0200
@@ -207,7 +207,15 @@
 
   void WebAssemblyViewport::Invalidate()
   {
-    emscripten_request_animation_frame(OnRequestAnimationFrame, reinterpret_cast<void*>(this));
+    if (compositor_.get() != NULL &&
+        controller_ /* should always be true */)
+    {
+      printf("TOTO3\n");
+      UpdateSize(*compositor_);
+      OnRequestAnimationFrame(0, reinterpret_cast<void*>(this));
+    }
+    
+    //emscripten_request_animation_frame(OnRequestAnimationFrame, reinterpret_cast<void*>(this));
   }
 
   void WebAssemblyViewport::AcquireCompositor(ICompositor* compositor /* takes ownership */)