changeset 1051:7fad86d62135

removed unused abstraction IOpenGLContextLossMonitor
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Oct 2019 14:37:07 +0200
parents d393ad9cf68c
children 0cc62db7e61b
files Framework/OpenGL/IOpenGLContextLossMonitor.h Framework/OpenGL/WebAssemblyOpenGLContext.h
diffstat 2 files changed, 8 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/OpenGL/IOpenGLContextLossMonitor.h	Thu Oct 10 14:31:56 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/**
- * Stone of Orthanc
- * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
- * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2019 Osimis S.A., Belgium
- *
- * This program is free software: you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- **/
-
-#pragma once
-
-namespace OrthancStone
-{
-  namespace OpenGL
-  {
-    class IOpenGLContextLossMonitor : public boost::noncopyable
-    {
-    public:
-      virtual ~IOpenGLContextLossMonitor()
-      {
-      }
-
-      virtual void* DebugGetInternalContext() const = 0;
-
-      // This is for manual context loss (debug purposes)
-      virtual void SetLostContext() = 0;
-      virtual void RestoreLostContext() = 0;
-    };
-  }
-}
--- a/Framework/OpenGL/WebAssemblyOpenGLContext.h	Thu Oct 10 14:31:56 2019 +0200
+++ b/Framework/OpenGL/WebAssemblyOpenGLContext.h	Thu Oct 10 14:37:07 2019 +0200
@@ -38,7 +38,6 @@
 #endif
 
 #include "IOpenGLContext.h"
-#include "IOpenGLContextLossMonitor.h"
 
 #include <Core/Enumerations.h>
 
@@ -48,9 +47,7 @@
 {
   namespace OpenGL
   {
-    class WebAssemblyOpenGLContext :
-      public OpenGL::IOpenGLContext,
-      public OpenGL::IOpenGLContextLossMonitor
+    class WebAssemblyOpenGLContext : public OpenGL::IOpenGLContext
     {
     private:
       class PImpl;
@@ -61,9 +58,6 @@
 
       virtual bool IsContextLost() ORTHANC_OVERRIDE;
 
-      virtual void SetLostContext() ORTHANC_OVERRIDE;
-      virtual void RestoreLostContext() ORTHANC_OVERRIDE;
-
       virtual void MakeCurrent() ORTHANC_OVERRIDE;
 
       virtual void SwapBuffer() ORTHANC_OVERRIDE;
@@ -72,8 +66,6 @@
 
       virtual unsigned int GetCanvasHeight() const ORTHANC_OVERRIDE;
 
-      virtual void* DebugGetInternalContext() const ORTHANC_OVERRIDE;
-
       /**
       Returns true if the underlying context has been successfully recreated
       */
@@ -82,6 +74,13 @@
       void UpdateSize();
 
       const std::string& GetCanvasIdentifier() const;
+
+
+      /**
+       * This is for manual context loss (debug purposes)
+       **/
+      void* DebugGetInternalContext() const;
+      void SetLostContext();
     };
   }
 }