Bug 569490 Don't build D3D9 layer if we can't find d3d9.h r=ted,jmuizelaar

This commit is contained in:
Neil Rashbrook 2010-06-06 11:37:44 +01:00
Родитель 8b9db577e2
Коммит a30d461807
8 изменённых файлов: 26 добавлений и 10 удалений

Просмотреть файл

@ -512,6 +512,7 @@ MOZ_ENABLE_PHOTON = @MOZ_ENABLE_PHOTON@
MOZ_ENABLE_XREMOTE = @MOZ_ENABLE_XREMOTE@
MOZ_ENABLE_DWRITE_FONT = @MOZ_ENABLE_DWRITE_FONT@
MOZ_ENABLE_D2D_SURFACE = @MOZ_ENABLE_D2D_SURFACE@
MOZ_ENABLE_D3D9_LAYER = @MOZ_ENABLE_D3D9_LAYER@
MOZ_GTK2_CFLAGS = @MOZ_GTK2_CFLAGS@
MOZ_GTK2_LIBS = @MOZ_GTK2_LIBS@

Просмотреть файл

@ -8200,6 +8200,8 @@ if test "$MOZ_TREE_CAIRO"; then
WIN32_D2D_SURFACE_FEATURE=
fi
AC_CHECK_HEADER(d3d9.h, MOZ_ENABLE_D3D9_LAYER=1)
AC_TRY_COMPILE([#include <ddraw.h>], [int foo = DDLOCK_WAITNOTBUSY;], HAS_DDRAW=1, HAS_DDRAW=)
if test -z "$HAS_DDRAW"; then
AC_MSG_WARN([DirectDraw ddraw.h header not found or it's missing DDLOCK_WAITNOTBUSY, disabling DirectDraw surface. If you have an older SDK (such as the CE5 SDK), try copying in ddraw.lib and ddraw.h from the WM6 SDK.])
@ -8247,6 +8249,7 @@ if test "$MOZ_TREE_CAIRO"; then
AC_SUBST(MOZ_ENABLE_CAIRO_FT)
AC_SUBST(MOZ_ENABLE_DWRITE_FONT)
AC_SUBST(MOZ_ENABLE_D2D_SURFACE)
AC_SUBST(MOZ_ENABLE_D3D9_LAYER)
AC_SUBST(CAIRO_FT_CFLAGS)
AC_SUBST(HAS_OGLES)

Просмотреть файл

@ -77,7 +77,7 @@ CPPSRCS = \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
ifndef WINCE
ifdef MOZ_ENABLE_D3D9_LAYER
EXPORTS += LayerManagerD3D9.h
CPPSRCS += \

Просмотреть файл

@ -109,6 +109,10 @@ _OS_LIBS += uuid
endif
OS_LIBS += $(call EXPAND_LIBNAME,$(_OS_LIBS))
ifdef MOZ_ENABLE_D3D9_LAYER
DEFINES += -DMOZ_ENABLE_D3D9_LAYER
endif
ACDEFINES += -UWIN32_LEAN_AND_MEAN
endif

Просмотреть файл

@ -2,7 +2,7 @@
#include "LayerManagerOGL.h"
#include "BasicLayers.h"
#include "ImageLayers.h"
#if defined(XP_WIN) && !defined(WINCE)
#ifdef MOZ_ENABLE_D3D9_LAYER
#include "LayerManagerD3D9.h"
#endif
@ -13,7 +13,7 @@ void XXXNeverCalled_Layers()
{
BasicLayerManager(nsnull);
LayerManagerOGL(nsnull);
#if defined(XP_WIN) && !defined(WINCE)
#ifdef MOZ_ENABLE_D3D9_LAYER
LayerManagerD3D9(nsnull);
#endif
}

Просмотреть файл

@ -108,6 +108,10 @@ endif
DEFINES += -D_IMPL_NS_WIDGET -DMOZ_UNICODE
ifdef MOZ_ENABLE_D3D9_LAYER
DEFINES += -DMOZ_ENABLE_D3D9_LAYER
endif
ifdef BUILD_STATIC_LIBS
DEFINES += -DMOZ_STATIC_COMPONENT_LIBS
endif # BUILD_STATIC_LIBS

Просмотреть файл

@ -169,7 +169,9 @@
#include "gfxWindowsPlatform.h"
#include "Layers.h"
#ifndef WINCE
#ifdef MOZ_ENABLE_D3D9_LAYER
#include "LayerManagerD3D9.h"
#endif
#include "LayerManagerOGL.h"
#endif
@ -2944,16 +2946,18 @@ nsWindow::GetLayerManager()
}
if (allowAcceleration) {
if (preferOpenGL) {
nsRefPtr<mozilla::layers::LayerManagerOGL> layerManager =
new mozilla::layers::LayerManagerOGL(this);
#ifdef MOZ_ENABLE_D3D9_LAYER
if (!preferOpenGL) {
nsRefPtr<mozilla::layers::LayerManagerD3D9> layerManager =
new mozilla::layers::LayerManagerD3D9(this);
if (layerManager->Initialize()) {
mLayerManager = layerManager;
}
}
#endif
if (!mLayerManager) {
nsRefPtr<mozilla::layers::LayerManagerD3D9> layerManager =
new mozilla::layers::LayerManagerD3D9(this);
nsRefPtr<mozilla::layers::LayerManagerOGL> layerManager =
new mozilla::layers::LayerManagerOGL(this);
if (layerManager->Initialize()) {
mLayerManager = layerManager;
}

Просмотреть файл

@ -71,7 +71,7 @@ using mozilla::plugins::PluginInstanceParent;
#include "prmem.h"
#include "LayerManagerOGL.h"
#ifndef WINCE
#ifdef MOZ_ENABLE_D3D9_LAYER
#include "LayerManagerD3D9.h"
#endif
@ -680,7 +680,7 @@ DDRAW_FAILED:
SetClippingRegion(event.region);
result = DispatchWindowEvent(&event, eventStatus);
break;
#ifndef WINCE
#ifdef MOZ_ENABLE_D3D9_LAYER
case LayerManager::LAYERS_D3D9:
static_cast<mozilla::layers::LayerManagerD3D9*>(GetLayerManager())->
SetClippingRegion(event.region);