# HG changeset patch # User Sebastien Jodogne # Date 1600960836 -7200 # Node ID 1f812f4c95beebc80ede16a0b4a9b4a6786791e5 # Parent e8a120dd05bd0eb4c8984dd46c40cefb25603b60 comments diff -r e8a120dd05bd -r 1f812f4c95be Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp --- 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 { diff -r e8a120dd05bd -r 1f812f4c95be OrthancStone/Sources/OpenGL/WebAssemblyOpenGLContext.cpp --- 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) diff -r e8a120dd05bd -r 1f812f4c95be OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp --- 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(this)); + OnRequestAnimationFrame(0, reinterpret_cast(this)); // Mandatory to work with Firefox } } diff -r e8a120dd05bd -r 1f812f4c95be OrthancStone/Sources/Viewport/WebAssemblyViewport.h --- 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(); }; }