merge b2g-inbound to mozilla-central

This commit is contained in:
Carsten "Tomcat" Book 2013-12-03 10:41:51 +01:00
commit 02cebc7fa1
9 changed files with 33 additions and 24 deletions

View File

@ -47,6 +47,7 @@ FilePicker.prototype = {
/* members */
mParent: undefined,
mExtraProps: {},
mFilterTypes: [],
mFileEnumerator: undefined,
mFilePickerShownCallback: undefined,
@ -85,6 +86,8 @@ FilePicker.prototype = {
if (filterMask & Ci.nsIFilePicker.filterImages) {
this.mFilterTypes = this.mFilterTypes.concat(IMAGE_FILTERS);
// This property is needed for the gallery app pick activity.
this.mExtraProps['nocrop'] = true;
}
// Ci.nsIFilePicker.filterXML is not supported
@ -117,6 +120,12 @@ FilePicker.prototype = {
detail.type = this.mFilterTypes;
}
for (let prop in this.mExtraProps) {
if (!(prop in detail)) {
detail[prop] = this.mExtraProps[prop];
}
}
cpmm.sendAsyncMessage('file-picker', detail);
},

View File

@ -1,4 +1,4 @@
{
"revision": "c2506884aba22b968d3ab1ad6c28f0782b22a17f",
"revision": "001672effec8835928519312c1075a842af9166c",
"repo_path": "/integration/gaia-central"
}

View File

@ -322,10 +322,6 @@ documenttab[selected] .documenttab-selection {
min-width: @scroller_minimum@;
}
#browsers[input="imprecise"] browser {
overflow: hidden;
}
/* overlay buttons */
.overlay-button {

View File

@ -37,6 +37,10 @@ MediaOmxReader::MediaOmxReader(AbstractMediaDecoder *aDecoder) :
MediaOmxReader::~MediaOmxReader()
{
ResetDecode();
VideoFrameContainer* container = mDecoder->GetVideoFrameContainer();
if (container) {
container->ClearCurrentFrame();
}
mOmxDecoder.clear();
}
@ -64,6 +68,12 @@ bool MediaOmxReader::IsDormantNeeded()
void MediaOmxReader::ReleaseMediaResources()
{
ResetDecode();
// Before freeing a video codec, all video buffers needed to be released
// even from graphics pipeline.
VideoFrameContainer* container = mDecoder->GetVideoFrameContainer();
if (container) {
container->ClearCurrentFrame();
}
if (mOmxDecoder.get()) {
mOmxDecoder->ReleaseMediaResources();
}
@ -166,18 +176,6 @@ nsresult MediaOmxReader::ReadMetadata(MediaInfo* aInfo,
return NS_OK;
}
// Resets all state related to decoding, emptying all buffers etc.
nsresult MediaOmxReader::ResetDecode()
{
MediaDecoderReader::ResetDecode();
VideoFrameContainer* container = mDecoder->GetVideoFrameContainer();
if (container) {
container->ClearCurrentFrame();
}
return NS_OK;
}
bool MediaOmxReader::DecodeVideoFrame(bool &aKeyframeSkip,
int64_t aTimeThreshold)
{
@ -347,12 +345,11 @@ nsresult MediaOmxReader::Seek(int64_t aTarget, int64_t aStartTime, int64_t aEndT
{
NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
ResetDecode();
VideoFrameContainer* container = mDecoder->GetVideoFrameContainer();
if (container && container->GetImageContainer()) {
container->GetImageContainer()->ClearAllImagesExceptFront();
}
mVideoQueue.Reset();
mAudioQueue.Reset();
mAudioSeekTimeUs = mVideoSeekTimeUs = aTarget;

View File

@ -48,7 +48,6 @@ public:
~MediaOmxReader();
virtual nsresult Init(MediaDecoderReader* aCloneDonor);
virtual nsresult ResetDecode();
virtual void NotifyDataArrived(const char* aBuffer, uint32_t aLength, int64_t aOffset);

View File

@ -1045,7 +1045,9 @@ ParticularProcessPriorityManager::ShutDown()
mResetPriorityTimer = nullptr;
}
ProcessPriorityManager::RemoveFromBackgroundLRUPool(mContentParent);
if (mPriority == PROCESS_PRIORITY_BACKGROUND && !IsPreallocated()) {
ProcessPriorityManager::RemoveFromBackgroundLRUPool(mContentParent);
}
mContentParent = nullptr;
}

View File

@ -110,10 +110,12 @@ SpeakerManager::DispatchSimpleEvent(const nsAString& aStr)
void
SpeakerManager::Init(nsPIDOMWindow* aWindow)
{
BindToOwner(aWindow->IsOuterWindow() ?
aWindow->GetCurrentInnerWindow() : aWindow);
BindToOwner(aWindow);
nsCOMPtr<nsIDocShell> docshell = do_GetInterface(GetOwner());
NS_ENSURE_TRUE_VOID(docshell);
docshell->GetIsActive(&mVisible);
mVisible = !GetOwner()->IsBackground();
nsCOMPtr<nsIDOMEventTarget> target = do_QueryInterface(GetOwner());
NS_ENSURE_TRUE_VOID(target);

View File

@ -525,6 +525,8 @@ HwcComposer2D::Render(EGLDisplay dpy, EGLSurface sur)
mList->hwLayers[0].compositionType = HWC_BACKGROUND;
mList->hwLayers[0].flags = HWC_SKIP_LAYER;
mList->hwLayers[0].backgroundColor = {0};
mList->hwLayers[0].acquireFenceFd = -1;
mList->hwLayers[0].releaseFenceFd = -1;
mList->hwLayers[0].displayFrame = {0, 0, mScreenRect.width, mScreenRect.height};
Prepare(fbsurface->lastHandle, fbsurface->lastFenceFD);
}

View File

@ -234,6 +234,8 @@ GonkDisplayJB::Post(buffer_handle_t buf, int fence)
/* Skip this layer so the hwc module doesn't complain about null handles */
mList->hwLayers[0].flags = HWC_SKIP_LAYER;
mList->hwLayers[0].backgroundColor = {0};
mList->hwLayers[0].acquireFenceFd = -1;
mList->hwLayers[0].releaseFenceFd = -1;
/* hwc module checks displayFrame even though it shouldn't */
mList->hwLayers[0].displayFrame = r;
mList->hwLayers[1].compositionType = HWC_FRAMEBUFFER_TARGET;