From 9ab611a652334a98ba7922ee6a53b61bbcc4892f Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Sat, 25 Feb 2012 14:13:08 +0000 Subject: android: move DamageTracker concept into SvpSalFrame and try to use it --- vcl/inc/android/androidinst.hxx | 5 ++++- vcl/inc/headless/svpframe.hxx | 11 +++++++++++ vcl/inc/unx/gtk/gtkframe.hxx | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'vcl/inc') diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx index 10d17c53b8b5..9f8d22f98645 100644 --- a/vcl/inc/android/androidinst.hxx +++ b/vcl/inc/android/androidinst.hxx @@ -38,6 +38,7 @@ #include #include +class AndroidSalFrame; class AndroidSalInstance : public SvpSalInstance { void BlitFrameToWindow(ANativeWindow_Buffer *pOutBuffer, @@ -64,10 +65,12 @@ public: void RedrawWindows(ANativeWindow *pWindow); SalFrame *getFocusFrame() const; + void damaged(AndroidSalFrame *frame, const Rectangle &rRect); protected: virtual void DoReleaseYield( int nTimeoutMS ); struct android_app *mpApp; - bool mbQueueReDraw; + Region maRedrawRegion; + bool mbQueueReDraw; private: EGLDisplay mxDisplay; diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx index 3dd896165b6e..ac8683fcf502 100644 --- a/vcl/inc/headless/svpframe.hxx +++ b/vcl/inc/headless/svpframe.hxx @@ -29,6 +29,7 @@ #ifndef _SVP_SVPFRAME_HXX #include +#include #include #include "svpelement.hxx" @@ -45,6 +46,9 @@ class SvpSalFrame : public SalFrame, public SvpElement std::list< SvpSalFrame* > m_aChildren; // List of child frames sal_uLong m_nStyle; bool m_bVisible; + bool m_bDamageTracking; + bool m_bTopDown; + sal_Int32 m_nScanlineFormat; long m_nMinWidth; long m_nMinHeight; long m_nMaxWidth; @@ -60,12 +64,15 @@ public: SvpSalFrame( SvpSalInstance* pInstance, SalFrame* pParent, sal_uLong nSalFrameStyle, + bool bTopDown, + sal_Int32 nScanlineFormat, SystemParentData* pSystemParent = NULL ); virtual ~SvpSalFrame(); void GetFocus(); void LoseFocus(); void PostPaint(bool bImmediate) const; + void AllocateFrame(); // SvpElement virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; } @@ -121,6 +128,10 @@ public: virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ); virtual void EndSetClipRegion(); + // If enabled we can get damage notifications for regions immediately rendered to ... + virtual void enableDamageTracker( bool bOn = true ); + virtual void damaged( const basegfx::B2IBox& /* rDamageRect */) {} + /*TODO: functional implementation */ virtual void SetScreenNumber( unsigned int nScreen ) { (void)nScreen; } virtual void SetApplicationID(const rtl::OUString &rApplicationID) { (void) rApplicationID; } diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index e5fd0cf5660a..50258e0b42ec 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -432,7 +432,7 @@ public: static GtkSalFrame *getFromWindow( GtkWindow *pWindow ); - virtual void damaged (const basegfx::B2IBox& rDamageRect); + virtual void damaged (const basegfx::B2IBox& rDamageRect); }; #define OOO_TYPE_FIXED ooo_fixed_get_type() -- cgit v1.2.3