Bug 1187088 - Use UNIFIED_SOURCES in widget/android; r=snorp

Fix some compiling errors in unified mode due to header dependency
issues.
This commit is contained in:
Jim Chen 2015-08-04 17:47:28 -04:00
parent ff569cc4b6
commit 412ca11ada
5 changed files with 10 additions and 22 deletions

View File

@ -3,12 +3,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/layers/CompositorChild.h"
#include "mozilla/layers/CompositorParent.h"
#include <android/log.h>
#include <dlfcn.h>
#include <math.h>
#include <GLES2/gl2.h>
#include "mozilla/layers/CompositorChild.h"
#include "mozilla/layers/CompositorParent.h"
#include "mozilla/Hal.h"
#include "nsXULAppAPI.h"

View File

@ -9,6 +9,7 @@
#include <nsTArray.h>
#include "AndroidGraphicBuffer.h"
#include "AndroidBridge.h"
#include "GLTypes.h"
#include "mozilla/Preferences.h"
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "AndroidGraphicBuffer" , ## args)
@ -25,7 +26,6 @@ typedef uint32_t EGLBoolean;
#define EGL_TRUE 1
#define EGL_FALSE 0
#define EGL_NONE 0x3038
#define EGL_NO_CONTEXT (EGLContext)0
#define EGL_DEFAULT_DISPLAY (void*)0
#define ANDROID_LIBUI_PATH "libui.so"

View File

@ -30,6 +30,7 @@
#endif
#include "mozilla/unused.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/dom/SmsMessage.h"
@ -706,20 +707,6 @@ Java_org_mozilla_gecko_GeckoAppShell_notifyFilePickerResult(JNIEnv* jenv, jclass
NS_DispatchToMainThread(runnable);
}
static int
NextPowerOfTwo(int value) {
// code taken from http://acius2.blogspot.com/2007/11/calculating-next-power-of-2.html
if (0 == value--) {
return 1;
}
value = (value >> 1) | value;
value = (value >> 2) | value;
value = (value >> 4) | value;
value = (value >> 8) | value;
value = (value >> 16) | value;
return value + 1;
}
#define MAX_LOCK_ATTEMPTS 10
static bool LockWindowWithRetry(void* window, unsigned char** bits, int* width, int* height, int* format, int* stride)
@ -778,8 +765,8 @@ Java_org_mozilla_gecko_GeckoAppShell_getSurfaceBits(JNIEnv* jenv, jclass, jobjec
goto cleanup;
}
dstWidth = NextPowerOfTwo(srcWidth);
dstHeight = NextPowerOfTwo(srcHeight);
dstWidth = mozilla::RoundUpPow2(srcWidth);
dstHeight = mozilla::RoundUpPow2(srcHeight);
dstSize = dstWidth * dstHeight * bpp;
bitsCopy = (unsigned char*)malloc(dstSize);

View File

@ -12,7 +12,7 @@ EXPORTS.mozilla.jni += [
'Utils.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'Utils.cpp',
]

View File

@ -22,7 +22,7 @@ EXPORTS += [
'GeneratedJNIWrappers.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'AndroidBridge.cpp',
'AndroidContentController.cpp',
'AndroidDirectTexture.cpp',