changeset 1578:1f812f4c95be

comments
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 24 Sep 2020 17:20:36 +0200
parents e8a120dd05bd
children c476b0d5e59c
files Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp OrthancStone/Sources/OpenGL/WebAssemblyOpenGLContext.cpp OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp OrthancStone/Sources/Viewport/WebAssemblyViewport.h
diffstat 4 files changed, 8 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp	Thu Sep 24 16:51:14 2020 +0200
+++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp	Thu Sep 24 17:20:36 2020 +0200
@@ -1907,9 +1907,7 @@
     viewport_->AcquireInteractor(interactor.release());
   }
 
-
-
-  void FitForPrint()  // TODO - REMOVE
+  void FitForPrint()
   {
     viewport_->FitForPrint();
   }
@@ -2468,7 +2466,7 @@
 
 
   EMSCRIPTEN_KEEPALIVE
-  void FitForPrint()  // TODO - REMOVE
+  void FitForPrint()
   {
     try
     {
--- a/OrthancStone/Sources/OpenGL/WebAssemblyOpenGLContext.cpp	Thu Sep 24 16:51:14 2020 +0200
+++ b/OrthancStone/Sources/OpenGL/WebAssemblyOpenGLContext.cpp	Thu Sep 24 17:20:36 2020 +0200
@@ -50,13 +50,11 @@
         EmscriptenWebGLContextAttributes attr; 
         emscripten_webgl_init_context_attributes(&attr);
 
-#if 1
-        // The next line might be necessary to print on Firefox 71
-        // using WebGL. Sometimes, if set to "false" (the default
-        // value), the canvas was rendered as a fully white or black
-        // area. UNCONFIRMED, so disabled.
+        // The next line might be necessary to print using
+        // WebGL. Sometimes, if set to "false" (the default value),
+        // the canvas was rendered as a fully white or black
+        // area. UNCONFIRMED.
         attr.preserveDrawingBuffer = true;
-#endif
 
         context_ = emscripten_webgl_create_context(canvasSelector.c_str(), &attr);
         if (context_ == 0)
--- a/OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp	Thu Sep 24 16:51:14 2020 +0200
+++ b/OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp	Thu Sep 24 17:20:36 2020 +0200
@@ -223,7 +223,7 @@
     {
       RefreshCanvasSize();
       compositor_->FitContent(controller_->GetScene());
-      OnRequestAnimationFrame(0, reinterpret_cast<void*>(this));
+      OnRequestAnimationFrame(0, reinterpret_cast<void*>(this));  // Mandatory to work with Firefox
     }
   }
 
--- a/OrthancStone/Sources/Viewport/WebAssemblyViewport.h	Thu Sep 24 16:51:14 2020 +0200
+++ b/OrthancStone/Sources/Viewport/WebAssemblyViewport.h	Thu Sep 24 17:20:36 2020 +0200
@@ -134,6 +134,6 @@
       return canvasCssSelector_;
     }
 
-    void FitForPrint();  // TODO - REMOVE
+    void FitForPrint();
   };
 }