Bug 550545 - The NPAPI ImageExpose event should be disabled when building for Qt. r=vlad

--HG--
extra : rebase_source : b66a81ba5a019e7da387eb81d4fd2454be196fe7
This commit is contained in:
Doug Turner 2010-03-10 15:01:46 -08:00
parent c6f8ea29d3
commit e342d43d13
2 changed files with 13 additions and 16 deletions

View File

@ -174,18 +174,15 @@ enum { XKeyPress = KeyPress };
#undef KeyPress
#endif
#if (MOZ_PLATFORM_MAEMO == 5)
#if (MOZ_PLATFORM_MAEMO == 5) && defined(MOZ_WIDGET_GTK2)
#define MOZ_COMPOSITED_PLUGINS 1
#define MOZ_USE_IMAGE_EXPOSE 1
#include "gfxXlibSurface.h"
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/XShm.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#endif
#ifdef MOZ_WIDGET_GTK2
@ -417,7 +414,7 @@ public:
return strncmp(GetPluginName(), aPluginName, strlen(aPluginName)) == 0;
}
#if (MOZ_PLATFORM_MAEMO == 5)
#ifdef MOZ_USE_IMAGE_EXPOSE
nsresult SetAbsoluteScreenPosition(nsIDOMElement* element,
nsIDOMClientRect* position,
nsIDOMClientRect* clip);
@ -512,7 +509,7 @@ private:
};
#endif
#if (MOZ_PLATFORM_MAEMO == 5)
#ifdef MOZ_USE_IMAGE_EXPOSE
// On hildon, we attempt to use NPImageExpose which allows us faster
// painting.
@ -1226,7 +1223,7 @@ nsObjectFrame::SetAbsoluteScreenPosition(nsIDOMElement* element,
nsIDOMClientRect* position,
nsIDOMClientRect* clip)
{
#if (MOZ_PLATFORM_MAEMO == 5)
#ifdef MOZ_USE_IMAGE_EXPOSE
if (!mInstanceOwner)
return NS_ERROR_NOT_AVAILABLE;
return mInstanceOwner->SetAbsoluteScreenPosition(element, position, clip);
@ -2456,7 +2453,7 @@ nsPluginInstanceOwner::nsPluginInstanceOwner()
mLastPoint = nsIntPoint(0,0);
#endif
#if (MOZ_PLATFORM_MAEMO == 5)
#ifdef MOZ_USE_IMAGE_EXPOSE
mPluginSize = nsIntSize(0,0);
mXlibSurfGC = None;
mBlitWindow = nsnull;
@ -2526,7 +2523,7 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner()
mInstance->InvalidateOwner();
}
#if (MOZ_PLATFORM_MAEMO == 5)
#ifdef MOZ_USE_IMAGE_EXPOSE
ReleaseXShm();
#endif
}
@ -2738,7 +2735,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(NPRect *invalidRect)
if (!mObjectFrame || !invalidRect || !mWidgetVisible)
return NS_ERROR_FAILURE;
#if (MOZ_PLATFORM_MAEMO == 5)
#ifdef MOZ_USE_IMAGE_EXPOSE
PRBool simpleImageRender = PR_FALSE;
mInstance->GetValueFromPlugin(NPPVpluginWindowlessLocalBool,
&simpleImageRender);
@ -4885,7 +4882,7 @@ void nsPluginInstanceOwner::Paint(gfxContext* aContext,
if (!mInstance || !mObjectFrame)
return;
#if (MOZ_PLATFORM_MAEMO == 5)
#ifdef MOZ_USE_IMAGE_EXPOSE
// through to be able to paint the context passed in. This allows
// us to handle plugins that do not self invalidate (slowly, but
// accurately), and it allows us to reduce flicker.
@ -4974,7 +4971,7 @@ DepthOfVisual(const Screen* screen, const Visual* visual)
}
#endif
#if (MOZ_PLATFORM_MAEMO == 5)
#ifdef MOZ_USE_IMAGE_EXPOSE
static GdkWindow* GetClosestWindow(nsIDOMElement *element)
{
@ -5665,7 +5662,7 @@ void nsPluginInstanceOwner::SetPluginHost(nsIPluginHost* aHost)
mPluginHost = aHost;
}
#if (MOZ_PLATFORM_MAEMO == 5)
#ifdef MOZ_USE_IMAGE_EXPOSE
PRBool nsPluginInstanceOwner::UpdateVisibility(PRBool aVisible)
{
// NOTE: Death grip must be held by caller.
@ -5829,7 +5826,7 @@ void nsPluginInstanceOwner::FixUpURLS(const nsString &name, nsAString &value)
}
}
#if (MOZ_PLATFORM_MAEMO == 5)
#ifdef MOZ_USE_IMAGE_EXPOSE
nsresult
nsPluginInstanceOwner::SetAbsoluteScreenPosition(nsIDOMElement* element,
nsIDOMClientRect* position,

View File

@ -103,7 +103,7 @@ public:
SetPluginInstance(aPluginInstance);
return NS_OK;
}
#if (MOZ_PLATFORM_MAEMO == 5)
#if (MOZ_PLATFORM_MAEMO == 5) && defined(MOZ_WIDGET_GTK2)
#define MOZ_COMPOSITED_PLUGINS
#endif
#ifdef MOZ_COMPOSITED_PLUGINS