Kaydet (Commit) 8747200c authored tarafından Alexander Wilms's avatar Alexander Wilms Kaydeden (comit) Thorsten Behrens

Remove visual noise from canvas

Change-Id: I0f01a4064ab6d1f55647ecdc1a8710e289e5d96c
üst 8448d136
......@@ -88,7 +88,7 @@ namespace cairocanvas
// SpriteRedrawManager functor calls
// -------------------------------------------------
/** Gets called for simple background repaints
*/
......
......@@ -37,7 +37,7 @@ namespace
{
// The X protocol request CreatePixmap puts an upper bound
// of 16 bit to the size.
//
// see, e.g. moz#424333, fdo#48961
// we've a duplicate of this in vcl :-(
if (width > SAL_MAX_INT16 || height > SAL_MAX_INT16)
......
......@@ -40,9 +40,9 @@ using namespace ::com::sun::star;
namespace dxcanvas
{
//////////////////////////////////////////////////////////////////////////////////
// DXBitmap::DXBitmap
//////////////////////////////////////////////////////////////////////////////////
DXBitmap::DXBitmap( const BitmapSharedPtr& rBitmap,
bool bWithAlpha ) :
......
......@@ -102,7 +102,7 @@ namespace dxcanvas
typedef ::rtl::Reference< Canvas > CanvasRef;
//////////////////////////////////////////////////////////////////////////////////////////////////////
typedef ::cppu::WeakComponentImplHelper7< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
......
......@@ -226,7 +226,7 @@ namespace dxcanvas
1.0) )
{
// KLUDGE 1:
//
// And here comes the greatest shortcoming of the GDI+
// gradients ever: SetFocusScales completely ignores
// transformations, both when set at the PathGradientBrush
......@@ -362,7 +362,7 @@ namespace dxcanvas
else
{
// KLUDGE 2:
//
// We're generating a PathGradientBrush from scratch here,
// and put in a transformed GraphicsPath (transformed with
// the texture transform). This is because the
......
......@@ -92,7 +92,7 @@ namespace dxcanvas
// SpriteRedrawManager functor calls
// -------------------------------------------------
/** Gets called for simple background repaints
*/
......
......@@ -44,9 +44,9 @@ namespace dxcanvas
{
namespace
{
//////////////////////////////////////////////////////////////////////////////////
// DXColorBuffer
//////////////////////////////////////////////////////////////////////////////////
struct DXColorBuffer : public canvas::IColorBuffer
{
......@@ -129,9 +129,9 @@ namespace dxcanvas
return canvas::IColorBuffer::FMT_X8R8G8B8;
}
//////////////////////////////////////////////////////////////////////////////////
// GDIColorBuffer
//////////////////////////////////////////////////////////////////////////////////
struct GDIColorBuffer : public canvas::IColorBuffer
{
......@@ -208,9 +208,9 @@ namespace dxcanvas
}
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::DXSurfaceBitmap
//////////////////////////////////////////////////////////////////////////////////
DXSurfaceBitmap::DXSurfaceBitmap( const ::basegfx::B2IVector& rSize,
const canvas::ISurfaceProxyManagerSharedPtr& rMgr,
......@@ -231,18 +231,18 @@ namespace dxcanvas
init();
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::getSize
//////////////////////////////////////////////////////////////////////////////////
::basegfx::B2IVector DXSurfaceBitmap::getSize() const
{
return maSize;
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::init
//////////////////////////////////////////////////////////////////////////////////
void DXSurfaceBitmap::init()
{
......@@ -278,9 +278,9 @@ namespace dxcanvas
mpSurfaceProxy = mpSurfaceManager->createSurfaceProxy(mpColorBuffer);
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::resize
//////////////////////////////////////////////////////////////////////////////////
bool DXSurfaceBitmap::resize( const ::basegfx::B2IVector& rSize )
{
......@@ -293,9 +293,9 @@ namespace dxcanvas
return true;
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::clear
//////////////////////////////////////////////////////////////////////////////////
void DXSurfaceBitmap::clear()
{
......@@ -305,18 +305,18 @@ namespace dxcanvas
pGraphics->Clear( transColor );
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::hasAlpha
//////////////////////////////////////////////////////////////////////////////////
bool DXSurfaceBitmap::hasAlpha() const
{
return mbAlpha;
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::getGraphics
//////////////////////////////////////////////////////////////////////////////////
GraphicsSharedPtr DXSurfaceBitmap::getGraphics()
{
......@@ -332,9 +332,9 @@ namespace dxcanvas
return createSurfaceGraphics(mpSurface);
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::getBitmap
//////////////////////////////////////////////////////////////////////////////////
BitmapSharedPtr DXSurfaceBitmap::getBitmap() const
{
......@@ -386,9 +386,9 @@ namespace dxcanvas
return pResult;
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::draw
//////////////////////////////////////////////////////////////////////////////////
bool DXSurfaceBitmap::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos,
......@@ -404,9 +404,9 @@ namespace dxcanvas
return mpSurfaceProxy->draw( fAlpha, rPos, rClipPoly, rTransform );
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::draw
//////////////////////////////////////////////////////////////////////////////////
bool DXSurfaceBitmap::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos,
......@@ -422,9 +422,9 @@ namespace dxcanvas
return mpSurfaceProxy->draw( fAlpha, rPos, rArea, rTransform );
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::draw
//////////////////////////////////////////////////////////////////////////////////
bool DXSurfaceBitmap::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos,
......@@ -439,9 +439,9 @@ namespace dxcanvas
return mpSurfaceProxy->draw( fAlpha, rPos, rTransform );
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::draw
//////////////////////////////////////////////////////////////////////////////////
bool DXSurfaceBitmap::draw( const ::basegfx::B2IRange& rArea )
{
......@@ -460,9 +460,9 @@ namespace dxcanvas
aTransform);
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::imageDebugger
//////////////////////////////////////////////////////////////////////////////////
#if defined(DX_DEBUG_IMAGES)
# if OSL_DEBUG_LEVEL > 0
void DXSurfaceBitmap::imageDebugger()
......@@ -494,9 +494,9 @@ namespace dxcanvas
# endif
#endif
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::getData
//////////////////////////////////////////////////////////////////////////////////
uno::Sequence< sal_Int8 > DXSurfaceBitmap::getData( rendering::IntegerBitmapLayout& /*bitmapLayout*/,
const geometry::IntegerRectangle2D& rect )
......@@ -582,9 +582,9 @@ namespace dxcanvas
}
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::setData
//////////////////////////////////////////////////////////////////////////////////
void DXSurfaceBitmap::setData( const uno::Sequence< sal_Int8 >& data,
const rendering::IntegerBitmapLayout& /*bitmapLayout*/,
......@@ -666,9 +666,9 @@ namespace dxcanvas
mbIsSurfaceDirty = true;
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::setPixel
//////////////////////////////////////////////////////////////////////////////////
void DXSurfaceBitmap::setPixel( const uno::Sequence< sal_Int8 >& color,
const rendering::IntegerBitmapLayout& /*bitmapLayout*/,
......@@ -730,9 +730,9 @@ namespace dxcanvas
mbIsSurfaceDirty = true;
}
//////////////////////////////////////////////////////////////////////////////////
// DXSurfaceBitmap::getPixel
//////////////////////////////////////////////////////////////////////////////////
uno::Sequence< sal_Int8 > DXSurfaceBitmap::getPixel( rendering::IntegerBitmapLayout& /*bitmapLayout*/,
const geometry::IntegerPoint2D& pos )
......
......@@ -49,7 +49,7 @@ class ::com::sun::star::rendering::XCanvasFont;
using namespace ::com::sun::star;
//////////////////////////////////////////////////////////////////////////////
namespace dxcanvas
{
......
......@@ -184,16 +184,16 @@ namespace dxcanvas
// By convention, the access buffer always has
// one of the following formats:
//
// BMP_FORMAT_1BIT_MSB_PAL
// BMP_FORMAT_4BIT_MSN_PAL
// BMP_FORMAT_8BIT_PAL
// BMP_FORMAT_16BIT_TC_LSB_MASK
// BMP_FORMAT_24BIT_TC_BGR
// BMP_FORMAT_32BIT_TC_MASK
//
// and is always BMP_FORMAT_BOTTOM_UP
//
// This is the way
// WinSalBitmap::AcquireBuffer() sets up the
// buffer
......@@ -326,16 +326,16 @@ namespace dxcanvas
// By convention, the access buffer always has
// one of the following formats:
//
// BMP_FORMAT_1BIT_MSB_PAL
// BMP_FORMAT_4BIT_MSN_PAL
// BMP_FORMAT_8BIT_PAL
// BMP_FORMAT_16BIT_TC_LSB_MASK
// BMP_FORMAT_24BIT_TC_BGR
// BMP_FORMAT_32BIT_TC_MASK
//
// and is always BMP_FORMAT_BOTTOM_UP
//
// This is the way
// WinSalBitmap::AcquireBuffer() sets up the
// buffer
......
......@@ -113,7 +113,7 @@ namespace oglcanvas
/// Get instance of internal texture cache
TextureCache& getTextureCache() const;
////////////////////////////////////////////////////////
// nobody except IBufferContext implementations are supposed
// to use this
......
......@@ -172,7 +172,7 @@ namespace
tools::initViewState(maViewState);
}
///////////////////////////////////////////////////////////////////////////////////////////////
private:
// Ifc XServiceName
......@@ -362,7 +362,7 @@ namespace
return createStrokingRenderState();
}
///////////////////////////////////////////////////////////////////////////////////////////////
typedef o3tl::LazyUpdate<
rendering::FontRequest,
......
......@@ -30,7 +30,7 @@
// TEMP!!!
// Awaiting corresponding functionality in OSL
//
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winbase.h>
......@@ -54,7 +54,7 @@ double ElapsedTime::getSystemTime()
{
// TEMP!!!
// Awaiting corresponding functionality in OSL
//
// is there a performance counter available?
static bool bTimeSetupDone( false );
......
......@@ -24,13 +24,13 @@
namespace canvas
{
//////////////////////////////////////////////////////////////////////////////////
// PageManager
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// PageManager::allocateSpace
//////////////////////////////////////////////////////////////////////////////////
FragmentSharedPtr PageManager::allocateSpace( const ::basegfx::B2ISize& rSize )
{
......@@ -74,9 +74,9 @@ namespace canvas
return pFragment;
}
//////////////////////////////////////////////////////////////////////////////////
// PageManager::free
//////////////////////////////////////////////////////////////////////////////////
void PageManager::free( const FragmentSharedPtr& pFragment )
{
......@@ -94,9 +94,9 @@ namespace canvas
pFragment->free(pFragment);
}
//////////////////////////////////////////////////////////////////////////////////
// PageManager::nakedFragment
//////////////////////////////////////////////////////////////////////////////////
void PageManager::nakedFragment( const FragmentSharedPtr& pFragment )
{
......@@ -151,9 +151,9 @@ namespace canvas
}
}
//////////////////////////////////////////////////////////////////////////////////
// PageManager::relocate
//////////////////////////////////////////////////////////////////////////////////
bool PageManager::relocate( const FragmentSharedPtr& pFragment )
{
......@@ -181,9 +181,9 @@ namespace canvas
return false;
}
//////////////////////////////////////////////////////////////////////////////////
// PageManager::validatePages
//////////////////////////////////////////////////////////////////////////////////
void PageManager::validatePages()
{
......@@ -192,18 +192,18 @@ namespace canvas
::boost::mem_fn(&Page::validate));
}
//////////////////////////////////////////////////////////////////////////////////
// PageManager::getPageSize
//////////////////////////////////////////////////////////////////////////////////
::basegfx::B2ISize PageManager::getPageSize() const
{
return mpRenderModule->getPageSize();
}
//////////////////////////////////////////////////////////////////////////////////
// PageManager::getRenderModule
//////////////////////////////////////////////////////////////////////////////////
canvas::IRenderModuleSharedPtr PageManager::getRenderModule() const
{
......
......@@ -29,9 +29,9 @@
namespace canvas
{
//////////////////////////////////////////////////////////////////////////////////
// PageManager
//////////////////////////////////////////////////////////////////////////////////
class PageManager
{
......@@ -72,9 +72,9 @@ namespace canvas
bool relocate( const FragmentSharedPtr& pFragment );
};
//////////////////////////////////////////////////////////////////////////////////
// PageManagerSharedPtr
//////////////////////////////////////////////////////////////////////////////////
typedef ::boost::shared_ptr< PageManager > PageManagerSharedPtr;
}
......
......@@ -433,7 +433,7 @@ namespace canvas
{
// check whether SpriteInfo::needsUpdate returns false for
// all elements of this area's contained sprites
//
// if not a single changed sprite found - just ignore this
// component (return false)
const SpriteConnectedRanges::ComponentListType::const_iterator aEnd(
......
......@@ -27,9 +27,9 @@
namespace canvas
{
//////////////////////////////////////////////////////////////////////////////////
// Surface::Surface
//////////////////////////////////////////////////////////////////////////////////
Surface::Surface( const PageManagerSharedPtr& rPageManager,
const IColorBufferSharedPtr& rColorBuffer,
......@@ -44,9 +44,9 @@ namespace canvas
{
}
//////////////////////////////////////////////////////////////////////////////////
// Surface::~Surface
//////////////////////////////////////////////////////////////////////////////////
Surface::~Surface()
{
......@@ -54,18 +54,18 @@ namespace canvas
mpPageManager->free(mpFragment);
}
//////////////////////////////////////////////////////////////////////////////////
// Surface::getUVCoords
//////////////////////////////////////////////////////////////////////////////////
void Surface::setColorBufferDirty()
{
mbIsDirty=true;
}
//////////////////////////////////////////////////////////////////////////////////
// Surface::getUVCoords
//////////////////////////////////////////////////////////////////////////////////
basegfx::B2DRectangle Surface::getUVCoords() const
{
......@@ -87,9 +87,9 @@ namespace canvas
(oy+sy)/ph );
}
//////////////////////////////////////////////////////////////////////////////////
// Surface::getUVCoords
//////////////////////////////////////////////////////////////////////////////////
basegfx::B2DRectangle Surface::getUVCoords( const ::basegfx::B2IPoint& rPos,
const ::basegfx::B2ISize& rSize ) const
......@@ -109,9 +109,9 @@ namespace canvas
(oy+sy)/ph );
}
//////////////////////////////////////////////////////////////////////////////////
// Surface::draw
//////////////////////////////////////////////////////////////////////////////////
bool Surface::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos,
......@@ -209,9 +209,9 @@ namespace canvas
return !(pRenderModule->isError());
}
//////////////////////////////////////////////////////////////////////////////////
// Surface::drawRectangularArea
//////////////////////////////////////////////////////////////////////////////////
bool Surface::drawRectangularArea(
double fAlpha,
......@@ -335,9 +335,9 @@ namespace canvas
return !(pRenderModule->isError());
}
//////////////////////////////////////////////////////////////////////////////////
// Surface::drawWithClip
//////////////////////////////////////////////////////////////////////////////////
bool Surface::drawWithClip( double fAlpha,
const ::basegfx::B2DPoint& rPos,
......@@ -443,9 +443,9 @@ namespace canvas
return !(pRenderModule->isError());
}
//////////////////////////////////////////////////////////////////////////////////
// Surface::prepareRendering
//////////////////////////////////////////////////////////////////////////////////
void Surface::prepareRendering()
{
......
......@@ -35,9 +35,9 @@
namespace canvas
{
//////////////////////////////////////////////////////////////////////////////////
// Surface
//////////////////////////////////////////////////////////////////////////////////
/** surfaces denote occupied areas withing pages.
......
......@@ -26,9 +26,9 @@
namespace canvas
{
//////////////////////////////////////////////////////////////////////////////////
// SurfaceProxy::SurfaceProxy
//////////////////////////////////////////////////////////////////////////////////
SurfaceProxy::SurfaceProxy( const canvas::IColorBufferSharedPtr& pBuffer,
const PageManagerSharedPtr& pPageManager ) :
......@@ -82,9 +82,9 @@ namespace canvas
}
}
//////////////////////////////////////////////////////////////////////////////////
// SurfaceProxy::setColorBufferDirty
//////////////////////////////////////////////////////////////////////////////////
void SurfaceProxy::setColorBufferDirty()
{
......@@ -93,9 +93,9 @@ namespace canvas
::boost::mem_fn(&Surface::setColorBufferDirty));
}
//////////////////////////////////////////////////////////////////////////////////
// SurfaceProxy::draw
//////////////////////////////////////////////////////////////////////////////////
bool SurfaceProxy::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos,
......@@ -112,9 +112,9 @@ namespace canvas
return true;
}
//////////////////////////////////////////////////////////////////////////////////
// SurfaceProxy::draw
//////////////////////////////////////////////////////////////////////////////////
bool SurfaceProxy::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos,
......@@ -133,9 +133,9 @@ namespace canvas
return true;
}
//////////////////////////////////////////////////////////////////////////////////
// SurfaceProxy::draw
//////////////////////////////////////////////////////////////////////////////////
bool SurfaceProxy::draw( double fAlpha,
const ::basegfx::B2DPoint& rPos,
......
......@@ -29,9 +29,9 @@
namespace canvas
{
//////////////////////////////////////////////////////////////////////////////////
// SurfaceProxy
//////////////////////////////////////////////////////////////////////////////////
/** Definition of the surface proxy class.
......
......@@ -25,9 +25,9 @@
namespace canvas
{
//////////////////////////////////////////////////////////////////////////////////
// SurfaceProxyManager
//////////////////////////////////////////////////////////////////////////////////
class SurfaceProxyManager : public ISurfaceProxyManager
{
......@@ -63,9 +63,9 @@ namespace canvas
PageManagerSharedPtr mpPageManager;
};
//////////////////////////////////////////////////////////////////////////////////
// createSurfaceProxyManager
//////////////////////////////////////////////////////////////////////////////////
ISurfaceProxyManagerSharedPtr createSurfaceProxyManager( const IRenderModuleSharedPtr& rRenderModule )
{
......
......@@ -25,9 +25,9 @@
namespace canvas
{
//////////////////////////////////////////////////////////////////////////////////
// SurfaceRect
//////////////////////////////////////////////////////////////////////////////////
struct SurfaceRect
{
......
......@@ -347,12 +347,12 @@ namespace vclcanvas
// innermost in rColor1. The innermost polygon will never
// have zero area, thus, we must divide the interval into
// nStepCount+1 steps. For example, to create 3 steps:
//
// | |
// |-------|-------|-------|
// | |
// 3 2 1 0
//
// This yields 4 tick marks, where 0 is never attained (since
// zero-area polygons typically don't display perceivable
// color).
......
......@@ -84,7 +84,7 @@ namespace vclcanvas
bool& io_bSurfaceDirty );
// SpriteRedrawManager functor calls
// -------------------------------------------------
/** Gets called for simple background repaints
*/
......
......@@ -380,7 +380,7 @@ class DemoRenderer
//called CanvasHelper::getScaledBitmap, we return NULL, TODO
//Exception 'BitmapEx vclcanvas::tools::bitmapExFromXBitmap(const com::sun::star::uno::Reference<com::sun::star::rendering::XBitmap>&),
//bitmapExFromXBitmap(): could not extract BitmapEx' thrown
//
//vcl-canvas says:
//Exception 'BitmapEx vclcanvas::tools::bitmapExFromXBitmap(const com::sun::star::uno::Reference<com::sun::star::rendering::XBitmap>&),
//bitmapExFromXBitmap(): could not extract bitmap' thrown
......
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