Bug 796084 - Rename MOZ_JAVA_COMPOSITOR -> MOZ_ANDROID_OMTC. r=blassey

This commit is contained in:
Benoit Girard 2012-10-01 16:01:35 -04:00
parent e264d5e2bf
commit c8f1bc0779
17 changed files with 40 additions and 40 deletions

View File

@ -4213,7 +4213,7 @@ MOZ_REFLOW_PERF=
MOZ_SAFE_BROWSING=
MOZ_HELP_VIEWER=
MOZ_SPELLCHECK=1
MOZ_JAVA_COMPOSITOR=
MOZ_ANDROID_OMTC=
MOZ_ONLY_TOUCH_EVENTS=
MOZ_TOOLKIT_SEARCH=1
MOZ_UI_LOCALE=en-US
@ -5042,9 +5042,9 @@ fi
dnl ========================================================
dnl = Build with the Android Java compositor
dnl ========================================================
if test -n "$MOZ_JAVA_COMPOSITOR"; then
if test -n "$MOZ_ANDROID_OMTC"; then
dnl Do this if defined in confvars.sh
AC_DEFINE(MOZ_JAVA_COMPOSITOR)
AC_DEFINE(MOZ_ANDROID_OMTC)
fi
dnl ========================================================
@ -8253,7 +8253,7 @@ AC_SUBST(IBMBIDI)
AC_SUBST(MOZ_UNIVERSALCHARDET)
AC_SUBST(ACCESSIBILITY)
AC_SUBST(MOZ_SPELLCHECK)
AC_SUBST(MOZ_JAVA_COMPOSITOR)
AC_SUBST(MOZ_ANDROID_OMTC)
AC_SUBST(MOZ_ONLY_TOUCH_EVENTS)
AC_SUBST(MOZ_CRASHREPORTER)
AC_SUBST(MOZ_CRASHREPORTER_INJECTOR)

View File

@ -574,7 +574,7 @@ MOCHITEST_FILES_B = \
# OOP tests don't work on Windows (bug 763081) or native-fennec
# (see Bug 774939)
ifneq ($(OS_ARCH),WINNT)
ifndef MOZ_JAVA_COMPOSITOR
ifndef MOZ_ANDROID_OMTC
MOCHITEST_FILES_B += \
test_messagemanager_assertpermission.html \
test_child_process_shutdown_message.html \

View File

@ -145,7 +145,7 @@ MOCHITEST_FILES = \
# so we don't run that test on platforms which don't support OOP tests.
ifneq ($(OS_ARCH),WINNT) #{
ifndef MOZ_JAVA_COMPOSITOR #{
ifndef MOZ_ANDROID_OMTC #{
MOCHITEST_FILES += \
browserElement_OpenMixedProcess.js \
file_browserElement_OpenMixedProcess.html \

View File

@ -146,7 +146,7 @@ static GLLibraryEGL sEGLLibrary;
(_array).AppendElement(_k); \
} while (0)
#ifndef MOZ_JAVA_COMPOSITOR
#ifndef MOZ_ANDROID_OMTC
static EGLSurface
CreateSurfaceForWindow(nsIWidget *aWidget, EGLConfig config);
#endif
@ -533,7 +533,7 @@ public:
sEGLLibrary.fMakeCurrent(EGL_DISPLAY(), EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT);
if (!mSurface) {
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
mSurface = mozilla::AndroidBridge::Bridge()->ProvideEGLSurface();
#else
EGLConfig config;
@ -2122,9 +2122,9 @@ CreateConfig(EGLConfig* aConfig)
}
}
// When MOZ_JAVA_COMPOSITOR is defined,
// When MOZ_ANDROID_OMTC is defined,
// use mozilla::AndroidBridge::Bridge()->ProvideEGLSurface() instead.
#ifndef MOZ_JAVA_COMPOSITOR
#ifndef MOZ_ANDROID_OMTC
static EGLSurface
CreateSurfaceForWindow(nsIWidget *aWidget, EGLConfig config)
{
@ -2216,7 +2216,7 @@ GLContextProviderEGL::CreateForWindow(nsIWidget *aWidget)
return nullptr;
}
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
mozilla::AndroidBridge::Bridge()->RegisterCompositor();
EGLSurface surface = mozilla::AndroidBridge::Bridge()->ProvideEGLSurface();
#else
@ -2646,7 +2646,7 @@ GLContextProviderEGL::GetGlobalContext(const ContextFlags)
{
// Don't want a global context on Android as 1) share groups across 2 threads fail on many Tegra drivers (bug 759225)
// and 2) some mobile devices have a very strict limit on global number of GL contexts (bug 754257)
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
return nullptr;
#endif

View File

@ -110,8 +110,8 @@ CPPSRCS += \
GLLibraryEGL.cpp
endif
ifdef MOZ_JAVA_COMPOSITOR
DEFINES += -DMOZ_JAVA_COMPOSITOR
ifdef MOZ_ANDROID_OMTC
DEFINES += -DMOZ_ANDROID_OMTC
endif
include $(topsrcdir)/config/rules.mk

View File

@ -8,7 +8,7 @@
#define TILEDLAYERBUFFER_TILE_SIZE 256
// Debug defines
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
// This needs to go away as we enabled tiled
// layers everywhere.
#define FORCE_BASICTILEDTHEBESLAYER

View File

@ -924,7 +924,7 @@ LayerManagerOGL::Render()
// If the Java compositor is being used, this clear will be done in
// DrawWindowUnderlay. Make sure the bits used here match up with those used
// in mobile/android/base/gfx/LayerRenderer.java
#ifndef MOZ_JAVA_COMPOSITOR
#ifndef MOZ_ANDROID_OMTC
mGLContext->fClearColor(0.0, 0.0, 0.0, 0.0);
mGLContext->fClear(LOCAL_GL_COLOR_BUFFER_BIT | LOCAL_GL_DEPTH_BUFFER_BIT);
#endif

View File

@ -1459,7 +1459,7 @@ ContainerState::CreateOrRecycleThebesLayer(const nsIFrame* aActiveScrolledRoot,
layer->SetBaseTransform(gfx3DMatrix::From2D(matrix));
// FIXME: Temporary workaround for bug 681192 and bug 724786.
#ifndef MOZ_JAVA_COMPOSITOR
#ifndef MOZ_ANDROID_OMTC
// Calculate exact position of the top-left of the active scrolled root.
// This might not be 0,0 due to the snapping in ScaleToNearestPixels.
gfxPoint activeScrolledRootTopLeft = scaledOffset - matrix.GetTranslation();

View File

@ -714,7 +714,7 @@ PresShell::PresShell()
mIsThemeSupportDisabled = false;
mIsActive = true;
// FIXME/bug 735029: find a better solution to this problem
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
// The java pan/zoom code uses this to mean approximately "request a
// reset of pan/zoom state" which doesn't necessarily correspond
// with the first paint of content.

View File

@ -42,7 +42,7 @@ MOZ_ONLY_TOUCH_EVENTS=1
MOZ_APP_ID={aa3c5121-dab2-40e2-81ca-7ea25febc110}
MOZ_JAVA_COMPOSITOR=1
MOZ_ANDROID_OMTC=1
MOZ_EXTENSION_MANAGER=1
MOZ_APP_STATIC_INI=1

View File

@ -201,7 +201,7 @@ AndroidBridge::Init(JNIEnv *jEnv,
jRegisterSurfaceTextureFrameListener = jEnv->GetStaticMethodID(jGeckoAppShellClass, "registerSurfaceTextureFrameListener", "(Ljava/lang/Object;I)V");
jUnregisterSurfaceTextureFrameListener = jEnv->GetStaticMethodID(jGeckoAppShellClass, "unregisterSurfaceTextureFrameListener", "(Ljava/lang/Object;)V");
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
jPumpMessageLoop = (jmethodID) jEnv->GetStaticMethodID(jGeckoAppShellClass, "pumpMessageLoop", "()Z");
jAddPluginView = jEnv->GetStaticMethodID(jGeckoAppShellClass, "addPluginView", "(Landroid/view/View;IIIIZ)V");
@ -2281,7 +2281,7 @@ AndroidBridge::UnlockScreenOrientation()
bool
AndroidBridge::PumpMessageLoop()
{
#if MOZ_JAVA_COMPOSITOR
#if MOZ_ANDROID_OMTC
JNIEnv* env = GetJNIEnv();
if (!env)
return false;
@ -2316,7 +2316,7 @@ AndroidBridge::NotifyWakeLockChanged(const nsAString& topic, const nsAString& st
void
AndroidBridge::ScheduleComposite()
{
#if MOZ_JAVA_COMPOSITOR
#if MOZ_ANDROID_OMTC
nsWindow::ScheduleComposite();
#endif
}
@ -2387,7 +2387,7 @@ AndroidBridge::AddPluginView(jobject view, const gfxRect& rect, bool isFullScree
AutoLocalJNIFrame jniFrame(env);
#if MOZ_JAVA_COMPOSITOR
#if MOZ_ANDROID_OMTC
env->CallStaticVoidMethod(sBridge->mGeckoAppShellClass,
sBridge->jAddPluginView, view,
(int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height,

View File

@ -814,7 +814,7 @@ Java_org_mozilla_gecko_GeckoAppShell_notifyReadingMessageListFailed(JNIEnv* jenv
NS_DispatchToMainThread(runnable);
}
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
NS_EXPORT void JNICALL
Java_org_mozilla_gecko_GeckoAppShell_scheduleComposite(JNIEnv*, jclass)

View File

@ -234,7 +234,7 @@ AndroidGeckoEvent::InitGeckoEventClass(JNIEnv *jEnv)
void
AndroidGeckoSurfaceView::InitGeckoSurfaceViewClass(JNIEnv *jEnv)
{
#ifndef MOZ_JAVA_COMPOSITOR
#ifndef MOZ_ANDROID_OMTC
initInit();
jGeckoSurfaceViewClass = getClassGlobalRef("org/mozilla/gecko/GeckoSurfaceView");
@ -331,7 +331,7 @@ AndroidRectF::InitRectFClass(JNIEnv *jEnv)
void
AndroidGeckoLayerClient::InitGeckoLayerClientClass(JNIEnv *jEnv)
{
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
initInit();
jGeckoLayerClientClass = getClassGlobalRef("org/mozilla/gecko/gfx/GeckoLayerClient");
@ -358,7 +358,7 @@ AndroidGeckoLayerClient::InitGeckoLayerClientClass(JNIEnv *jEnv)
void
AndroidLayerRendererFrame::InitLayerRendererFrameClass(JNIEnv *jEnv)
{
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
initInit();
jLayerRendererFrameClass = getClassGlobalRef("org/mozilla/gecko/gfx/LayerRenderer$Frame");
@ -373,7 +373,7 @@ AndroidLayerRendererFrame::InitLayerRendererFrameClass(JNIEnv *jEnv)
void
AndroidViewTransform::InitViewTransformClass(JNIEnv *jEnv)
{
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
initInit();
jViewTransformClass = getClassGlobalRef("org/mozilla/gecko/gfx/ViewTransform");

View File

@ -283,7 +283,7 @@ const nsTArray<GfxDriverInfo>&
GfxInfo::GetGfxDriverInfo()
{
if (mDriverInfo->IsEmpty()) {
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
APPEND_TO_DRIVER_BLOCKLIST2( DRIVER_OS_ALL,
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAll), GfxDriverInfo::allDevices,
nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_NO_INFO,

View File

@ -60,7 +60,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsWindow, nsBaseWidget)
static gfxIntSize gAndroidBounds = gfxIntSize(0, 0);
static gfxIntSize gAndroidScreenBounds;
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
#include "mozilla/layers/CompositorChild.h"
#include "mozilla/layers/CompositorParent.h"
#include "mozilla/Mutex.h"
@ -172,7 +172,7 @@ nsWindow::~nsWindow()
if (top->mFocus == this)
top->mFocus = nullptr;
ALOG("nsWindow %p destructor", (void*)this);
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
SetCompositor(NULL, NULL);
#endif
}
@ -697,7 +697,7 @@ nsWindow::GetLayerManager(PLayersChild*, LayersBackend, LayerManagerPersistence,
mUseAcceleratedRendering = GetShouldAccelerate();
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
bool useCompositor = UseOffMainThreadCompositing();
if (useCompositor) {
@ -909,7 +909,7 @@ nsWindow::OnGlobalAndroidEvent(AndroidGeckoEvent *ae)
sValidSurface = false;
break;
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
case AndroidGeckoEvent::COMPOSITOR_PAUSE:
// The compositor gets paused when the app is about to go into the
// background. While the compositor is paused, we need to ensure that
@ -1086,7 +1086,7 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
return;
AutoLocalJNIFrame jniFrame;
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
// We're paused, or we haven't been given a window-size yet, so do nothing
if (sCompositorPaused || gAndroidBounds.width <= 0 || gAndroidBounds.height <= 0) {
return;
@ -2230,7 +2230,7 @@ nsWindow::GetIMEUpdatePreference()
return nsIMEUpdatePreference(true, true);
}
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
void
nsWindow::DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect)
{

View File

@ -11,7 +11,7 @@
#include "nsIIdleServiceInternal.h"
#include "nsTArray.h"
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
#include "AndroidJavaWrappers.h"
#endif
@ -146,7 +146,7 @@ public:
NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent);
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
virtual bool NeedsPaint();
virtual void DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect);
virtual void DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect);
@ -212,7 +212,7 @@ private:
void HandleSpecialKey(mozilla::AndroidGeckoEvent *ae);
void RedrawAll();
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
mozilla::AndroidLayerRendererFrame mLayerRendererFrame;
static nsRefPtr<mozilla::layers::CompositorParent> sCompositorParent;

View File

@ -804,7 +804,7 @@ nsBaseWidget::GetShouldAccelerate()
if (!whitelisted) {
NS_WARNING("OpenGL-accelerated layers are not supported on this system.");
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
NS_RUNTIMEABORT("OpenGL-accelerated layers are a hard requirement on this platform. "
"Cannot continue without support for them.");
#endif
@ -821,7 +821,7 @@ nsBaseWidget::GetShouldAccelerate()
void nsBaseWidget::CreateCompositor()
{
bool renderToEGLSurface = false;
#ifdef MOZ_JAVA_COMPOSITOR
#ifdef MOZ_ANDROID_OMTC
renderToEGLSurface = true;
#endif
nsIntRect rect;