Kaydet (Commit) 74ac2c25 authored tarafından Caolán McNamara's avatar Caolán McNamara

work around lack of cairo_rectangle_int_t with basegfx

ditch the CAIRO_VERSION_ENCODE(1, 10, 0) + sub optional
damage rect and just use our always-available basegfx
foo here.

Change-Id: I680453180f4725ac37cabf38d71b935c99edf6c7
Reviewed-on: https://gerrit.libreoffice.org/21971Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2387d277
...@@ -37,26 +37,6 @@ public: ...@@ -37,26 +37,6 @@ public:
virtual bool ErrorTrapPop( bool ) { return false; } virtual bool ErrorTrapPop( bool ) { return false; }
}; };
void AndroidSalInstance::damaged(AndroidSalFrame* /* frame */)
{
static bool beenHere = false;
static jmethodID nCallbackDamaged = 0;
// Check if we are running in an app that has registered for damage callbacks
// static public void callbackDamaged();
// Call the Java layer to post an invalidate if necessary
if (appClass != 0 && !beenHere) {
nCallbackDamaged = m_pJNIEnv->GetStaticMethodID(appClass, "callbackDamaged", "()V");
if (nCallbackDamaged == 0)
LOGE("Could not find the callbackDamaged method");
beenHere = true;
}
if (appClass != 0 && nCallbackDamaged != 0)
m_pJNIEnv->CallStaticVoidMethod(appClass, nCallbackDamaged);
}
void AndroidSalInstance::GetWorkArea( Rectangle& rRect ) void AndroidSalInstance::GetWorkArea( Rectangle& rRect )
{ {
rRect = Rectangle( Point( 0, 0 ), rRect = Rectangle( Point( 0, 0 ),
...@@ -131,16 +111,6 @@ public: ...@@ -131,16 +111,6 @@ public:
AndroidSalInstance::getInstance()->GetWorkArea( rRect ); AndroidSalInstance::getInstance()->GetWorkArea( rRect );
} }
virtual void damaged( const basegfx::B2IBox& rDamageRect)
{
if (rDamageRect.getWidth() <= 0 ||
rDamageRect.getHeight() <= 0)
{
return;
}
AndroidSalInstance::getInstance()->damaged( this );
}
virtual void UpdateSettings( AllSettings &rSettings ) virtual void UpdateSettings( AllSettings &rSettings )
{ {
// Clobber the UI fonts // Clobber the UI fonts
......
This diff is collapsed.
...@@ -38,8 +38,6 @@ public: ...@@ -38,8 +38,6 @@ public:
// mainloop pieces // mainloop pieces
virtual bool AnyInput( VclInputFlags nType ); virtual bool AnyInput( VclInputFlags nType );
void damaged(AndroidSalFrame *frame);
}; };
#endif // INCLUDED_VCL_INC_ANDROID_ANDROIDINST_HXX #endif // INCLUDED_VCL_INC_ANDROID_ANDROIDINST_HXX
......
...@@ -48,7 +48,6 @@ class GlyphCache; ...@@ -48,7 +48,6 @@ class GlyphCache;
class ServerFont; class ServerFont;
typedef struct _cairo cairo_t; typedef struct _cairo cairo_t;
typedef struct _cairo_surface cairo_surface_t; typedef struct _cairo_surface cairo_surface_t;
typedef struct _cairo_rectangle_int cairo_rectangle_int_t;
typedef struct _cairo_user_data_key cairo_user_data_key_t; typedef struct _cairo_user_data_key cairo_user_data_key_t;
enum PaintMode { OVERPAINT, XOR, INVERT }; enum PaintMode { OVERPAINT, XOR, INVERT };
...@@ -218,7 +217,7 @@ public: ...@@ -218,7 +217,7 @@ public:
#endif // ENABLE_CAIRO_CANVAS #endif // ENABLE_CAIRO_CANVAS
cairo_t* getCairoContext(bool bXorModeAllowed) const; cairo_t* getCairoContext(bool bXorModeAllowed) const;
void releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, const cairo_rectangle_int_t& extents) const; void releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, const basegfx::B2DRange& rExtents) const;
static cairo_surface_t* createCairoSurface(const BitmapBuffer *pBuffer); static cairo_surface_t* createCairoSurface(const BitmapBuffer *pBuffer);
void clipRegion(cairo_t* cr); void clipRegion(cairo_t* cr);
}; };
......
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