mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Merge m-c to fx-team a=merge
This commit is contained in:
commit
e9a45aaea6
@ -67,14 +67,6 @@ Accessible::ScrollTo(uint32_t aHow) const
|
||||
nsCoreUtils::ScrollTo(mDoc->PresShell(), mContent, aHow);
|
||||
}
|
||||
|
||||
inline bool
|
||||
Accessible::UpdateChildren()
|
||||
{
|
||||
AutoTreeMutation mut(this);
|
||||
InvalidateChildren();
|
||||
return EnsureChildren();
|
||||
}
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
|
@ -2012,8 +2012,7 @@ Accessible::InvalidateChildren()
|
||||
{
|
||||
int32_t childCount = mChildren.Length();
|
||||
for (int32_t childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
Accessible* child = mChildren.ElementAt(childIdx);
|
||||
child->UnbindFromParent();
|
||||
mChildren.ElementAt(childIdx)->UnbindFromParent();
|
||||
}
|
||||
|
||||
mEmbeddedObjCollector = nullptr;
|
||||
@ -2446,23 +2445,17 @@ Accessible::TestChildCache(Accessible* aCachedChild) const
|
||||
#endif
|
||||
}
|
||||
|
||||
// Accessible public
|
||||
bool
|
||||
void
|
||||
Accessible::EnsureChildren()
|
||||
{
|
||||
if (IsDefunct()) {
|
||||
SetChildrenFlag(eChildrenUninitialized);
|
||||
return true;
|
||||
}
|
||||
NS_ASSERTION(!IsDefunct(), "Caching children for defunct accessible!");
|
||||
|
||||
if (!IsChildrenFlag(eChildrenUninitialized))
|
||||
return false;
|
||||
return;
|
||||
|
||||
// State is embedded children until text leaf accessible is appended.
|
||||
SetChildrenFlag(eEmbeddedChildren); // Prevent reentry
|
||||
|
||||
CacheChildren();
|
||||
return false;
|
||||
}
|
||||
|
||||
Accessible*
|
||||
|
@ -366,14 +366,9 @@ public:
|
||||
{ mRoleMapEntry = aRoleMapEntry; }
|
||||
|
||||
/**
|
||||
* Update the children cache.
|
||||
* Cache children if necessary.
|
||||
*/
|
||||
bool UpdateChildren();
|
||||
|
||||
/**
|
||||
* Cache children if necessary. Return true if the accessible is defunct.
|
||||
*/
|
||||
bool EnsureChildren();
|
||||
void EnsureChildren();
|
||||
|
||||
/**
|
||||
* Set the child count to -1 (unknown) and null out cached child pointers.
|
||||
@ -587,6 +582,7 @@ public:
|
||||
HyperTextAccessible* AsHyperText();
|
||||
|
||||
bool IsHTMLBr() const { return mType == eHTMLBRType; }
|
||||
bool IsHTMLCombobox() const { return mType == eHTMLComboboxType; }
|
||||
bool IsHTMLFileInput() const { return mType == eHTMLFileInputType; }
|
||||
|
||||
bool IsHTMLListItem() const { return mType == eHTMLLiType; }
|
||||
@ -870,6 +866,19 @@ public:
|
||||
bool NeedsDOMUIEvent() const
|
||||
{ return !(mStateFlags & eIgnoreDOMUIEvent); }
|
||||
|
||||
/**
|
||||
* Get/set survivingInUpdate bit on child indicating that parent recollects
|
||||
* its children.
|
||||
*/
|
||||
bool IsSurvivingInUpdate() const { return mStateFlags & eSurvivingInUpdate; }
|
||||
void SetSurvivingInUpdate(bool aIsSurviving)
|
||||
{
|
||||
if (aIsSurviving)
|
||||
mStateFlags |= eSurvivingInUpdate;
|
||||
else
|
||||
mStateFlags &= ~eSurvivingInUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this accessible has a parent whose name depends on this
|
||||
* accessible.
|
||||
@ -953,8 +962,9 @@ protected:
|
||||
eGroupInfoDirty = 1 << 5, // accessible needs to update group info
|
||||
eSubtreeMutating = 1 << 6, // subtree is being mutated
|
||||
eIgnoreDOMUIEvent = 1 << 7, // don't process DOM UI events for a11y events
|
||||
eSurvivingInUpdate = 1 << 8, // parent drops children to recollect them
|
||||
|
||||
eLastStateFlag = eIgnoreDOMUIEvent
|
||||
eLastStateFlag = eSurvivingInUpdate
|
||||
};
|
||||
|
||||
/**
|
||||
@ -1068,7 +1078,7 @@ protected:
|
||||
int32_t mIndexInParent;
|
||||
|
||||
static const uint8_t kChildrenFlagsBits = 2;
|
||||
static const uint8_t kStateFlagsBits = 8;
|
||||
static const uint8_t kStateFlagsBits = 9;
|
||||
static const uint8_t kContextFlagsBits = 1;
|
||||
static const uint8_t kTypeBits = 6;
|
||||
static const uint8_t kGenericTypesBits = 13;
|
||||
|
@ -1308,19 +1308,10 @@ DocAccessible::ProcessInvalidationList()
|
||||
// children are recached.
|
||||
for (uint32_t idx = 0; idx < mInvalidationList.Length(); idx++) {
|
||||
nsIContent* content = mInvalidationList[idx];
|
||||
Accessible* accessible = GetAccessible(content);
|
||||
if (!accessible) {
|
||||
if (!HasAccessible(content)) {
|
||||
Accessible* container = GetContainerAccessible(content);
|
||||
if (container) {
|
||||
container->UpdateChildren();
|
||||
accessible = GetAccessible(content);
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the subtree is created.
|
||||
if (accessible) {
|
||||
AutoTreeMutation mut(accessible);
|
||||
CacheChildrenInSubtree(accessible);
|
||||
if (container)
|
||||
UpdateTreeOnInsertion(container);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1633,8 +1624,6 @@ DocAccessible::ProcessContentInserted(Accessible* aContainer,
|
||||
if (!HasAccessible(aContainer->GetNode()))
|
||||
return;
|
||||
|
||||
bool containerNotUpdated = true;
|
||||
|
||||
for (uint32_t idx = 0; idx < aInsertedContent->Length(); idx++) {
|
||||
// The container might be changed, for example, because of the subsequent
|
||||
// overlapping content insertion (i.e. other content was inserted between
|
||||
@ -1644,108 +1633,73 @@ DocAccessible::ProcessContentInserted(Accessible* aContainer,
|
||||
// Note, the inserted content might be not in tree at all at this point what
|
||||
// means there's no container. Ignore the insertion too.
|
||||
|
||||
Accessible* presentContainer =
|
||||
Accessible* container =
|
||||
GetContainerAccessible(aInsertedContent->ElementAt(idx));
|
||||
if (presentContainer != aContainer)
|
||||
if (container != aContainer)
|
||||
continue;
|
||||
|
||||
if (containerNotUpdated) {
|
||||
containerNotUpdated = false;
|
||||
|
||||
if (aContainer == this) {
|
||||
// If new root content has been inserted then update it.
|
||||
nsIContent* rootContent = nsCoreUtils::GetRoleContent(mDocumentNode);
|
||||
if (rootContent != mContent) {
|
||||
mContent = rootContent;
|
||||
SetRoleMapEntry(aria::GetRoleMap(mContent));
|
||||
}
|
||||
|
||||
// Continue to update the tree even if we don't have root content.
|
||||
// For example, elements may be inserted under the document element while
|
||||
// there is no HTML body element.
|
||||
if (container == this) {
|
||||
// If new root content has been inserted then update it.
|
||||
nsIContent* rootContent = nsCoreUtils::GetRoleContent(mDocumentNode);
|
||||
if (rootContent != mContent) {
|
||||
mContent = rootContent;
|
||||
SetRoleMapEntry(aria::GetRoleMap(mContent));
|
||||
}
|
||||
|
||||
// XXX: Invalidate parent-child relations for container accessible and its
|
||||
// children because there's no good way to find insertion point of new child
|
||||
// accessibles into accessible tree. We need to invalidate children even
|
||||
// there's no inserted accessibles in the end because accessible children
|
||||
// are created while parent recaches child accessibles.
|
||||
// XXX Group invalidation here may be redundant with invalidation in
|
||||
// UpdateTree.
|
||||
AutoTreeMutation mut(aContainer);
|
||||
aContainer->InvalidateChildren();
|
||||
CacheChildrenInSubtree(aContainer);
|
||||
// Continue to update the tree even if we don't have root content.
|
||||
// For example, elements may be inserted under the document element while
|
||||
// there is no HTML body element.
|
||||
}
|
||||
|
||||
UpdateTree(aContainer, aInsertedContent->ElementAt(idx), true);
|
||||
// HTML comboboxes have no-content list accessible as an intermidiate
|
||||
// containing all options.
|
||||
if (container->IsHTMLCombobox())
|
||||
container = container->FirstChild();
|
||||
|
||||
// We have a DOM/layout change under the container accessible, and its tree
|
||||
// might need an update. Since DOM/layout change of the element may affect
|
||||
// on the accessibleness of adjacent elements (for example, insertion of
|
||||
// extra HTML:body make the old body accessible) then we have to recache
|
||||
// children of the container, and then fire show/hide events for a change.
|
||||
UpdateTreeOnInsertion(container);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DocAccessible::UpdateTree(Accessible* aContainer, nsIContent* aChildNode,
|
||||
bool aIsInsert)
|
||||
DocAccessible::UpdateTreeOnInsertion(Accessible* aContainer)
|
||||
{
|
||||
uint32_t updateFlags = eNoAccessible;
|
||||
for (uint32_t idx = 0; idx < aContainer->ContentChildCount(); idx++) {
|
||||
Accessible* child = aContainer->ContentChildAt(idx);
|
||||
child->SetSurvivingInUpdate(true);
|
||||
}
|
||||
|
||||
// If child node is not accessible then look for its accessible children.
|
||||
Accessible* child = GetAccessible(aChildNode);
|
||||
#ifdef A11Y_LOG
|
||||
if (logging::IsEnabled(logging::eTree)) {
|
||||
logging::MsgBegin("TREE", "process content %s",
|
||||
(aIsInsert ? "insertion" : "removal"));
|
||||
logging::Node("container", aContainer->GetNode());
|
||||
logging::Node("child", aChildNode);
|
||||
if (child)
|
||||
logging::Address("child", child);
|
||||
else
|
||||
logging::MsgEntry("child accessible: null");
|
||||
|
||||
logging::MsgEnd();
|
||||
}
|
||||
#endif
|
||||
AutoTreeMutation mut(aContainer);
|
||||
aContainer->InvalidateChildren();
|
||||
aContainer->EnsureChildren();
|
||||
|
||||
nsRefPtr<AccReorderEvent> reorderEvent = new AccReorderEvent(aContainer);
|
||||
AutoTreeMutation mut(aContainer);
|
||||
|
||||
if (child) {
|
||||
updateFlags |= UpdateTreeInternal(child, aIsInsert, reorderEvent);
|
||||
} else {
|
||||
if (aIsInsert) {
|
||||
TreeWalker walker(aContainer, aChildNode, TreeWalker::eWalkCache);
|
||||
|
||||
while ((child = walker.NextChild()))
|
||||
updateFlags |= UpdateTreeInternal(child, aIsInsert, reorderEvent);
|
||||
} else {
|
||||
// aChildNode may not coorespond to a particular accessible, to handle
|
||||
// this we go through all the children of aContainer. Then if a child
|
||||
// has aChildNode as an ancestor, or does not have the node for
|
||||
// aContainer as an ancestor remove that child of aContainer. Note that
|
||||
// when we are called aChildNode may already have been removed
|
||||
// from the DOM so we can't expect it to have a parent or what was it's
|
||||
// parent to have it as a child.
|
||||
nsINode* containerNode = aContainer->GetNode();
|
||||
for (uint32_t idx = 0; idx < aContainer->ContentChildCount();) {
|
||||
Accessible* child = aContainer->ContentChildAt(idx);
|
||||
|
||||
// If accessible doesn't have its own content then we assume parent
|
||||
// will handle its update. If child is DocAccessible then we don't
|
||||
// handle updating it here either.
|
||||
if (!child->HasOwnContent() || child->IsDoc()) {
|
||||
idx++;
|
||||
continue;
|
||||
}
|
||||
|
||||
nsINode* childNode = child->GetContent();
|
||||
while (childNode != aChildNode && childNode != containerNode &&
|
||||
(childNode = childNode->GetParentNode()));
|
||||
|
||||
if (childNode != containerNode) {
|
||||
updateFlags |= UpdateTreeInternal(child, false, reorderEvent);
|
||||
} else {
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
uint32_t updateFlags = eNoAccessible;
|
||||
for (uint32_t idx = 0; idx < aContainer->ContentChildCount(); idx++) {
|
||||
Accessible* child = aContainer->ContentChildAt(idx);
|
||||
if (child->IsSurvivingInUpdate()) {
|
||||
child->SetSurvivingInUpdate(false);
|
||||
continue;
|
||||
}
|
||||
|
||||
// A new child has been created, update its tree.
|
||||
#ifdef A11Y_LOG
|
||||
if (logging::IsEnabled(logging::eTree)) {
|
||||
logging::MsgBegin("TREE", "process content insertion");
|
||||
logging::Node("container", aContainer->GetNode());
|
||||
logging::Node("child", child->GetContent());
|
||||
logging::Address("child", child);
|
||||
logging::MsgEnd();
|
||||
}
|
||||
#endif
|
||||
|
||||
updateFlags |= UpdateTreeInternal(child, true, reorderEvent);
|
||||
}
|
||||
|
||||
// Content insertion/removal is not cause of accessible tree change.
|
||||
@ -1754,7 +1708,7 @@ DocAccessible::UpdateTree(Accessible* aContainer, nsIContent* aChildNode,
|
||||
|
||||
// Check to see if change occurred inside an alert, and fire an EVENT_ALERT
|
||||
// if it did.
|
||||
if (aIsInsert && !(updateFlags & eAlertAccessible)) {
|
||||
if (!(updateFlags & eAlertAccessible)) {
|
||||
// XXX: tree traversal is perf issue, accessible should know if they are
|
||||
// children of alert accessible to avoid this.
|
||||
Accessible* ancestor = aContainer;
|
||||
@ -1773,9 +1727,71 @@ DocAccessible::UpdateTree(Accessible* aContainer, nsIContent* aChildNode,
|
||||
}
|
||||
|
||||
MaybeNotifyOfValueChange(aContainer);
|
||||
FireDelayedEvent(reorderEvent);
|
||||
}
|
||||
|
||||
// Fire reorder event so the MSAA clients know the children have changed. Also
|
||||
// the event is used internally by MSAA layer.
|
||||
void
|
||||
DocAccessible::UpdateTreeOnRemoval(Accessible* aContainer, nsIContent* aChildNode)
|
||||
{
|
||||
// If child node is not accessible then look for its accessible children.
|
||||
Accessible* child = GetAccessible(aChildNode);
|
||||
#ifdef A11Y_LOG
|
||||
if (logging::IsEnabled(logging::eTree)) {
|
||||
logging::MsgBegin("TREE", "process content removal");
|
||||
logging::Node("container", aContainer->GetNode());
|
||||
logging::Node("child", aChildNode);
|
||||
if (child)
|
||||
logging::Address("child", child);
|
||||
else
|
||||
logging::MsgEntry("child accessible: null");
|
||||
|
||||
logging::MsgEnd();
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t updateFlags = eNoAccessible;
|
||||
nsRefPtr<AccReorderEvent> reorderEvent = new AccReorderEvent(aContainer);
|
||||
AutoTreeMutation mut(aContainer);
|
||||
|
||||
if (child) {
|
||||
updateFlags |= UpdateTreeInternal(child, false, reorderEvent);
|
||||
} else {
|
||||
// aChildNode may not coorespond to a particular accessible, to handle
|
||||
// this we go through all the children of aContainer. Then if a child
|
||||
// has aChildNode as an ancestor, or does not have the node for
|
||||
// aContainer as an ancestor remove that child of aContainer. Note that
|
||||
// when we are called aChildNode may already have been removed from the DOM
|
||||
// so we can't expect it to have a parent or what was it's parent to have
|
||||
// it as a child.
|
||||
nsINode* containerNode = aContainer->GetNode();
|
||||
for (uint32_t idx = 0; idx < aContainer->ContentChildCount();) {
|
||||
Accessible* child = aContainer->ContentChildAt(idx);
|
||||
|
||||
// If accessible doesn't have its own content then we assume parent
|
||||
// will handle its update. If child is DocAccessible then we don't
|
||||
// handle updating it here either.
|
||||
if (!child->HasOwnContent() || child->IsDoc()) {
|
||||
idx++;
|
||||
continue;
|
||||
}
|
||||
|
||||
nsINode* childNode = child->GetContent();
|
||||
while (childNode != aChildNode && childNode != containerNode &&
|
||||
(childNode = childNode->GetParentNode()));
|
||||
|
||||
if (childNode != containerNode) {
|
||||
updateFlags |= UpdateTreeInternal(child, false, reorderEvent);
|
||||
} else {
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Content insertion/removal is not cause of accessible tree change.
|
||||
if (updateFlags == eNoAccessible)
|
||||
return;
|
||||
|
||||
MaybeNotifyOfValueChange(aContainer);
|
||||
FireDelayedEvent(reorderEvent);
|
||||
}
|
||||
|
||||
|
@ -321,7 +321,7 @@ public:
|
||||
{
|
||||
// Update the whole tree of this document accessible when the container is
|
||||
// null (document element is removed).
|
||||
UpdateTree((aContainer ? aContainer : this), aChildNode, false);
|
||||
UpdateTreeOnRemoval((aContainer ? aContainer : this), aChildNode);
|
||||
}
|
||||
void ContentRemoved(nsIContent* aContainerNode, nsIContent* aChildNode)
|
||||
{
|
||||
@ -465,13 +465,17 @@ protected:
|
||||
void ProcessInvalidationList();
|
||||
|
||||
/**
|
||||
* Update the accessible tree for content insertion or removal.
|
||||
* Update the tree on content insertion.
|
||||
*/
|
||||
void UpdateTree(Accessible* aContainer, nsIContent* aChildNode,
|
||||
bool aIsInsert);
|
||||
void UpdateTreeOnInsertion(Accessible* aContainer);
|
||||
|
||||
/**
|
||||
* Helper for UpdateTree() method. Go down to DOM subtree and updates
|
||||
* Update the accessible tree for content removal.
|
||||
*/
|
||||
void UpdateTreeOnRemoval(Accessible* aContainer, nsIContent* aChildNode);
|
||||
|
||||
/**
|
||||
* Helper for UpdateTreeOn methods. Go down to DOM subtree and updates
|
||||
* accessible tree. Return one of these flags.
|
||||
*/
|
||||
enum EUpdateTreeFlags {
|
||||
|
@ -359,6 +359,7 @@ HTMLComboboxAccessible::
|
||||
HTMLComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||
AccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
mType = eHTMLComboboxType;
|
||||
mGenericTypes |= eCombobox;
|
||||
}
|
||||
|
||||
|
@ -336,6 +336,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
function insertReferredElm(aContainerID)
|
||||
{
|
||||
this.containerNode = getNode(aContainerID);
|
||||
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_SHOW, function(aNode) { return aNode.lastChild; }, this.containerNode),
|
||||
new invokerChecker(EVENT_SHOW, function(aNode) { return aNode.firstChild; }, this.containerNode),
|
||||
new invokerChecker(EVENT_REORDER, this.containerNode)
|
||||
];
|
||||
|
||||
this.invoke = function insertReferredElm_invoke()
|
||||
{
|
||||
this.containerNode.innerHTML =
|
||||
"<span id='insertReferredElms_span'></span><input aria-labelledby='insertReferredElms_span'>";
|
||||
}
|
||||
|
||||
this.getID = function insertReferredElm_getID()
|
||||
{
|
||||
return "insert inaccessible element and then insert referring element to make it accessible";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Target getters.
|
||||
*/
|
||||
@ -343,6 +365,10 @@
|
||||
{
|
||||
return [aNode.firstChild];
|
||||
}
|
||||
function getLastChild(aNode)
|
||||
{
|
||||
return [aNode.lastChild];
|
||||
}
|
||||
|
||||
function getNEnsureFirstChild(aNode)
|
||||
{
|
||||
@ -457,6 +483,7 @@
|
||||
gQueue.push(new test2("testContainer", "testContainer2"));
|
||||
gQueue.push(new test2("testContainer", "testNestedContainer"));
|
||||
gQueue.push(new test3("testContainer"));
|
||||
gQueue.push(new insertReferredElm("testContainer3"));
|
||||
|
||||
gQueue.invoke(); // Will call SimpleTest.finish();
|
||||
}
|
||||
@ -516,5 +543,6 @@
|
||||
<div id="testNestedContainer"></div>
|
||||
</div>
|
||||
<div id="testContainer2"></div>
|
||||
<div id="testContainer3"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -86,7 +86,7 @@
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
},
|
||||
{
|
||||
role: ROLE_COMBOBOX_OPTION,
|
||||
children: [
|
||||
|
@ -21,6 +21,7 @@
|
||||
{
|
||||
this.selectNode = getNode(aID);
|
||||
this.select = getAccessible(this.selectNode);
|
||||
this.selectList = this.select.firstChild;
|
||||
|
||||
this.invoke = function addOptGroup_invoke()
|
||||
{
|
||||
@ -39,7 +40,7 @@
|
||||
}
|
||||
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_REORDER, this.select)
|
||||
new invokerChecker(EVENT_REORDER, this.selectList)
|
||||
];
|
||||
|
||||
this.finalCheck = function addOptGroup_finalCheck()
|
||||
|
@ -21,6 +21,7 @@
|
||||
{
|
||||
this.selectNode = getNode(aID);
|
||||
this.select = getAccessible(this.selectNode);
|
||||
this.selectList = this.select.firstChild;
|
||||
|
||||
this.invoke = function addOptions_invoke()
|
||||
{
|
||||
@ -34,7 +35,7 @@
|
||||
}
|
||||
|
||||
this.eventSeq = [
|
||||
new invokerChecker(EVENT_REORDER, this.select)
|
||||
new invokerChecker(EVENT_REORDER, this.selectList)
|
||||
];
|
||||
|
||||
this.finalCheck = function addOptions_finalCheck()
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a2e84985476d4b1fa518b7465a26cfe596923e7"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
@ -139,7 +139,7 @@
|
||||
<project name="platform/system/core" path="system/core" revision="53d584d4a4b4316e4de9ee5f210d662f89b44e7e"/>
|
||||
<project name="u-boot" path="u-boot" revision="982c1fd67b89d5573317c1796cf5b0143de44e8a"/>
|
||||
<project name="vendor/sprd/gps" path="vendor/sprd/gps" revision="6974f8e771d4d8e910357a6739ab124768891e8f"/>
|
||||
<project name="vendor/sprd/open-source" path="vendor/sprd/open-source" revision="5565803db502bf01b9d10102327c81ab3a140f1b"/>
|
||||
<project name="vendor/sprd/open-source" path="vendor/sprd/open-source" revision="c7e8ac3f420ced1473fc5a42e6918b722112ede2"/>
|
||||
<project name="vendor/sprd/partner" path="vendor/sprd/partner" revision="8649c7145972251af11b0639997edfecabfc7c2e"/>
|
||||
<project name="vendor/sprd/proprietories" path="vendor/sprd/proprietories" revision="d2466593022f7078aaaf69026adf3367c2adb7bb"/>
|
||||
</manifest>
|
||||
|
@ -19,13 +19,13 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a2e84985476d4b1fa518b7465a26cfe596923e7"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a2e84985476d4b1fa518b7465a26cfe596923e7"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
@ -136,7 +136,7 @@
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c5f8d282efe4a4e8b1e31a37300944e338e60e4f"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9f28c4faea3b2f01db227b2467b08aeba96d9bec"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="026478f008f26e568fb189a5be2928f9b18e3efa"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="22cd128c866dd895fd2e019918982b147503ac80"/>
|
||||
<project name="android-sdk" path="sdk" remote="b2g" revision="8b1365af38c9a653df97349ee53a3f5d64fd590a"/>
|
||||
<project name="darwinstreamingserver" path="system/darwinstreamingserver" remote="b2g" revision="cf85968c7f85e0ec36e72c87ceb4837a943b8af6"/>
|
||||
</manifest>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a2e84985476d4b1fa518b7465a26cfe596923e7"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>
|
||||
|
@ -19,13 +19,13 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a2e84985476d4b1fa518b7465a26cfe596923e7"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a2e84985476d4b1fa518b7465a26cfe596923e7"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
@ -158,7 +158,7 @@
|
||||
<project name="platform/hardware/ril" path="hardware/ril" revision="12b1977cc704b35f2e9db2bb423fa405348bc2f3"/>
|
||||
<project name="platform/system/bluetooth" path="system/bluetooth" revision="985bf15264d865fe7b9c5b45f61c451cbaafa43d"/>
|
||||
<project name="platform/system/core" path="system/core" revision="350eac5403124dacb2a5fd9e28ac290a59fc3b8e"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="026478f008f26e568fb189a5be2928f9b18e3efa"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="22cd128c866dd895fd2e019918982b147503ac80"/>
|
||||
<project name="platform/system/qcom" path="system/qcom" revision="63e3f6f176caad587d42bba4c16b66d953fb23c2"/>
|
||||
<project name="platform/vendor/qcom-opensource/wlan/prima" path="vendor/qcom/opensource/wlan/prima" revision="d8952a42771045fca73ec600e2b42a4c7129d723"/>
|
||||
<project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="018b44e52b2bac5d3631d559550e88a4b68c6e67"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a2e84985476d4b1fa518b7465a26cfe596923e7"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
@ -145,7 +145,7 @@
|
||||
<project name="platform/hardware/ril" path="hardware/ril" revision="c4e2ac95907a5519a0e09f01a0d8e27fec101af0"/>
|
||||
<project name="platform/system/bluetooth" path="system/bluetooth" revision="e1eb226fa3ad3874ea7b63c56a9dc7012d7ff3c2"/>
|
||||
<project name="platform/system/core" path="system/core" revision="adc485d8755af6a61641d197de7cfef667722580"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="026478f008f26e568fb189a5be2928f9b18e3efa"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="22cd128c866dd895fd2e019918982b147503ac80"/>
|
||||
<project name="platform/system/qcom" path="system/qcom" revision="1cdab258b15258b7f9657da70e6f06ebd5a2fc25"/>
|
||||
<project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="4ae5df252123591d5b941191790e7abed1bce5a4"/>
|
||||
<project name="platform/vendor/qcom-opensource/wlan/prima" path="vendor/qcom/opensource/wlan/prima" revision="ce18b47b4a4f93a581d672bbd5cb6d12fe796ca9"/>
|
||||
|
@ -4,6 +4,6 @@
|
||||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "e704a7447a7fce238197a7f5429b2282090f1d13",
|
||||
"revision": "8db023189f8d58a474eaf31d25cbd56b711c5567",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
@ -17,11 +17,11 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a2e84985476d4b1fa518b7465a26cfe596923e7"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a2e84985476d4b1fa518b7465a26cfe596923e7"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
@ -131,7 +131,7 @@
|
||||
<project name="device-mako" path="device/lge/mako" remote="b2g" revision="78d17f0c117f0c66dd55ee8d5c5dde8ccc93ecba"/>
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
|
||||
<project name="device/lge/mako-kernel" path="device/lge/mako-kernel" revision="d1729e53d71d711c8fde25eab8728ff2b9b4df0e"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="026478f008f26e568fb189a5be2928f9b18e3efa"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="22cd128c866dd895fd2e019918982b147503ac80"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
|
||||
<project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="0e1929fa3aa38bf9d40e9e953d619fab8164c82e"/>
|
||||
|
@ -17,12 +17,12 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="26d479f0fccb7174e06255121e4e938c1b280d67"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a2e84985476d4b1fa518b7465a26cfe596923e7"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
|
@ -89,8 +89,6 @@ public:
|
||||
mStream = aStream;
|
||||
mAudioSource = aAudioSource;
|
||||
mVideoSource = aVideoSource;
|
||||
mLastEndTimeAudio = 0;
|
||||
mLastEndTimeVideo = 0;
|
||||
|
||||
mStream->AddListener(this);
|
||||
}
|
||||
@ -187,10 +185,10 @@ public:
|
||||
// Currently audio sources ignore NotifyPull, but they could
|
||||
// watch it especially for fake audio.
|
||||
if (mAudioSource) {
|
||||
mAudioSource->NotifyPull(aGraph, mStream, kAudioTrack, aDesiredTime, mLastEndTimeAudio);
|
||||
mAudioSource->NotifyPull(aGraph, mStream, kAudioTrack, aDesiredTime);
|
||||
}
|
||||
if (mVideoSource) {
|
||||
mVideoSource->NotifyPull(aGraph, mStream, kVideoTrack, aDesiredTime, mLastEndTimeVideo);
|
||||
mVideoSource->NotifyPull(aGraph, mStream, kVideoTrack, aDesiredTime);
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,8 +237,6 @@ private:
|
||||
nsRefPtr<MediaEngineSource> mAudioSource; // threadsafe refcnt
|
||||
nsRefPtr<MediaEngineSource> mVideoSource; // threadsafe refcnt
|
||||
nsRefPtr<SourceMediaStream> mStream; // threadsafe refcnt
|
||||
StreamTime mLastEndTimeAudio;
|
||||
StreamTime mLastEndTimeVideo;
|
||||
bool mFinished;
|
||||
|
||||
// Accessed from MainThread and MSG thread
|
||||
|
@ -206,6 +206,7 @@ MediaStreamGraphImpl::ExtractPendingInput(SourceMediaStream* aStream,
|
||||
aStream, data->mID, int64_t(data->mStart),
|
||||
int64_t(segment->GetDuration())));
|
||||
|
||||
data->mEndOfFlushedData += segment->GetDuration();
|
||||
aStream->mBuffer.AddTrack(data->mID, data->mStart, segment);
|
||||
// The track has taken ownership of data->mData, so let's replace
|
||||
// data->mData with an empty clone.
|
||||
@ -217,6 +218,7 @@ MediaStreamGraphImpl::ExtractPendingInput(SourceMediaStream* aStream,
|
||||
aStream, data->mID,
|
||||
int64_t(dest->GetDuration()),
|
||||
int64_t(dest->GetDuration() + data->mData->GetDuration())));
|
||||
data->mEndOfFlushedData += data->mData->GetDuration();
|
||||
dest->AppendFrom(data->mData);
|
||||
}
|
||||
if (data->mCommands & SourceMediaStream::TRACK_END) {
|
||||
@ -2279,6 +2281,7 @@ SourceMediaStream::AddTrackInternal(TrackID aID, TrackRate aRate, StreamTime aSt
|
||||
data->mID = aID;
|
||||
data->mInputRate = aRate;
|
||||
data->mStart = aStart;
|
||||
data->mEndOfFlushedData = aStart;
|
||||
data->mCommands = TRACK_CREATE;
|
||||
data->mData = aSegment;
|
||||
data->mHaveEnough = false;
|
||||
@ -2437,6 +2440,18 @@ SourceMediaStream::HaveEnoughBuffered(TrackID aID)
|
||||
return false;
|
||||
}
|
||||
|
||||
StreamTime
|
||||
SourceMediaStream::GetEndOfAppendedData(TrackID aID)
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
TrackData *track = FindDataForTrack(aID);
|
||||
if (track) {
|
||||
return track->mEndOfFlushedData + track->mData->GetDuration();
|
||||
}
|
||||
NS_ERROR("Track not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
SourceMediaStream::DispatchWhenNotEnoughBuffered(TrackID aID,
|
||||
nsIEventTarget* aSignalThread, nsIRunnable* aSignalRunnable)
|
||||
|
@ -750,6 +750,13 @@ public:
|
||||
* Returns false if there isn't enough data or if no such track exists.
|
||||
*/
|
||||
bool HaveEnoughBuffered(TrackID aID);
|
||||
/**
|
||||
* Get the stream time of the end of the data that has been appended so far.
|
||||
* Can be called from any thread but won't be useful if it can race with
|
||||
* an AppendToTrack call, so should probably just be called from the thread
|
||||
* that also calls AppendToTrack.
|
||||
*/
|
||||
StreamTime GetEndOfAppendedData(TrackID aID);
|
||||
/**
|
||||
* Ensures that aSignalRunnable will be dispatched to aSignalThread
|
||||
* when we don't have enough buffered data in the track (which could be
|
||||
@ -848,13 +855,15 @@ protected:
|
||||
int mResamplerChannelCount;
|
||||
#endif
|
||||
StreamTime mStart;
|
||||
// Each time the track updates are flushed to the media graph thread,
|
||||
// this is cleared.
|
||||
uint32_t mCommands;
|
||||
// End-time of data already flushed to the track (excluding mData)
|
||||
StreamTime mEndOfFlushedData;
|
||||
// Each time the track updates are flushed to the media graph thread,
|
||||
// the segment buffer is emptied.
|
||||
nsAutoPtr<MediaSegment> mData;
|
||||
nsTArray<ThreadAndRunnable> mDispatchWhenNotEnough;
|
||||
// Each time the track updates are flushed to the media graph thread,
|
||||
// this is cleared.
|
||||
uint32_t mCommands;
|
||||
bool mHaveEnough;
|
||||
};
|
||||
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
layers::SurfaceTextureImage::Data data;
|
||||
data.mSurfTex = mSurfaceTexture.get();
|
||||
data.mSize = gfx::IntSize(mConfig.display_width, mConfig.display_height);
|
||||
data.mInverted = true;
|
||||
data.mOriginPos = gl::OriginPos::BottomLeft;
|
||||
|
||||
layers::SurfaceTextureImage* stImg = static_cast<layers::SurfaceTextureImage*>(img.get());
|
||||
stImg->SetData(data);
|
||||
@ -138,7 +138,7 @@ public:
|
||||
data.mSync = eglSync;
|
||||
data.mOwns = true;
|
||||
data.mSize = gfx::IntSize(mConfig.display_width, mConfig.display_height);
|
||||
data.mInverted = false;
|
||||
data.mOriginPos = gl::OriginPos::TopLeft;
|
||||
|
||||
layers::EGLImageImage* typedImg = static_cast<layers::EGLImageImage*>(img.get());
|
||||
typedImg->SetData(data);
|
||||
|
@ -149,7 +149,7 @@ GMPAudioDecoderParent::Close()
|
||||
|
||||
// In case this is the last reference
|
||||
nsRefPtr<GMPAudioDecoderParent> kungfudeathgrip(this);
|
||||
NS_RELEASE(kungfudeathgrip);
|
||||
Release();
|
||||
Shutdown();
|
||||
|
||||
return NS_OK;
|
||||
|
@ -76,7 +76,7 @@ GMPVideoDecoderParent::Close()
|
||||
|
||||
// In case this is the last reference
|
||||
nsRefPtr<GMPVideoDecoderParent> kungfudeathgrip(this);
|
||||
NS_RELEASE(kungfudeathgrip);
|
||||
Release();
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ GMPVideoEncoderParent::Close()
|
||||
|
||||
// In case this is the last reference
|
||||
nsRefPtr<GMPVideoEncoderParent> kungfudeathgrip(this);
|
||||
NS_RELEASE(kungfudeathgrip);
|
||||
Release();
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,10 @@ SourceBuffer::SetMode(SourceBufferAppendMode aMode, ErrorResult& aRv)
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return;
|
||||
}
|
||||
if (aMode == SourceBufferAppendMode::Sequence) {
|
||||
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
return;
|
||||
}
|
||||
MOZ_ASSERT(mMediaSource->ReadyState() != MediaSourceReadyState::Closed);
|
||||
if (mMediaSource->ReadyState() == MediaSourceReadyState::Ended) {
|
||||
mMediaSource->SetReadyState(MediaSourceReadyState::Open);
|
||||
|
@ -19,6 +19,7 @@ skip-if = (toolkit == 'android' || buildapp == 'mulet') #timeout android/mulet o
|
||||
[test_SeekableAfterEndOfStreamSplit.html]
|
||||
[test_SeekableBeforeEndOfStream.html]
|
||||
[test_SeekableBeforeEndOfStreamSplit.html]
|
||||
[test_SetModeThrows.html]
|
||||
[test_SplitAppendDelay.html]
|
||||
[test_SplitAppend.html]
|
||||
[test_WaitingOnMissingData.html]
|
||||
|
34
dom/media/mediasource/test/test_SetModeThrows.html
Normal file
34
dom/media/mediasource/test/test_SetModeThrows.html
Normal file
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>MSE: append initialization only</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="mediasource.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
// This test should be removed when we implement sequence mode in bug 1116353
|
||||
runWithMSE(function (ms, v) {
|
||||
ms.addEventListener("sourceopen", function () {
|
||||
var sb = ms.addSourceBuffer("video/webm");
|
||||
|
||||
sb.mode = "segments";
|
||||
ok("true", "Setting to segments does not throw");
|
||||
try {
|
||||
sb.mode = "sequence";
|
||||
ok(false, "Should have thrown");
|
||||
} catch (e) { ok(/supported/.test(e), "Correctly threw not supported: " + e); }
|
||||
|
||||
SimpleTest.finish();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -110,8 +110,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream *aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime) = 0;
|
||||
StreamTime aDesiredTime) = 0;
|
||||
|
||||
/* Stop the device and release the corresponding MediaStream */
|
||||
virtual nsresult Stop(SourceMediaStream *aSource, TrackID aID) = 0;
|
||||
|
@ -244,8 +244,7 @@ void
|
||||
MediaEngineDefaultVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream *aSource,
|
||||
TrackID aID,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime)
|
||||
StreamTime aDesiredTime)
|
||||
{
|
||||
// AddTrack takes ownership of segment
|
||||
VideoSegment segment;
|
||||
@ -256,7 +255,7 @@ MediaEngineDefaultVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
|
||||
// Note: we're not giving up mImage here
|
||||
nsRefPtr<layers::Image> image = mImage;
|
||||
StreamTime delta = aDesiredTime - aLastEndTime;
|
||||
StreamTime delta = aDesiredTime - aSource->GetEndOfAppendedData(aID);
|
||||
|
||||
if (delta > 0) {
|
||||
// nullptr images are allowed
|
||||
@ -264,9 +263,7 @@ MediaEngineDefaultVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
segment.AppendFrame(image.forget(), delta, size);
|
||||
// This can fail if either a) we haven't added the track yet, or b)
|
||||
// we've removed or finished the track.
|
||||
if (aSource->AppendToTrack(aID, &segment)) {
|
||||
aLastEndTime = aDesiredTime;
|
||||
}
|
||||
aSource->AppendToTrack(aID, &segment);
|
||||
// Generate null data for fake tracks.
|
||||
if (mHasFakeTracks) {
|
||||
for (int i = 0; i < kFakeVideoTrackCount; ++i) {
|
||||
|
@ -53,8 +53,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream *aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime);
|
||||
StreamTime aDesiredTime) MOZ_OVERRIDE;
|
||||
virtual bool SatisfiesConstraintSets(
|
||||
const nsTArray<const dom::MediaTrackConstraintSet*>& aConstraintSets)
|
||||
{
|
||||
@ -122,8 +121,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream *aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime) {}
|
||||
StreamTime aDesiredTime) MOZ_OVERRIDE {}
|
||||
|
||||
virtual bool IsFake() {
|
||||
return true;
|
||||
|
@ -70,8 +70,7 @@ void
|
||||
MediaEngineGonkVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aID,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime& aLastEndTime)
|
||||
StreamTime aDesiredTime)
|
||||
{
|
||||
VideoSegment segment;
|
||||
|
||||
@ -82,7 +81,7 @@ MediaEngineGonkVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
|
||||
// Note: we're not giving up mImage here
|
||||
nsRefPtr<layers::Image> image = mImage;
|
||||
StreamTime delta = aDesiredTime - aLastEndTime;
|
||||
StreamTime delta = aDesiredTime - aSource->GetEndOfAppendedData(aID);
|
||||
LOGFRAME(("NotifyPull, desired = %ld, delta = %ld %s", (int64_t) aDesiredTime,
|
||||
(int64_t) delta, image ? "" : "<null>"));
|
||||
|
||||
@ -102,9 +101,7 @@ MediaEngineGonkVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
segment.AppendFrame(image.forget(), delta, size);
|
||||
// This can fail if either a) we haven't added the track yet, or b)
|
||||
// we've removed or finished the track.
|
||||
if (aSource->AppendToTrack(aID, &(segment))) {
|
||||
aLastEndTime = aDesiredTime;
|
||||
}
|
||||
aSource->AppendToTrack(aID, &(segment));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,8 +68,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime) MOZ_OVERRIDE;
|
||||
StreamTime aDesiredTime) MOZ_OVERRIDE;
|
||||
virtual bool SatisfiesConstraintSets(
|
||||
const nsTArray<const dom::MediaTrackConstraintSet*>& aConstraintSets)
|
||||
{
|
||||
|
@ -192,24 +192,21 @@ MediaEngineTabVideoSource::Start(SourceMediaStream* aStream, TrackID aID)
|
||||
void
|
||||
MediaEngineTabVideoSource::NotifyPull(MediaStreamGraph*,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aID, StreamTime aDesiredTime,
|
||||
StreamTime& aLastEndTime)
|
||||
TrackID aID, StreamTime aDesiredTime)
|
||||
{
|
||||
VideoSegment segment;
|
||||
MonitorAutoLock mon(mMonitor);
|
||||
|
||||
// Note: we're not giving up mImage here
|
||||
nsRefPtr<layers::CairoImage> image = mImage;
|
||||
StreamTime delta = aDesiredTime - aLastEndTime;
|
||||
StreamTime delta = aDesiredTime - aSource->GetEndOfAppendedData(aID);
|
||||
if (delta > 0) {
|
||||
// nullptr images are allowed
|
||||
gfx::IntSize size = image ? image->GetSize() : IntSize(0, 0);
|
||||
segment.AppendFrame(image.forget().downcast<layers::Image>(), delta, size);
|
||||
// This can fail if either a) we haven't added the track yet, or b)
|
||||
// we've removed or finished the track.
|
||||
if (aSource->AppendToTrack(aID, &(segment))) {
|
||||
aLastEndTime = aDesiredTime;
|
||||
}
|
||||
aSource->AppendToTrack(aID, &(segment));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ class MediaEngineTabVideoSource : public MediaEngineVideoSource, nsIDOMEventList
|
||||
virtual nsresult Deallocate();
|
||||
virtual nsresult Start(mozilla::SourceMediaStream*, mozilla::TrackID);
|
||||
virtual void SetDirectListeners(bool aHasDirectListeners) {};
|
||||
virtual void NotifyPull(mozilla::MediaStreamGraph*, mozilla::SourceMediaStream*, mozilla::TrackID, mozilla::StreamTime, mozilla::StreamTime&);
|
||||
virtual void NotifyPull(mozilla::MediaStreamGraph*, mozilla::SourceMediaStream*, mozilla::TrackID, mozilla::StreamTime) MOZ_OVERRIDE;
|
||||
virtual nsresult Stop(mozilla::SourceMediaStream*, mozilla::TrackID);
|
||||
virtual nsresult Config(bool, uint32_t, bool, uint32_t, bool, uint32_t, int32_t);
|
||||
virtual bool IsFake();
|
||||
|
@ -97,8 +97,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime);
|
||||
StreamTime aDesiredTime) MOZ_OVERRIDE;
|
||||
|
||||
virtual const MediaSourceType GetMediaSource() {
|
||||
return mMediaSource;
|
||||
@ -180,8 +179,7 @@ public:
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aId,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime);
|
||||
StreamTime aDesiredTime) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool IsFake() {
|
||||
return false;
|
||||
|
@ -398,16 +398,10 @@ void
|
||||
MediaEngineWebRTCAudioSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream *aSource,
|
||||
TrackID aID,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime)
|
||||
StreamTime aDesiredTime)
|
||||
{
|
||||
// Ignore - we push audio data
|
||||
#ifdef DEBUG
|
||||
StreamTime delta = aDesiredTime - aLastEndTime;
|
||||
LOG(("Audio: NotifyPull: aDesiredTime %ld, delta %ld",(int64_t) aDesiredTime,
|
||||
(int64_t) delta));
|
||||
aLastEndTime = aDesiredTime;
|
||||
#endif
|
||||
LOG_FRAMES(("NotifyPull, desired = %ld", (int64_t) aDesiredTime));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -124,8 +124,7 @@ void
|
||||
MediaEngineWebRTCVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
SourceMediaStream* aSource,
|
||||
TrackID aID,
|
||||
StreamTime aDesiredTime,
|
||||
StreamTime &aLastEndTime)
|
||||
StreamTime aDesiredTime)
|
||||
{
|
||||
VideoSegment segment;
|
||||
|
||||
@ -134,7 +133,7 @@ MediaEngineWebRTCVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
// So mState could be kReleased here. We really don't care about the state,
|
||||
// though.
|
||||
|
||||
StreamTime delta = aDesiredTime - aLastEndTime;
|
||||
StreamTime delta = aDesiredTime - aSource->GetEndOfAppendedData(aID);
|
||||
LOGFRAME(("NotifyPull, desired = %ld, delta = %ld %s", (int64_t) aDesiredTime,
|
||||
(int64_t) delta, mImage.get() ? "" : "<null>"));
|
||||
|
||||
@ -150,9 +149,7 @@ MediaEngineWebRTCVideoSource::NotifyPull(MediaStreamGraph* aGraph,
|
||||
// Doing so means a negative delta and thus messes up handling of the graph
|
||||
if (delta > 0) {
|
||||
// nullptr images are allowed
|
||||
if (AppendToTrack(aSource, mImage, aID, delta)) {
|
||||
aLastEndTime = aDesiredTime;
|
||||
}
|
||||
AppendToTrack(aSource, mImage, aID, delta);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ NfcContentHelper.prototype = {
|
||||
result.isFormatable);
|
||||
}
|
||||
|
||||
let tagInfo = new TagInfo(result.techList);
|
||||
let tagInfo = new TagInfo(result.techList, result.tagId);
|
||||
this.eventListener.notifyTagFound(result.sessionToken,
|
||||
tagInfo,
|
||||
ndefInfo,
|
||||
@ -411,13 +411,15 @@ TagNDEFInfo.prototype = {
|
||||
isFormatable: false
|
||||
};
|
||||
|
||||
function TagInfo(techList) {
|
||||
function TagInfo(techList, tagId) {
|
||||
this.techList = techList;
|
||||
this.tagId = tagId;
|
||||
}
|
||||
TagInfo.prototype = {
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsITagInfo]),
|
||||
|
||||
techList: null,
|
||||
tagId: null,
|
||||
};
|
||||
|
||||
if (NFC_ENABLED) {
|
||||
|
@ -8,7 +8,7 @@
|
||||
namespace mozilla {
|
||||
|
||||
#define NFCD_MAJOR_VERSION 1
|
||||
#define NFCD_MINOR_VERSION 18
|
||||
#define NFCD_MINOR_VERSION 19
|
||||
|
||||
enum NfcRequest {
|
||||
ChangeRFStateReq = 0,
|
||||
|
@ -254,8 +254,8 @@ NfcMessageHandler::InitializeNotification(const Parcel& aParcel, EventOptions& a
|
||||
|
||||
if (aOptions.mMajorVersion != NFCD_MAJOR_VERSION ||
|
||||
aOptions.mMinorVersion != NFCD_MINOR_VERSION) {
|
||||
NMH_LOG("NFCD version mismatched. majorVersion: %d, minorVersion: %d",
|
||||
aOptions.mMajorVersion, aOptions.mMinorVersion);
|
||||
NMH_LOG("NFCD version mismatched. majorVersion: %d, minorVersion: %d",
|
||||
aOptions.mMajorVersion, aOptions.mMinorVersion);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -267,9 +267,14 @@ NfcMessageHandler::TechDiscoveredNotification(const Parcel& aParcel, EventOption
|
||||
aOptions.mType = NS_ConvertUTF8toUTF16(kTechDiscoveredNotification);
|
||||
aOptions.mSessionId = aParcel.readInt32();
|
||||
aOptions.mIsP2P = aParcel.readInt32();
|
||||
|
||||
int32_t techCount = aParcel.readInt32();
|
||||
aOptions.mTechList.AppendElements(
|
||||
static_cast<const uint8_t*>(aParcel.readInplace(techCount)), techCount);
|
||||
static_cast<const uint8_t*>(aParcel.readInplace(techCount)), techCount);
|
||||
|
||||
int32_t idCount = aParcel.readInt32();
|
||||
aOptions.mTagId.AppendElements(
|
||||
static_cast<const uint8_t*>(aParcel.readInplace(idCount)), idCount);
|
||||
|
||||
int32_t ndefMsgCount = aParcel.readInt32();
|
||||
if (ndefMsgCount != 0) {
|
||||
@ -327,15 +332,15 @@ NfcMessageHandler::ReadNDEFMessage(const Parcel& aParcel, EventOptions& aOptions
|
||||
|
||||
int32_t typeLength = aParcel.readInt32();
|
||||
record.mType.AppendElements(
|
||||
static_cast<const uint8_t*>(aParcel.readInplace(typeLength)), typeLength);
|
||||
static_cast<const uint8_t*>(aParcel.readInplace(typeLength)), typeLength);
|
||||
|
||||
int32_t idLength = aParcel.readInt32();
|
||||
record.mId.AppendElements(
|
||||
static_cast<const uint8_t*>(aParcel.readInplace(idLength)), idLength);
|
||||
static_cast<const uint8_t*>(aParcel.readInplace(idLength)), idLength);
|
||||
|
||||
int32_t payloadLength = aParcel.readInt32();
|
||||
record.mPayload.AppendElements(
|
||||
static_cast<const uint8_t*>(aParcel.readInplace(payloadLength)), payloadLength);
|
||||
static_cast<const uint8_t*>(aParcel.readInplace(payloadLength)), payloadLength);
|
||||
|
||||
aOptions.mRecords.AppendElement(record);
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ struct EventOptions
|
||||
int32_t mMajorVersion;
|
||||
int32_t mMinorVersion;
|
||||
nsTArray<uint8_t> mTechList;
|
||||
nsTArray<uint8_t> mTagId;
|
||||
int32_t mIsP2P;
|
||||
nsTArray<NDEFRecordStruct> mRecords;
|
||||
int32_t mTagType;
|
||||
|
@ -132,6 +132,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (mEvent.mTagId.Length() > 0) {
|
||||
event.mTagId.Construct();
|
||||
event.mTagId.Value().Init(Uint8Array::Create(cx, mEvent.mTagId.Length(), mEvent.mTagId.Elements()));
|
||||
}
|
||||
|
||||
if (mEvent.mRecords.Length() > 0) {
|
||||
int length = mEvent.mRecords.Length();
|
||||
event.mRecords.Construct();
|
||||
|
@ -7,13 +7,15 @@
|
||||
interface nsIVariant;
|
||||
interface nsIDOMWindow;
|
||||
|
||||
[scriptable, uuid(30d77baf-50ed-4a6b-ab75-25bade40977a)]
|
||||
[scriptable, uuid(a694c7e8-10dd-416e-a3d9-433edf40647e)]
|
||||
interface nsITagInfo : nsISupports
|
||||
{
|
||||
/**
|
||||
* Array of technolgies supported. See NFCTechType in MozNFCTag.webidl
|
||||
*/
|
||||
readonly attribute nsIVariant techList;
|
||||
|
||||
readonly attribute nsIVariant tagId; // Uint8Array
|
||||
};
|
||||
|
||||
[scriptable, uuid(74d70ebb-557f-4ac8-8296-7885961cd1dc)]
|
||||
|
@ -104,6 +104,7 @@ function MozNFCTagImpl(window, sessionToken, tagInfo, ndefInfo) {
|
||||
this._window = window;
|
||||
this.session = sessionToken;
|
||||
this.techList = tagInfo.techList;
|
||||
this.id = Cu.cloneInto(tagInfo.tagId, window);
|
||||
|
||||
if (ndefInfo) {
|
||||
this.type = ndefInfo.tagType;
|
||||
@ -119,6 +120,7 @@ MozNFCTagImpl.prototype = {
|
||||
_window: null,
|
||||
session: null,
|
||||
techList: null,
|
||||
id: null,
|
||||
type: null,
|
||||
maxNDEFSize: null,
|
||||
isReadOnly: null,
|
||||
@ -191,7 +193,7 @@ MozNFCTagImpl.prototype = {
|
||||
},
|
||||
|
||||
classID: Components.ID("{4e1e2e90-3137-11e3-aa6e-0800200c9a66}"),
|
||||
contractID: "@mozilla.org/nfc/NFCTag;1",
|
||||
contractID: "@mozilla.org/nfc/tag;1",
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
|
||||
Ci.nsIDOMGlobalPropertyInitializer]),
|
||||
};
|
||||
@ -243,7 +245,7 @@ MozNFCPeerImpl.prototype = {
|
||||
},
|
||||
|
||||
classID: Components.ID("{c1b2bcf0-35eb-11e3-aa6e-0800200c9a66}"),
|
||||
contractID: "@mozilla.org/nfc/NFCPeer;1",
|
||||
contractID: "@mozilla.org/nfc/peer;1",
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
|
||||
Ci.nsIDOMGlobalPropertyInitializer]),
|
||||
};
|
||||
@ -537,7 +539,7 @@ MozNFCImpl.prototype = {
|
||||
},
|
||||
|
||||
classID: Components.ID("{6ff2b290-2573-11e3-8224-0800200c9a66}"),
|
||||
contractID: "@mozilla.org/navigatorNfc;1",
|
||||
contractID: "@mozilla.org/nfc/manager;1",
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
|
||||
Ci.nsIDOMGlobalPropertyInitializer,
|
||||
Ci.nsINfcEventListener,
|
||||
|
@ -1,11 +1,11 @@
|
||||
component {6ff2b290-2573-11e3-8224-0800200c9a66} nsNfc.js
|
||||
contract @mozilla.org/navigatorNfc;1 {6ff2b290-2573-11e3-8224-0800200c9a66}
|
||||
contract @mozilla.org/nfc/manager;1 {6ff2b290-2573-11e3-8224-0800200c9a66}
|
||||
|
||||
component {4e1e2e90-3137-11e3-aa6e-0800200c9a66} nsNfc.js
|
||||
contract @mozilla.org/nfc/NFCTag;1 {4e1e2e90-3137-11e3-aa6e-0800200c9a66}
|
||||
contract @mozilla.org/nfc/tag;1 {4e1e2e90-3137-11e3-aa6e-0800200c9a66}
|
||||
|
||||
component {c1b2bcf0-35eb-11e3-aa6e-0800200c9a66} nsNfc.js
|
||||
contract @mozilla.org/nfc/NFCPeer;1 {c1b2bcf0-35eb-11e3-aa6e-0800200c9a66}
|
||||
contract @mozilla.org/nfc/peer;1 {c1b2bcf0-35eb-11e3-aa6e-0800200c9a66}
|
||||
|
||||
component {c5063a5c-8cb9-41d2-baf5-56062a2e30e9} nsNfc.js
|
||||
contract @mozilla.org/dom/system-messages/wrapper/nfc-manager-send-file;1 {c5063a5c-8cb9-41d2-baf5-56062a2e30e9}
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "gfxRect.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla;
|
||||
|
||||
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GeckoPlugins" , ## args)
|
||||
@ -24,8 +23,13 @@ static ANPNativeWindow anp_native_window_acquireNativeWindow(NPP instance) {
|
||||
}
|
||||
|
||||
static void anp_native_window_invertPluginContent(NPP instance, bool isContentInverted) {
|
||||
// NativeWindow is TopLeft if uninverted.
|
||||
gl::OriginPos newOriginPos = gl::OriginPos::TopLeft;
|
||||
if (isContentInverted)
|
||||
newOriginPos = gl::OriginPos::BottomLeft;
|
||||
|
||||
nsNPAPIPluginInstance* pinst = static_cast<nsNPAPIPluginInstance*>(instance->ndata);
|
||||
pinst->SetInverted(isContentInverted);
|
||||
pinst->SetOriginPos(newOriginPos);
|
||||
pinst->RedrawPlugin();
|
||||
}
|
||||
|
||||
|
@ -60,10 +60,14 @@ static void anp_opengl_releaseTexture(NPP instance, const ANPTextureInfo* info)
|
||||
}
|
||||
|
||||
static void anp_opengl_invertPluginContent(NPP instance, bool isContentInverted) {
|
||||
// OpenGL is BottomLeft if uninverted.
|
||||
gl::OriginPos newOriginPos = gl::OriginPos::BottomLeft;
|
||||
if (isContentInverted)
|
||||
newOriginPos = gl::OriginPos::TopLeft;
|
||||
|
||||
nsNPAPIPluginInstance* pinst = static_cast<nsNPAPIPluginInstance*>(instance->ndata);
|
||||
|
||||
// Our definition of inverted is the opposite of the plugin's
|
||||
pinst->SetInverted(!isContentInverted);
|
||||
pinst->SetOriginPos(newOriginPos);
|
||||
pinst->RedrawPlugin();
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ nsNPAPIPluginInstance::nsNPAPIPluginInstance()
|
||||
, mFullScreenOrientation(dom::eScreenOrientation_LandscapePrimary)
|
||||
, mWakeLocked(false)
|
||||
, mFullScreen(false)
|
||||
, mInverted(false)
|
||||
, mOriginPos(gl::OriginPos::TopLeft)
|
||||
#endif
|
||||
, mRunning(NOT_STARTED)
|
||||
, mWindowless(false)
|
||||
@ -1056,14 +1056,6 @@ void nsNPAPIPluginInstance::GetVideos(nsTArray<VideoInfo*>& aVideos)
|
||||
aVideos.AppendElement(it->second);
|
||||
}
|
||||
|
||||
void nsNPAPIPluginInstance::SetInverted(bool aInverted)
|
||||
{
|
||||
if (aInverted == mInverted)
|
||||
return;
|
||||
|
||||
mInverted = aInverted;
|
||||
}
|
||||
|
||||
nsNPAPIPluginInstance* nsNPAPIPluginInstance::GetFromNPP(NPP npp)
|
||||
{
|
||||
std::map<NPP, nsNPAPIPluginInstance*>::iterator it;
|
||||
|
@ -220,8 +220,10 @@ public:
|
||||
|
||||
void GetVideos(nsTArray<VideoInfo*>& aVideos);
|
||||
|
||||
void SetInverted(bool aInverted);
|
||||
bool Inverted() { return mInverted; }
|
||||
void SetOriginPos(mozilla::gl::OriginPos aOriginPos) {
|
||||
mOriginPos = aOriginPos;
|
||||
}
|
||||
mozilla::gl::OriginPos OriginPos() const { return mOriginPos; }
|
||||
|
||||
static nsNPAPIPluginInstance* GetFromNPP(NPP npp);
|
||||
#endif
|
||||
@ -328,7 +330,7 @@ protected:
|
||||
uint32_t mFullScreenOrientation;
|
||||
bool mWakeLocked;
|
||||
bool mFullScreen;
|
||||
bool mInverted;
|
||||
mozilla::gl::OriginPos mOriginPos;
|
||||
|
||||
mozilla::RefPtr<SharedPluginTexture> mContentTexture;
|
||||
mozilla::RefPtr<mozilla::gl::AndroidSurfaceTexture> mContentSurface;
|
||||
|
@ -176,7 +176,7 @@ AttachToContainerAsEGLImage(ImageContainer* container,
|
||||
EGLImageImage::Data data;
|
||||
data.mImage = image;
|
||||
data.mSize = gfx::IntSize(rect.width, rect.height);
|
||||
data.mInverted = instance->Inverted();
|
||||
data.mOriginPos = instance->OriginPos();
|
||||
|
||||
EGLImageImage* typedImg = static_cast<EGLImageImage*>(img.get());
|
||||
typedImg->SetData(data);
|
||||
@ -203,7 +203,7 @@ AttachToContainerAsSurfaceTexture(ImageContainer* container,
|
||||
SurfaceTextureImage::Data data;
|
||||
data.mSurfTex = surfTex;
|
||||
data.mSize = gfx::IntSize(rect.width, rect.height);
|
||||
data.mInverted = instance->Inverted();
|
||||
data.mOriginPos = instance->OriginPos();
|
||||
|
||||
SurfaceTextureImage* typedImg = static_cast<SurfaceTextureImage*>(img.get());
|
||||
typedImg->SetData(data);
|
||||
@ -1386,7 +1386,8 @@ nsPluginInstanceOwner::GetImageContainerForVideo(nsNPAPIPluginInstance::VideoInf
|
||||
|
||||
// The logic below for Honeycomb is just a guess, but seems to work. We don't have a separate
|
||||
// inverted flag for video.
|
||||
data.mInverted = AndroidBridge::Bridge()->IsHoneycomb() ? true : mInstance->Inverted();
|
||||
data.mOriginPos = AndroidBridge::Bridge()->IsHoneycomb() ? gl::OriginPos::BottomLeft
|
||||
: mInstance->OriginPos();
|
||||
data.mSize = gfx::IntSize(aVideoInfo->mDimensions.width, aVideoInfo->mDimensions.height);
|
||||
|
||||
SurfaceTextureImage* typedImg = static_cast<SurfaceTextureImage*>(img.get());
|
||||
|
@ -125,10 +125,6 @@ function TelephonyService() {
|
||||
|
||||
this._cdmaCallWaitingNumber = null;
|
||||
|
||||
// _isActiveCall[clientId][callIndex] shows the active status of the call.
|
||||
this._isActiveCall = {};
|
||||
this._numActiveCall = 0;
|
||||
|
||||
this._updateDebugFlag();
|
||||
this.defaultServiceId = this._getDefaultServiceId();
|
||||
|
||||
@ -139,7 +135,6 @@ function TelephonyService() {
|
||||
|
||||
for (let i = 0; i < this._numClients; ++i) {
|
||||
this._enumerateCallsForClient(i);
|
||||
this._isActiveCall[i] = {};
|
||||
this._audioStates[i] = RIL.AUDIO_STATE_NO_CALL;
|
||||
}
|
||||
}
|
||||
@ -215,37 +210,6 @@ TelephonyService.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Track the active call and update the audio system as its state changes.
|
||||
*/
|
||||
_updateActiveCall: function(aCall) {
|
||||
let active = false;
|
||||
let incoming = false;
|
||||
|
||||
switch (aCall.state) {
|
||||
case nsITelephonyService.CALL_STATE_DIALING: // Fall through...
|
||||
case nsITelephonyService.CALL_STATE_ALERTING:
|
||||
case nsITelephonyService.CALL_STATE_CONNECTED:
|
||||
active = true;
|
||||
break;
|
||||
case nsITelephonyService.CALL_STATE_INCOMING:
|
||||
incoming = true;
|
||||
break;
|
||||
case nsITelephonyService.CALL_STATE_HELD: // Fall through...
|
||||
case nsITelephonyService.CALL_STATE_DISCONNECTED:
|
||||
break;
|
||||
}
|
||||
|
||||
// Update active count and info.
|
||||
let oldActive = this._isActiveCall[aCall.clientId][aCall.callIndex];
|
||||
if (!oldActive && active) {
|
||||
this._numActiveCall++;
|
||||
} else if (oldActive && !active) {
|
||||
this._numActiveCall--;
|
||||
}
|
||||
this._isActiveCall[aCall.clientId][aCall.callIndex] = active;
|
||||
},
|
||||
|
||||
_updateAudioState: function(aAudioState) {
|
||||
switch (aAudioState) {
|
||||
case RIL.AUDIO_STATE_NO_CALL:
|
||||
@ -1160,8 +1124,6 @@ TelephonyService.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
this._updateActiveCall(aCall);
|
||||
|
||||
if (!aCall.failCause ||
|
||||
aCall.failCause === RIL.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING) {
|
||||
this._notifyAllListeners("callStateChanged", [aClientId,
|
||||
@ -1217,7 +1179,6 @@ TelephonyService.prototype = {
|
||||
}
|
||||
|
||||
aCall.clientId = aClientId;
|
||||
this._updateActiveCall(aCall);
|
||||
|
||||
function pick(arg, defaultValue) {
|
||||
return typeof arg !== 'undefined' ? arg : defaultValue;
|
||||
|
@ -69,7 +69,7 @@ interface MozNFCManager {
|
||||
Promise<void> powerOff();
|
||||
};
|
||||
|
||||
[JSImplementation="@mozilla.org/navigatorNfc;1",
|
||||
[JSImplementation="@mozilla.org/nfc/manager;1",
|
||||
NavigatorProperty="mozNfc",
|
||||
Func="Navigator::HasNFCSupport",
|
||||
CheckPermissions="nfc nfc-share",
|
||||
|
@ -8,7 +8,7 @@
|
||||
* Copyright © 2013 Deutsche Telekom, Inc.
|
||||
*/
|
||||
|
||||
[JSImplementation="@mozilla.org/nfc/NFCPeer;1", AvailableIn="PrivilegedApps"]
|
||||
[JSImplementation="@mozilla.org/nfc/peer;1", AvailableIn="PrivilegedApps"]
|
||||
interface MozNFCPeer {
|
||||
/**
|
||||
* Send NDEF data to peer device.
|
||||
|
@ -32,13 +32,18 @@ enum NFCTagType {
|
||||
"mifare_classic"
|
||||
};
|
||||
|
||||
[JSImplementation="@mozilla.org/nfc/NFCTag;1", AvailableIn="PrivilegedApps"]
|
||||
[JSImplementation="@mozilla.org/nfc/tag;1", AvailableIn="PrivilegedApps"]
|
||||
interface MozNFCTag {
|
||||
/**
|
||||
* The supported technologies of this tag, null if unknown.
|
||||
*/
|
||||
[Cached, Pure] readonly attribute sequence<NFCTechType>? techList;
|
||||
|
||||
/**
|
||||
* The identifier of this tag.
|
||||
*/
|
||||
[Pure, Constant] readonly attribute Uint8Array? id;
|
||||
|
||||
/**
|
||||
* The type of this tag, null if unknown.
|
||||
*/
|
||||
|
@ -37,6 +37,7 @@ dictionary NfcEventOptions
|
||||
|
||||
boolean isP2P;
|
||||
sequence<NFCTechType> techList;
|
||||
Uint8Array tagId;
|
||||
sequence<MozNDEFRecordOptions> records;
|
||||
|
||||
NFCTagType tagType;
|
||||
|
@ -690,7 +690,7 @@ GLBlitHelper::BindAndUploadEGLImage(EGLImage image, GLuint target)
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
|
||||
bool
|
||||
GLBlitHelper::BlitGrallocImage(layers::GrallocImage* grallocImage, bool yFlip)
|
||||
GLBlitHelper::BlitGrallocImage(layers::GrallocImage* grallocImage, bool yflip)
|
||||
{
|
||||
ScopedBindTextureUnit boundTU(mGL, LOCAL_GL_TEXTURE0);
|
||||
mGL->fClear(LOCAL_GL_COLOR_BUFFER_BIT);
|
||||
@ -711,7 +711,7 @@ GLBlitHelper::BlitGrallocImage(layers::GrallocImage* grallocImage, bool yFlip)
|
||||
|
||||
BindAndUploadEGLImage(image, LOCAL_GL_TEXTURE_EXTERNAL_OES);
|
||||
|
||||
mGL->fUniform1f(mYFlipLoc, yFlip ? (float)1.0f : (float)0.0f);
|
||||
mGL->fUniform1f(mYFlipLoc, yflip ? (float)1.0f : (float)0.0f);
|
||||
|
||||
mGL->fDrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
|
||||
|
||||
@ -724,18 +724,14 @@ GLBlitHelper::BlitGrallocImage(layers::GrallocImage* grallocImage, bool yFlip)
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
|
||||
bool
|
||||
GLBlitHelper::BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage, bool yFlip)
|
||||
GLBlitHelper::BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage, bool yflip)
|
||||
{
|
||||
AndroidSurfaceTexture* surfaceTexture = stImage->GetData()->mSurfTex;
|
||||
if (stImage->GetData()->mInverted) {
|
||||
yFlip = !yFlip;
|
||||
}
|
||||
|
||||
ScopedBindTextureUnit boundTU(mGL, LOCAL_GL_TEXTURE0);
|
||||
|
||||
if (NS_FAILED(surfaceTexture->Attach(mGL))) {
|
||||
if (NS_FAILED(surfaceTexture->Attach(mGL)))
|
||||
return false;
|
||||
}
|
||||
|
||||
// UpdateTexImage() changes the EXTERNAL binding, so save it here
|
||||
// so we can restore it after.
|
||||
@ -748,7 +744,7 @@ GLBlitHelper::BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage, bool
|
||||
surfaceTexture->GetTransformMatrix(transform);
|
||||
|
||||
mGL->fUniformMatrix4fv(mTextureTransformLoc, 1, false, &transform._11);
|
||||
mGL->fUniform1f(mYFlipLoc, yFlip ? 1.0f : 0.0f);
|
||||
mGL->fUniform1f(mYFlipLoc, yflip ? 1.0f : 0.0f);
|
||||
mGL->fDrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
|
||||
|
||||
surfaceTexture->Detach();
|
||||
@ -758,15 +754,11 @@ GLBlitHelper::BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage, bool
|
||||
}
|
||||
|
||||
bool
|
||||
GLBlitHelper::BlitEGLImageImage(layers::EGLImageImage* image, bool yFlip)
|
||||
GLBlitHelper::BlitEGLImageImage(layers::EGLImageImage* image, bool yflip)
|
||||
{
|
||||
EGLImage eglImage = image->GetData()->mImage;
|
||||
EGLSync eglSync = image->GetData()->mSync;
|
||||
|
||||
if (image->GetData()->mInverted) {
|
||||
yFlip = !yFlip;
|
||||
}
|
||||
|
||||
if (eglSync) {
|
||||
EGLint status = sEGLLibrary.fClientWaitSync(EGL_DISPLAY(), eglSync, 0, LOCAL_EGL_FOREVER);
|
||||
if (status != LOCAL_EGL_CONDITION_SATISFIED) {
|
||||
@ -781,7 +773,7 @@ GLBlitHelper::BlitEGLImageImage(layers::EGLImageImage* image, bool yFlip)
|
||||
|
||||
BindAndUploadEGLImage(eglImage, LOCAL_GL_TEXTURE_2D);
|
||||
|
||||
mGL->fUniform1f(mYFlipLoc, yFlip ? 1.0f : 0.0f);
|
||||
mGL->fUniform1f(mYFlipLoc, yflip ? 1.0f : 0.0f);
|
||||
|
||||
mGL->fDrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
|
||||
|
||||
@ -792,7 +784,7 @@ GLBlitHelper::BlitEGLImageImage(layers::EGLImageImage* image, bool yFlip)
|
||||
#endif
|
||||
|
||||
bool
|
||||
GLBlitHelper::BlitPlanarYCbCrImage(layers::PlanarYCbCrImage* yuvImage, bool yFlip)
|
||||
GLBlitHelper::BlitPlanarYCbCrImage(layers::PlanarYCbCrImage* yuvImage, bool yflip)
|
||||
{
|
||||
ScopedBindTextureUnit boundTU(mGL, LOCAL_GL_TEXTURE0);
|
||||
const PlanarYCbCrData* yuvData = yuvImage->GetData();
|
||||
@ -813,7 +805,7 @@ GLBlitHelper::BlitPlanarYCbCrImage(layers::PlanarYCbCrImage* yuvImage, bool yFli
|
||||
BindAndUploadYUVTexture(Channel_Cb, yuvData->mCbCrStride, yuvData->mCbCrSize.height, yuvData->mCbChannel, needsAllocation);
|
||||
BindAndUploadYUVTexture(Channel_Cr, yuvData->mCbCrStride, yuvData->mCbCrSize.height, yuvData->mCrChannel, needsAllocation);
|
||||
|
||||
mGL->fUniform1f(mYFlipLoc, yFlip ? (float)1.0 : (float)0.0);
|
||||
mGL->fUniform1f(mYFlipLoc, yflip ? (float)1.0 : (float)0.0);
|
||||
|
||||
if (needsAllocation) {
|
||||
mGL->fUniform2f(mYTexScaleLoc, (float)yuvData->mYSize.width/yuvData->mYStride, 1.0f);
|
||||
@ -832,7 +824,7 @@ bool
|
||||
GLBlitHelper::BlitImageToFramebuffer(layers::Image* srcImage,
|
||||
const gfx::IntSize& destSize,
|
||||
GLuint destFB,
|
||||
bool yFlip,
|
||||
bool yflip,
|
||||
GLuint xoffset,
|
||||
GLuint yoffset,
|
||||
GLuint cropWidth,
|
||||
@ -878,22 +870,22 @@ GLBlitHelper::BlitImageToFramebuffer(layers::Image* srcImage,
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (type == ConvertGralloc) {
|
||||
layers::GrallocImage* grallocImage = static_cast<layers::GrallocImage*>(srcImage);
|
||||
return BlitGrallocImage(grallocImage, yFlip);
|
||||
return BlitGrallocImage(grallocImage, yflip);
|
||||
}
|
||||
#endif
|
||||
if (type == ConvertPlanarYCbCr) {
|
||||
mGL->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 1);
|
||||
PlanarYCbCrImage* yuvImage = static_cast<PlanarYCbCrImage*>(srcImage);
|
||||
return BlitPlanarYCbCrImage(yuvImage, yFlip);
|
||||
return BlitPlanarYCbCrImage(yuvImage, yflip);
|
||||
}
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
if (type == ConvertSurfaceTexture) {
|
||||
layers::SurfaceTextureImage* stImage = static_cast<layers::SurfaceTextureImage*>(srcImage);
|
||||
return BlitSurfaceTextureImage(stImage, yFlip);
|
||||
return BlitSurfaceTextureImage(stImage, yflip);
|
||||
}
|
||||
if (type == ConvertEGLImage) {
|
||||
layers::EGLImageImage* eglImage = static_cast<layers::EGLImageImage*>(srcImage);
|
||||
return BlitEGLImageImage(eglImage, yFlip);
|
||||
return BlitEGLImageImage(eglImage, yflip);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -905,7 +897,7 @@ GLBlitHelper::BlitImageToTexture(layers::Image* srcImage,
|
||||
const gfx::IntSize& destSize,
|
||||
GLuint destTex,
|
||||
GLenum destTarget,
|
||||
bool yFlip,
|
||||
bool yflip,
|
||||
GLuint xoffset,
|
||||
GLuint yoffset,
|
||||
GLuint cropWidth,
|
||||
@ -913,13 +905,13 @@ GLBlitHelper::BlitImageToTexture(layers::Image* srcImage,
|
||||
{
|
||||
ScopedGLDrawState autoStates(mGL);
|
||||
|
||||
if (!mFBO) {
|
||||
if (!mFBO)
|
||||
mGL->fGenFramebuffers(1, &mFBO);
|
||||
}
|
||||
|
||||
ScopedBindFramebuffer boundFB(mGL, mFBO);
|
||||
mGL->fFramebufferTexture2D(LOCAL_GL_FRAMEBUFFER, LOCAL_GL_COLOR_ATTACHMENT0, destTarget, destTex, 0);
|
||||
return BlitImageToFramebuffer(srcImage, destSize, mFBO, yFlip, xoffset, yoffset,
|
||||
mGL->fFramebufferTexture2D(LOCAL_GL_FRAMEBUFFER, LOCAL_GL_COLOR_ATTACHMENT0,
|
||||
destTarget, destTex, 0);
|
||||
return BlitImageToFramebuffer(srcImage, destSize, mFBO, yflip, xoffset, yoffset,
|
||||
cropWidth, cropHeight);
|
||||
}
|
||||
|
||||
@ -1027,5 +1019,5 @@ GLBlitHelper::BlitTextureToTexture(GLuint srcTex, GLuint destTex,
|
||||
srcSize, destSize, destTarget);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace gl
|
||||
} // namespace mozilla
|
||||
|
@ -145,12 +145,13 @@ class GLBlitHelper MOZ_FINAL
|
||||
void BindAndUploadEGLImage(EGLImage image, GLuint target);
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
bool BlitGrallocImage(layers::GrallocImage* grallocImage, bool yFlip = false);
|
||||
bool BlitGrallocImage(layers::GrallocImage* grallocImage, bool yflip);
|
||||
#endif
|
||||
bool BlitPlanarYCbCrImage(layers::PlanarYCbCrImage* yuvImage, bool yFlip = false);
|
||||
bool BlitPlanarYCbCrImage(layers::PlanarYCbCrImage* yuvImage, bool yflip);
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
bool BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage, bool yFlip = false);
|
||||
bool BlitEGLImageImage(layers::EGLImageImage* eglImage, bool yFlip = false);
|
||||
// Blit onto the current FB.
|
||||
bool BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage, bool yflip);
|
||||
bool BlitEGLImageImage(layers::EGLImageImage* eglImage, bool yflip);
|
||||
#endif
|
||||
|
||||
public:
|
||||
@ -186,14 +187,15 @@ public:
|
||||
GLenum srcTarget = LOCAL_GL_TEXTURE_2D,
|
||||
GLenum destTarget = LOCAL_GL_TEXTURE_2D);
|
||||
bool BlitImageToFramebuffer(layers::Image* srcImage, const gfx::IntSize& destSize,
|
||||
GLuint destFB, bool yFlip = false, GLuint xoffset = 0,
|
||||
GLuint destFB, bool yflip = false, GLuint xoffset = 0,
|
||||
GLuint yoffset = 0, GLuint width = 0, GLuint height = 0);
|
||||
bool BlitImageToTexture(layers::Image* srcImage, const gfx::IntSize& destSize,
|
||||
GLuint destTex, GLenum destTarget, bool yFlip = false, GLuint xoffset = 0,
|
||||
GLuint yoffset = 0, GLuint width = 0, GLuint height = 0);
|
||||
GLuint destTex, GLenum destTarget, bool yflip = false,
|
||||
GLuint xoffset = 0, GLuint yoffset = 0, GLuint width = 0,
|
||||
GLuint height = 0);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace gl
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // GLBLITHELPER_H_
|
||||
|
@ -22,6 +22,11 @@ MOZ_BEGIN_ENUM_CLASS(GLContextType)
|
||||
EGL
|
||||
MOZ_END_ENUM_CLASS(GLContextType)
|
||||
|
||||
MOZ_BEGIN_ENUM_CLASS(OriginPos, uint8_t)
|
||||
TopLeft,
|
||||
BottomLeft
|
||||
MOZ_END_ENUM_CLASS(OriginPos)
|
||||
|
||||
struct GLFormats
|
||||
{
|
||||
// Constructs a zeroed object:
|
||||
@ -39,7 +44,6 @@ struct GLFormats
|
||||
GLsizei samples;
|
||||
};
|
||||
|
||||
|
||||
struct PixelBufferFormat
|
||||
{
|
||||
// Constructs a zeroed object:
|
||||
@ -53,7 +57,6 @@ struct PixelBufferFormat
|
||||
int ColorBits() const { return red + green + blue; }
|
||||
};
|
||||
|
||||
|
||||
} /* namespace gl */
|
||||
} /* namespace mozilla */
|
||||
|
||||
|
@ -49,7 +49,7 @@ GLScreenBuffer::Create(GLContext* gl,
|
||||
XRE_GetProcessType() != GeckoProcessType_Default)
|
||||
{
|
||||
layers::TextureFlags flags = layers::TextureFlags::DEALLOCATE_CLIENT |
|
||||
layers::TextureFlags::NEEDS_Y_FLIP;
|
||||
layers::TextureFlags::ORIGIN_BOTTOM_LEFT;
|
||||
if (!caps.premultAlpha) {
|
||||
flags |= layers::TextureFlags::NON_PREMULTIPLIED;
|
||||
}
|
||||
|
@ -597,9 +597,9 @@ gfx::IntRect TiledTextureImage::GetTileRect()
|
||||
gfx::IntRect TiledTextureImage::GetSrcTileRect()
|
||||
{
|
||||
gfx::IntRect rect = GetTileRect();
|
||||
unsigned int srcY = mFlags & NeedsYFlip
|
||||
? mSize.height - rect.height - rect.y
|
||||
: rect.y;
|
||||
const bool needsYFlip = mFlags & OriginBottomLeft;
|
||||
unsigned int srcY = needsYFlip ? mSize.height - rect.height - rect.y
|
||||
: rect.y;
|
||||
return gfx::IntRect(rect.x, srcY, rect.width, rect.height);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
enum Flags {
|
||||
NoFlags = 0x0,
|
||||
UseNearestFilter = 0x1,
|
||||
NeedsYFlip = 0x2,
|
||||
OriginBottomLeft = 0x2,
|
||||
DisallowBigImage = 0x4
|
||||
};
|
||||
|
||||
@ -381,7 +381,8 @@ CreateBasicTextureImage(GLContext* aGL,
|
||||
* |aWrapMode| (usually GL_CLAMP_TO_EDGE or GL_REPEAT) and by
|
||||
* default, GL_LINEAR filtering. Specify
|
||||
* |aFlags=UseNearestFilter| for GL_NEAREST filtering. Specify
|
||||
* |aFlags=NeedsYFlip| if the image is flipped. Return
|
||||
* |aFlags=OriginBottomLeft| if the image is origin-bottom-left, instead of the
|
||||
* default origin-top-left. Return
|
||||
* nullptr if creating the TextureImage fails.
|
||||
*
|
||||
* The returned TextureImage may only be used with this GLContext.
|
||||
|
@ -29,8 +29,8 @@ MOZ_BEGIN_ENUM_CLASS(TextureFlags, uint32_t)
|
||||
NO_FLAGS = 0,
|
||||
// Use nearest-neighbour texture filtering (as opposed to linear filtering).
|
||||
USE_NEAREST_FILTER = 1 << 0,
|
||||
// The texture should be flipped along the y-axis when composited.
|
||||
NEEDS_Y_FLIP = 1 << 1,
|
||||
// The compositor assumes everything is origin-top-left by default.
|
||||
ORIGIN_BOTTOM_LEFT = 1 << 1,
|
||||
// Force the texture to be represented using a single tile (note that this means
|
||||
// tiled textures, not tiled layers).
|
||||
DISALLOW_BIGIMAGE = 1 << 2,
|
||||
|
@ -32,6 +32,7 @@ CopyableCanvasLayer::CopyableCanvasLayer(LayerManager* aLayerManager, void *aImp
|
||||
CanvasLayer(aLayerManager, aImplData)
|
||||
, mGLFrontbuffer(nullptr)
|
||||
, mIsAlphaPremultiplied(true)
|
||||
, mOriginPos(gl::OriginPos::TopLeft)
|
||||
{
|
||||
MOZ_COUNT_CTOR(CopyableCanvasLayer);
|
||||
}
|
||||
@ -49,7 +50,8 @@ CopyableCanvasLayer::Initialize(const Data& aData)
|
||||
if (aData.mGLContext) {
|
||||
mGLContext = aData.mGLContext;
|
||||
mIsAlphaPremultiplied = aData.mIsGLAlphaPremult;
|
||||
mNeedsYFlip = true;
|
||||
mOriginPos = gl::OriginPos::BottomLeft;
|
||||
|
||||
MOZ_ASSERT(mGLContext->IsOffscreen(), "canvas gl context isn't offscreen");
|
||||
|
||||
if (aData.mFrontbufferGLTex) {
|
||||
@ -63,9 +65,8 @@ CopyableCanvasLayer::Initialize(const Data& aData)
|
||||
} else if (aData.mDrawTarget) {
|
||||
mDrawTarget = aData.mDrawTarget;
|
||||
mSurface = mDrawTarget->Snapshot();
|
||||
mNeedsYFlip = false;
|
||||
} else {
|
||||
NS_ERROR("CanvasLayer created without mSurface, mDrawTarget or mGLContext?");
|
||||
MOZ_CRASH("CanvasLayer created without mSurface, mDrawTarget or mGLContext?");
|
||||
}
|
||||
|
||||
mBounds.SetRect(0, 0, aData.mSize.width, aData.mSize.height);
|
||||
|
@ -55,7 +55,7 @@ protected:
|
||||
UniquePtr<gl::SharedSurface> mGLFrontbuffer;
|
||||
|
||||
bool mIsAlphaPremultiplied;
|
||||
bool mNeedsYFlip;
|
||||
gl::OriginPos mOriginPos;
|
||||
|
||||
RefPtr<gfx::DataSourceSurface> mCachedTempSurface;
|
||||
|
||||
|
@ -40,9 +40,9 @@ public:
|
||||
|
||||
FrameMetrics()
|
||||
: mCompositionBounds(0, 0, 0, 0)
|
||||
, mCriticalDisplayPort(0, 0, 0, 0)
|
||||
, mPresShellResolution(1)
|
||||
, mDisplayPort(0, 0, 0, 0)
|
||||
, mCriticalDisplayPort(0, 0, 0, 0)
|
||||
, mScrollableRect(0, 0, 0, 0)
|
||||
, mCumulativeResolution(1)
|
||||
, mDevPixelsPerCSSPixel(1)
|
||||
@ -251,19 +251,6 @@ public:
|
||||
// layout/paint time.
|
||||
ParentLayerRect mCompositionBounds;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// The following metrics are all in CSS pixels. They are not in any uniform
|
||||
// space, so each is explained separately.
|
||||
//
|
||||
|
||||
// If non-empty, the area of a frame's contents that is considered critical
|
||||
// to paint. Area outside of this area (i.e. area inside mDisplayPort, but
|
||||
// outside of mCriticalDisplayPort) is considered low-priority, and may be
|
||||
// painted with lower precision, or not painted at all.
|
||||
//
|
||||
// The same restrictions for mDisplayPort apply here.
|
||||
CSSRect mCriticalDisplayPort;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// The following metrics are dimensionless.
|
||||
//
|
||||
@ -288,6 +275,16 @@ public:
|
||||
return mDisplayPort;
|
||||
}
|
||||
|
||||
void SetCriticalDisplayPort(const CSSRect& aCriticalDisplayPort)
|
||||
{
|
||||
mCriticalDisplayPort = aCriticalDisplayPort;
|
||||
}
|
||||
|
||||
CSSRect GetCriticalDisplayPort() const
|
||||
{
|
||||
return mCriticalDisplayPort;
|
||||
}
|
||||
|
||||
void SetCumulativeResolution(const LayoutDeviceToLayerScale& aCumulativeResolution)
|
||||
{
|
||||
mCumulativeResolution = aCumulativeResolution;
|
||||
@ -539,6 +536,14 @@ private:
|
||||
// width = window.innerWidth + 200, height = window.innerHeight + 200 }
|
||||
CSSRect mDisplayPort;
|
||||
|
||||
// If non-empty, the area of a frame's contents that is considered critical
|
||||
// to paint. Area outside of this area (i.e. area inside mDisplayPort, but
|
||||
// outside of mCriticalDisplayPort) is considered low-priority, and may be
|
||||
// painted with lower precision, or not painted at all.
|
||||
//
|
||||
// The same restrictions for mDisplayPort apply here.
|
||||
CSSRect mCriticalDisplayPort;
|
||||
|
||||
// The scrollable bounds of a frame. This is determined by reflow.
|
||||
// Ordinarily the x and y will be 0 and the width and height will be the
|
||||
// size of the element being scrolled. However for RTL pages or elements
|
||||
|
@ -40,7 +40,6 @@ GLImage::GetAsSourceSurface()
|
||||
|
||||
if (!sSnapshotContext) {
|
||||
sSnapshotContext = GLContextProvider::CreateHeadless();
|
||||
|
||||
if (!sSnapshotContext) {
|
||||
NS_WARNING("Failed to create snapshot GLContext");
|
||||
return nullptr;
|
||||
@ -63,6 +62,7 @@ GLImage::GetAsSourceSurface()
|
||||
GLBlitHelper helper(sSnapshotContext);
|
||||
|
||||
helper.BlitImageToFramebuffer(this, size, fb.FB(), false);
|
||||
|
||||
ScopedBindFramebuffer bind(sSnapshotContext, fb.FB());
|
||||
|
||||
RefPtr<gfx::DataSourceSurface> source =
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef GFX_GLIMAGES_H
|
||||
#define GFX_GLIMAGES_H
|
||||
|
||||
#include "GLContextTypes.h"
|
||||
#include "GLTypes.h"
|
||||
#include "ImageContainer.h" // for Image
|
||||
#include "ImageTypes.h" // for ImageFormat::SHARED_GLTEXTURE
|
||||
@ -31,10 +32,11 @@ public:
|
||||
EGLImage mImage;
|
||||
EGLSync mSync;
|
||||
gfx::IntSize mSize;
|
||||
bool mInverted;
|
||||
gl::OriginPos mOriginPos;
|
||||
bool mOwns;
|
||||
|
||||
Data() : mImage(nullptr), mSync(nullptr), mSize(0, 0), mInverted(false), mOwns(false)
|
||||
Data() : mImage(nullptr), mSync(nullptr), mSize(0, 0),
|
||||
mOriginPos(gl::OriginPos::TopLeft), mOwns(false)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -60,7 +62,7 @@ public:
|
||||
struct Data {
|
||||
mozilla::gl::AndroidSurfaceTexture* mSurfTex;
|
||||
gfx::IntSize mSize;
|
||||
bool mInverted;
|
||||
gl::OriginPos mOriginPos;
|
||||
};
|
||||
|
||||
void SetData(const Data& aData) { mData = aData; }
|
||||
|
@ -176,7 +176,7 @@ AppendToString(std::stringstream& aStream, const FrameMetrics& m,
|
||||
AppendToString(aStream, m.GetSmoothScrollOffset(), "] [ss=");
|
||||
}
|
||||
AppendToString(aStream, m.GetDisplayPort(), "] [dp=");
|
||||
AppendToString(aStream, m.mCriticalDisplayPort, "] [cdp=");
|
||||
AppendToString(aStream, m.GetCriticalDisplayPort(), "] [cdp=");
|
||||
AppendToString(aStream, m.GetBackgroundColor(), "] [color=");
|
||||
if (!detailed) {
|
||||
AppendToString(aStream, m.GetScrollId(), "] [scrollId=");
|
||||
@ -289,7 +289,7 @@ AppendToString(std::stringstream& aStream, TextureFlags flags,
|
||||
}
|
||||
bool previous = false;
|
||||
AppendFlag(TextureFlags::USE_NEAREST_FILTER);
|
||||
AppendFlag(TextureFlags::NEEDS_Y_FLIP);
|
||||
AppendFlag(TextureFlags::ORIGIN_BOTTOM_LEFT);
|
||||
AppendFlag(TextureFlags::DISALLOW_BIGIMAGE);
|
||||
|
||||
#undef AppendFlag
|
||||
|
@ -79,7 +79,7 @@ MOZ_END_ENUM_CLASS(SurfaceMode)
|
||||
// by other surfaces we will need a more generic LayerRenderState.
|
||||
MOZ_BEGIN_ENUM_CLASS(LayerRenderStateFlags, int8_t)
|
||||
LAYER_RENDER_STATE_DEFAULT = 0,
|
||||
Y_FLIPPED = 1 << 0,
|
||||
ORIGIN_BOTTOM_LEFT = 1 << 0,
|
||||
BUFFER_ROTATION = 1 << 1,
|
||||
// Notify Composer2D to swap the RB pixels of gralloc buffer
|
||||
FORMAT_RB_SWAP = 1 << 2,
|
||||
@ -116,8 +116,8 @@ struct LayerRenderState {
|
||||
, mTexture(aTexture)
|
||||
{}
|
||||
|
||||
bool YFlipped() const
|
||||
{ return bool(mFlags & LayerRenderStateFlags::Y_FLIPPED); }
|
||||
bool OriginBottomLeft() const
|
||||
{ return bool(mFlags & LayerRenderStateFlags::ORIGIN_BOTTOM_LEFT); }
|
||||
|
||||
bool BufferRotated() const
|
||||
{ return bool(mFlags & LayerRenderStateFlags::BUFFER_ROTATION); }
|
||||
|
@ -2707,9 +2707,9 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
|
||||
LogRendertraceRect(GetGuid(), "page", "brown", aLayerMetrics.GetScrollableRect());
|
||||
LogRendertraceRect(GetGuid(), "painted displayport", "lightgreen",
|
||||
aLayerMetrics.GetDisplayPort() + aLayerMetrics.GetScrollOffset());
|
||||
if (!aLayerMetrics.mCriticalDisplayPort.IsEmpty()) {
|
||||
if (!aLayerMetrics.GetCriticalDisplayPort().IsEmpty()) {
|
||||
LogRendertraceRect(GetGuid(), "painted critical displayport", "darkgreen",
|
||||
aLayerMetrics.mCriticalDisplayPort + aLayerMetrics.GetScrollOffset());
|
||||
aLayerMetrics.GetCriticalDisplayPort() + aLayerMetrics.GetScrollOffset());
|
||||
}
|
||||
|
||||
mPaintThrottler.TaskComplete(GetFrameTime());
|
||||
|
@ -40,8 +40,10 @@ BasicCanvasLayer::Paint(DrawTarget* aDT,
|
||||
return;
|
||||
}
|
||||
|
||||
const bool needsYFlip = (mOriginPos == gl::OriginPos::BottomLeft);
|
||||
|
||||
Matrix oldTM;
|
||||
if (mNeedsYFlip) {
|
||||
if (needsYFlip) {
|
||||
oldTM = aDT->GetTransform();
|
||||
aDT->SetTransform(Matrix(oldTM).
|
||||
PreTranslate(0.0f, mBounds.height).
|
||||
@ -54,7 +56,7 @@ BasicCanvasLayer::Paint(DrawTarget* aDT,
|
||||
DrawOptions(GetEffectiveOpacity(), GetEffectiveOperator(this)),
|
||||
aMaskLayer);
|
||||
|
||||
if (mNeedsYFlip) {
|
||||
if (needsYFlip) {
|
||||
aDT->SetTransform(oldTM);
|
||||
}
|
||||
}
|
||||
|
@ -72,8 +72,8 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
||||
gfxImageFormat format
|
||||
= gfxPlatform::GetPlatform()->OptimalFormatForContent(contentType);
|
||||
TextureFlags flags = TextureFlags::DEFAULT;
|
||||
if (mTextureFlags & TextureFlags::NEEDS_Y_FLIP) {
|
||||
flags |= TextureFlags::NEEDS_Y_FLIP;
|
||||
if (mTextureFlags & TextureFlags::ORIGIN_BOTTOM_LEFT) {
|
||||
flags |= TextureFlags::ORIGIN_BOTTOM_LEFT;
|
||||
}
|
||||
|
||||
gfx::SurfaceFormat surfaceFormat = gfx::ImageFormatToSurfaceFormat(format);
|
||||
|
@ -78,7 +78,7 @@ ClientCanvasLayer::Initialize(const Data& aData)
|
||||
if (mGLContext->GetContextType() == GLContextType::EGL) {
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
TextureFlags flags = TextureFlags::DEALLOCATE_CLIENT |
|
||||
TextureFlags::NEEDS_Y_FLIP;
|
||||
TextureFlags::ORIGIN_BOTTOM_LEFT;
|
||||
if (!aData.mIsGLAlphaPremult) {
|
||||
flags |= TextureFlags::NON_PREMULTIPLIED;
|
||||
}
|
||||
@ -153,8 +153,8 @@ ClientCanvasLayer::RenderLayer()
|
||||
|
||||
if (!mCanvasClient) {
|
||||
TextureFlags flags = TextureFlags::IMMEDIATE_UPLOAD;
|
||||
if (mNeedsYFlip) {
|
||||
flags |= TextureFlags::NEEDS_Y_FLIP;
|
||||
if (mOriginPos == gl::OriginPos::BottomLeft) {
|
||||
flags |= TextureFlags::ORIGIN_BOTTOM_LEFT;
|
||||
}
|
||||
|
||||
if (!mGLContext) {
|
||||
|
@ -752,8 +752,8 @@ ClientLayerManager::ProgressiveUpdateCallback(bool aHasPendingNewThebesContent,
|
||||
// gfx/layers/ipc/CompositorParent.cpp::TransformShadowTree.
|
||||
CSSToLayerScale paintScale = aMetrics.LayersPixelsPerCSSPixel();
|
||||
const CSSRect& metricsDisplayPort =
|
||||
(aDrawingCritical && !aMetrics.mCriticalDisplayPort.IsEmpty()) ?
|
||||
aMetrics.mCriticalDisplayPort : aMetrics.GetDisplayPort();
|
||||
(aDrawingCritical && !aMetrics.GetCriticalDisplayPort().IsEmpty()) ?
|
||||
aMetrics.GetCriticalDisplayPort() : aMetrics.GetDisplayPort();
|
||||
LayerRect displayPort = (metricsDisplayPort + aMetrics.GetScrollOffset()) * paintScale;
|
||||
|
||||
ParentLayerPoint scrollOffset;
|
||||
|
@ -152,7 +152,7 @@ ClientTiledPaintedLayer::BeginPaint()
|
||||
// Compute the critical display port that applies to this layer in the
|
||||
// LayoutDevice space of this layer.
|
||||
ParentLayerRect criticalDisplayPort =
|
||||
(displayportMetrics.mCriticalDisplayPort * displayportMetrics.GetZoom())
|
||||
(displayportMetrics.GetCriticalDisplayPort() * displayportMetrics.GetZoom())
|
||||
+ displayportMetrics.mCompositionBounds.TopLeft();
|
||||
mPaintData.mCriticalDisplayPort = RoundedOut(
|
||||
ApplyParentLayerToLayerTransform(transformDisplayPortToLayer, criticalDisplayPort));
|
||||
@ -189,7 +189,7 @@ ClientTiledPaintedLayer::UseFastPath()
|
||||
|
||||
bool multipleTransactionsNeeded = gfxPlatform::GetPlatform()->UseProgressivePaint()
|
||||
|| gfxPrefs::UseLowPrecisionBuffer()
|
||||
|| !parentMetrics.mCriticalDisplayPort.IsEmpty();
|
||||
|| !parentMetrics.GetCriticalDisplayPort().IsEmpty();
|
||||
bool isFixed = GetIsFixedPosition() || GetParent()->GetIsFixedPosition();
|
||||
return !multipleTransactionsNeeded || isFixed || parentMetrics.GetDisplayPort().IsEmpty();
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ ImageClientSingle::UpdateImage(ImageContainer* aContainer, uint32_t aContentFlag
|
||||
const SurfaceTextureImage::Data* data = typedImage->GetData();
|
||||
texture = new SurfaceTextureClient(GetForwarder(), mTextureFlags,
|
||||
data->mSurfTex, size,
|
||||
data->mInverted);
|
||||
data->mOriginPos);
|
||||
#endif
|
||||
} else {
|
||||
MOZ_ASSERT(false, "Bad ImageFormat.");
|
||||
|
@ -257,9 +257,9 @@ SharedFrameMetricsHelper::AboutToCheckerboard(const FrameMetrics& aContentMetric
|
||||
// converted to app units and then back to CSS pixels before being put in the FrameMetrics.
|
||||
// This process can introduce some rounding error, so we inflate the rect by one app unit
|
||||
// to account for that.
|
||||
CSSRect painted = (aContentMetrics.mCriticalDisplayPort.IsEmpty()
|
||||
CSSRect painted = (aContentMetrics.GetCriticalDisplayPort().IsEmpty()
|
||||
? aContentMetrics.GetDisplayPort()
|
||||
: aContentMetrics.mCriticalDisplayPort)
|
||||
: aContentMetrics.GetCriticalDisplayPort())
|
||||
+ aContentMetrics.GetScrollOffset();
|
||||
painted.Inflate(CSSMargin::FromAppUnits(nsMargin(1, 1, 1, 1)));
|
||||
|
||||
|
@ -604,8 +604,8 @@ AsyncCompositionManager::ApplyAsyncContentTransformToTree(Layer *aLayer)
|
||||
|
||||
const FrameMetrics& metrics = aLayer->GetFrameMetrics(i);
|
||||
CSSToLayerScale paintScale = metrics.LayersPixelsPerCSSPixel();
|
||||
CSSRect displayPort(metrics.mCriticalDisplayPort.IsEmpty() ?
|
||||
metrics.GetDisplayPort() : metrics.mCriticalDisplayPort);
|
||||
CSSRect displayPort(metrics.GetCriticalDisplayPort().IsEmpty() ?
|
||||
metrics.GetDisplayPort() : metrics.GetCriticalDisplayPort());
|
||||
ScreenPoint offset(0, 0);
|
||||
// XXX this call to SyncFrameMetrics is not currently being used. It will be cleaned
|
||||
// up as part of bug 776030 or one of its dependencies.
|
||||
@ -859,9 +859,9 @@ AsyncCompositionManager::TransformScrollableLayer(Layer* aLayer)
|
||||
// notifications, so that Java can take these into account in its response.
|
||||
// Calculate the absolute display port to send to Java
|
||||
LayerIntRect displayPort = RoundedToInt(
|
||||
(metrics.mCriticalDisplayPort.IsEmpty()
|
||||
(metrics.GetCriticalDisplayPort().IsEmpty()
|
||||
? metrics.GetDisplayPort()
|
||||
: metrics.mCriticalDisplayPort
|
||||
: metrics.GetCriticalDisplayPort()
|
||||
) * geckoZoom);
|
||||
displayPort += scrollOffsetLayerPixels;
|
||||
|
||||
|
@ -151,7 +151,7 @@ ImageHost::Composite(EffectChain& aEffectChain,
|
||||
} else {
|
||||
effect->mTextureCoords = Rect(0, 0, 1, 1);
|
||||
}
|
||||
if (mFrontBuffer->GetFlags() & TextureFlags::NEEDS_Y_FLIP) {
|
||||
if (mFrontBuffer->GetFlags() & TextureFlags::ORIGIN_BOTTOM_LEFT) {
|
||||
effect->mTextureCoords.y = effect->mTextureCoords.YMost();
|
||||
effect->mTextureCoords.height = -effect->mTextureCoords.height;
|
||||
}
|
||||
@ -179,7 +179,7 @@ ImageHost::Composite(EffectChain& aEffectChain,
|
||||
rect = gfx::Rect(0, 0, textureSize.width, textureSize.height);
|
||||
}
|
||||
|
||||
if (mFrontBuffer->GetFlags() & TextureFlags::NEEDS_Y_FLIP) {
|
||||
if (mFrontBuffer->GetFlags() & TextureFlags::ORIGIN_BOTTOM_LEFT) {
|
||||
effect->mTextureCoords.y = effect->mTextureCoords.YMost();
|
||||
effect->mTextureCoords.height = -effect->mTextureCoords.height;
|
||||
}
|
||||
|
@ -928,10 +928,10 @@ LayerManagerComposite::ComputeRenderIntegrity()
|
||||
|
||||
// Work out how much of the critical display-port covers the screen
|
||||
bool hasLowPrecision = false;
|
||||
if (!metrics.mCriticalDisplayPort.IsEmpty()) {
|
||||
if (!metrics.GetCriticalDisplayPort().IsEmpty()) {
|
||||
hasLowPrecision = true;
|
||||
highPrecisionMultiplier =
|
||||
GetDisplayportCoverage(metrics.mCriticalDisplayPort, transform, screenRect);
|
||||
GetDisplayportCoverage(metrics.GetCriticalDisplayPort(), transform, screenRect);
|
||||
}
|
||||
|
||||
// Work out how much of the display-port covers the screen
|
||||
|
@ -23,8 +23,8 @@ using namespace mozilla::gfx;
|
||||
CanvasLayerD3D10::CanvasLayerD3D10(LayerManagerD3D10 *aManager)
|
||||
: CanvasLayer(aManager, nullptr)
|
||||
, LayerD3D10(aManager)
|
||||
, mDataIsPremultiplied(false)
|
||||
, mNeedsYFlip(false)
|
||||
, mDataIsPremultiplied(true)
|
||||
, mOriginPos(gl::OriginPos::TopLeft)
|
||||
, mHasAlpha(true)
|
||||
{
|
||||
mImplData = static_cast<LayerD3D10*>(this);
|
||||
@ -43,7 +43,7 @@ CanvasLayerD3D10::Initialize(const Data& aData)
|
||||
mGLContext = aData.mGLContext;
|
||||
NS_ASSERTION(mGLContext->IsOffscreen(), "Canvas GLContext must be offscreen.");
|
||||
mDataIsPremultiplied = aData.mIsGLAlphaPremult;
|
||||
mNeedsYFlip = true;
|
||||
mOriginPos = gl::OriginPos::TopLeft;
|
||||
|
||||
GLScreenBuffer* screen = mGLContext->Screen();
|
||||
|
||||
@ -60,8 +60,6 @@ CanvasLayerD3D10::Initialize(const Data& aData)
|
||||
}
|
||||
} else if (aData.mDrawTarget) {
|
||||
mDrawTarget = aData.mDrawTarget;
|
||||
mNeedsYFlip = false;
|
||||
mDataIsPremultiplied = true;
|
||||
void *texture = mDrawTarget->GetNativeSurface(NativeSurfaceType::D3D10_TEXTURE);
|
||||
|
||||
if (texture) {
|
||||
@ -79,7 +77,7 @@ CanvasLayerD3D10::Initialize(const Data& aData)
|
||||
// bypassing Thebes
|
||||
mSurface = mDrawTarget->Snapshot();
|
||||
} else {
|
||||
NS_ERROR("CanvasLayer created without mSurface, mDrawTarget or mGLContext?");
|
||||
MOZ_CRASH("CanvasLayer created without mSurface, mDrawTarget or mGLContext?");
|
||||
}
|
||||
|
||||
mBounds.SetRect(0, 0, aData.mSize.width, aData.mSize.height);
|
||||
@ -213,7 +211,9 @@ CanvasLayerD3D10::RenderLayer()
|
||||
(float)mBounds.height)
|
||||
);
|
||||
|
||||
if (mNeedsYFlip) {
|
||||
const bool needsYFlip = (mOriginPos == gl::OriginPos::BottomLeft);
|
||||
|
||||
if (needsYFlip) {
|
||||
effect()->GetVariableByName("vTextureCoords")->AsVector()->SetFloatVector(
|
||||
ShaderConstantRectD3D10(
|
||||
0,
|
||||
@ -226,7 +226,7 @@ CanvasLayerD3D10::RenderLayer()
|
||||
technique->GetPassByIndex(0)->Apply(0);
|
||||
device()->Draw(4, 0);
|
||||
|
||||
if (mNeedsYFlip) {
|
||||
if (needsYFlip) {
|
||||
effect()->GetVariableByName("vTextureCoords")->AsVector()->
|
||||
SetFloatVector(ShaderConstantRectD3D10(0, 0, 1.0f, 1.0f));
|
||||
}
|
||||
|
@ -6,8 +6,8 @@
|
||||
#ifndef GFX_CANVASLAYERD3D10_H
|
||||
#define GFX_CANVASLAYERD3D10_H
|
||||
|
||||
#include "GLContextTypes.h"
|
||||
#include "LayerManagerD3D10.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
namespace mozilla {
|
||||
@ -45,7 +45,7 @@ private:
|
||||
nsRefPtr<ID3D10ShaderResourceView> mSRView;
|
||||
|
||||
bool mDataIsPremultiplied;
|
||||
bool mNeedsYFlip;
|
||||
gl::OriginPos mOriginPos;
|
||||
bool mIsD2DTexture;
|
||||
bool mHasAlpha;
|
||||
|
||||
|
@ -22,8 +22,8 @@ namespace layers {
|
||||
CanvasLayerD3D9::CanvasLayerD3D9(LayerManagerD3D9 *aManager)
|
||||
: CanvasLayer(aManager, nullptr)
|
||||
, LayerD3D9(aManager)
|
||||
, mDataIsPremultiplied(false)
|
||||
, mNeedsYFlip(false)
|
||||
, mDataIsPremultiplied(true)
|
||||
, mOriginPos(gl::OriginPos::TopLeft)
|
||||
, mHasAlpha(true)
|
||||
{
|
||||
mImplData = static_cast<LayerD3D9*>(this);
|
||||
@ -44,13 +44,11 @@ CanvasLayerD3D9::Initialize(const Data& aData)
|
||||
|
||||
if (aData.mDrawTarget) {
|
||||
mDrawTarget = aData.mDrawTarget;
|
||||
mNeedsYFlip = false;
|
||||
mDataIsPremultiplied = true;
|
||||
} else if (aData.mGLContext) {
|
||||
mGLContext = aData.mGLContext;
|
||||
NS_ASSERTION(mGLContext->IsOffscreen(), "Canvas GLContext must be offscreen.");
|
||||
mDataIsPremultiplied = aData.mIsGLAlphaPremult;
|
||||
mNeedsYFlip = true;
|
||||
mOriginPos = gl::OriginPos::BottomLeft;
|
||||
} else {
|
||||
NS_ERROR("CanvasLayer created without mGLContext or mDrawTarget?");
|
||||
}
|
||||
@ -137,9 +135,10 @@ CanvasLayerD3D9::RenderLayer()
|
||||
* We flip the Y axis here, note we can only do this because we are in
|
||||
* CULL_NONE mode!
|
||||
*/
|
||||
|
||||
ShaderConstantRect quad(0, 0, mBounds.width, mBounds.height);
|
||||
if (mNeedsYFlip) {
|
||||
|
||||
const bool needsYFlip = (mOriginPos == gl::OriginPos::BottomLeft);
|
||||
if (needsYFlip) {
|
||||
quad.mHeight = (float)-mBounds.height;
|
||||
quad.mY = (float)mBounds.height;
|
||||
}
|
||||
|
@ -6,8 +6,8 @@
|
||||
#ifndef GFX_CANVASLAYERD3D9_H
|
||||
#define GFX_CANVASLAYERD3D9_H
|
||||
|
||||
#include "LayerManagerD3D9.h"
|
||||
#include "GLContextTypes.h"
|
||||
#include "LayerManagerD3D9.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
@ -42,7 +42,7 @@ protected:
|
||||
RefPtr<gfx::DrawTarget> mDrawTarget;
|
||||
|
||||
bool mDataIsPremultiplied;
|
||||
bool mNeedsYFlip;
|
||||
gl::OriginPos mOriginPos;
|
||||
bool mHasAlpha;
|
||||
|
||||
nsAutoArrayPtr<uint8_t> mCachedTempBlob;
|
||||
|
@ -348,7 +348,7 @@ GrallocTextureClientOGL::FromSharedSurface(gl::SharedSurface* abstractSurf,
|
||||
|
||||
RefPtr<TextureClient> ret = surf->GetTextureClient();
|
||||
|
||||
TextureFlags mask = TextureFlags::NEEDS_Y_FLIP |
|
||||
TextureFlags mask = TextureFlags::ORIGIN_BOTTOM_LEFT |
|
||||
TextureFlags::RB_SWAPPED |
|
||||
TextureFlags::NON_PREMULTIPLIED;
|
||||
TextureFlags required = flags & mask;
|
||||
|
@ -212,8 +212,8 @@ GrallocTextureHostOGL::GetRenderState()
|
||||
if (mIsOpaque) {
|
||||
flags |= LayerRenderStateFlags::OPAQUE;
|
||||
}
|
||||
if (mFlags & TextureFlags::NEEDS_Y_FLIP) {
|
||||
flags |= LayerRenderStateFlags::Y_FLIPPED;
|
||||
if (mFlags & TextureFlags::ORIGIN_BOTTOM_LEFT) {
|
||||
flags |= LayerRenderStateFlags::ORIGIN_BOTTOM_LEFT;
|
||||
}
|
||||
if (mFlags & TextureFlags::RB_SWAPPED) {
|
||||
flags |= LayerRenderStateFlags::FORMAT_RB_SWAP;
|
||||
|
@ -34,8 +34,8 @@ EGLImageTextureClient::EGLImageTextureClient(ISurfaceAllocator* aAllocator,
|
||||
|
||||
AddFlags(TextureFlags::DEALLOCATE_CLIENT);
|
||||
|
||||
if (aImage->GetData()->mInverted) {
|
||||
AddFlags(TextureFlags::NEEDS_Y_FLIP);
|
||||
if (aImage->GetData()->mOriginPos == gl::OriginPos::BottomLeft) {
|
||||
AddFlags(TextureFlags::ORIGIN_BOTTOM_LEFT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ SurfaceTextureClient::SurfaceTextureClient(ISurfaceAllocator* aAllocator,
|
||||
TextureFlags aFlags,
|
||||
AndroidSurfaceTexture* aSurfTex,
|
||||
gfx::IntSize aSize,
|
||||
bool aInverted)
|
||||
gl::OriginPos aOriginPos)
|
||||
: TextureClient(aAllocator, aFlags)
|
||||
, mSurfTex(aSurfTex)
|
||||
, mSize(aSize)
|
||||
@ -89,8 +89,8 @@ SurfaceTextureClient::SurfaceTextureClient(ISurfaceAllocator* aAllocator,
|
||||
// Our data is always owned externally.
|
||||
AddFlags(TextureFlags::DEALLOCATE_CLIENT);
|
||||
|
||||
if (aInverted) {
|
||||
AddFlags(TextureFlags::NEEDS_Y_FLIP);
|
||||
if (aOriginPos == gl::OriginPos::BottomLeft) {
|
||||
AddFlags(TextureFlags::ORIGIN_BOTTOM_LEFT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
TextureFlags aFlags,
|
||||
gl::AndroidSurfaceTexture* aSurfTex,
|
||||
gfx::IntSize aSize,
|
||||
bool aInverted);
|
||||
gl::OriginPos aOriginPos);
|
||||
|
||||
~SurfaceTextureClient();
|
||||
|
||||
|
@ -103,8 +103,8 @@ FlagsToGLFlags(TextureFlags aFlags)
|
||||
|
||||
if (aFlags & TextureFlags::USE_NEAREST_FILTER)
|
||||
result |= TextureImage::UseNearestFilter;
|
||||
if (aFlags & TextureFlags::NEEDS_Y_FLIP)
|
||||
result |= TextureImage::NeedsYFlip;
|
||||
if (aFlags & TextureFlags::ORIGIN_BOTTOM_LEFT)
|
||||
result |= TextureImage::OriginBottomLeft;
|
||||
if (aFlags & TextureFlags::DISALLOW_BIGIMAGE)
|
||||
result |= TextureImage::DisallowBigImage;
|
||||
|
||||
|
@ -225,7 +225,7 @@ TestFrameMetrics()
|
||||
|
||||
fm.SetDisplayPort(CSSRect(0, 0, 10, 10));
|
||||
fm.mCompositionBounds = ParentLayerRect(0, 0, 10, 10);
|
||||
fm.mCriticalDisplayPort = CSSRect(0, 0, 10, 10);
|
||||
fm.SetCriticalDisplayPort(CSSRect(0, 0, 10, 10));
|
||||
fm.SetScrollableRect(CSSRect(0, 0, 100, 100));
|
||||
|
||||
return fm;
|
||||
|
@ -429,7 +429,7 @@ class GCRuntime
|
||||
void disallowIncrementalGC() { incrementalAllowed = false; }
|
||||
|
||||
bool isIncrementalGCEnabled() { return mode == JSGC_MODE_INCREMENTAL && incrementalAllowed; }
|
||||
bool isIncrementalGCInProgress() { return state() != gc::NO_INCREMENTAL && !verifyPreData; }
|
||||
bool isIncrementalGCInProgress() { return state() != gc::NO_INCREMENTAL; }
|
||||
|
||||
bool isGenerationalGCEnabled() { return generationalDisabled == 0; }
|
||||
void disableGenerationalGC();
|
||||
|
@ -773,7 +773,7 @@ Statistics::endGC()
|
||||
runtime->addTelemetry(JS_TELEMETRY_GC_INCREMENTAL_DISABLED, !runtime->gc.isIncrementalGCAllowed());
|
||||
runtime->addTelemetry(JS_TELEMETRY_GC_SCC_SWEEP_TOTAL_MS, t(sccTotal));
|
||||
runtime->addTelemetry(JS_TELEMETRY_GC_SCC_SWEEP_MAX_PAUSE_MS, t(sccLongest));
|
||||
|
||||
|
||||
double mmu50 = computeMMU(50 * PRMJ_USEC_PER_MSEC);
|
||||
runtime->addTelemetry(JS_TELEMETRY_GC_MMU_50, mmu50 * 100);
|
||||
|
||||
@ -792,7 +792,7 @@ Statistics::beginSlice(const ZoneGCStats &zoneStats, JSGCInvocationKind gckind,
|
||||
{
|
||||
this->zoneStats = zoneStats;
|
||||
|
||||
bool first = runtime->gc.state() == gc::NO_INCREMENTAL;
|
||||
bool first = !runtime->gc.isIncrementalGCInProgress();
|
||||
if (first)
|
||||
beginGC(gckind);
|
||||
|
||||
@ -820,7 +820,7 @@ Statistics::endSlice()
|
||||
runtime->addTelemetry(JS_TELEMETRY_GC_SLICE_MS, t(slices.back().end - slices.back().start));
|
||||
runtime->addTelemetry(JS_TELEMETRY_GC_RESET, !!slices.back().resetReason);
|
||||
|
||||
bool last = runtime->gc.state() == gc::NO_INCREMENTAL;
|
||||
bool last = !runtime->gc.isIncrementalGCInProgress();
|
||||
if (last)
|
||||
endGC();
|
||||
|
||||
|
@ -170,7 +170,7 @@ NextNode(VerifyNode *node)
|
||||
void
|
||||
gc::GCRuntime::startVerifyPreBarriers()
|
||||
{
|
||||
if (verifyPreData || incrementalState != NO_INCREMENTAL)
|
||||
if (verifyPreData || isIncrementalGCInProgress())
|
||||
return;
|
||||
|
||||
/*
|
||||
@ -403,11 +403,8 @@ struct VerifyPostTracer : JSTracer
|
||||
void
|
||||
gc::GCRuntime::startVerifyPostBarriers()
|
||||
{
|
||||
if (verifyPostData ||
|
||||
incrementalState != NO_INCREMENTAL)
|
||||
{
|
||||
if (verifyPostData || isIncrementalGCInProgress())
|
||||
return;
|
||||
}
|
||||
|
||||
evictNursery();
|
||||
|
||||
|
@ -107,13 +107,6 @@ Zone::onTooMuchMalloc()
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Zone::isCloseToAllocTrigger(bool highFrequencyGC) const
|
||||
{
|
||||
double factor = highFrequencyGC ? 0.85 : 0.9;
|
||||
return usage.gcBytes() >= factor * threshold.gcTriggerBytes();
|
||||
}
|
||||
|
||||
void
|
||||
Zone::beginSweepTypes(FreeOp *fop, bool releaseTypes)
|
||||
{
|
||||
|
@ -62,6 +62,7 @@ class ZoneHeapThreshold
|
||||
|
||||
double gcHeapGrowthFactor() const { return gcHeapGrowthFactor_; }
|
||||
size_t gcTriggerBytes() const { return gcTriggerBytes_; }
|
||||
bool isCloseToAllocTrigger(const js::gc::HeapUsage& usage, bool highFrequencyGC) const;
|
||||
|
||||
void updateAfterGC(size_t lastBytes, JSGCInvocationKind gckind,
|
||||
const GCSchedulingTunables &tunables, const GCSchedulingState &state);
|
||||
@ -153,8 +154,6 @@ struct Zone : public JS::shadow::Zone,
|
||||
bool isTooMuchMalloc() const { return gcMallocBytes <= 0; }
|
||||
void onTooMuchMalloc();
|
||||
|
||||
bool isCloseToAllocTrigger(bool highFrequencyGC) const;
|
||||
|
||||
void *onOutOfMemory(void *p, size_t nbytes) {
|
||||
return runtimeFromMainThread()->onOutOfMemory(p, nbytes);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user