[Libreoffice-commits] core.git: vcl/inc vcl/opengl
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Wed Aug 31 11:14:03 UTC 2016
vcl/inc/opengl/bmpop.hxx | 35 -----------------------------------
vcl/inc/opengl/salbmp.hxx | 5 +----
vcl/opengl/salbmp.cxx | 31 +------------------------------
3 files changed, 2 insertions(+), 69 deletions(-)
New commits:
commit 6d361d86f72d33fac41847b80883c524580f4cf3
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Wed Aug 31 15:52:58 2016 +0900
opengl: remove unsused "bitmap ops" in GL backend
Change-Id: I188570d11349a5344753f3948daedf0e17806c6c
Reviewed-on: https://gerrit.libreoffice.org/28536
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/inc/opengl/bmpop.hxx b/vcl/inc/opengl/bmpop.hxx
deleted file mode 100644
index d19410b..0000000
--- a/vcl/inc/opengl/bmpop.hxx
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_VCL_INC_OPENGL_BMPOP_H
-#define INCLUDED_VCL_INC_OPENGL_BMPOP_H
-
-class OpenGLSalBitmapOp
-{
-public:
- OpenGLSalBitmapOp() {};
- virtual ~OpenGLSalBitmapOp() {};
-
- virtual bool Execute() = 0;
- virtual void GetSize( Size& rSize ) const = 0;
-};
-
-#endif // INCLUDED_VCL_INC_OPENGL_BMPOP_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/opengl/salbmp.hxx b/vcl/inc/opengl/salbmp.hxx
index 771c4aa..59e18592 100644
--- a/vcl/inc/opengl/salbmp.hxx
+++ b/vcl/inc/opengl/salbmp.hxx
@@ -23,7 +23,6 @@
#include <vcl/opengl/OpenGLContext.hxx>
#include <vcl/salbtype.hxx>
-#include "opengl/bmpop.hxx"
#include "opengl/texture.hxx"
#include <salbmp.hxx>
@@ -45,7 +44,6 @@ private:
sal_uInt16 mnBytesPerRow;
int mnWidth;
int mnHeight;
- std::deque< OpenGLSalBitmapOp* > maPendingOps;
virtual void updateChecksum() const override;
@@ -71,7 +69,7 @@ public:
Size GetSize() const override;
sal_uInt16 GetBitCount() const override;
- BitmapBuffer *AcquireBuffer( BitmapAccessMode nMode ) override;
+ BitmapBuffer* AcquireBuffer( BitmapAccessMode nMode ) override;
void ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode ) override;
bool GetSystemData( BitmapSystemData& rData ) override;
@@ -89,7 +87,6 @@ public:
private:
- void ExecuteOperations();
GLuint CreateTexture();
bool AllocateUserData();
bool ReadTexture();
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index bb9bc7e..af93401 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -230,8 +230,6 @@ OpenGLTexture& OpenGLSalBitmap::GetTexture() const
OpenGLSalBitmap* pThis = const_cast<OpenGLSalBitmap*>(this);
if( !maTexture || mbDirtyTexture )
pThis->CreateTexture();
- else if( !maPendingOps.empty() )
- pThis->ExecuteOperations();
VCL_GL_INFO( "Got texture " << maTexture.Id() );
return pThis->maTexture;
}
@@ -241,7 +239,6 @@ void OpenGLSalBitmap::Destroy()
OpenGLZone aZone;
VCL_GL_INFO("Destroy OpenGLSalBitmap texture:" << maTexture.Id());
- maPendingOps.clear();
maTexture = OpenGLTexture();
mpUserBuffer.reset();
}
@@ -461,25 +458,7 @@ public:
Size OpenGLSalBitmap::GetSize() const
{
- OpenGLZone aZone;
-
- std::deque< OpenGLSalBitmapOp* >::const_iterator it = maPendingOps.begin();
- Size aSize( mnWidth, mnHeight );
-
- while( it != maPendingOps.end() )
- (*it++)->GetSize( aSize );
-
- return aSize;
-}
-
-void OpenGLSalBitmap::ExecuteOperations()
-{
- while( !maPendingOps.empty() )
- {
- OpenGLSalBitmapOp* pOp = maPendingOps.front();
- pOp->Execute();
- maPendingOps.pop_front();
- }
+ return Size(mnWidth, mnHeight);
}
GLuint OpenGLSalBitmap::CreateTexture()
@@ -561,7 +540,6 @@ GLuint OpenGLSalBitmap::CreateTexture()
if( bAllocated )
delete[] pData;
- ExecuteOperations();
mbDirtyTexture = false;
CHECK_GL_ERROR();
@@ -777,13 +755,6 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode )
if( maTexture && !ReadTexture() )
return nullptr;
}
-
- if( !maPendingOps.empty() )
- {
- VCL_GL_INFO( "** Creating texture and reading it back immediately" );
- if( !CreateTexture() || !AllocateUserData() || !ReadTexture() )
- return nullptr;
- }
}
// mpUserBuffer must be unique when we are doing the write access
More information about the Libreoffice-commits
mailing list