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