diff Framework/Viewport/SdlViewport.cpp @ 907:722ee73e6ba2

cleanup + started to implement WebAssemblyCairoViewport (wip)
author Alain Mazy <alain@mazy.be>
date Thu, 18 Jul 2019 09:19:39 +0200
parents 88bf49aebc13
children 7a7e4e1f558f
line wrap: on
line diff
--- a/Framework/Viewport/SdlViewport.cpp	Wed Jul 17 16:56:53 2019 +0200
+++ b/Framework/Viewport/SdlViewport.cpp	Thu Jul 18 09:19:39 2019 +0200
@@ -78,35 +78,6 @@
     }
   }
 
-//  void SdlCairoViewport::SetSize(unsigned int width,
-//                                 unsigned int height)
-//  {
-    //    if (cairoSurface_.get() == NULL ||
-    //        cairoSurface_->GetWidth() != width ||
-    //        cairoSurface_->GetHeight() != height)
-    //    {
-    //      cairoSurface_.reset(new CairoSurface(width, height, false /* no alpha */));
-
-    //      // TODO Big endian?
-    //      static const uint32_t rmask = 0x00ff0000;
-    //      static const uint32_t gmask = 0x0000ff00;
-    //      static const uint32_t bmask = 0x000000ff;
-
-    //      if (sdlSurface_)
-    //      {
-    //        SDL_FreeSurface(sdlSurface_);
-    //      }
-
-    //      sdlSurface_ = SDL_CreateRGBSurfaceFrom(cairoSurface_->GetBuffer(), width, height, 32,
-    //                                             cairoSurface_->GetPitch(), rmask, gmask, bmask, 0);
-    //      if (!sdlSurface_)
-    //      {
-    //        LOG(ERROR) << "Cannot create a SDL surface from a Cairo surface";
-    //        throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
-    //      }
-    //    }
-//  }
-
 
   void SdlCairoViewport::Refresh()
   {
@@ -114,17 +85,4 @@
     window_.Render(sdlSurface_);
   }
 
-
-  //  void SdlCairoViewport::Render()
-  //  {
-  //    Orthanc::ImageAccessor target;
-  //    compositor_.GetCanvas() cairoSurface_->GetWriteableAccessor(target);
-
-  //    if (viewport.Render(target))
-  //    {
-  //      window_.Render(sdlSurface_);
-  //    }
-  //  }
-
-
 }