INTEGRATION: CWS canvas05 (1.2.2); FILE MERGED
2008/06/03 11:11:24 thb 1.2.2.4: Cleaned up image debugging stuff; fixed a few d3d debug warnings; fixed one deadlock rendering a bitmap from the same surface to itself; fixed premature ReleaseDC call in GraphicsProvider::getGraphics() 2008/04/21 07:30:17 thb 1.2.2.3: RESYNC: (1.2-1.3); FILE MERGED 2008/01/22 00:25:23 thb 1.2.2.2: #i81092# Making gdiplus and dx canvas more independent 2007/12/20 22:18:57 thb 1.2.2.1: #i81092# #i78888# #i78925# #i79258# #i79437# #i84784# Large canvas rework, completing various areas such as color spaces, bitmap data access, true sprite and non-sprite implementations, and upstreaming the canvas parts of rodos emf+ rendering
This commit is contained in:
parent
77627c5756
commit
e14b94ab84
@ -7,7 +7,7 @@
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* $RCSfile: dx_spritecanvashelper.cxx,v $
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
@ -28,9 +28,13 @@
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_canvas.hxx"
|
||||
|
||||
#include <canvas/debug.hxx>
|
||||
#include <canvas/verbosetrace.hxx>
|
||||
#include <canvas/canvastools.hxx>
|
||||
#include <tools/diagnose_ex.h>
|
||||
|
||||
#include <comphelper/scopeguard.hxx>
|
||||
|
||||
@ -42,6 +46,14 @@
|
||||
#include "dx_spritecanvashelper.hxx"
|
||||
#include "dx_canvascustomsprite.hxx"
|
||||
|
||||
#if defined(DX_DEBUG_IMAGES)
|
||||
# if OSL_DEBUG_LEVEL > 0
|
||||
# include <imdebug.h>
|
||||
# undef min
|
||||
# undef max
|
||||
# endif
|
||||
#endif
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
namespace dxcanvas
|
||||
@ -50,7 +62,7 @@ namespace dxcanvas
|
||||
{
|
||||
void repaintBackground( const ::basegfx::B2DRange& rUpdateArea,
|
||||
const ::basegfx::B2IRange& rOutputArea,
|
||||
const DXBitmapSharedPtr& rBackBuffer )
|
||||
const DXSurfaceBitmapSharedPtr& rBackBuffer )
|
||||
{
|
||||
// TODO(E1): Use numeric_cast to catch overflow here
|
||||
::basegfx::B2IRange aActualArea( 0, 0,
|
||||
@ -94,6 +106,7 @@ namespace dxcanvas
|
||||
}
|
||||
|
||||
SpriteCanvasHelper::SpriteCanvasHelper() :
|
||||
mpSpriteSurface( NULL ),
|
||||
mpRedrawManager( NULL ),
|
||||
mpRenderModule(),
|
||||
mpSurfaceProxy(),
|
||||
@ -108,19 +121,22 @@ namespace dxcanvas
|
||||
#endif
|
||||
}
|
||||
|
||||
void SpriteCanvasHelper::init( ::canvas::SpriteRedrawManager& rManager,
|
||||
void SpriteCanvasHelper::init( SpriteCanvas& rParent,
|
||||
::canvas::SpriteRedrawManager& rManager,
|
||||
const IDXRenderModuleSharedPtr& rRenderModule,
|
||||
const ::canvas::ISurfaceProxyManagerSharedPtr& rSurfaceProxy,
|
||||
const DXBitmapSharedPtr& rBackBuffer,
|
||||
const DXSurfaceBitmapSharedPtr& rBackBuffer,
|
||||
const ::basegfx::B2ISize& rOutputOffset )
|
||||
{
|
||||
// init base
|
||||
setDevice( rParent );
|
||||
setTarget( rBackBuffer, rOutputOffset );
|
||||
|
||||
mpSpriteSurface = &rParent;
|
||||
mpRedrawManager = &rManager;
|
||||
mpRenderModule = rRenderModule;
|
||||
mpSurfaceProxy = rSurfaceProxy;
|
||||
mpBackBuffer = rBackBuffer;
|
||||
mpRenderModule = rRenderModule;
|
||||
mpSurfaceProxy = rSurfaceProxy;
|
||||
mpBackBuffer = rBackBuffer;
|
||||
}
|
||||
|
||||
void SpriteCanvasHelper::disposing()
|
||||
@ -131,6 +147,7 @@ namespace dxcanvas
|
||||
mpBackBuffer.reset();
|
||||
mpRenderModule.reset();
|
||||
mpRedrawManager = NULL;
|
||||
mpSpriteSurface = NULL;
|
||||
|
||||
// forward to base
|
||||
CanvasHelper::disposing();
|
||||
@ -156,7 +173,7 @@ namespace dxcanvas
|
||||
|
||||
return uno::Reference< rendering::XCustomSprite >(
|
||||
new CanvasCustomSprite( spriteSize,
|
||||
mpDevice,
|
||||
mpSpriteSurface,
|
||||
mpRenderModule,
|
||||
mpSurfaceProxy,
|
||||
mbShowSpriteBounds ) );
|
||||
@ -178,6 +195,12 @@ namespace dxcanvas
|
||||
return sal_False; // disposed, or otherwise dysfunctional
|
||||
}
|
||||
|
||||
#if defined(DX_DEBUG_IMAGES)
|
||||
# if OSL_DEBUG_LEVEL > 0
|
||||
mpBackBuffer->imageDebugger();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// store current output area (need to tunnel that to the
|
||||
// background, scroll, opaque and general sprite repaint
|
||||
// routines)
|
||||
@ -246,7 +269,7 @@ namespace dxcanvas
|
||||
|
||||
void SpriteCanvasHelper::backgroundPaint( const ::basegfx::B2DRange& rUpdateRect )
|
||||
{
|
||||
ENSURE_AND_THROW( mpRenderModule &&
|
||||
ENSURE_OR_THROW( mpRenderModule &&
|
||||
mpBackBuffer,
|
||||
"SpriteCanvasHelper::backgroundPaint(): NULL device pointer " );
|
||||
|
||||
@ -259,7 +282,7 @@ namespace dxcanvas
|
||||
const ::basegfx::B2DRange& rMoveEnd,
|
||||
const ::canvas::SpriteRedrawManager::UpdateArea& rUpdateArea )
|
||||
{
|
||||
ENSURE_AND_THROW( mpRenderModule &&
|
||||
ENSURE_OR_THROW( mpRenderModule &&
|
||||
mpBackBuffer,
|
||||
"SpriteCanvasHelper::scrollUpdate(): NULL device pointer " );
|
||||
|
||||
@ -309,7 +332,7 @@ namespace dxcanvas
|
||||
void SpriteCanvasHelper::opaqueUpdate( const ::basegfx::B2DRange& rTotalArea,
|
||||
const ::std::vector< ::canvas::Sprite::Reference >& rSortedUpdateSprites )
|
||||
{
|
||||
ENSURE_AND_THROW( mpRenderModule &&
|
||||
ENSURE_OR_THROW( mpRenderModule &&
|
||||
mpBackBuffer,
|
||||
"SpriteCanvasHelper::opaqueUpdate(): NULL device pointer " );
|
||||
|
||||
@ -333,7 +356,7 @@ namespace dxcanvas
|
||||
void SpriteCanvasHelper::genericUpdate( const ::basegfx::B2DRange& rTotalArea,
|
||||
const ::std::vector< ::canvas::Sprite::Reference >& rSortedUpdateSprites )
|
||||
{
|
||||
ENSURE_AND_THROW( mpRenderModule &&
|
||||
ENSURE_OR_THROW( mpRenderModule &&
|
||||
mpBackBuffer,
|
||||
"SpriteCanvasHelper::genericUpdate(): NULL device pointer " );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user