Kaydet (Commit) f7274c63 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

canvas: whitespace/comments cleanup

The more redundant cases of whitespace/comments had to go...

Change-Id: Id0bfab5f60f123c0a4d3d9f8468791e0d8046225
üst 849f1d37
...@@ -404,7 +404,6 @@ namespace canvas ...@@ -404,7 +404,6 @@ namespace canvas
} }
} }
// Sprite interface
bool CanvasCustomSpriteHelper::isAreaUpdateOpaque( const ::basegfx::B2DRange& rUpdateArea ) const bool CanvasCustomSpriteHelper::isAreaUpdateOpaque( const ::basegfx::B2DRange& rUpdateArea ) const
{ {
if( !mbIsCurrClipRectangle || if( !mbIsCurrClipRectangle ||
...@@ -427,8 +426,6 @@ namespace canvas ...@@ -427,8 +426,6 @@ namespace canvas
} }
} }
::basegfx::B2DRange CanvasCustomSpriteHelper::getUpdateArea( const ::basegfx::B2DRange& rBounds ) const ::basegfx::B2DRange CanvasCustomSpriteHelper::getUpdateArea( const ::basegfx::B2DRange& rBounds ) const
{ {
// Internal! Only call with locked object mutex! // Internal! Only call with locked object mutex!
...@@ -460,7 +457,6 @@ namespace canvas ...@@ -460,7 +457,6 @@ namespace canvas
maPosition + maCurrClipBounds.getMaximum() ); maPosition + maCurrClipBounds.getMaximum() );
} }
::basegfx::B2DRange CanvasCustomSpriteHelper::getFullSpriteRect() const ::basegfx::B2DRange CanvasCustomSpriteHelper::getFullSpriteRect() const
{ {
// Internal! Only call with locked object mutex! // Internal! Only call with locked object mutex!
......
...@@ -23,15 +23,6 @@ ...@@ -23,15 +23,6 @@
namespace canvas namespace canvas
{ {
// PageManager
// PageManager::allocateSpace
FragmentSharedPtr PageManager::allocateSpace( const ::basegfx::B2ISize& rSize ) FragmentSharedPtr PageManager::allocateSpace( const ::basegfx::B2ISize& rSize )
{ {
// we are asked to find a location for the requested size. // we are asked to find a location for the requested size.
...@@ -74,10 +65,6 @@ namespace canvas ...@@ -74,10 +65,6 @@ namespace canvas
return pFragment; return pFragment;
} }
// PageManager::free
void PageManager::free( const FragmentSharedPtr& pFragment ) void PageManager::free( const FragmentSharedPtr& pFragment )
{ {
// erase the reference to the given fragment from our // erase the reference to the given fragment from our
...@@ -94,10 +81,6 @@ namespace canvas ...@@ -94,10 +81,6 @@ namespace canvas
pFragment->free(pFragment); pFragment->free(pFragment);
} }
// PageManager::nakedFragment
void PageManager::nakedFragment( const FragmentSharedPtr& pFragment ) void PageManager::nakedFragment( const FragmentSharedPtr& pFragment )
{ {
if(maPages.empty()) if(maPages.empty())
...@@ -151,10 +134,6 @@ namespace canvas ...@@ -151,10 +134,6 @@ namespace canvas
} }
} }
// PageManager::relocate
bool PageManager::relocate( const FragmentSharedPtr& pFragment ) bool PageManager::relocate( const FragmentSharedPtr& pFragment )
{ {
// the fragment passed as argument is assumed to // the fragment passed as argument is assumed to
...@@ -181,29 +160,16 @@ namespace canvas ...@@ -181,29 +160,16 @@ namespace canvas
return false; return false;
} }
// PageManager::validatePages
void PageManager::validatePages() void PageManager::validatePages()
{ {
for( const auto& rPagePtr : maPages ) for( const auto& rPagePtr : maPages )
rPagePtr->validate(); rPagePtr->validate();
} }
// PageManager::getPageSize
::basegfx::B2ISize PageManager::getPageSize() const ::basegfx::B2ISize PageManager::getPageSize() const
{ {
return mpRenderModule->getPageSize(); return mpRenderModule->getPageSize();
} }
// PageManager::getRenderModule
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -28,11 +28,6 @@ ...@@ -28,11 +28,6 @@
namespace canvas namespace canvas
{ {
// Surface::Surface
Surface::Surface( const PageManagerSharedPtr& rPageManager, Surface::Surface( const PageManagerSharedPtr& rPageManager,
const IColorBufferSharedPtr& rColorBuffer, const IColorBufferSharedPtr& rColorBuffer,
const ::basegfx::B2IPoint& rPos, const ::basegfx::B2IPoint& rPos,
...@@ -46,29 +41,17 @@ namespace canvas ...@@ -46,29 +41,17 @@ namespace canvas
{ {
} }
// Surface::~Surface
Surface::~Surface() Surface::~Surface()
{ {
if(mpFragment) if(mpFragment)
mpPageManager->free(mpFragment); mpPageManager->free(mpFragment);
} }
// Surface::getUVCoords
void Surface::setColorBufferDirty() void Surface::setColorBufferDirty()
{ {
mbIsDirty=true; mbIsDirty=true;
} }
// Surface::getUVCoords
basegfx::B2DRectangle Surface::getUVCoords() const basegfx::B2DRectangle Surface::getUVCoords() const
{ {
::basegfx::B2ISize aPageSize(mpPageManager->getPageSize()); ::basegfx::B2ISize aPageSize(mpPageManager->getPageSize());
...@@ -89,10 +72,6 @@ namespace canvas ...@@ -89,10 +72,6 @@ namespace canvas
(oy+sy)/ph ); (oy+sy)/ph );
} }
// Surface::getUVCoords
basegfx::B2DRectangle Surface::getUVCoords( const ::basegfx::B2IPoint& rPos, basegfx::B2DRectangle Surface::getUVCoords( const ::basegfx::B2IPoint& rPos,
const ::basegfx::B2ISize& rSize ) const const ::basegfx::B2ISize& rSize ) const
{ {
...@@ -111,10 +90,6 @@ namespace canvas ...@@ -111,10 +90,6 @@ namespace canvas
(oy+sy)/ph ); (oy+sy)/ph );
} }
// Surface::draw
bool Surface::draw( double fAlpha, bool Surface::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos, const ::basegfx::B2DPoint& rPos,
const ::basegfx::B2DHomMatrix& rTransform ) const ::basegfx::B2DHomMatrix& rTransform )
...@@ -211,10 +186,6 @@ namespace canvas ...@@ -211,10 +186,6 @@ namespace canvas
return !(pRenderModule->isError()); return !(pRenderModule->isError());
} }
// Surface::drawRectangularArea
bool Surface::drawRectangularArea( bool Surface::drawRectangularArea(
double fAlpha, double fAlpha,
const ::basegfx::B2DPoint& rPos, const ::basegfx::B2DPoint& rPos,
...@@ -337,10 +308,6 @@ namespace canvas ...@@ -337,10 +308,6 @@ namespace canvas
return !(pRenderModule->isError()); return !(pRenderModule->isError());
} }
// Surface::drawWithClip
bool Surface::drawWithClip( double fAlpha, bool Surface::drawWithClip( double fAlpha,
const ::basegfx::B2DPoint& rPos, const ::basegfx::B2DPoint& rPos,
const ::basegfx::B2DPolygon& rClipPoly, const ::basegfx::B2DPolygon& rClipPoly,
...@@ -445,10 +412,6 @@ namespace canvas ...@@ -445,10 +412,6 @@ namespace canvas
return !(pRenderModule->isError()); return !(pRenderModule->isError());
} }
// Surface::prepareRendering
void Surface::prepareRendering() void Surface::prepareRendering()
{ {
mpPageManager->validatePages(); mpPageManager->validatePages();
......
...@@ -35,10 +35,6 @@ ...@@ -35,10 +35,6 @@
namespace canvas namespace canvas
{ {
// Surface
/** surfaces denote occupied areas within pages. /** surfaces denote occupied areas within pages.
pages encapsulate the hardware buffers that pages encapsulate the hardware buffers that
...@@ -114,7 +110,6 @@ namespace canvas ...@@ -114,7 +110,6 @@ namespace canvas
const ::basegfx::B2DPolygon& rClipPoly, const ::basegfx::B2DPolygon& rClipPoly,
const ::basegfx::B2DHomMatrix& rTransform ); const ::basegfx::B2DHomMatrix& rTransform );
// private attributes
private: private:
IColorBufferSharedPtr mpColorBuffer; IColorBufferSharedPtr mpColorBuffer;
...@@ -138,7 +133,6 @@ namespace canvas ...@@ -138,7 +133,6 @@ namespace canvas
bool mbIsDirty; bool mbIsDirty;
// private methods
private: private:
bool refresh( canvas::IColorBuffer& rBuffer ) const; bool refresh( canvas::IColorBuffer& rBuffer ) const;
void prepareRendering(); void prepareRendering();
......
...@@ -27,10 +27,6 @@ ...@@ -27,10 +27,6 @@
namespace canvas namespace canvas
{ {
// SurfaceProxy::SurfaceProxy
SurfaceProxy::SurfaceProxy( const canvas::IColorBufferSharedPtr& pBuffer, SurfaceProxy::SurfaceProxy( const canvas::IColorBufferSharedPtr& pBuffer,
const PageManagerSharedPtr& pPageManager ) : const PageManagerSharedPtr& pPageManager ) :
mpPageManager( pPageManager ), mpPageManager( pPageManager ),
...@@ -83,20 +79,12 @@ namespace canvas ...@@ -83,20 +79,12 @@ namespace canvas
} }
} }
// SurfaceProxy::setColorBufferDirty
void SurfaceProxy::setColorBufferDirty() void SurfaceProxy::setColorBufferDirty()
{ {
for( const auto& rSurfacePtr : maSurfaceList ) for( const auto& rSurfacePtr : maSurfaceList )
rSurfacePtr->setColorBufferDirty(); rSurfacePtr->setColorBufferDirty();
} }
// SurfaceProxy::draw
bool SurfaceProxy::draw( double fAlpha, bool SurfaceProxy::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos, const ::basegfx::B2DPoint& rPos,
const ::basegfx::B2DHomMatrix& rTransform ) const ::basegfx::B2DHomMatrix& rTransform )
...@@ -107,10 +95,6 @@ namespace canvas ...@@ -107,10 +95,6 @@ namespace canvas
return true; return true;
} }
// SurfaceProxy::draw
bool SurfaceProxy::draw( double fAlpha, bool SurfaceProxy::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos, const ::basegfx::B2DPoint& rPos,
const ::basegfx::B2DRange& rArea, const ::basegfx::B2DRange& rArea,
...@@ -122,10 +106,6 @@ namespace canvas ...@@ -122,10 +106,6 @@ namespace canvas
return true; return true;
} }
// SurfaceProxy::draw
bool SurfaceProxy::draw( double fAlpha, bool SurfaceProxy::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos, const ::basegfx::B2DPoint& rPos,
const ::basegfx::B2DPolyPolygon& rClipPoly, const ::basegfx::B2DPolyPolygon& rClipPoly,
......
...@@ -28,11 +28,6 @@ ...@@ -28,11 +28,6 @@
namespace canvas namespace canvas
{ {
// SurfaceProxy
/** Definition of the surface proxy class. /** Definition of the surface proxy class.
Surface proxies are the connection between *one* source image Surface proxies are the connection between *one* source image
......
...@@ -26,11 +26,6 @@ ...@@ -26,11 +26,6 @@
namespace canvas namespace canvas
{ {
// SurfaceProxyManager
class SurfaceProxyManager : public ISurfaceProxyManager class SurfaceProxyManager : public ISurfaceProxyManager
{ {
public: public:
...@@ -65,10 +60,6 @@ namespace canvas ...@@ -65,10 +60,6 @@ namespace canvas
PageManagerSharedPtr mpPageManager; PageManagerSharedPtr mpPageManager;
}; };
// createSurfaceProxyManager
ISurfaceProxyManagerSharedPtr createSurfaceProxyManager( const IRenderModuleSharedPtr& rRenderModule ) ISurfaceProxyManagerSharedPtr createSurfaceProxyManager( const IRenderModuleSharedPtr& rRenderModule )
{ {
return ISurfaceProxyManagerSharedPtr( return ISurfaceProxyManagerSharedPtr(
......
...@@ -25,10 +25,6 @@ ...@@ -25,10 +25,6 @@
namespace canvas namespace canvas
{ {
// SurfaceRect
struct SurfaceRect struct SurfaceRect
{ {
::basegfx::B2IPoint maPos; ::basegfx::B2IPoint maPos;
...@@ -67,7 +63,7 @@ namespace canvas ...@@ -67,7 +63,7 @@ namespace canvas
return true; return true;
} }
// returns true if the horizontal line intersects the rect. /// returns true if the horizontal line intersects the rect.
bool hLineIntersect( sal_Int32 lx1, sal_Int32 lx2, sal_Int32 ly ) const bool hLineIntersect( sal_Int32 lx1, sal_Int32 lx2, sal_Int32 ly ) const
{ {
const sal_Int32 x1(maPos.getX()); const sal_Int32 x1(maPos.getX());
...@@ -81,7 +77,7 @@ namespace canvas ...@@ -81,7 +77,7 @@ namespace canvas
return true; return true;
} }
//! Returns true if the vertical line intersects the rect. /// returns true if the vertical line intersects the rect.
bool vLineIntersect( sal_Int32 lx, sal_Int32 ly1, sal_Int32 ly2 ) const bool vLineIntersect( sal_Int32 lx, sal_Int32 ly1, sal_Int32 ly2 ) const
{ {
const sal_Int32 x1(maPos.getX()); const sal_Int32 x1(maPos.getX());
...@@ -95,7 +91,7 @@ namespace canvas ...@@ -95,7 +91,7 @@ namespace canvas
return true; return true;
} }
// returns true if the passed rect intersects this one. /// returns true if the passed rect intersects this one.
bool intersection( const SurfaceRect& r ) const bool intersection( const SurfaceRect& r ) const
{ {
const sal_Int32 x1(maPos.getX()); const sal_Int32 x1(maPos.getX());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment