[Libreoffice-commits] core.git: vcl/inc vcl/skia

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 20 14:32:08 UTC 2020


 vcl/inc/skia/win/gdiimpl.hxx |    4 ----
 vcl/skia/SkiaHelper.cxx      |    1 -
 vcl/skia/gdiimpl.cxx         |    3 +--
 vcl/skia/salbmp.cxx          |    4 ++--
 vcl/skia/win/gdiimpl.cxx     |   18 ------------------
 5 files changed, 3 insertions(+), 27 deletions(-)

New commits:
commit 552ec2a3e53c5267ee04dca2249fd30983c6a395
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon Jan 20 15:30:13 2020 +0100
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Jan 20 15:31:27 2020 +0100

    remove outdated Skia TODO comments
    
    Change-Id: Ia9925a703a4adca41e056916d285c21e5de4898f

diff --git a/vcl/inc/skia/win/gdiimpl.hxx b/vcl/inc/skia/win/gdiimpl.hxx
index 7f11e4da628c..69ee6ba475af 100644
--- a/vcl/inc/skia/win/gdiimpl.hxx
+++ b/vcl/inc/skia/win/gdiimpl.hxx
@@ -63,11 +63,7 @@ private:
 public:
     WinSkiaSalGraphicsImpl(WinSalGraphics& rGraphics, SalGeometryProvider* mpProvider);
 
-#if 0 // TODO
-    virtual void Init() override;
-#endif
     virtual void DeInit() override;
-
     virtual void freeResources() override;
 
     virtual bool UseRenderNativeControl() const override { return true; }
diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index eff77ae5340f..4ea63f85db8a 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -74,7 +74,6 @@ bool isVCLSkiaEnabled()
 
     bool bRet = false;
     bool bSupportsVCLSkia = supportsVCLSkia();
-    // TODO SKIA always call supportsVCLOpenGL to de-zombie the glxtest child process on X11
     if (bForceSkia)
     {
         bRet = true;
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 1c5474301034..a88f78823382 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -290,7 +290,6 @@ void SkiaSalGraphicsImpl::destroySurface()
         // if this fails, something forgot to use SkAutoCanvasRestore
         assert(mSurface->getCanvas()->getTotalMatrix().isIdentity());
     }
-    // TODO Is this still needed?
     // If we use e.g. Vulkan, we must destroy the surface before the context,
     // otherwise destroying the surface will reference the context. This is
     // handled by calling destroySurface() before destroying the context.
@@ -957,7 +956,7 @@ Color SkiaSalGraphicsImpl::getPixel(long nX, long nY)
     checkSurface();
     SAL_INFO("vcl.skia", "getpixel(" << this << "): " << Point(nX, nY));
     mSurface->getCanvas()->flush();
-    // TODO this is presumably slow, and possibly won't work with GPU surfaces
+    // This is presumably slow, but getPixel() should be generally used only by unit tests.
     SkBitmap bitmap;
     if (!bitmap.tryAllocN32Pixels(GetWidth(), GetHeight()))
         abort();
diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index 568996723011..925e27f6d9a8 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -299,7 +299,7 @@ BitmapBuffer* SkiaSalBitmap::AcquireBuffer(BitmapAccessMode nMode)
 
 void SkiaSalBitmap::ReleaseBuffer(BitmapBuffer* pBuffer, BitmapAccessMode nMode)
 {
-    if (nMode == BitmapAccessMode::Write) // TODO something more?
+    if (nMode == BitmapAccessMode::Write)
     {
 #ifdef DBG_UTIL
         assert(mWriteAccessCount > 0);
@@ -599,7 +599,7 @@ void SkiaSalBitmap::EnsureBitmapData()
 void SkiaSalBitmap::EnsureBitmapUniqueData()
 {
     EnsureBitmapData();
-    // TODO threads?
+    // TODO thread safety?
     if (mBitmap.pixelRef() && !mBitmap.pixelRef()->unique())
     {
         // SkBitmap copies share pixels, so make a deep copy.
diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index ebaa81aa986a..deace0072630 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -25,24 +25,6 @@ WinSkiaSalGraphicsImpl::WinSkiaSalGraphicsImpl(WinSalGraphics& rGraphics,
 {
 }
 
-#if 0 // TODO
-void WinSkiaSalGraphicsImpl::Init()
-{
-    if (!IsOffscreen() && mpContext.is() && mpContext->isInitialized())
-    {
-        const GLWinWindow& rGLWindow = static_cast<const GLWinWindow&>(mpContext->getOpenGLWindow());
-        if (rGLWindow.hWnd != mrWinParent.mhWnd || rGLWindow.hDC == mrWinParent.mhLocalDC)
-        {
-            // This can legitimately happen, SalFrame keeps 2x
-            // SalGraphics which share the same hWnd and hDC.
-            // The shape 'Area' dialog does reparenting to trigger this.
-            SAL_WARN("vcl.opengl", "Unusual: Windows handle / DC changed without DeInit");
-            DeInit();
-        }
-    }
-}
-#endif
-
 void WinSkiaSalGraphicsImpl::createWindowContext()
 {
     // When created, Init() gets called with size (0,0), which is invalid size


More information about the Libreoffice-commits mailing list