зеркало из https://github.com/mozilla/pjs.git
Backout e20a19a790dd (bug 743830) for linux QT bustage.
This commit is contained in:
Родитель
e4b1dc6405
Коммит
337ab6ecc5
|
@ -57,7 +57,7 @@
|
|||
#include "gfxXlibSurface.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxImageSurface.h"
|
||||
#include "gfxPlatformGtk.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "GLContext.h"
|
||||
#include "gfxUtils.h"
|
||||
|
||||
|
@ -251,7 +251,7 @@ GLXLibrary::EnsureInitialized()
|
|||
GLLibraryLoader::LoadSymbols(mOGLLibrary, symbols_texturefrompixmap,
|
||||
(GLLibraryLoader::PlatformLookupFunction)&xGetProcAddress))
|
||||
{
|
||||
mUseTextureFromPixmap = gfxPlatformGtk::UseXRender();
|
||||
mHasTextureFromPixmap = true;
|
||||
} else {
|
||||
NS_WARNING("Texture from pixmap disabled");
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ GLXLibrary::SupportsTextureFromPixmap(gfxASurface* aSurface)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (aSurface->GetType() != gfxASurface::SurfaceTypeXlib || !mUseTextureFromPixmap) {
|
||||
if (aSurface->GetType() != gfxASurface::SurfaceTypeXlib || !mHasTextureFromPixmap) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -328,7 +328,7 @@ GLXLibrary::CreatePixmap(gfxASurface* aSurface)
|
|||
void
|
||||
GLXLibrary::DestroyPixmap(GLXPixmap aPixmap)
|
||||
{
|
||||
if (!mUseTextureFromPixmap) {
|
||||
if (!mHasTextureFromPixmap) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -339,7 +339,7 @@ GLXLibrary::DestroyPixmap(GLXPixmap aPixmap)
|
|||
void
|
||||
GLXLibrary::BindTexImage(GLXPixmap aPixmap)
|
||||
{
|
||||
if (!mUseTextureFromPixmap) {
|
||||
if (!mHasTextureFromPixmap) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -352,7 +352,7 @@ GLXLibrary::BindTexImage(GLXPixmap aPixmap)
|
|||
void
|
||||
GLXLibrary::ReleaseTexImage(GLXPixmap aPixmap)
|
||||
{
|
||||
if (!mUseTextureFromPixmap) {
|
||||
if (!mHasTextureFromPixmap) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -843,7 +843,7 @@ TRY_AGAIN_NO_SHARING:
|
|||
|
||||
bool TextureImageSupportsGetBackingSurface()
|
||||
{
|
||||
return sGLXLibrary.UseTextureFromPixmap();
|
||||
return sGLXLibrary.HasTextureFromPixmap();
|
||||
}
|
||||
|
||||
virtual already_AddRefed<TextureImage>
|
||||
|
|
|
@ -49,7 +49,7 @@ class GLXLibrary
|
|||
{
|
||||
public:
|
||||
GLXLibrary() : mInitialized(false), mTriedInitializing(false),
|
||||
mUseTextureFromPixmap(false), mDebug(false),
|
||||
mHasTextureFromPixmap(false), mDebug(false),
|
||||
mHasRobustness(false), mOGLLibrary(nsnull) {}
|
||||
|
||||
void xDestroyContext(Display* display, GLXContext context);
|
||||
|
@ -121,7 +121,7 @@ public:
|
|||
void BindTexImage(GLXPixmap aPixmap);
|
||||
void ReleaseTexImage(GLXPixmap aPixmap);
|
||||
|
||||
bool UseTextureFromPixmap() { return mUseTextureFromPixmap; }
|
||||
bool HasTextureFromPixmap() { return mHasTextureFromPixmap; }
|
||||
bool HasRobustness() { return mHasRobustness; }
|
||||
bool SupportsTextureFromPixmap(gfxASurface* aSurface);
|
||||
|
||||
|
@ -230,7 +230,7 @@ private:
|
|||
|
||||
bool mInitialized;
|
||||
bool mTriedInitializing;
|
||||
bool mUseTextureFromPixmap;
|
||||
bool mHasTextureFromPixmap;
|
||||
bool mDebug;
|
||||
bool mHasRobustness;
|
||||
PRLibrary *mOGLLibrary;
|
||||
|
|
|
@ -67,7 +67,6 @@
|
|||
#include <gdk/gdkx.h>
|
||||
#include "gfxXlibSurface.h"
|
||||
#include "cairo-xlib.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
/* Undefine the Status from Xlib since it will conflict with system headers on OSX */
|
||||
#if defined(__APPLE__) && defined(Status)
|
||||
|
@ -105,20 +104,14 @@ static void do_gdk_drawable_unref (void *data)
|
|||
g_object_unref (d);
|
||||
}
|
||||
|
||||
#ifdef MOZ_X11
|
||||
bool gfxPlatformGtk::sUseXRender = false;
|
||||
#endif
|
||||
|
||||
gfxPlatformGtk::gfxPlatformGtk()
|
||||
{
|
||||
if (!sFontconfigUtils)
|
||||
sFontconfigUtils = gfxFontconfigUtils::GetFontconfigUtils();
|
||||
#ifdef MOZ_X11
|
||||
sUseXRender = mozilla::Preferences::GetBool("gfx.xrender.enabled");
|
||||
#endif
|
||||
|
||||
#ifndef MOZ_PANGO
|
||||
FT_Init_FreeType(&gPlatformFTLibrary);
|
||||
|
||||
gPlatformFonts = new FontTable();
|
||||
gPlatformFonts->Init(100);
|
||||
gPlatformFontAliases = new FontTable();
|
||||
|
@ -185,7 +178,7 @@ gfxPlatformGtk::CreateOffscreenSurface(const gfxIntSize& size,
|
|||
imageFormat = GetOffscreenFormat();
|
||||
}
|
||||
|
||||
if (UseXRender()) {
|
||||
if (UseClientSideRendering()) {
|
||||
// We're not going to use XRender, so we don't need to
|
||||
// search for a render format
|
||||
newSurface = new gfxImageSurface(size, imageFormat);
|
||||
|
|
|
@ -129,7 +129,7 @@ public:
|
|||
|
||||
static PRInt32 GetDPI();
|
||||
|
||||
static bool UseXRender() {
|
||||
static bool UseClientSideRendering() {
|
||||
#if defined(MOZ_X11) && defined(MOZ_PLATFORM_MAEMO)
|
||||
// XRender is not accelerated on the Maemo at the moment, and
|
||||
// X server pixman is out of our control; it's likely to be
|
||||
|
@ -141,8 +141,6 @@ public:
|
|||
// rendering, but until we have the ability to featuer test
|
||||
// this, we'll only disable this for maemo.
|
||||
return true;
|
||||
#elif defined(MOZ_X11)
|
||||
return sUseXRender;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
@ -155,9 +153,6 @@ protected:
|
|||
|
||||
private:
|
||||
virtual qcms_profile *GetPlatformCMSOutputProfile();
|
||||
#ifdef MOZ_X11
|
||||
static bool sUseXRender;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* GFX_PLATFORM_GTK_H */
|
||||
|
|
|
@ -3431,10 +3431,6 @@ pref("layers.acceleration.draw-fps", false);
|
|||
|
||||
pref("layers.offmainthreadcomposition.enabled", false);
|
||||
|
||||
#ifdef MOZ_X11
|
||||
pref("gfx.xrender.enabled",true);
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
// Whether to disable the automatic detection and use of direct2d.
|
||||
#ifdef MOZ_E10S_COMPAT
|
||||
|
|
Загрузка…
Ссылка в новой задаче