Skip to content
Snippets Groups Projects
Commit 921f13ce authored by Greg Grisco's avatar Greg Grisco
Browse files

Remove patch files since upstream changes have landed

Change-Id: Idac36820226ee39f6388ec5100e8d3943a7c9393
parent a088f4e5
No related branches found
No related merge requests found
From a49c14cf336031e9a69f07a422cf19b906e61e58 Mon Sep 17 00:00:00 2001
From: Michael Vines <mvines@codeaurora.org>
Date: Wed, 18 Mar 2015 14:34:48 -0700
Subject: [PATCH 1/4] Bug 1144512 - Add b2g build support for API level 22
Change-Id: Ibd833ee7d74716d86d23a5b664a7e414211d18b7
---
b2g/app/moz.build | 2 +-
configure.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/b2g/app/moz.build b/b2g/app/moz.build
index c6736b3..1f95405 100644
--- a/b2g/app/moz.build
+++ b/b2g/app/moz.build
@@ -58,7 +58,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
'cutils',
]
OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
- if CONFIG['ANDROID_VERSION'] in ('17', '18', '19', '21'):
+ if CONFIG['ANDROID_VERSION'] in ('17', '18', '19', '21', '22'):
OS_LIBS += [
'gui',
'suspend',
diff --git a/configure.in b/configure.in
index 72bff25..2250f4b 100644
--- a/configure.in
+++ b/configure.in
@@ -286,7 +286,7 @@ if test -n "$gonkdir" ; then
AC_DEFINE(MOZ_AUDIO_OFFLOAD)
MOZ_FMP4=1
;;
- 21)
+ 21|22)
GONK_INCLUDES="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include"
MOZ_AUDIO_OFFLOAD=1
MOZ_OMX_DECODER=1
--
1.8.2.1
From ae4139a7b5dfb0b0326c84070e52fa58e43a54fe Mon Sep 17 00:00:00 2001
From: Michael Vines <mvines@codeaurora.org>
Date: Wed, 18 Mar 2015 15:03:15 -0700
Subject: [PATCH] Bug 1144515 - ConsumerListener interface changes
Change-Id: I3a3e4d6f58a42576197356ba4b7301c670298c74
---
widget/gonk/libdisplay/FramebufferSurface.cpp | 4 ++++
widget/gonk/libdisplay/FramebufferSurface.h | 4 ++++
.../nativewindow/GonkBufferQueueLL/GonkBufferQueueLL.cpp | 16 ++++++++++++++++
.../nativewindow/GonkBufferQueueLL/GonkBufferQueueLL.h | 5 +++++
.../GonkBufferQueueLL/GonkBufferQueueProducer.cpp | 9 ++++++++-
widget/gonk/nativewindow/GonkConsumerBaseLL.cpp | 4 ++++
widget/gonk/nativewindow/GonkConsumerBaseLL.h | 5 +++++
widget/gonk/nativewindow/GonkNativeWindowLL.cpp | 5 +++++
widget/gonk/nativewindow/GonkNativeWindowLL.h | 4 ++++
9 files changed, 55 insertions(+), 1 deletion(-)
diff --git a/widget/gonk/libdisplay/FramebufferSurface.cpp b/widget/gonk/libdisplay/FramebufferSurface.cpp
index 32d0907..3282448 100644
--- a/widget/gonk/libdisplay/FramebufferSurface.cpp
+++ b/widget/gonk/libdisplay/FramebufferSurface.cpp
@@ -129,7 +129,11 @@ status_t FramebufferSurface::nextBuffer(sp<GraphicBuffer>& outBuffer, sp<Fence>&
}
// Overrides ConsumerBase::onFrameAvailable(), does not call base class impl.
+#if ANDROID_VERSION >= 22
+void FramebufferSurface::onFrameAvailable(const ::android::BufferItem &item) {
+#else
void FramebufferSurface::onFrameAvailable() {
+#endif
sp<GraphicBuffer> buf;
sp<Fence> acquireFence;
status_t err = nextBuffer(buf, acquireFence);
diff --git a/widget/gonk/libdisplay/FramebufferSurface.h b/widget/gonk/libdisplay/FramebufferSurface.h
index 1528c6e..0e4c2aa 100644
--- a/widget/gonk/libdisplay/FramebufferSurface.h
+++ b/widget/gonk/libdisplay/FramebufferSurface.h
@@ -63,7 +63,11 @@ public:
private:
virtual ~FramebufferSurface() { }; // this class cannot be overloaded
+#if ANDROID_VERSION >= 22
+ virtual void onFrameAvailable(const ::android::BufferItem &item);
+#else
virtual void onFrameAvailable();
+#endif
virtual void freeBufferLocked(int slotIndex);
// nextBuffer waits for and then latches the next buffer from the
diff --git a/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueLL.cpp b/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueLL.cpp
index 1056c3b..649d06b 100644
--- a/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueLL.cpp
+++ b/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueLL.cpp
@@ -32,12 +32,28 @@ GonkBufferQueue::ProxyConsumerListener::ProxyConsumerListener(
GonkBufferQueue::ProxyConsumerListener::~ProxyConsumerListener() {}
+#if ANDROID_VERSION == 21
void GonkBufferQueue::ProxyConsumerListener::onFrameAvailable() {
sp<ConsumerListener> listener(mConsumerListener.promote());
if (listener != NULL) {
listener->onFrameAvailable();
}
}
+#else
+void GonkBufferQueue::ProxyConsumerListener::onFrameAvailable(const ::android::BufferItem& item) {
+ sp<ConsumerListener> listener(mConsumerListener.promote());
+ if (listener != NULL) {
+ listener->onFrameAvailable(item);
+ }
+}
+
+void GonkBufferQueue::ProxyConsumerListener::onFrameReplaced(const ::android::BufferItem& item) {
+ sp<ConsumerListener> listener(mConsumerListener.promote());
+ if (listener != NULL) {
+ listener->onFrameReplaced(item);
+ }
+}
+#endif
void GonkBufferQueue::ProxyConsumerListener::onBuffersReleased() {
sp<ConsumerListener> listener(mConsumerListener.promote());
diff --git a/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueLL.h b/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueLL.h
index 9fb740a..b1b4e06 100644
--- a/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueLL.h
+++ b/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueLL.h
@@ -63,7 +63,12 @@ public:
public:
ProxyConsumerListener(const wp<ConsumerListener>& consumerListener);
virtual ~ProxyConsumerListener();
+#if ANDROID_VERSION == 21
virtual void onFrameAvailable();
+#else
+ virtual void onFrameAvailable(const ::android::BufferItem& item);
+ virtual void onFrameReplaced(const ::android::BufferItem& item);
+#endif
virtual void onBuffersReleased();
virtual void onSidebandStreamChanged();
private:
diff --git a/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueProducer.cpp b/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueProducer.cpp
index 5d3bbed..3340c97 100644
--- a/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueProducer.cpp
+++ b/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueProducer.cpp
@@ -537,6 +537,7 @@ status_t GonkBufferQueueProducer::queueBuffer(int slot,
return BAD_VALUE;
}
+ GonkBufferItem item;
sp<IConsumerListener> listener;
{ // Autolock scope
Mutex::Autolock lock(mCore->mMutex);
@@ -593,7 +594,6 @@ status_t GonkBufferQueueProducer::queueBuffer(int slot,
++mCore->mFrameCounter;
mSlots[slot].mFrameNumber = mCore->mFrameCounter;
- GonkBufferItem item;
item.mAcquireCalled = mSlots[slot].mAcquireCalled;
item.mGraphicBuffer = mSlots[slot].mGraphicBuffer;
item.mCrop = crop;
@@ -641,11 +641,18 @@ status_t GonkBufferQueueProducer::queueBuffer(int slot,
output->inflate(mCore->mDefaultWidth, mCore->mDefaultHeight,
mCore->mTransformHint, mCore->mQueue.size());
+
+ item.mGraphicBuffer.clear();
+ item.mSlot = GonkBufferItem::INVALID_BUFFER_SLOT;
} // Autolock scope
// Call back without lock held
if (listener != NULL) {
+#if ANDROID_VERSION == 21
listener->onFrameAvailable();
+#else
+ listener->onFrameAvailable(reinterpret_cast<::android::BufferItem&>(item));
+#endif
}
return NO_ERROR;
diff --git a/widget/gonk/nativewindow/GonkConsumerBaseLL.cpp b/widget/gonk/nativewindow/GonkConsumerBaseLL.cpp
index 8444665..36e4a83 100644
--- a/widget/gonk/nativewindow/GonkConsumerBaseLL.cpp
+++ b/widget/gonk/nativewindow/GonkConsumerBaseLL.cpp
@@ -85,7 +85,11 @@ void GonkConsumerBase::freeBufferLocked(int slotIndex) {
mSlots[slotIndex].mFrameNumber = 0;
}
+#if ANDROID_VERSION == 21
void GonkConsumerBase::onFrameAvailable() {
+#else
+void GonkConsumerBase::onFrameAvailable(const ::android::BufferItem& item) {
+#endif
ALOGV("onFrameAvailable");
sp<FrameAvailableListener> listener;
diff --git a/widget/gonk/nativewindow/GonkConsumerBaseLL.h b/widget/gonk/nativewindow/GonkConsumerBaseLL.h
index ba7b6c3..0b2c2d1 100644
--- a/widget/gonk/nativewindow/GonkConsumerBaseLL.h
+++ b/widget/gonk/nativewindow/GonkConsumerBaseLL.h
@@ -107,7 +107,12 @@ protected:
// the GonkConsumerBase implementation must be called from the derived class.
// The GonkConsumerBase version of onSidebandStreamChanged does nothing and can
// be overriden by derived classes if they want the notification.
+#if ANDROID_VERSION == 21
virtual void onFrameAvailable();
+#else
+ virtual void onFrameAvailable(const ::android::BufferItem& item);
+ virtual void onFrameReplaced(const ::android::BufferItem& item) {};
+#endif
virtual void onBuffersReleased();
virtual void onSidebandStreamChanged();
diff --git a/widget/gonk/nativewindow/GonkNativeWindowLL.cpp b/widget/gonk/nativewindow/GonkNativeWindowLL.cpp
index ee939ce..0cccc9d 100644
--- a/widget/gonk/nativewindow/GonkNativeWindowLL.cpp
+++ b/widget/gonk/nativewindow/GonkNativeWindowLL.cpp
@@ -188,8 +188,13 @@ void GonkNativeWindow::setNewFrameCallback(
mNewFrameCallback = callback;
}
+#if ANDROID_VERSION == 21
void GonkNativeWindow::onFrameAvailable() {
GonkConsumerBase::onFrameAvailable();
+#else
+void GonkNativeWindow::onFrameAvailable(const ::android::BufferItem &item) {
+ GonkConsumerBase::onFrameAvailable(item);
+#endif
if (mNewFrameCallback) {
mNewFrameCallback->OnNewFrame();
diff --git a/widget/gonk/nativewindow/GonkNativeWindowLL.h b/widget/gonk/nativewindow/GonkNativeWindowLL.h
index a257cc5..1a9b210 100644
--- a/widget/gonk/nativewindow/GonkNativeWindowLL.h
+++ b/widget/gonk/nativewindow/GonkNativeWindowLL.h
@@ -118,7 +118,11 @@ class GonkNativeWindow: public GonkConsumerBase
static void RecycleCallback(TextureClient* client, void* closure);
protected:
+#if ANDROID_VERSION == 21
virtual void onFrameAvailable();
+#else
+ virtual void onFrameAvailable(const ::android::BufferItem &item);
+#endif
private:
GonkNativeWindowNewFrameCallback* mNewFrameCallback;
--
1.8.2.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment