diff --git a/accessible/atk/AccessibleWrap.cpp b/accessible/atk/AccessibleWrap.cpp index a0ef188fb2a..dd25b25d7bd 100644 --- a/accessible/atk/AccessibleWrap.cpp +++ b/accessible/atk/AccessibleWrap.cpp @@ -759,7 +759,7 @@ getAttributesCB(AtkObject *aAtkObj) if (!proxy) return nullptr; - nsAutoTArray attrs; + AutoTArray attrs; proxy->Attributes(&attrs); if (attrs.IsEmpty()) return nullptr; @@ -1019,7 +1019,7 @@ refRelationSetCB(AtkObject *aAtkObj) continue; size_t targetCount = targetSets[i].Length(); - nsAutoTArray wrappers; + AutoTArray wrappers; for (size_t j = 0; j < targetCount; j++) wrappers.AppendElement(GetWrapperFor(targetSets[i][j])); @@ -1664,7 +1664,7 @@ AccessibleWrap::GetColumnHeader(TableAccessible* aAccessible, int32_t aColIdx) return nullptr; } - nsAutoTArray headerCells; + AutoTArray headerCells; tableCell->ColHeaderCells(&headerCells); if (headerCells.IsEmpty()) { return nullptr; @@ -1698,7 +1698,7 @@ AccessibleWrap::GetRowHeader(TableAccessible* aAccessible, int32_t aRowIdx) return nullptr; } - nsAutoTArray headerCells; + AutoTArray headerCells; tableCell->RowHeaderCells(&headerCells); if (headerCells.IsEmpty()) { return nullptr; diff --git a/accessible/atk/nsMaiInterfaceTable.cpp b/accessible/atk/nsMaiInterfaceTable.cpp index 1795f8e12b0..c94815f3c82 100644 --- a/accessible/atk/nsMaiInterfaceTable.cpp +++ b/accessible/atk/nsMaiInterfaceTable.cpp @@ -273,7 +273,7 @@ getSelectedColumnsCB(AtkTable *aTable, gint** aSelected) { *aSelected = nullptr; - nsAutoTArray cols; + AutoTArray cols; AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable)); if (accWrap) { accWrap->AsTable()->SelectedColIndices(&cols); @@ -300,7 +300,7 @@ getSelectedColumnsCB(AtkTable *aTable, gint** aSelected) static gint getSelectedRowsCB(AtkTable *aTable, gint **aSelected) { - nsAutoTArray rows; + AutoTArray rows; AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aTable)); if (accWrap) { accWrap->AsTable()->SelectedRowIndices(&rows); diff --git a/accessible/atk/nsMaiInterfaceText.cpp b/accessible/atk/nsMaiInterfaceText.cpp index 0386ef8343f..1982f373091 100644 --- a/accessible/atk/nsMaiInterfaceText.cpp +++ b/accessible/atk/nsMaiInterfaceText.cpp @@ -311,7 +311,7 @@ getRunAttributesCB(AtkText *aText, gint aOffset, return nullptr; } - nsAutoTArray attrs; + AutoTArray attrs; proxy->TextAttributes(false, aOffset, &attrs, &startOffset, &endOffset); *aStartOffset = startOffset; *aEndOffset = endOffset; @@ -337,7 +337,7 @@ getDefaultAttributesCB(AtkText *aText) return nullptr; } - nsAutoTArray attrs; + AutoTArray attrs; proxy->DefaultTextAttributes(&attrs); return ConvertToAtkTextAttributeSet(attrs); } diff --git a/accessible/base/EventQueue.h b/accessible/base/EventQueue.h index 01384b844f7..b80cddcbeb4 100644 --- a/accessible/base/EventQueue.h +++ b/accessible/base/EventQueue.h @@ -76,7 +76,7 @@ protected: DocAccessible* mDocument; /** - * Pending events array. Don't make this an nsAutoTArray; we use + * Pending events array. Don't make this an AutoTArray; we use * SwapElements() on it. */ nsTArray > mEvents; diff --git a/accessible/base/NotificationController.h b/accessible/base/NotificationController.h index ab106fc00c1..14f7b3af527 100644 --- a/accessible/base/NotificationController.h +++ b/accessible/base/NotificationController.h @@ -282,7 +282,7 @@ private: /** * A pending accessible tree update notifications for content insertions. - * Don't make this an nsAutoTArray; we use SwapElements() on it. + * Don't make this an AutoTArray; we use SwapElements() on it. */ nsTArray > mContentInsertions; @@ -316,7 +316,7 @@ private: nsTHashtable > mTextHash; /** - * Other notifications like DOM events. Don't make this an nsAutoTArray; we + * Other notifications like DOM events. Don't make this an AutoTArray; we * use SwapElements() on it. */ nsTArray > mNotifications; diff --git a/accessible/base/TextRange-inl.h b/accessible/base/TextRange-inl.h index ab8a4969a43..15bbaa23570 100644 --- a/accessible/base/TextRange-inl.h +++ b/accessible/base/TextRange-inl.h @@ -17,7 +17,7 @@ inline Accessible* TextRange::Container() const { uint32_t pos1 = 0, pos2 = 0; - nsAutoTArray parents1, parents2; + AutoTArray parents1, parents2; return CommonParent(mStartContainer, mEndContainer, &parents1, &pos1, &parents2, &pos2); } diff --git a/accessible/base/TextRange.cpp b/accessible/base/TextRange.cpp index 5a1afe272f9..c2a69dc59ee 100644 --- a/accessible/base/TextRange.cpp +++ b/accessible/base/TextRange.cpp @@ -24,7 +24,7 @@ TextPoint::operator <(const TextPoint& aPoint) const // Build the chain of parents Accessible* p1 = mContainer; Accessible* p2 = aPoint.mContainer; - nsAutoTArray parents1, parents2; + AutoTArray parents1, parents2; do { parents1.AppendElement(p1); p1 = p1->Parent(); @@ -76,7 +76,7 @@ TextRange::EmbeddedChildren(nsTArray* aChildren) const Accessible* p2 = mEndContainer->GetChildAtOffset(mEndOffset); uint32_t pos1 = 0, pos2 = 0; - nsAutoTArray parents1, parents2; + AutoTArray parents1, parents2; Accessible* container = CommonParent(p1, p2, &parents1, &pos1, &parents2, &pos2); @@ -146,7 +146,7 @@ bool TextRange::Crop(Accessible* aContainer) { uint32_t boundaryPos = 0, containerPos = 0; - nsAutoTArray boundaryParents, containerParents; + AutoTArray boundaryParents, containerParents; // Crop the start boundary. Accessible* container = nullptr; diff --git a/accessible/base/TreeWalker.h b/accessible/base/TreeWalker.h index 356a329aef7..72d3f8dbd7c 100644 --- a/accessible/base/TreeWalker.h +++ b/accessible/base/TreeWalker.h @@ -87,7 +87,7 @@ private: DocAccessible* mDoc; Accessible* mContext; nsIContent* mAnchorNode; - nsAutoTArray mStateStack; + AutoTArray mStateStack; int32_t mChildFilter; uint32_t mFlags; }; diff --git a/accessible/ipc/DocAccessibleChild.cpp b/accessible/ipc/DocAccessibleChild.cpp index 0c47835b64b..023cdfbdddf 100644 --- a/accessible/ipc/DocAccessibleChild.cpp +++ b/accessible/ipc/DocAccessibleChild.cpp @@ -1048,7 +1048,7 @@ DocAccessibleChild::RecvColHeaderCells(const uint64_t& aID, { TableCellAccessible* acc = IdToTableCellAccessible(aID); if (acc) { - nsAutoTArray headerCells; + AutoTArray headerCells; acc->ColHeaderCells(&headerCells); aCells->SetCapacity(headerCells.Length()); for (uint32_t i = 0; i < headerCells.Length(); ++i) { @@ -1066,7 +1066,7 @@ DocAccessibleChild::RecvRowHeaderCells(const uint64_t& aID, { TableCellAccessible* acc = IdToTableCellAccessible(aID); if (acc) { - nsAutoTArray headerCells; + AutoTArray headerCells; acc->RowHeaderCells(&headerCells); aCells->SetCapacity(headerCells.Length()); for (uint32_t i = 0; i < headerCells.Length(); ++i) { @@ -1368,7 +1368,7 @@ DocAccessibleChild::RecvTableSelectedCells(const uint64_t& aID, { TableAccessible* acc = IdToTableAccessible(aID); if (acc) { - nsAutoTArray cells; + AutoTArray cells; acc->SelectedCells(&cells); aCellIDs->SetCapacity(cells.Length()); for (uint32_t i = 0; i < cells.Length(); ++i) { @@ -1529,7 +1529,7 @@ DocAccessibleChild::RecvSelectedItems(const uint64_t& aID, { Accessible* acc = IdToAccessibleSelect(aID); if (acc) { - nsAutoTArray selectedItems; + AutoTArray selectedItems; acc->SelectedItems(&selectedItems); aSelectedItemIDs->SetCapacity(selectedItems.Length()); for (size_t i = 0; i < selectedItems.Length(); ++i) { diff --git a/accessible/ipc/ProxyAccessible.cpp b/accessible/ipc/ProxyAccessible.cpp index 43665c5308d..aad2f03c061 100644 --- a/accessible/ipc/ProxyAccessible.cpp +++ b/accessible/ipc/ProxyAccessible.cpp @@ -778,7 +778,7 @@ ProxyAccessible::TableSelectedRowCount() void ProxyAccessible::TableSelectedCells(nsTArray* aCellIDs) { - nsAutoTArray cellIDs; + AutoTArray cellIDs; Unused << mDoc->SendTableSelectedCells(mID, &cellIDs); aCellIDs->SetCapacity(cellIDs.Length()); for (uint32_t i = 0; i < cellIDs.Length(); ++i) { @@ -857,7 +857,7 @@ ProxyAccessible::AtkTableRowHeader(int32_t aRow) void ProxyAccessible::SelectedItems(nsTArray* aSelectedItems) { - nsAutoTArray itemIDs; + AutoTArray itemIDs; Unused << mDoc->SendSelectedItems(mID, &itemIDs); aSelectedItems->SetCapacity(itemIDs.Length()); for (size_t i = 0; i < itemIDs.Length(); ++i) { diff --git a/accessible/mac/mozAccessible.mm b/accessible/mac/mozAccessible.mm index 770df417e0e..4426af45b7b 100644 --- a/accessible/mac/mozAccessible.mm +++ b/accessible/mac/mozAccessible.mm @@ -420,7 +420,7 @@ ConvertToNSArray(nsTArray& aArray) nsCOMPtr attributes = accWrap->Attributes(); nsAccUtils::GetAccAttr(attributes, nsGkAtoms::linethickness_, thickness); } else { - nsAutoTArray attrs; + AutoTArray attrs; proxy->Attributes(&attrs); for (size_t i = 0 ; i < attrs.Length() ; i++) { if (attrs.ElementAt(i).Name() == "thickness") { @@ -684,11 +684,11 @@ ConvertToNSArray(nsTArray& aArray) // get the array of children. if (accWrap) { - nsAutoTArray childrenArray; + AutoTArray childrenArray; accWrap->GetUnignoredChildren(&childrenArray); mChildren = ConvertToNSArray(childrenArray); } else if (ProxyAccessible* proxy = [self getProxyAccessible]) { - nsAutoTArray childrenArray; + AutoTArray childrenArray; GetProxyUnignoredChildren(proxy, &childrenArray); mChildren = ConvertToNSArray(childrenArray); } diff --git a/accessible/mac/mozTableAccessible.mm b/accessible/mac/mozTableAccessible.mm index 53381cd2cad..a3612e5bc3b 100644 --- a/accessible/mac/mozTableAccessible.mm +++ b/accessible/mac/mozTableAccessible.mm @@ -207,12 +207,12 @@ return [NSValue valueWithRange:NSMakeRange(cell->ColIdx(), cell->ColExtent())]; if ([attribute isEqualToString:NSAccessibilityRowHeaderUIElementsAttribute]) { - nsAutoTArray headerCells; + AutoTArray headerCells; cell->RowHeaderCells(&headerCells); return ConvertToNSArray(headerCells); } if ([attribute isEqualToString:NSAccessibilityColumnHeaderUIElementsAttribute]) { - nsAutoTArray headerCells; + AutoTArray headerCells; cell->ColHeaderCells(&headerCells); return ConvertToNSArray(headerCells); } diff --git a/accessible/windows/ia2/ia2Accessible.cpp b/accessible/windows/ia2/ia2Accessible.cpp index f655417800a..ec17b47e222 100644 --- a/accessible/windows/ia2/ia2Accessible.cpp +++ b/accessible/windows/ia2/ia2Accessible.cpp @@ -768,7 +768,7 @@ ia2Accessible::get_selectionRanges(IA2Range** aRanges, if (acc->IsDefunct()) return CO_E_OBJNOTCONNECTED; - nsAutoTArray ranges; + AutoTArray ranges; acc->Document()->SelectionRanges(&ranges); uint32_t len = ranges.Length(); for (uint32_t idx = 0; idx < len; idx++) { diff --git a/accessible/windows/ia2/ia2AccessibleTable.cpp b/accessible/windows/ia2/ia2AccessibleTable.cpp index 79ea2ccaebf..6ac6bbab4e7 100644 --- a/accessible/windows/ia2/ia2AccessibleTable.cpp +++ b/accessible/windows/ia2/ia2AccessibleTable.cpp @@ -371,7 +371,7 @@ ia2AccessibleTable::get_selectedChildren(long aMaxChildren, long** aChildren, if (!mTable) return CO_E_OBJNOTCONNECTED; - nsAutoTArray cellIndices; + AutoTArray cellIndices; mTable->SelectedCellIndices(&cellIndices); uint32_t maxCells = cellIndices.Length(); @@ -663,7 +663,7 @@ ia2AccessibleTable::get_selectedCells(IUnknown*** aCells, long* aNSelectedCells) if (!mTable) return CO_E_OBJNOTCONNECTED; - nsAutoTArray cells; + AutoTArray cells; mTable->SelectedCells(&cells); if (cells.IsEmpty()) return S_FALSE; @@ -699,7 +699,7 @@ ia2AccessibleTable::get_selectedColumns(long** aColumns, long* aNColumns) if (!mTable) return CO_E_OBJNOTCONNECTED; - nsAutoTArray colIndices; + AutoTArray colIndices; mTable->SelectedColIndices(&colIndices); uint32_t maxCols = colIndices.Length(); @@ -729,7 +729,7 @@ ia2AccessibleTable::get_selectedRows(long** aRows, long* aNRows) if (!mTable) return CO_E_OBJNOTCONNECTED; - nsAutoTArray rowIndices; + AutoTArray rowIndices; mTable->SelectedRowIndices(&rowIndices); uint32_t maxRows = rowIndices.Length(); diff --git a/accessible/windows/ia2/ia2AccessibleTableCell.cpp b/accessible/windows/ia2/ia2AccessibleTableCell.cpp index 20f0f1ecd7b..e625a70495b 100644 --- a/accessible/windows/ia2/ia2AccessibleTableCell.cpp +++ b/accessible/windows/ia2/ia2AccessibleTableCell.cpp @@ -100,7 +100,7 @@ ia2AccessibleTableCell::get_columnHeaderCells(IUnknown*** aCellAccessibles, if (!mTableCell) return CO_E_OBJNOTCONNECTED; - nsAutoTArray cells; + AutoTArray cells; mTableCell->ColHeaderCells(&cells); *aNColumnHeaderCells = cells.Length(); @@ -172,7 +172,7 @@ ia2AccessibleTableCell::get_rowHeaderCells(IUnknown*** aCellAccessibles, if (!mTableCell) return CO_E_OBJNOTCONNECTED; - nsAutoTArray cells; + AutoTArray cells; mTableCell->RowHeaderCells(&cells); *aNRowHeaderCells = cells.Length(); diff --git a/accessible/windows/ia2/ia2AccessibleText.cpp b/accessible/windows/ia2/ia2AccessibleText.cpp index d8237370cfc..7f79b110cc4 100644 --- a/accessible/windows/ia2/ia2AccessibleText.cpp +++ b/accessible/windows/ia2/ia2AccessibleText.cpp @@ -61,7 +61,7 @@ ia2AccessibleText::get_attributes(long aOffset, long *aStartOffset, int32_t startOffset = 0, endOffset = 0; HRESULT hr; if (ProxyAccessible* proxy = HyperTextProxyFor(this)) { - nsAutoTArray attrs; + AutoTArray attrs; proxy->TextAttributes(true, aOffset, &attrs, &startOffset, &endOffset); hr = AccessibleWrap::ConvertToIA2Attributes(&attrs, aTextAttributes); } else { diff --git a/accessible/windows/msaa/AccessibleWrap.cpp b/accessible/windows/msaa/AccessibleWrap.cpp index 249784d886e..1fba158128b 100644 --- a/accessible/windows/msaa/AccessibleWrap.cpp +++ b/accessible/windows/msaa/AccessibleWrap.cpp @@ -834,7 +834,7 @@ AccessibleWrap::get_accSelection(VARIANT __RPC_FAR *pvarChildren) return E_NOTIMPL; if (IsSelect()) { - nsAutoTArray selectedItems; + AutoTArray selectedItems; if (IsProxy()) { nsTArray proxies; Proxy()->SelectedItems(&proxies); diff --git a/accessible/xpcom/xpcAccessibleHyperText.cpp b/accessible/xpcom/xpcAccessibleHyperText.cpp index 3734ed85180..ade838eca34 100644 --- a/accessible/xpcom/xpcAccessibleHyperText.cpp +++ b/accessible/xpcom/xpcAccessibleHyperText.cpp @@ -371,7 +371,7 @@ xpcAccessibleHyperText::GetSelectionRanges(nsIArray** aRanges) do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); - nsAutoTArray ranges; + AutoTArray ranges; Intl()->SelectionRanges(&ranges); uint32_t len = ranges.Length(); for (uint32_t idx = 0; idx < len; idx++) diff --git a/accessible/xpcom/xpcAccessibleSelectable.cpp b/accessible/xpcom/xpcAccessibleSelectable.cpp index 2a09450530e..df63e116c85 100644 --- a/accessible/xpcom/xpcAccessibleSelectable.cpp +++ b/accessible/xpcom/xpcAccessibleSelectable.cpp @@ -21,7 +21,7 @@ xpcAccessibleSelectable::GetSelectedItems(nsIArray** aSelectedItems) return NS_ERROR_FAILURE; NS_PRECONDITION(Intl()->IsSelect(), "Called on non selectable widget!"); - nsAutoTArray items; + AutoTArray items; Intl()->SelectedItems(&items); uint32_t itemCount = items.Length(); diff --git a/accessible/xpcom/xpcAccessibleTable.cpp b/accessible/xpcom/xpcAccessibleTable.cpp index aa6ee8f7646..0787bf73fdf 100644 --- a/accessible/xpcom/xpcAccessibleTable.cpp +++ b/accessible/xpcom/xpcAccessibleTable.cpp @@ -273,7 +273,7 @@ xpcAccessibleTable::GetSelectedCells(nsIArray** aSelectedCells) do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); - nsAutoTArray cellsArray; + AutoTArray cellsArray; Intl()->SelectedCells(&cellsArray); uint32_t totalCount = cellsArray.Length(); @@ -299,7 +299,7 @@ xpcAccessibleTable::GetSelectedCellIndices(uint32_t* aCellsArraySize, if (!Intl()) return NS_ERROR_FAILURE; - nsAutoTArray cellsArray; + AutoTArray cellsArray; Intl()->SelectedCellIndices(&cellsArray); *aCellsArraySize = cellsArray.Length(); @@ -324,7 +324,7 @@ xpcAccessibleTable::GetSelectedColumnIndices(uint32_t* aColsArraySize, if (!Intl()) return NS_ERROR_FAILURE; - nsAutoTArray colsArray; + AutoTArray colsArray; Intl()->SelectedColIndices(&colsArray); *aColsArraySize = colsArray.Length(); @@ -349,7 +349,7 @@ xpcAccessibleTable::GetSelectedRowIndices(uint32_t* aRowsArraySize, if (!Intl()) return NS_ERROR_FAILURE; - nsAutoTArray rowsArray; + AutoTArray rowsArray; Intl()->SelectedRowIndices(&rowsArray); *aRowsArraySize = rowsArray.Length(); diff --git a/accessible/xpcom/xpcAccessibleTableCell.cpp b/accessible/xpcom/xpcAccessibleTableCell.cpp index dfd975bbdb0..e507a88162f 100644 --- a/accessible/xpcom/xpcAccessibleTableCell.cpp +++ b/accessible/xpcom/xpcAccessibleTableCell.cpp @@ -108,7 +108,7 @@ xpcAccessibleTableCell::GetColumnHeaderCells(nsIArray** aHeaderCells) if (!Intl()) return NS_ERROR_FAILURE; - nsAutoTArray headerCells; + AutoTArray headerCells; Intl()->ColHeaderCells(&headerCells); nsCOMPtr cells = do_CreateInstance(NS_ARRAY_CONTRACTID); @@ -132,7 +132,7 @@ xpcAccessibleTableCell::GetRowHeaderCells(nsIArray** aHeaderCells) if (!Intl()) return NS_ERROR_FAILURE; - nsAutoTArray headerCells; + AutoTArray headerCells; Intl()->RowHeaderCells(&headerCells); nsCOMPtr cells = do_CreateInstance(NS_ARRAY_CONTRACTID); diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js index a4199208798..b76bcd5dc20 100644 --- a/b2g/app/b2g.js +++ b/b2g/app/b2g.js @@ -355,6 +355,10 @@ pref("browser.safebrowsing.downloads.enabled", true); pref("browser.safebrowsing.downloads.remote.enabled", true); pref("browser.safebrowsing.downloads.remote.timeout_ms", 10000); pref("browser.safebrowsing.downloads.remote.url", "https://sb-ssl.google.com/safebrowsing/clientreport/download?key=%GOOGLE_API_KEY%"); +pref("browser.safebrowsing.downloads.remote.block_dangerous", true); +pref("browser.safebrowsing.downloads.remote.block_dangerous_host", true); +pref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false); +pref("browser.safebrowsing.downloads.remote.block_uncommon", false); pref("browser.safebrowsing.debug", false); pref("browser.safebrowsing.provider.google.lists", "goog-badbinurl-shavar,goog-downloadwhite-digest256,goog-phish-shavar,goog-malware-shavar,goog-unwanted-shavar"); diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 5d75798b057..c47d3cb7826 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -25,6 +25,7 @@ + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 5d75798b057..c47d3cb7826 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -25,6 +25,7 @@ + diff --git a/b2g/installer/Makefile.in b/b2g/installer/Makefile.in index 150f8815579..57ecd93dfcc 100644 --- a/b2g/installer/Makefile.in +++ b/b2g/installer/Makefile.in @@ -26,17 +26,14 @@ DEFINES += -DJAREXT= DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) # Set MSVC dlls version to package, if any. -ifdef WIN32_REDIST_DIR ifdef MOZ_NO_DEBUG_RTL +ifdef WIN32_REDIST_DIR DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1 DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL) DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL) -ifdef MSVC_APPCRT_DLL -DEFINES += -DMSVC_APPCRT_DLL=$(MSVC_APPCRT_DLL) -endif -ifdef MSVC_DESKTOPCRT_DLL -DEFINES += -DMSVC_DESKTOPCRT_DLL=$(MSVC_DESKTOPCRT_DLL) endif +ifdef WIN_UCRT_REDIST_DIR +DEFINES += -DMOZ_PACKAGE_WIN_UCRT_DLLS=1 endif endif diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in index eed3fdcd390..c826ac38c04 100644 --- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -65,12 +65,10 @@ #if MOZ_PACKAGE_MSVC_DLLS @BINPATH@/@MSVC_C_RUNTIME_DLL@ @BINPATH@/@MSVC_CXX_RUNTIME_DLL@ -#ifdef MSVC_APPCRT_DLL -@BINPATH@/@MSVC_APPCRT_DLL@ -#endif -#ifdef MSVC_DESKTOPCRT_DLL -@BINPATH@/@MSVC_DESKTOPCRT_DLL@ #endif +#if MOZ_PACKAGE_WIN_UCRT_DLLS +@BINPATH@/api-ms-win-*.dll +@BINPATH@/ucrtbase.dll #endif #endif #ifndef MOZ_NATIVE_ICU diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 17ea7581925..946efe8bded 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -7,14 +7,6 @@ dist_dest = $(DIST)/$(MOZ_MACBUNDLE_NAME) # hardcode en-US for the moment AB_CD = en-US -DEFINES += \ - -DFIREFOX_ICO='"$(DIST)/branding/firefox.ico"' \ - -DDOCUMENT_ICO='"$(DIST)/branding/document.ico"' \ - -DNEWWINDOW_ICO='"$(DIST)/branding/newwindow.ico"' \ - -DNEWTAB_ICO='"$(DIST)/branding/newtab.ico"' \ - -DPBMODE_ICO='"$(DIST)/branding/pbmode.ico"' \ - $(NULL) - # Build a binary bootstrapping with XRE_main ifndef MOZ_WINCONSOLE diff --git a/browser/app/moz.build b/browser/app/moz.build index e4d9d053200..89989230343 100644 --- a/browser/app/moz.build +++ b/browser/app/moz.build @@ -73,3 +73,7 @@ if CONFIG['HAVE_CLOCK_MONOTONIC']: if CONFIG['GNU_CXX']: CXXFLAGS += ['-Wshadow'] + +for icon in ('firefox', 'document', 'newwindow', 'newtab', 'pbmode'): + DEFINES[icon.upper() + '_ICO'] = '"%s/dist/branding/%s.ico"' % ( + TOPOBJDIR, icon) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index d023f345969..fd4daab321f 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -953,6 +953,10 @@ pref("browser.safebrowsing.downloads.enabled", true); pref("browser.safebrowsing.downloads.remote.enabled", true); pref("browser.safebrowsing.downloads.remote.timeout_ms", 10000); pref("browser.safebrowsing.downloads.remote.url", "https://sb-ssl.google.com/safebrowsing/clientreport/download?key=%GOOGLE_API_KEY%"); +pref("browser.safebrowsing.downloads.remote.block_dangerous", true); +pref("browser.safebrowsing.downloads.remote.block_dangerous_host", true); +pref("browser.safebrowsing.downloads.remote.block_potentially_unwanted", false); +pref("browser.safebrowsing.downloads.remote.block_uncommon", false); pref("browser.safebrowsing.debug", false); pref("browser.safebrowsing.provider.google.lists", "goog-badbinurl-shavar,goog-downloadwhite-digest256,goog-phish-shavar,goog-malware-shavar,goog-unwanted-shavar"); diff --git a/browser/base/content/test/general/browser_bug724239.js b/browser/base/content/test/general/browser_bug724239.js index 766002ecaa5..430751b911c 100644 --- a/browser/base/content/test/general/browser_bug724239.js +++ b/browser/base/content/test/general/browser_bug724239.js @@ -1,33 +1,11 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -function test() { - waitForExplicitFinish(); - BrowserOpenTab(); - - let tab = gBrowser.selectedTab; - let browser = tab.linkedBrowser; - - registerCleanupFunction(function () { gBrowser.removeTab(tab); }); - - whenBrowserLoaded(browser, function () { - browser.loadURI("http://example.com/"); - - whenBrowserLoaded(browser, function () { - ok(!gBrowser.canGoBack, "about:newtab wasn't added to the session history"); - finish(); - }); +add_task(function* test() { + yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" }, + function* (browser) { + BrowserTestUtils.loadURI(browser, "http://example.com"); + yield BrowserTestUtils.browserLoaded(browser); + ok(!gBrowser.canGoBack, "about:newtab wasn't added to the session history"); }); -} - -function whenBrowserLoaded(aBrowser, aCallback) { - if (aBrowser.contentDocument.readyState == "complete") { - executeSoon(aCallback); - return; - } - - aBrowser.addEventListener("load", function onLoad() { - aBrowser.removeEventListener("load", onLoad, true); - executeSoon(aCallback); - }, true); -} +}); diff --git a/browser/components/privatebrowsing/test/browser/browser.ini b/browser/components/privatebrowsing/test/browser/browser.ini index 3c10a2d4388..8b16c8b8432 100644 --- a/browser/components/privatebrowsing/test/browser/browser.ini +++ b/browser/components/privatebrowsing/test/browser/browser.ini @@ -42,9 +42,6 @@ tags = trackingprotection [browser_privatebrowsing_ui.js] [browser_privatebrowsing_urlbarfocus.js] [browser_privatebrowsing_windowtitle.js] -skip-if = e10s [browser_privatebrowsing_zoom.js] -skip-if = e10s [browser_privatebrowsing_zoomrestore.js] -skip-if = e10s [browser_privatebrowsing_newtab_from_popup.js] diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js index 5197940206f..bdd1a37e6f2 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js @@ -5,10 +5,9 @@ // This test makes sure that the window title changes correctly while switching // from and to private browsing mode. -function test() { +add_task(function test() { const testPageURL = "http://mochi.test:8888/browser/" + "browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle_page.html"; - waitForExplicitFinish(); requestLongerTimeout(2); // initialization of expected titles @@ -38,69 +37,41 @@ function test() { pb_about_pb_title = "You're browsing privately - " + app_name + " (Private Browsing)"; } - function testTabTitle(aWindow, url, insidePB, expected_title, funcNext) { - executeSoon(function () { - let tab = aWindow.gBrowser.selectedTab = aWindow.gBrowser.addTab(); - let browser = aWindow.gBrowser.selectedBrowser; - browser.stop(); - // ensure that the test is run after the titlebar has been updated - browser.addEventListener("load", function () { - browser.removeEventListener("load", arguments.callee, true); - executeSoon(function () { - if (aWindow.document.title != expected_title) { - executeSoon(arguments.callee); - return; - } - is(aWindow.document.title, expected_title, "The window title for " + url + - " is correct (" + (insidePB ? "inside" : "outside") + - " private browsing mode)"); + function* testTabTitle(aWindow, url, insidePB, expected_title) { + let tab = (yield BrowserTestUtils.openNewForegroundTab(aWindow.gBrowser)); + yield BrowserTestUtils.loadURI(tab.linkedBrowser, url); + yield BrowserTestUtils.browserLoaded(tab.linkedBrowser); - let win = aWindow.gBrowser.replaceTabWithWindow(tab); - win.addEventListener("load", function() { - win.removeEventListener("load", arguments.callee, false); - executeSoon(function() { - if (win.document.title != expected_title) { - executeSoon(arguments.callee); - return; - } - is(win.document.title, expected_title, "The window title for " + url + - " detached tab is correct (" + (insidePB ? "inside" : "outside") + - " private browsing mode)"); - win.close(); - aWindow.close(); - - setTimeout(funcNext, 0); - }); - }, false); - }); - }, true); - - browser.loadURI(url); + yield BrowserTestUtils.waitForCondition(() => { + return aWindow.document.title === expected_title; }); + + is(aWindow.document.title, expected_title, "The window title for " + url + + " is correct (" + (insidePB ? "inside" : "outside") + + " private browsing mode)"); + + let win = aWindow.gBrowser.replaceTabWithWindow(tab); + yield BrowserTestUtils.waitForEvent(win, "load", false); + + yield BrowserTestUtils.waitForCondition(() => { + return win.document.title === expected_title; + }); + + is(win.document.title, expected_title, "The window title for " + url + + " detached tab is correct (" + (insidePB ? "inside" : "outside") + + " private browsing mode)"); + + yield Promise.all([ BrowserTestUtils.closeWindow(win), + BrowserTestUtils.closeWindow(aWindow) ]); } - whenNewWindowLoaded({private: false}, function(win) { - testTabTitle(win, "about:blank", false, page_without_title, function() { - whenNewWindowLoaded({private: false}, function(win) { - testTabTitle(win, testPageURL, false, page_with_title, function() { - whenNewWindowLoaded({private: false}, function(win) { - testTabTitle(win, "about:privatebrowsing", false, about_pb_title, function() { - whenNewWindowLoaded({private: true}, function(win) { - testTabTitle(win, "about:blank", true, pb_page_without_title, function() { - whenNewWindowLoaded({private: true}, function(win) { - testTabTitle(win, testPageURL, true, pb_page_with_title, function() { - whenNewWindowLoaded({private: true}, function(win) { - testTabTitle(win, "about:privatebrowsing", true, pb_about_pb_title, finish); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - }); - return; -} + function openWin(private) { + return BrowserTestUtils.openNewBrowserWindow({ private }); + } + yield Task.spawn(testTabTitle((yield openWin(false)), "about:blank", false, page_without_title)); + yield Task.spawn(testTabTitle((yield openWin(false)), testPageURL, false, page_with_title)); + yield Task.spawn(testTabTitle((yield openWin(false)), "about:privatebrowsing", false, about_pb_title)); + yield Task.spawn(testTabTitle((yield openWin(true)), "about:blank", true, pb_page_without_title)); + yield Task.spawn(testTabTitle((yield openWin(true)), testPageURL, true, pb_page_with_title)); + yield Task.spawn(testTabTitle((yield openWin(true)), "about:privatebrowsing", true, pb_about_pb_title)); +}); diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoom.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoom.js index 8ed67de181f..f5afcbd61c8 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoom.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoom.js @@ -5,56 +5,33 @@ // This test makes sure that private browsing turns off doesn't cause zoom // settings to be reset on tab switch (bug 464962) -function test() { - waitForExplicitFinish(); +add_task(function* test() { + let win = (yield BrowserTestUtils.openNewBrowserWindow({ private: true })); + let tabAbout = (yield BrowserTestUtils.openNewForegroundTab(win.gBrowser, "about:")); + let tabMozilla = (yield BrowserTestUtils.openNewForegroundTab(win.gBrowser, "about:")); - function testZoom(aWindow, aCallback) { - executeSoon(function() { - let tabAbout = aWindow.gBrowser.addTab(); - aWindow.gBrowser.selectedTab = tabAbout; + let mozillaZoom = win.ZoomManager.zoom; - let aboutBrowser = aWindow.gBrowser.getBrowserForTab(tabAbout); - aboutBrowser.addEventListener("load", function onAboutBrowserLoad() { - aboutBrowser.removeEventListener("load", onAboutBrowserLoad, true); - let tabMozilla = aWindow.gBrowser.addTab(); - aWindow.gBrowser.selectedTab = tabMozilla; + // change the zoom on the mozilla page + win.FullZoom.enlarge(); + // make sure the zoom level has been changed + isnot(win.ZoomManager.zoom, mozillaZoom, "Zoom level can be changed"); + mozillaZoom = win.ZoomManager.zoom; - let mozillaBrowser = aWindow.gBrowser.getBrowserForTab(tabMozilla); - mozillaBrowser.addEventListener("load", function onMozillaBrowserLoad() { - mozillaBrowser.removeEventListener("load", onMozillaBrowserLoad, true); - let mozillaZoom = aWindow.ZoomManager.zoom; + // switch to about: tab + yield BrowserTestUtils.switchTab(win.gBrowser, tabAbout); - // change the zoom on the mozilla page - aWindow.FullZoom.enlarge(); - // make sure the zoom level has been changed - isnot(aWindow.ZoomManager.zoom, mozillaZoom, "Zoom level can be changed"); - mozillaZoom = aWindow.ZoomManager.zoom; + // switch back to mozilla tab + yield BrowserTestUtils.switchTab(win.gBrowser, tabMozilla); - // switch to about: tab - aWindow.gBrowser.selectedTab = tabAbout; + // make sure the zoom level has not changed + is(win.ZoomManager.zoom, mozillaZoom, + "Entering private browsing should not reset the zoom on a tab"); - // switch back to mozilla tab - aWindow.gBrowser.selectedTab = tabMozilla; + // cleanup + win.FullZoom.reset(); + yield Promise.all([ BrowserTestUtils.removeTab(tabMozilla), + BrowserTestUtils.removeTab(tabAbout) ]); - // make sure the zoom level has not changed - is(aWindow.ZoomManager.zoom, mozillaZoom, - "Entering private browsing should not reset the zoom on a tab"); - - // cleanup - aWindow.FullZoom.reset(); - aWindow.gBrowser.removeTab(tabMozilla); - aWindow.gBrowser.removeTab(tabAbout); - aWindow.close(); - aCallback(); - - }, true); - mozillaBrowser.contentWindow.location = "about:mozilla"; - }, true); - aboutBrowser.contentWindow.location = "about:"; - }); - } - - whenNewWindowLoaded({private: true}, function(privateWindow) { - testZoom(privateWindow, finish); - }); -} + yield BrowserTestUtils.closeWindow(win); +}); diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoomrestore.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoomrestore.js index a2f0c6d2d58..b67bfc22958 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoomrestore.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_zoomrestore.js @@ -5,76 +5,60 @@ // This test makes sure that about:privatebrowsing does not appear zoomed in // if there is already a zoom site pref for about:blank (bug 487656). -function test() { +add_task(function* test() { // initialization - waitForExplicitFinish(); let windowsToClose = []; let windowsToReset = []; - function doTestWhenReady(aIsZoomedWindow, aWindow, aCallback) { + function promiseLocationChange() { + return new Promise(resolve => { + Services.obs.addObserver(function onLocationChange(subj, topic, data) { + Services.obs.removeObserver(onLocationChange, topic); + resolve(); + }, "browser-fullZoom:location-change", false); + }); + } + + function promiseTestReady(aIsZoomedWindow, aWindow) { // Need to wait on two things, the ordering of which is not guaranteed: // (1) the page load, and (2) FullZoom's update to the new page's zoom // level. FullZoom broadcasts "browser-fullZoom:location-change" when its // update is done. (See bug 856366 for details.) - let n = 0; let browser = aWindow.gBrowser.selectedBrowser; - browser.addEventListener("load", function onLoad() { - browser.removeEventListener("load", onLoad, true); - if (++n == 2) - doTest(aIsZoomedWindow, aWindow, aCallback); - }, true); - - Services.obs.addObserver(function onLocationChange(subj, topic, data) { - Services.obs.removeObserver(onLocationChange, topic); - if (++n == 2) - doTest(aIsZoomedWindow, aWindow, aCallback); - }, "browser-fullZoom:location-change", false); - - browser.loadURI("about:blank"); + return BrowserTestUtils.loadURI(browser, "about:blank").then(() => { + return Promise.all([ BrowserTestUtils.browserLoaded(browser), + promiseLocationChange() ]); + }).then(() => doTest(aIsZoomedWindow, aWindow)); } - function doTest(aIsZoomedWindow, aWindow, aCallback) { + function doTest(aIsZoomedWindow, aWindow) { if (aIsZoomedWindow) { is(aWindow.ZoomManager.zoom, 1, "Zoom level for freshly loaded about:blank should be 1"); // change the zoom on the blank page aWindow.FullZoom.enlarge(); isnot(aWindow.ZoomManager.zoom, 1, "Zoom level for about:blank should be changed"); - aCallback(); return; } + // make sure the zoom level is set to 1 is(aWindow.ZoomManager.zoom, 1, "Zoom level for about:privatebrowsing should be reset"); - aCallback(); - } - - function finishTest() { - // cleanup - windowsToReset.forEach(function(win) { - win.FullZoom.reset(); - }); - windowsToClose.forEach(function(win) { - win.close(); - }); - finish(); } function testOnWindow(options, callback) { - let win = whenNewWindowLoaded(options, - function(win) { - windowsToClose.push(win); - windowsToReset.push(win); - executeSoon(function() { callback(win); }); - }); - }; - - testOnWindow({}, function(win) { - doTestWhenReady(true, win, function() { - testOnWindow({private: true}, function(win) { - doTestWhenReady(false, win, finishTest); - }); + return BrowserTestUtils.openNewBrowserWindow(options).then((win) => { + windowsToClose.push(win); + windowsToReset.push(win); + return win; }); - }); -} + } + + yield testOnWindow({}).then(win => promiseTestReady(true, win)); + yield testOnWindow({private: true}).then(win => promiseTestReady(false, win)); + + // cleanup + windowsToReset.forEach((win) => win.FullZoom.reset()); + yield Promise.all(windowsToClose.map(win => BrowserTestUtils.closeWindow(win))); +}); diff --git a/browser/config/mozconfigs/macosx-universal/nightly b/browser/config/mozconfigs/macosx-universal/nightly index 5832a3035f9..801ace4d49a 100644 --- a/browser/config/mozconfigs/macosx-universal/nightly +++ b/browser/config/mozconfigs/macosx-universal/nightly @@ -12,6 +12,6 @@ fi ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/macosx/mozconfig.rust" +. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/macosx64/debug b/browser/config/mozconfigs/macosx64/debug index d6028f65087..cb96acb1e69 100644 --- a/browser/config/mozconfigs/macosx64/debug +++ b/browser/config/mozconfigs/macosx64/debug @@ -20,6 +20,6 @@ export MOZ_PACKAGE_JSSHELL=1 ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/macosx/mozconfig.rust" +. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/macosx64/nightly b/browser/config/mozconfigs/macosx64/nightly index 18a6532a76d..bd312855599 100644 --- a/browser/config/mozconfigs/macosx64/nightly +++ b/browser/config/mozconfigs/macosx64/nightly @@ -18,6 +18,6 @@ export MOZ_PACKAGE_JSSHELL=1 ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/macosx/mozconfig.rust" +. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/macosx64/opt-static-analysis b/browser/config/mozconfigs/macosx64/opt-static-analysis index 90f9f9269c1..344a9ef4cf6 100644 --- a/browser/config/mozconfigs/macosx64/opt-static-analysis +++ b/browser/config/mozconfigs/macosx64/opt-static-analysis @@ -13,7 +13,7 @@ ac_add_options --enable-warnings-as-errors ac_add_options --enable-clang-plugin -. "$topsrcdir/build/macosx/mozconfig.rust" +. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whitelist index 4d85bc90d9c..02a33b0048b 100644 --- a/browser/config/mozconfigs/whitelist +++ b/browser/config/mozconfigs/whitelist @@ -53,7 +53,7 @@ whitelist['nightly']['macosx-universal'] += [ 'ac_add_options --disable-install-strip', 'ac_add_options --enable-instruments', 'ac_add_options --enable-dtrace', - '. "$topsrcdir/build/macosx/mozconfig.rust"', + '. "$topsrcdir/build/mozconfig.rust"', ] whitelist['nightly']['win32'] += [ diff --git a/browser/config/tooltool-manifests/macosx64/cross-releng.manifest b/browser/config/tooltool-manifests/macosx64/cross-releng.manifest index 1c8d936fc82..1ad6cfe3143 100644 --- a/browser/config/tooltool-manifests/macosx64/cross-releng.manifest +++ b/browser/config/tooltool-manifests/macosx64/cross-releng.manifest @@ -47,5 +47,21 @@ "algorithm": "sha512", "unpack": true, "filename": "genisoimage.tar.xz" +}, +{ +"size": 60778437, +"visibility": "public", +"digest": "2d5d300dd0d829012953ca0dd70b0abfda4e848ff03450326cf0c10eac2a71e37275b824597641f0f536b97b754bc81b10f9dbbb73ff725412858a7c2b9df6a7", +"algorithm": "sha512", +"filename": "rust-std-lib.tar.bz2", +"unpack": true +}, +{ +"size": 36038146, +"visibility": "public", +"digest": "b967ba81cb08ce4c3a18e3f8411365ee775861df1ba7f60bcaccd03f940732ee9c4c622cd3163198abb36b2124cde550c61b5d153f1ae8a9107b382ddf660895", +"algorithm": "sha512", +"filename": "rustc-linux64.tar.bz2", +"unpack": true } ] diff --git a/browser/installer/Makefile.in b/browser/installer/Makefile.in index bb91b4a2927..1190b83bcd3 100644 --- a/browser/installer/Makefile.in +++ b/browser/installer/Makefile.in @@ -58,17 +58,14 @@ endif DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) # Set MSVC dlls version to package, if any. -ifdef WIN32_REDIST_DIR ifdef MOZ_NO_DEBUG_RTL +ifdef WIN32_REDIST_DIR DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1 DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL) DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL) -ifdef MSVC_APPCRT_DLL -DEFINES += -DMSVC_APPCRT_DLL=$(MSVC_APPCRT_DLL) -endif -ifdef MSVC_DESKTOPCRT_DLL -DEFINES += -DMSVC_DESKTOPCRT_DLL=$(MSVC_DESKTOPCRT_DLL) endif +ifdef WIN_UCRT_REDIST_DIR +DEFINES += -DMOZ_PACKAGE_WIN_UCRT_DLLS=1 endif endif diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index b2d7d6e4551..5287acdf504 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -91,12 +91,10 @@ #if MOZ_PACKAGE_MSVC_DLLS @BINPATH@/@MSVC_C_RUNTIME_DLL@ @BINPATH@/@MSVC_CXX_RUNTIME_DLL@ -#ifdef MSVC_APPCRT_DLL -@BINPATH@/@MSVC_APPCRT_DLL@ -#endif -#ifdef MSVC_DESKTOPCRT_DLL -@BINPATH@/@MSVC_DESKTOPCRT_DLL@ #endif +#if MOZ_PACKAGE_WIN_UCRT_DLLS +@BINPATH@/api-ms-win-*.dll +@BINPATH@/ucrtbase.dll #endif #endif #ifndef MOZ_NATIVE_ICU diff --git a/browser/modules/UserContextUI.jsm b/browser/modules/UserContextUI.jsm index ef60380aa73..3c3ca098e59 100644 --- a/browser/modules/UserContextUI.jsm +++ b/browser/modules/UserContextUI.jsm @@ -15,14 +15,14 @@ XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() { this.UserContextUI = { getUserContextLabel(userContextId) { - switch (userContextId) { + switch (parseInt(userContextId)) { // No UserContext: case 0: return ""; case 1: return gBrowserBundle.GetStringFromName("usercontext.personal.label"); case 2: return gBrowserBundle.GetStringFromName("usercontext.work.label"); - case 3: return gBrowserBundle.GetStringFromName("usercontext.shopping.label"); - case 4: return gBrowserBundle.GetStringFromName("usercontext.banking.label"); + case 3: return gBrowserBundle.GetStringFromName("usercontext.banking.label"); + case 4: return gBrowserBundle.GetStringFromName("usercontext.shopping.label"); // Display the context IDs for values outside the pre-defined range. // Used for debugging, no localization necessary. diff --git a/build/autoconf/rust.m4 b/build/autoconf/rust.m4 index 3cb948d0e9a..70a06e217ad 100644 --- a/build/autoconf/rust.m4 +++ b/build/autoconf/rust.m4 @@ -32,5 +32,87 @@ AC_DEFUN([MOZ_RUST_SUPPORT], [ first in your path. You can verify this by typing 'rustc --version'.]) fi + + if test -n "$RUSTC" -a -n "$MOZ_RUST"; then + # Rust's --target options are similar to, but not exactly the same + # as, the autoconf-derived targets we use. An example would be that + # Rust uses distinct target triples for targetting the GNU C++ ABI + # and the MSVC C++ ABI on Win32, whereas autoconf has a single + # triple and relies on the user to ensure that everything is + # compiled for the appropriate ABI. We need to perform appropriate + # munging to get the correct option to rustc. + # + # The canonical list of targets supported can be derived from: + # + # https://github.com/rust-lang/rust/tree/master/mk/cfg + rust_target= + case "$target" in + # Linux + i*86*linux-gnu) + rust_target=i686-unknown-linux-gnu + ;; + x86_64*linux-gnu) + rust_target=x86_64-unknown-linux-gnu + ;; + + # OS X and iOS + i*86-apple-darwin*) + rust_target=i686-apple-darwin + ;; + i*86-apple-ios*) + rust_target=i386-apple-ios + ;; + x86_64-apple-darwin*) + rust_target=x86_64-apple-darwin + ;; + + # Android + i*86*linux-android) + rust_target=i686-linux-android + ;; + arm*linux-android*) + rust_target=arm-linux-androideabi + ;; + + # Windows + i*86-pc-mingw32) + # XXX better detection of CXX needed here, to figure out whether + # we need i686-pc-windows-gnu instead, since mingw32 builds work. + rust_target=i686-pc-windows-msvc + ;; + x86_64-pc-mingw32) + # XXX and here as well + rust_target=x86_64-pc-windows-msvc + ;; + *) + AC_ERROR([don't know how to translate $target for rustc]) + esac + + # Check to see whether we need to pass --target to RUSTC. This can + # happen when building Firefox on Windows: js's configure will receive + # a RUSTC from the toplevel configure that already has --target added to + # it. + rustc_target_arg= + case "$RUSTC" in + *--target=${rust_target}*) + ;; + *) + rustc_target_arg=--target=${rust_target} + ;; + esac + + # Check to see whether our rustc has a reasonably functional stdlib + # for our chosen target. + echo 'pub extern fn hello() { println!("Hello world"); }' > conftest.rs + if AC_TRY_COMMAND(${RUSTC} --crate-type staticlib ${rustc_target_arg} -o conftest.rlib conftest.rs > /dev/null) && test -s conftest.rlib; then + RUSTC="${RUSTC} ${rustc_target_arg}" + else + AC_ERROR([cannot compile for ${rust_target} with ${RUSTC}]) + fi + rm -f conftest.rs conftest.rlib + fi + + # TODO: separate HOST_RUSTC and RUSTC variables + AC_SUBST(MOZ_RUST) ]) diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py index 4f7365ba2ea..e91038031cc 100644 --- a/build/mach_bootstrap.py +++ b/build/mach_bootstrap.py @@ -72,7 +72,6 @@ SEARCH_PATHS = [ 'testing/luciddream', 'testing/marionette/client', 'testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py', - 'testing/marionette/transport', 'testing/marionette/driver', 'testing/mozbase/mozcrash', 'testing/mozbase/mozdebug', diff --git a/build/macosx/mozconfig.rust b/build/macosx/mozconfig.rust deleted file mode 100644 index 92d9a608690..00000000000 --- a/build/macosx/mozconfig.rust +++ /dev/null @@ -1,6 +0,0 @@ -# Options to enable rust in automation builds. - -if test `uname -s` != Linux; then -RUSTC="$topsrcdir/rustc/bin/rustc" -ac_add_options --enable-rust -fi diff --git a/build/stlport/Makefile.in b/build/stlport/Makefile.in deleted file mode 100644 index ca11f307884..00000000000 --- a/build/stlport/Makefile.in +++ /dev/null @@ -1,9 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this file, -# You can obtain one at http://mozilla.org/MPL/2.0/. - -MODULES = stlport - -include $(topsrcdir)/config/rules.mk - -CXXFLAGS += -fuse-cxa-atexit diff --git a/build/stlport/moz.build b/build/stlport/moz.build index ef8627069a2..915b8c9ea2c 100644 --- a/build/stlport/moz.build +++ b/build/stlport/moz.build @@ -72,3 +72,7 @@ NO_EXPAND_LIBS = True # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True + +CXXFLAGS += [ + '-fuse-cxa-atexit', +] diff --git a/build/virtualenv_packages.txt b/build/virtualenv_packages.txt index 96ad3303f71..f7b61873c25 100644 --- a/build/virtualenv_packages.txt +++ b/build/virtualenv_packages.txt @@ -1,4 +1,3 @@ -marionette_transport.pth:testing/marionette/transport marionette_driver.pth:testing/marionette/driver browsermobproxy.pth:testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py wptserve.pth:testing/web-platform/tests/tools/wptserve diff --git a/build/win32/Makefile.in b/build/win32/Makefile.in index 664eca5257a..1c4bbc17a54 100644 --- a/build/win32/Makefile.in +++ b/build/win32/Makefile.in @@ -4,23 +4,26 @@ include $(topsrcdir)/config/rules.mk +REDIST_FILES = + ifdef WIN32_REDIST_DIR +REDIST_FILES += '$(WIN32_REDIST_DIR)'/$(MSVC_C_RUNTIME_DLL) +REDIST_FILES += '$(WIN32_REDIST_DIR)'/$(MSVC_CXX_RUNTIME_DLL) +endif -REDIST_FILES = \ - $(MSVC_C_RUNTIME_DLL) \ - $(MSVC_CXX_RUNTIME_DLL) \ - $(MSVC_APPCRT_DLL) \ - $(MSVC_DESKTOPCRT_DLL) \ - $(NULL) +ifdef WIN_UCRT_REDIST_DIR +REDIST_FILES += $(wildcard $(WIN_UCRT_REDIST_DIR)/api-ms-win-*.dll) +REDIST_FILES += '$(WIN_UCRT_REDIST_DIR)'/ucrtbase.dll +endif +ifdef REDIST_FILES libs-preqs = \ - $(call mkdir_deps,$(FINAL_TARGET)) \ - $(NULL) + $(call mkdir_deps,$(FINAL_TARGET)) \ + $(NULL) libs:: $(libs-preqs) - install --preserve-timestamps $(foreach f,$(REDIST_FILES),'$(WIN32_REDIST_DIR)'/$(f)) $(FINAL_TARGET) - -endif # WIN32_REDIST_DIR + install --preserve-timestamps $(REDIST_FILES) $(FINAL_TARGET) +endif # run the binscope tool to make sure the binary and all libraries # are using all available Windows OS-level security mechanisms diff --git a/build/win32/autobinscope.py b/build/win32/autobinscope.py index 8bb455990bf..fdba68e0c37 100644 --- a/build/win32/autobinscope.py +++ b/build/win32/autobinscope.py @@ -47,7 +47,7 @@ try: proc = subprocess.Popen([binscope_path, "/target", binary_path, "/output", log_file_path, "/sympath", symbol_path, "/c", "ATLVersionCheck", "/c", "ATLVulnCheck", "/c", "SharedSectionCheck", "/c", "APTCACheck", "/c", "NXCheck", - "/c", "GSCheck", "/c", "GSFunctionSafeBuffersCheck", "/c", "GSFriendlyInitCheck", + "/c", "GSCheck", "/c", "GSFriendlyInitCheck", "/c", "CompilerVersionCheck", "/c", "SafeSEHCheck", "/c", "SNCheck", "/c", "DBCheck"], stdout=subprocess.PIPE) diff --git a/config/config.mk b/config/config.mk index c56c754c12c..648b8c455b7 100644 --- a/config/config.mk +++ b/config/config.mk @@ -396,19 +396,6 @@ endif # MOZ_DEBUG endif # USE_STATIC_LIBS endif # WINNT && !GNU_CC -ifeq ($(OS_ARCH),Darwin) -# Compiling ObjC requires an Apple compiler anyway, so it's ok to set -# host CMFLAGS here. -HOST_CMFLAGS += -fobjc-exceptions -HOST_CMMFLAGS += -fobjc-exceptions -OS_COMPILE_CMFLAGS += -fobjc-exceptions -OS_COMPILE_CMMFLAGS += -fobjc-exceptions -ifeq ($(MOZ_WIDGET_TOOLKIT),uikit) -OS_COMPILE_CMFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch -OS_COMPILE_CMMFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch -endif -endif - COMPILE_CFLAGS = $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(OS_INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CFLAGS) $(_DEPEND_CFLAGS) $(CFLAGS) $(MOZBUILD_CFLAGS) COMPILE_CXXFLAGS = $(if $(DISABLE_STL_WRAPPING),,$(STL_FLAGS)) $(VISIBILITY_FLAGS) $(DEFINES) $(INCLUDES) $(OS_INCLUDES) $(DSO_CFLAGS) $(DSO_PIC_CFLAGS) $(RTL_FLAGS) $(OS_COMPILE_CXXFLAGS) $(_DEPEND_CFLAGS) $(CXXFLAGS) $(MOZBUILD_CXXFLAGS) COMPILE_CMFLAGS = $(OS_COMPILE_CMFLAGS) $(MOZBUILD_CMFLAGS) diff --git a/configure.in b/configure.in index 712504b9233..41b69e4e1f7 100644 --- a/configure.in +++ b/configure.in @@ -535,8 +535,6 @@ case "$target" in MSVS_VERSION=2015 MSVC_C_RUNTIME_DLL=vcruntime140.dll MSVC_CXX_RUNTIME_DLL=msvcp140.dll - MSVC_APPCRT_DLL=appcrt140.dll - MSVC_DESKTOPCRT_DLL=desktopcrt140.dll # -Wv:18 disables all warnings introduced after VS2013 # See http://blogs.msdn.com/b/vcblog/archive/2014/11/12/improvements-to-warnings-in-the-c-compiler.aspx @@ -555,6 +553,13 @@ case "$target" in # C4091: 'typedef ': ignored on left of '' when no variable is declared CFLAGS="$CFLAGS -wd4091" CXXFLAGS="$CXXFLAGS -wd4091" + + if test -n "$WIN_UCRT_REDIST_DIR"; then + if test ! -d "$WIN_UCRT_REDIST_DIR"; then + AC_MSG_ERROR([Invalid Windows UCRT Redist directory: ${WIN_UCRT_REDIST_DIR}]) + fi + WIN_UCRT_REDIST_DIR=`cd "$WIN_UCRT_REDIST_DIR" && pwd` + fi else AC_MSG_ERROR([This version (${_CC_MAJOR_VERSION}.${_CC_MINOR_VERSION}.${_CC_BUILD_VERSION}) of the MSVC compiler is unsupported. You must install Visual C++ 2013 Update 3, Visual C++ 2015 Update 1, or newer in order to build. @@ -563,8 +568,6 @@ See https://developer.mozilla.org/en/Windows_Build_Prerequisites.]) AC_SUBST(MSVS_VERSION) AC_SUBST(MSVC_C_RUNTIME_DLL) AC_SUBST(MSVC_CXX_RUNTIME_DLL) - AC_SUBST(MSVC_APPCRT_DLL) - AC_SUBST(MSVC_DESKTOPCRT_DLL) # Disable SEH on clang-cl because it doesn't implement them yet. if test -z "$CLANG_CL"; then @@ -1634,7 +1637,6 @@ dnl ======================================================== if test -n "$MACOSX_DEPLOYMENT_TARGET" -a -n "$MOZ_RUST"; then AC_MSG_CHECKING([if we're targeting 32-bit]) if test -z "$HAVE_64BIT_BUILD"; then - RUSTC="$RUSTC --target=i686-apple-darwin" AC_MSG_RESULT([using $RUSTC]) else AC_MSG_RESULT([no]) @@ -2216,6 +2218,8 @@ ia64*-hpux*) _USE_CPP_INCLUDE_FLAG=1 _DEFINES_CFLAGS='-FI $(topobjdir)/mozilla-config.h -DMOZILLA_CLIENT' _DEFINES_CXXFLAGS='-FI $(topobjdir)/mozilla-config.h -DMOZILLA_CLIENT' + SSE_FLAGS="-arch:SSE" + SSE2_FLAGS="-arch:SSE2" CFLAGS="$CFLAGS -W3 -Gy" CXXFLAGS="$CXXFLAGS -W3 -Gy" if test "$CPU_ARCH" = "x86"; then @@ -7216,14 +7220,16 @@ else *-mingw*) AC_DEFINE(MOZ_MEMORY_WINDOWS) export MOZ_NO_DEBUG_RTL=1 - WIN32_CRT_LIBS="msvcrt.lib msvcprt.lib" - dnl Look for a broken crtdll.obj - WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj` - lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH - if grep -q '__imp__\{0,1\}free' crtdll.obj; then - MOZ_CRT=1 + if test "$MSVS_VERSION" != "2015"; then + WIN32_CRT_LIBS="msvcrt.lib msvcprt.lib" + dnl Look for a broken crtdll.obj + WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj` + lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH + if grep -q '__imp__\{0,1\}free' crtdll.obj; then + MOZ_CRT=1 + fi + rm crtdll.obj fi - rm crtdll.obj ;; *) AC_MSG_ERROR([--enable-jemalloc not supported on ${target}]) @@ -8800,6 +8806,19 @@ AC_SUBST(MOZ_NATIVE_NSPR) AC_SUBST(MOZ_NATIVE_NSS) AC_SUBST(NSS_DISABLE_DBM) +HOST_CMFLAGS=-fobjc-exceptions +HOST_CMMFLAGS=-fobjc-exceptions +OS_COMPILE_CMFLAGS=-fobjc-exceptions +OS_COMPILE_CMMFLAGS=-fobjc-exceptions +if test "$MOZ_WIDGET_TOOLKIT" = uikit; then + OS_COMPILE_CMFLAGS="$OS_COMPILE_CMFLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch" + OS_COMPILE_CMMFLAGS="$OS_COMPILE_CMMFLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch" +fi +AC_SUBST(HOST_CMFLAGS) +AC_SUBST(HOST_CMMFLAGS) +AC_SUBST(OS_COMPILE_CMFLAGS) +AC_SUBST(OS_COMPILE_CMMFLAGS) + OS_CFLAGS="$CFLAGS" OS_CXXFLAGS="$CXXFLAGS" OS_CPPFLAGS="$CPPFLAGS" diff --git a/devtools/client/inspector/shared/test/browser_styleinspector_csslogic-content-stylesheets.js b/devtools/client/inspector/shared/test/browser_styleinspector_csslogic-content-stylesheets.js index 5acbc65e1b8..7c00602a079 100644 --- a/devtools/client/inspector/shared/test/browser_styleinspector_csslogic-content-stylesheets.js +++ b/devtools/client/inspector/shared/test/browser_styleinspector_csslogic-content-stylesheets.js @@ -21,6 +21,8 @@ var ssm = Components.classes["@mozilla.org/scriptsecuritymanager;1"] const XUL_PRINCIPAL = ssm.createCodebasePrincipal(XUL_URI, {}); add_task(function*() { + requestLongerTimeout(2); + info("Checking stylesheets on HTML document"); yield addTab(TEST_URI_HTML); let target = getNode("#target"); diff --git a/devtools/shared/security/LocalCertService.cpp b/devtools/shared/security/LocalCertService.cpp index eb580577d99..578009780b9 100644 --- a/devtools/shared/security/LocalCertService.cpp +++ b/devtools/shared/security/LocalCertService.cpp @@ -258,7 +258,7 @@ private: nsCOMPtr certFromDB; nsresult rv; - rv = certDB->FindCertByNickname(nullptr, NS_ConvertASCIItoUTF16(mNickname), + rv = certDB->FindCertByNickname(NS_ConvertASCIItoUTF16(mNickname), getter_AddRefs(certFromDB)); if (NS_FAILED(rv)) { return rv; diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index bce09ed5227..b90661b2640 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -1688,7 +1688,7 @@ nsDocShell::FirePageHideNotification(bool aIsUnload) mTiming->NotifyUnloadEventEnd(); } - nsAutoTArray, 8> kids; + AutoTArray, 8> kids; uint32_t n = mChildList.Length(); kids.SetCapacity(n); for (uint32_t i = 0; i < n; i++) { @@ -4396,7 +4396,7 @@ nsDocShell::RemoveFromSessionHistory() int32_t index = 0; sessionHistory->GetIndex(&index); - nsAutoTArray ids; + AutoTArray ids; ids.AppendElement(mHistoryID); internalHistory->RemoveEntries(ids, index); return NS_OK; @@ -4487,7 +4487,7 @@ nsDocShell::ClearFrameHistory(nsISHEntry* aEntry) int32_t count = 0; shcontainer->GetChildCount(&count); - nsAutoTArray ids; + AutoTArray ids; for (int32_t i = 0; i < count; ++i) { nsCOMPtr child; shcontainer->GetChildAt(i, getter_AddRefs(child)); @@ -14313,9 +14313,11 @@ nsDocShell::InFrameSwap() NS_IMETHODIMP nsDocShell::IssueWarning(uint32_t aWarning, bool aAsError) { - nsCOMPtr doc = mContentViewer->GetDocument(); - if (doc) { - doc->WarnOnceAbout(nsIDocument::DeprecatedOperations(aWarning), aAsError); + if (mContentViewer) { + nsCOMPtr doc = mContentViewer->GetDocument(); + if (doc) { + doc->WarnOnceAbout(nsIDocument::DeprecatedOperations(aWarning), aAsError); + } } return NS_OK; } diff --git a/docshell/shistory/nsSHistory.cpp b/docshell/shistory/nsSHistory.cpp index 6400fe64dbd..94455c4ff41 100644 --- a/docshell/shistory/nsSHistory.cpp +++ b/docshell/shistory/nsSHistory.cpp @@ -1405,7 +1405,7 @@ nsSHistory::RemoveDynEntries(int32_t aOldIndex, int32_t aNewIndex) nsCOMPtr originalSH; GetEntryAtIndex(aOldIndex, false, getter_AddRefs(originalSH)); nsCOMPtr originalContainer = do_QueryInterface(originalSH); - nsAutoTArray toBeRemovedEntries; + AutoTArray toBeRemovedEntries; if (originalContainer) { nsTArray originalDynDocShellIDs; GetDynamicChildren(originalContainer, originalDynDocShellIDs, true); diff --git a/dom/animation/EffectCompositor.cpp b/dom/animation/EffectCompositor.cpp index 3c4da5ee63e..fb6af8b0335 100644 --- a/dom/animation/EffectCompositor.cpp +++ b/dom/animation/EffectCompositor.cpp @@ -578,7 +578,7 @@ EffectCompositor::GetOverriddenProperties(nsStyleContext* aStyleContext, nsCSSPropertySet& aPropertiesOverridden) { - nsAutoTArray propertiesToTrack; + AutoTArray propertiesToTrack; { nsCSSPropertySet propertiesToTrackAsSet; for (KeyframeEffectReadOnly* effect : aEffectSet) { diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 65787afab44..3c85556facb 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -1355,7 +1355,7 @@ BuildAnimationPropertyListFromKeyframeSequence( { // Convert the object in aIterator to sequence, producing // an array of OffsetIndexedKeyframe objects. - nsAutoTArray keyframes; + AutoTArray keyframes; if (!ConvertKeyframeSequence(aCx, aIterator, keyframes)) { aRv.Throw(NS_ERROR_FAILURE); return; diff --git a/dom/animation/test/chrome/test_restyles.html b/dom/animation/test/chrome/test_restyles.html index ce0b9975f74..17b20993e08 100644 --- a/dom/animation/test/chrome/test_restyles.html +++ b/dom/animation/test/chrome/test_restyles.html @@ -81,7 +81,7 @@ waitForAllPaints(function() { is(markers.length, 0, 'CSS animations running on the compositor should not update style ' + 'on the main thread'); - div.remove(div); + div.remove(); }); add_task_if_omta_enabled(function* no_restyling_for_compositor_transitions() { @@ -98,7 +98,7 @@ waitForAllPaints(function() { is(markers.length, 0, 'CSS transitions running on the compositor should not update style ' + 'on the main thread'); - div.remove(div); + div.remove(); }); add_task_if_omta_enabled(function* no_restyling_when_animation_duration_is_changed() { @@ -114,7 +114,7 @@ waitForAllPaints(function() { is(markers.length, 0, 'Animations running on the compositor should not update style ' + 'on the main thread'); - div.remove(div); + div.remove(); }); add_task_if_omta_enabled(function* only_one_restyling_after_finish_is_called() { @@ -130,7 +130,7 @@ waitForAllPaints(function() { is(markers.length, 1, 'Animations running on the compositor should only update style ' + 'once after finish() is called'); - div.remove(div); + div.remove(); }); add_task(function* no_restyling_mouse_movement_on_finished_transition() { @@ -155,7 +155,7 @@ waitForAllPaints(function() { is(markers.length, 0, 'Bug 1219236: Finished transitions should never cause restyles ' + 'when mouse is moved on the animations'); - div.remove(div); + div.remove(); }); add_task(function* no_restyling_mouse_movement_on_finished_animation() { @@ -178,7 +178,7 @@ waitForAllPaints(function() { is(markers.length, 0, 'Bug 1219236: Finished animations should never cause restyles ' + 'when mouse is moved on the animations'); - div.remove(div); + div.remove(); }); add_task_if_omta_enabled(function* no_restyling_compositor_animations_out_of_view_element() { @@ -194,7 +194,7 @@ waitForAllPaints(function() { todo_is(markers.length, 0, 'Bug 1166500: Animations running on the compositor in out of ' + 'view element should never cause restyles'); - div.remove(div); + div.remove(); }); add_task(function* no_restyling_main_thread_animations_out_of_view_element() { @@ -208,7 +208,7 @@ waitForAllPaints(function() { todo_is(markers.length, 0, 'Bug 1166500: Animations running on the main-thread in out of ' + 'view element should never cause restyles'); - div.remove(div); + div.remove(); }); /* @@ -249,7 +249,7 @@ waitForAllPaints(function() { todo_is(markers.length, 0, 'Bug 1166500: Animations running on the main-thread in elements ' + 'which are scrolled out should never cause restyles'); - parentElement.remove(div); + parentElement.remove(); }); /* @@ -269,7 +269,7 @@ waitForAllPaints(function() { todo_is(markers.length, 0, 'Bug 1237454: Animations running on the compositor in ' + 'visibility hidden element should never cause restyles'); - div.remove(div); + div.remove(); }); */ @@ -284,7 +284,7 @@ waitForAllPaints(function() { todo_is(markers.length, 0, 'Bug 1237454: Animations running on the main-thread in ' + 'visibility hidden element should never cause restyles'); - div.remove(div); + div.remove(); }); add_task_if_omta_enabled(function* no_restyling_compositor_animations_after_pause_is_called() { @@ -302,10 +302,10 @@ waitForAllPaints(function() { is(markers.length, 0, 'Bug 1232563: Paused animations running on the compositor should ' + 'never cause restyles once after pause() is called'); - div.remove(div); + div.remove(); }); - add_task(function* no_restyling_matn_thread_animations_after_pause_is_called() { + add_task(function* no_restyling_main_thread_animations_after_pause_is_called() { var div = addDiv(null, { style: 'animation: background-color 100s' }); var animation = div.getAnimations()[0]; @@ -319,7 +319,22 @@ waitForAllPaints(function() { is(markers.length, 0, 'Bug 1232563: Paused animations running on the main-thread should ' + 'never cause restyles after pause() is called'); - div.remove(div); + div.remove(); + }); + + add_task_if_omta_enabled(function* only_one_restyling_when_current_time_is_set_to_middle_of_duration() { + var div = addDiv(null, { style: 'animation: opacity 100s' }); + var animation = div.getAnimations()[0]; + + yield animation.ready; + + animation.currentTime = 50000; // 50s + + var markers = yield observeStyling(5); + is(markers.length, 1, + 'Bug 1235478: Animations running on the compositor should only once ' + + 'update style when currentTime is set to middle of duration time'); + div.remove(); }); }); diff --git a/dom/base/DOMMatrix.cpp b/dom/base/DOMMatrix.cpp index 47210d96fe9..f30243befd0 100644 --- a/dom/base/DOMMatrix.cpp +++ b/dom/base/DOMMatrix.cpp @@ -267,7 +267,7 @@ template void GetDataFromMatrix(const DOMMatrixReadOnly* aMatrix, T void DOMMatrixReadOnly::ToFloat32Array(JSContext* aCx, JS::MutableHandle aResult, ErrorResult& aRv) const { - nsAutoTArray arr; + AutoTArray arr; arr.SetLength(16); GetDataFromMatrix(this, arr.Elements()); JS::Rooted value(aCx); @@ -281,7 +281,7 @@ DOMMatrixReadOnly::ToFloat32Array(JSContext* aCx, JS::MutableHandle a void DOMMatrixReadOnly::ToFloat64Array(JSContext* aCx, JS::MutableHandle aResult, ErrorResult& aRv) const { - nsAutoTArray arr; + AutoTArray arr; arr.SetLength(16); GetDataFromMatrix(this, arr.Elements()); JS::Rooted value(aCx); diff --git a/dom/base/File.cpp b/dom/base/File.cpp index f252d043d71..a8299523155 100644 --- a/dom/base/File.cpp +++ b/dom/base/File.cpp @@ -259,7 +259,7 @@ Blob::ToFile() already_AddRefed Blob::ToFile(const nsAString& aName, ErrorResult& aRv) const { - nsAutoTArray, 1> blobImpls; + AutoTArray, 1> blobImpls; blobImpls.AppendElement(mImpl); nsAutoString contentType; diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp index c51e07f3157..a490e3a9af4 100644 --- a/dom/base/FragmentOrElement.cpp +++ b/dom/base/FragmentOrElement.cpp @@ -308,7 +308,7 @@ nsIContent::GetBaseURI(bool aTryUseXHRDocBaseURI) const // faster for the far more common case of there not being any such // attributes. // Also check for SVG elements which require special handling - nsAutoTArray baseAttrs; + AutoTArray baseAttrs; nsString attr; const nsIContent *elem = this; do { @@ -1328,7 +1328,7 @@ public: } private: - nsAutoTArray, + AutoTArray, SUBTREE_UNBINDINGS_PER_RUNNABLE> mSubtreeRoots; RefPtr mNext; ContentUnbinder* mLast; @@ -1528,11 +1528,11 @@ FragmentOrElement::CanSkipInCC(nsINode* aNode) // nodesToUnpurple contains nodes which will be removed // from the purple buffer if the DOM tree is black. - nsAutoTArray nodesToUnpurple; + AutoTArray nodesToUnpurple; // grayNodes need script traverse, so they aren't removed from // the purple buffer, but are marked to be in black subtree so that // traverse is faster. - nsAutoTArray grayNodes; + AutoTArray grayNodes; bool foundBlack = root->IsBlack(); if (root != currentDoc) { @@ -1598,8 +1598,8 @@ FragmentOrElement::CanSkipInCC(nsINode* aNode) return !NeedsScriptTraverse(aNode); } -nsAutoTArray* gPurpleRoots = nullptr; -nsAutoTArray* gNodesToUnbind = nullptr; +AutoTArray* gPurpleRoots = nullptr; +AutoTArray* gNodesToUnbind = nullptr; void ClearCycleCollectorCleanupData() { @@ -1702,7 +1702,7 @@ FragmentOrElement::CanSkip(nsINode* aNode, bool aRemovingAllowed) // nodesToClear contains nodes which are either purple or // gray. - nsAutoTArray nodesToClear; + AutoTArray nodesToClear; bool foundBlack = root->IsBlack(); bool domOnlyCycle = false; @@ -1751,7 +1751,7 @@ FragmentOrElement::CanSkip(nsINode* aNode, bool aRemovingAllowed) root->SetIsPurpleRoot(true); if (domOnlyCycle) { if (!gNodesToUnbind) { - gNodesToUnbind = new nsAutoTArray(); + gNodesToUnbind = new AutoTArray(); } gNodesToUnbind->AppendElement(static_cast(root)); for (uint32_t i = 0; i < nodesToClear.Length(); ++i) { @@ -1763,7 +1763,7 @@ FragmentOrElement::CanSkip(nsINode* aNode, bool aRemovingAllowed) return true; } else { if (!gPurpleRoots) { - gPurpleRoots = new nsAutoTArray(); + gPurpleRoots = new AutoTArray(); } gPurpleRoots->AppendElement(root); } diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index 3065657a38c..265c3c26a17 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -871,7 +871,7 @@ Navigator::RemoveIdleObserver(MozIdleObserver& aIdleObserver, ErrorResult& aRv) bool Navigator::Vibrate(uint32_t aDuration) { - nsAutoTArray pattern; + AutoTArray pattern; pattern.AppendElement(aDuration); return Vibrate(pattern); } diff --git a/dom/base/nsContentIterator.cpp b/dom/base/nsContentIterator.cpp index 85dbee07fa5..5bbb604539a 100644 --- a/dom/base/nsContentIterator.cpp +++ b/dom/base/nsContentIterator.cpp @@ -155,7 +155,7 @@ protected: nsCOMPtr mCommonParent; // used by nsContentIterator to cache indices - nsAutoTArray mIndexes; + AutoTArray mIndexes; // used by nsSubtreeIterator to cache indices. Why put them in the base // class? Because otherwise I have to duplicate the routines GetNextSibling @@ -1058,8 +1058,8 @@ nsContentIterator::PositionAt(nsINode* aCurNode) // We can be at ANY node in the sequence. Need to regenerate the array of // indexes back to the root or common parent! - nsAutoTArray oldParentStack; - nsAutoTArray newIndexes; + AutoTArray oldParentStack; + AutoTArray newIndexes; // Get a list of the parents up to the root, then compare the new node with // entries in that array until we find a match (lowest common ancestor). If @@ -1213,8 +1213,8 @@ protected: RefPtr mRange; // these arrays all typically are used and have elements - nsAutoTArray mEndNodes; - nsAutoTArray mEndOffsets; + AutoTArray mEndNodes; + AutoTArray mEndOffsets; }; NS_IMPL_ADDREF_INHERITED(nsContentSubtreeIterator, nsContentIterator) diff --git a/dom/base/nsContentList.cpp b/dom/base/nsContentList.cpp index dbf0fb29dfe..e09239b376c 100644 --- a/dom/base/nsContentList.cpp +++ b/dom/base/nsContentList.cpp @@ -548,7 +548,7 @@ nsContentList::GetSupportedNames(unsigned aFlags, nsTArray& aNames) BringSelfUpToDate(true); - nsAutoTArray atoms; + AutoTArray atoms; for (uint32_t i = 0; i < mElements.Length(); ++i) { nsIContent *content = mElements.ElementAt(i); if (content->HasID()) { diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 00cea3a2e4e..86e80fc08a9 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -2286,7 +2286,7 @@ nsContentUtils::GetCommonAncestor(nsINode* aNode1, } // Build the chain of parents - nsAutoTArray parents1, parents2; + AutoTArray parents1, parents2; do { parents1.AppendElement(aNode1); aNode1 = aNode1->GetParentNode(); @@ -2335,7 +2335,7 @@ nsContentUtils::ComparePoints(nsINode* aParent1, int32_t aOffset1, 0; } - nsAutoTArray parents1, parents2; + AutoTArray parents1, parents2; nsINode* node1 = aParent1; nsINode* node2 = aParent2; do { @@ -4287,7 +4287,7 @@ nsContentUtils::CreateContextualFragment(nsINode* aContextNode, return frag.forget(); } - nsAutoTArray tagStack; + AutoTArray tagStack; nsAutoString uriStr, nameStr; nsCOMPtr content = do_QueryInterface(aContextNode); // just in case we have a text node @@ -6853,7 +6853,7 @@ nsContentUtils::FireMutationEventsForDirectParsing(nsIDocument* aDoc, int32_t newChildCount = aDest->GetChildCount(); if (newChildCount && nsContentUtils:: HasMutationListeners(aDoc, NS_EVENT_BITS_MUTATION_NODEINSERTED)) { - nsAutoTArray, 50> childNodes; + AutoTArray, 50> childNodes; NS_ASSERTION(newChildCount - aOldChildCount >= 0, "What, some unexpected dom mutation has happened?"); childNodes.SetCapacity(newChildCount - aOldChildCount); @@ -7920,7 +7920,7 @@ nsContentUtils::FirePageHideEvent(nsIDocShellTreeItem* aItem, int32_t childCount = 0; aItem->GetChildCount(&childCount); - nsAutoTArray, 8> kids; + AutoTArray, 8> kids; kids.AppendElements(childCount); for (int32_t i = 0; i < childCount; ++i) { aItem->GetChildAt(i, getter_AddRefs(kids[i])); @@ -7945,7 +7945,7 @@ nsContentUtils::FirePageShowEvent(nsIDocShellTreeItem* aItem, { int32_t childCount = 0; aItem->GetChildCount(&childCount); - nsAutoTArray, 8> kids; + AutoTArray, 8> kids; kids.AppendElements(childCount); for (int32_t i = 0; i < childCount; ++i) { aItem->GetChildAt(i, getter_AddRefs(kids[i])); @@ -8534,7 +8534,7 @@ private: } } - nsAutoTArray mUnits; + AutoTArray mUnits; nsAutoPtr mNext; StringBuilder* mLast; // mLength is used only in the first StringBuilder object in the linked list. diff --git a/dom/base/nsDOMMutationObserver.cpp b/dom/base/nsDOMMutationObserver.cpp index da89b51cd2a..b801765ca19 100644 --- a/dom/base/nsDOMMutationObserver.cpp +++ b/dom/base/nsDOMMutationObserver.cpp @@ -22,7 +22,7 @@ using mozilla::dom::TreeOrderComparator; using mozilla::dom::Animation; -nsAutoTArray, 4>* +AutoTArray, 4>* nsDOMMutationObserver::sScheduledMutationObservers = nullptr; nsDOMMutationObserver* nsDOMMutationObserver::sCurrentObserver = nullptr; @@ -30,7 +30,7 @@ nsDOMMutationObserver* nsDOMMutationObserver::sCurrentObserver = nullptr; uint32_t nsDOMMutationObserver::sMutationLevel = 0; uint64_t nsDOMMutationObserver::sCount = 0; -nsAutoTArray, 4>, 4>* +AutoTArray, 4>, 4>* nsDOMMutationObserver::sCurrentlyHandlingObservers = nullptr; nsINodeList* @@ -585,7 +585,7 @@ void nsDOMMutationObserver::RescheduleForRun() { if (!sScheduledMutationObservers) { - sScheduledMutationObservers = new nsAutoTArray, 4>; + sScheduledMutationObservers = new AutoTArray, 4>; } bool didInsert = false; @@ -882,7 +882,7 @@ nsDOMMutationObserver::HandleMutationsInternal() nsTArray >* suppressedObservers = nullptr; while (sScheduledMutationObservers) { - nsAutoTArray, 4>* observers = + AutoTArray, 4>* observers = sScheduledMutationObservers; sScheduledMutationObservers = nullptr; for (uint32_t i = 0; i < observers->Length(); ++i) { @@ -995,7 +995,7 @@ nsDOMMutationObserver::AddCurrentlyHandlingObserver(nsDOMMutationObserver* aObse if (!sCurrentlyHandlingObservers) { sCurrentlyHandlingObservers = - new nsAutoTArray, 4>, 4>; + new AutoTArray, 4>, 4>; } while (sCurrentlyHandlingObservers->Length() < aMutationLevel) { diff --git a/dom/base/nsDOMMutationObserver.h b/dom/base/nsDOMMutationObserver.h index b2c6e398160..8ff450d3ad3 100644 --- a/dom/base/nsDOMMutationObserver.h +++ b/dom/base/nsDOMMutationObserver.h @@ -605,7 +605,7 @@ protected: nsClassHashtable > mTransientReceivers; // MutationRecords which are being constructed. - nsAutoTArray mCurrentMutations; + AutoTArray mCurrentMutations; // MutationRecords which will be handed to the callback at the end of // the microtask. RefPtr mFirstPendingMutation; @@ -621,11 +621,11 @@ protected: uint64_t mId; static uint64_t sCount; - static nsAutoTArray, 4>* sScheduledMutationObservers; + static AutoTArray, 4>* sScheduledMutationObservers; static nsDOMMutationObserver* sCurrentObserver; static uint32_t sMutationLevel; - static nsAutoTArray, 4>, 4>* + static AutoTArray, 4>, 4>* sCurrentlyHandlingObservers; }; @@ -740,7 +740,7 @@ private: static nsAutoMutationBatch* sCurrentBatch; nsAutoMutationBatch* mPreviousBatch; - nsAutoTArray mObservers; + AutoTArray mObservers; nsTArray > mRemovedNodes; nsTArray > mAddedNodes; nsINode* mBatchTarget; @@ -907,7 +907,7 @@ private: }; static nsAutoAnimationMutationBatch* sCurrentBatch; - nsAutoTArray mObservers; + AutoTArray mObservers; typedef nsTArray EntryArray; nsClassHashtable, EntryArray> mEntryTable; // List of nodes referred to by mEntryTable so we can sort them diff --git a/dom/base/nsDOMTokenList.cpp b/dom/base/nsDOMTokenList.cpp index 682be1ddb9c..855b8e9c0e5 100644 --- a/dom/base/nsDOMTokenList.cpp +++ b/dom/base/nsDOMTokenList.cpp @@ -134,7 +134,7 @@ nsDOMTokenList::AddInternal(const nsAttrValue* aAttr, } bool oneWasAdded = false; - nsAutoTArray addedClasses; + AutoTArray addedClasses; for (uint32_t i = 0, l = aTokens.Length(); i < l; ++i) { const nsString& aToken = aTokens[i]; @@ -175,7 +175,7 @@ nsDOMTokenList::Add(const nsTArray& aTokens, ErrorResult& aError) void nsDOMTokenList::Add(const nsAString& aToken, mozilla::ErrorResult& aError) { - nsAutoTArray tokens; + AutoTArray tokens; tokens.AppendElement(aToken); Add(tokens, aError); } @@ -261,7 +261,7 @@ nsDOMTokenList::Remove(const nsTArray& aTokens, ErrorResult& aError) void nsDOMTokenList::Remove(const nsAString& aToken, mozilla::ErrorResult& aError) { - nsAutoTArray tokens; + AutoTArray tokens; tokens.AppendElement(aToken); Remove(tokens, aError); } @@ -281,7 +281,7 @@ nsDOMTokenList::Toggle(const nsAString& aToken, const bool forceOff = aForce.WasPassed() && !aForce.Value(); bool isPresent = attr && attr->Contains(aToken); - nsAutoTArray tokens; + AutoTArray tokens; (*tokens.AppendElement()).Rebind(aToken.Data(), aToken.Length()); if (isPresent) { diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 679fcf0fdbe..fc8826eefc3 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -3294,7 +3294,7 @@ nsDocument::ElementFromPointHelper(float aX, float aY, bool aIgnoreRootScrollFrame, bool aFlushLayout) { - nsAutoTArray, 1> elementArray; + AutoTArray, 1> elementArray; ElementsFromPointHelper(aX, aY, ((aIgnoreRootScrollFrame ? nsIDocument::IGNORE_ROOT_SCROLL_FRAME : 0) | (aFlushLayout ? nsIDocument::FLUSH_LAYOUT : 0) | @@ -3416,7 +3416,7 @@ nsDocument::NodesFromRectHelper(float aX, float aY, if (!rootFrame) return NS_OK; // return nothing to premature XUL callers as a reminder to wait - nsAutoTArray outFrames; + AutoTArray outFrames; nsLayoutUtils::GetFramesForArea(rootFrame, rect, outFrames, nsLayoutUtils::IGNORE_PAINT_SUPPRESSION | nsLayoutUtils::IGNORE_CROSS_DOC | (aIgnoreRootScrollFrame ? nsLayoutUtils::IGNORE_ROOT_SCROLL_FRAME : 0)); @@ -8807,9 +8807,11 @@ nsDocument::CanSavePresentation(nsIRequest *aNewRequest) } #ifdef MOZ_WEBSPEECH - auto* globalWindow = nsGlobalWindow::Cast(win); - if (globalWindow->HasActiveSpeechSynthesis()) { - return false; + if (win) { + auto* globalWindow = nsGlobalWindow::Cast(win); + if (globalWindow->HasActiveSpeechSynthesis()) { + return false; + } } #endif @@ -11238,7 +11240,7 @@ nsDocument::RestorePreviousFullScreenState() } nsCOMPtr fullScreenDoc = GetFullscreenLeaf(this); - nsAutoTArray exitDocs; + AutoTArray exitDocs; nsIDocument* doc = fullScreenDoc; // Collect all subdocuments. @@ -11855,7 +11857,7 @@ nsDocument::ApplyFullscreen(const FullscreenRequest& aRequest) // order, but we traverse the doctree in a leaf-to-root order, so we save // references to the documents we must dispatch to so that we get the order // as specified. - nsAutoTArray changed; + AutoTArray changed; // Remember the root document, so that if a full-screen document is hidden // we can reset full-screen state in the remaining visible full-screen documents. diff --git a/dom/base/nsDocumentEncoder.cpp b/dom/base/nsDocumentEncoder.cpp index f100a808d65..09b7195b37d 100644 --- a/dom/base/nsDocumentEncoder.cpp +++ b/dom/base/nsDocumentEncoder.cpp @@ -162,11 +162,11 @@ protected: uint32_t mEndDepth; int32_t mStartRootIndex; int32_t mEndRootIndex; - nsAutoTArray mCommonAncestors; - nsAutoTArray mStartNodes; - nsAutoTArray mStartOffsets; - nsAutoTArray mEndNodes; - nsAutoTArray mEndOffsets; + AutoTArray mCommonAncestors; + AutoTArray mStartNodes; + AutoTArray mStartOffsets; + AutoTArray mEndNodes; + AutoTArray mEndOffsets; bool mHaltRangeHint; // Used when context has already been serialized for // table cell selections (where parent is ) diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp index 33b5e43c9a8..eb0d5b070e8 100644 --- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp @@ -1370,7 +1370,7 @@ nsFocusManager::GetCommonAncestor(nsPIDOMWindowOuter* aWindow1, nsCOMPtr dsti2 = aWindow2->GetDocShell(); NS_ENSURE_TRUE(dsti2, nullptr); - nsAutoTArray parents1, parents2; + AutoTArray parents1, parents2; do { parents1.AppendElement(dsti1); nsCOMPtr parentDsti1; diff --git a/dom/base/nsFrameMessageManager.h b/dom/base/nsFrameMessageManager.h index b0215ef32c8..9f38e293bda 100644 --- a/dom/base/nsFrameMessageManager.h +++ b/dom/base/nsFrameMessageManager.h @@ -399,7 +399,7 @@ protected: bool InitChildGlobalInternal(nsISupports* aScope, const nsACString& aID); nsCOMPtr mGlobal; nsCOMPtr mPrincipal; - nsAutoTArray, 2> mAnonymousGlobalScopes; + AutoTArray, 2> mAnonymousGlobalScopes; static nsDataHashtable* sCachedScripts; static nsScriptCacheCleaner* sScriptCacheCleaner; diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h index 008825a2cc9..c7cf6c62b27 100644 --- a/dom/base/nsGkAtomList.h +++ b/dom/base/nsGkAtomList.h @@ -931,6 +931,10 @@ GK_ATOM(onupgradeneeded, "onupgradeneeded") GK_ATOM(onussdreceived, "onussdreceived") GK_ATOM(onversionchange, "onversionchange") GK_ATOM(onvoicechange, "onvoicechange") +GK_ATOM(onwebkitAnimationEnd, "onwebkitAnimationEnd") +GK_ATOM(onwebkitAnimationIteration, "onwebkitAnimationIteration") +GK_ATOM(onwebkitAnimationStart, "onwebkitAnimationStart") +GK_ATOM(onwebkitTransitionEnd, "onwebkitTransitionEnd") GK_ATOM(onwheel, "onwheel") GK_ATOM(open, "open") GK_ATOM(optgroup, "optgroup") diff --git a/dom/base/nsIDocument.h b/dom/base/nsIDocument.h index 66ac703417a..a0e3b1a5766 100644 --- a/dom/base/nsIDocument.h +++ b/dom/base/nsIDocument.h @@ -1830,7 +1830,7 @@ public: return mObservers; } protected: - nsAutoTArray< nsCOMPtr, 8 > mObservers; + AutoTArray< nsCOMPtr, 8 > mObservers; }; /** diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp index 9c81089b96c..091df34388d 100644 --- a/dom/base/nsINode.cpp +++ b/dom/base/nsINode.cpp @@ -595,7 +595,7 @@ void nsINode::Normalize() { // First collect list of nodes to be removed - nsAutoTArray, 50> nodes; + AutoTArray, 50> nodes; bool canMerge = false; for (nsIContent* node = this->GetFirstChild(); @@ -864,7 +864,7 @@ nsINode::CompareDocumentPosition(nsINode& aOtherNode) const return static_cast(nsIDOMNode::DOCUMENT_POSITION_FOLLOWING); } - nsAutoTArray parents1, parents2; + AutoTArray parents1, parents2; const nsINode *node1 = &aOtherNode, *node2 = this; @@ -1992,7 +1992,7 @@ nsINode::ReplaceOrInsertBefore(bool aReplace, nsINode* aNewChild, nodeToInsertBefore = nodeToInsertBefore->GetNextSibling(); } - Maybe, 50> > fragChildren; + Maybe, 50> > fragChildren; // Remove the new child from the old parent if one exists nsIContent* newContent = aNewChild->AsContent(); @@ -2702,7 +2702,7 @@ nsINode::QuerySelectorAll(const nsAString& aSelector, ErrorResult& aResult) nsCSSSelectorList* selectorList = ParseSelectorList(aSelector, aResult); if (selectorList) { - FindMatchingElements>(this, + FindMatchingElements>(this, selectorList, *contentList, aResult); diff --git a/dom/base/nsLineBreaker.cpp b/dom/base/nsLineBreaker.cpp index b0e71275fa9..89d5e6a59f6 100644 --- a/dom/base/nsLineBreaker.cpp +++ b/dom/base/nsLineBreaker.cpp @@ -59,7 +59,7 @@ nsresult nsLineBreaker::FlushCurrentWord() { uint32_t length = mCurrentWord.Length(); - nsAutoTArray breakState; + AutoTArray breakState; if (!breakState.AppendElements(length)) return NS_ERROR_OUT_OF_MEMORY; @@ -187,7 +187,7 @@ nsLineBreaker::AppendText(nsIAtom* aHyphenationLanguage, const char16_t* aText, return rv; } - nsAutoTArray breakState; + AutoTArray breakState; if (aSink) { if (!breakState.AppendElements(aLength)) return NS_ERROR_OUT_OF_MEMORY; @@ -313,7 +313,7 @@ nsLineBreaker::FindHyphenationPoints(nsHyphenator *aHyphenator, uint8_t *aBreakState) { nsDependentSubstring string(aTextStart, aTextLimit); - AutoFallibleTArray hyphens; + AutoTArray hyphens; if (NS_SUCCEEDED(aHyphenator->Hyphenate(string, hyphens))) { for (uint32_t i = 0; i + 1 < string.Length(); ++i) { if (hyphens[i]) { @@ -368,7 +368,7 @@ nsLineBreaker::AppendText(nsIAtom* aHyphenationLanguage, const uint8_t* aText, u return rv; } - nsAutoTArray breakState; + AutoTArray breakState; if (aSink) { if (!breakState.AppendElements(aLength)) return NS_ERROR_OUT_OF_MEMORY; diff --git a/dom/base/nsLineBreaker.h b/dom/base/nsLineBreaker.h index 012faa62dd1..81c4c334e9b 100644 --- a/dom/base/nsLineBreaker.h +++ b/dom/base/nsLineBreaker.h @@ -206,9 +206,9 @@ private: const char16_t *aTextLimit, uint8_t *aBreakState); - nsAutoTArray mCurrentWord; + AutoTArray mCurrentWord; // All the items that contribute to mCurrentWord - nsAutoTArray mTextItems; + AutoTArray mTextItems; nsIAtom* mCurrentWordLanguage; bool mCurrentWordContainsMixedLang; bool mCurrentWordContainsComplexChar; diff --git a/dom/base/nsPIDOMWindowInlines.h b/dom/base/nsPIDOMWindowInlines.h index 7fc629eb81c..fc4afa7ed2d 100644 --- a/dom/base/nsPIDOMWindowInlines.h +++ b/dom/base/nsPIDOMWindowInlines.h @@ -125,7 +125,7 @@ nsIContent* nsPIDOMWindow::GetFocusedNode() const { if (IsOuterWindow()) { - return mInnerWindow->GetFocusedNode(); + return mInnerWindow ? mInnerWindow->GetFocusedNode() : nullptr; } return mFocusedNode; diff --git a/dom/base/nsPerformance.cpp b/dom/base/nsPerformance.cpp index 3f4160744af..baecce534e5 100644 --- a/dom/base/nsPerformance.cpp +++ b/dom/base/nsPerformance.cpp @@ -958,7 +958,7 @@ DOMHighResTimeStamp PerformanceBase::ResolveTimestampFromName(const nsAString& aName, ErrorResult& aRv) { - nsAutoTArray, 1> arr; + AutoTArray, 1> arr; DOMHighResTimeStamp ts; Optional typeParam; nsAutoString str; diff --git a/dom/base/nsPlainTextSerializer.h b/dom/base/nsPlainTextSerializer.h index a154b38321a..acdbff5bae0 100644 --- a/dom/base/nsPlainTextSerializer.h +++ b/dom/base/nsPlainTextSerializer.h @@ -199,10 +199,10 @@ private: RefPtr mElement; // For handling table rows - nsAutoTArray mHasWrittenCellsForRow; + AutoTArray mHasWrittenCellsForRow; // Values gotten in OpenContainer that is (also) needed in CloseContainer - nsAutoTArray mIsInCiteBlockquote; + AutoTArray mIsInCiteBlockquote; // The output data nsAString* mOutputString; diff --git a/dom/base/nsXHTMLContentSerializer.h b/dom/base/nsXHTMLContentSerializer.h index f6041c98b45..6fc7dce6691 100644 --- a/dom/base/nsXHTMLContentSerializer.h +++ b/dom/base/nsXHTMLContentSerializer.h @@ -152,7 +152,7 @@ protected: }; // Stack to store one olState struct per
    . - nsAutoTArray mOLStateStack; + AutoTArray mOLStateStack; bool HasNoChildren(nsIContent* aContent); }; diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h index 3ce76ae1c6a..3968d024632 100644 --- a/dom/bindings/BindingUtils.h +++ b/dom/bindings/BindingUtils.h @@ -2070,10 +2070,10 @@ void DoTraceSequence(JSTracer* trc, InfallibleTArray& seq); namespace binding_detail { template -class AutoSequence : public AutoFallibleTArray +class AutoSequence : public AutoTArray { public: - AutoSequence() : AutoFallibleTArray() + AutoSequence() : AutoTArray() {} // Allow converting to const sequences as needed diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index 99e4bb77e7e..e8e2947bdc9 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -4474,8 +4474,8 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, # reallocation behavior for arrays. In particular, if we use auto # arrays for sequences and have a sequence of elements which are # themselves sequences or have sequences as members, we have a problem. - # In that case, resizing the outermost nsAutoTarray to the right size - # will memmove its elements, but nsAutoTArrays are not memmovable and + # In that case, resizing the outermost AutoTArray to the right size + # will memmove its elements, but AutoTArrays are not memmovable and # hence will end up with pointers to bogus memory, which is bad. To # deal with this, we typically map WebIDL sequences to our Sequence # type, which is in fact memmovable. The one exception is when we're @@ -8389,7 +8389,7 @@ class CGEnumerateHook(CGAbstractBindingMethod): def generate_code(self): return CGGeneric(dedent(""" - nsAutoTArray names; + AutoTArray names; ErrorResult rv; self->GetOwnPropertyNames(cx, names, rv); if (rv.MaybeSetPendingException(cx)) { @@ -10456,7 +10456,7 @@ class CGEnumerateOwnPropertiesViaGetOwnPropertyNames(CGAbstractBindingMethod): def generate_code(self): return CGGeneric(dedent(""" - nsAutoTArray names; + AutoTArray names; ErrorResult rv; self->GetOwnPropertyNames(cx, names, rv); if (rv.MaybeSetPendingException(cx)) { diff --git a/dom/bluetooth/common/BluetoothService.cpp b/dom/bluetooth/common/BluetoothService.cpp index 76c1a945fae..7f4f39736aa 100644 --- a/dom/bluetooth/common/BluetoothService.cpp +++ b/dom/bluetooth/common/BluetoothService.cpp @@ -94,7 +94,7 @@ GetAllBluetoothActors(InfallibleTArray& aActors) MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(aActors.IsEmpty()); - nsAutoTArray contentActors; + AutoTArray contentActors; ContentParent::GetAll(contentActors); for (uint32_t contentIndex = 0; @@ -102,7 +102,7 @@ GetAllBluetoothActors(InfallibleTArray& aActors) contentIndex++) { MOZ_ASSERT(contentActors[contentIndex]); - AutoInfallibleTArray bluetoothActors; + AutoTArray bluetoothActors; contentActors[contentIndex]->ManagedPBluetoothParent(bluetoothActors); for (uint32_t bluetoothIndex = 0; @@ -487,7 +487,7 @@ BluetoothService::SetEnabled(bool aEnabled) { MOZ_ASSERT(NS_IsMainThread()); - AutoInfallibleTArray childActors; + AutoTArray childActors; GetAllBluetoothActors(childActors); for (uint32_t index = 0; index < childActors.Length(); index++) { @@ -571,7 +571,7 @@ BluetoothService::HandleShutdown() Cleanup(); - AutoInfallibleTArray childActors; + AutoTArray childActors; GetAllBluetoothActors(childActors); if (!childActors.IsEmpty()) { diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js index cc6e652af59..f8d9b331478 100644 --- a/dom/browser-element/BrowserElementChildPreload.js +++ b/dom/browser-element/BrowserElementChildPreload.js @@ -1887,6 +1887,7 @@ BrowserElementChild.prototype = { case Cr.NS_BINDING_ABORTED : // Ignoring NS_BINDING_ABORTED, which is set when loading page is // stopped. + case Cr.NS_ERROR_PARSED_DATA_CACHED: return; // TODO See nsDocShell::DisplayLoadError to see what extra diff --git a/dom/cache/AutoUtils.cpp b/dom/cache/AutoUtils.cpp index 1f9c8a52c75..527cb528a73 100644 --- a/dom/cache/AutoUtils.cpp +++ b/dom/cache/AutoUtils.cpp @@ -47,7 +47,7 @@ CleanupChildFds(CacheReadStream& aReadStream, CleanupAction aAction) return; } - nsAutoTArray fds; + AutoTArray fds; FileDescriptorSetChild* fdSetActor = static_cast(aReadStream.fds().get_PFileDescriptorSetChild()); @@ -107,7 +107,7 @@ CleanupParentFds(CacheReadStream& aReadStream, CleanupAction aAction) return; } - nsAutoTArray fds; + AutoTArray fds; FileDescriptorSetParent* fdSetActor = static_cast(aReadStream.fds().get_PFileDescriptorSetParent()); @@ -306,7 +306,7 @@ MatchInPutList(InternalRequest* aRequest, RefPtr cachedResponseHeaders = TypeUtils::ToInternalHeaders(cachedResponse.headers()); - nsAutoTArray varyHeaders; + AutoTArray varyHeaders; ErrorResult rv; cachedResponseHeaders->GetAll(NS_LITERAL_CSTRING("vary"), varyHeaders, rv); MOZ_ALWAYS_TRUE(!rv.Failed()); diff --git a/dom/cache/Cache.cpp b/dom/cache/Cache.cpp index a91e2cb488e..a34ccf47d3a 100644 --- a/dom/cache/Cache.cpp +++ b/dom/cache/Cache.cpp @@ -114,7 +114,7 @@ public: // an Array of Response objects. The following code unwraps these // JS values back to an nsTArray>. - nsAutoTArray, 256> responseList; + AutoTArray, 256> responseList; responseList.SetCapacity(mRequestList.Length()); bool isArray; @@ -571,7 +571,7 @@ Cache::AddAll(const GlobalObject& aGlobal, return promise.forget(); } - nsAutoTArray, 256> fetchList; + AutoTArray, 256> fetchList; fetchList.SetCapacity(aRequestList.Length()); // Begin fetching each request in parallel. For now, if an error occurs just diff --git a/dom/cache/CacheOpChild.cpp b/dom/cache/CacheOpChild.cpp index fdc942abe38..c65a7fe1c65 100644 --- a/dom/cache/CacheOpChild.cpp +++ b/dom/cache/CacheOpChild.cpp @@ -219,7 +219,7 @@ CacheOpChild::HandleResponse(const CacheResponseOrVoid& aResponseOrVoid) void CacheOpChild::HandleResponseList(const nsTArray& aResponseList) { - nsAutoTArray, 256> responses; + AutoTArray, 256> responses; responses.SetCapacity(aResponseList.Length()); for (uint32_t i = 0; i < aResponseList.Length(); ++i) { @@ -233,7 +233,7 @@ CacheOpChild::HandleResponseList(const nsTArray& aResponseList) void CacheOpChild::HandleRequestList(const nsTArray& aRequestList) { - nsAutoTArray, 256> requests; + AutoTArray, 256> requests; requests.SetCapacity(aRequestList.Length()); for (uint32_t i = 0; i < aRequestList.Length(); ++i) { diff --git a/dom/cache/CacheOpParent.cpp b/dom/cache/CacheOpParent.cpp index 1077d4e8ab6..b67fbaa774b 100644 --- a/dom/cache/CacheOpParent.cpp +++ b/dom/cache/CacheOpParent.cpp @@ -79,8 +79,8 @@ CacheOpParent::Execute(Manager* aManager) const CachePutAllArgs& args = mOpArgs.get_CachePutAllArgs(); const nsTArray& list = args.requestResponseList(); - nsAutoTArray, 256> requestStreamList; - nsAutoTArray, 256> responseStreamList; + AutoTArray, 256> requestStreamList; + AutoTArray, 256> responseStreamList; for (uint32_t i = 0; i < list.Length(); ++i) { requestStreamList.AppendElement( @@ -221,7 +221,7 @@ CacheOpParent::DeserializeCacheStream(const CacheReadStreamOrVoid& aStreamOrVoid } // Option 3: A stream was serialized using normal methods. - nsAutoTArray fds; + AutoTArray fds; if (readStream.fds().type() == OptionalFileDescriptorSet::TPFileDescriptorSetChild) { diff --git a/dom/cache/DBSchema.cpp b/dom/cache/DBSchema.cpp index fa83a268a58..c3a49dea8b0 100644 --- a/dom/cache/DBSchema.cpp +++ b/dom/cache/DBSchema.cpp @@ -588,11 +588,11 @@ DeleteCacheId(mozIStorageConnection* aConn, CacheId aCacheId, // Delete the bodies explicitly as we need to read out the body IDs // anyway. These body IDs must be deleted one-by-one as content may // still be referencing them invidivually. - nsAutoTArray matches; + AutoTArray matches; nsresult rv = QueryAll(aConn, aCacheId, matches); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } - nsAutoTArray deletedSecurityIdList; + AutoTArray deletedSecurityIdList; rv = DeleteEntries(aConn, matches, aDeletedBodyIdListOut, deletedSecurityIdList); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -720,7 +720,7 @@ CacheMatch(mozIStorageConnection* aConn, CacheId aCacheId, *aFoundResponseOut = false; - nsAutoTArray matches; + AutoTArray matches; nsresult rv = QueryCache(aConn, aCacheId, aRequest, aParams, matches, 1); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -747,7 +747,7 @@ CacheMatchAll(mozIStorageConnection* aConn, CacheId aCacheId, MOZ_ASSERT(aConn); nsresult rv; - nsAutoTArray matches; + AutoTArray matches; if (aRequestOrVoid.type() == CacheRequestOrVoid::Tvoid_t) { rv = QueryAll(aConn, aCacheId, matches); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -781,11 +781,11 @@ CachePut(mozIStorageConnection* aConn, CacheId aCacheId, CacheQueryParams params(false, false, false, false, NS_LITERAL_STRING("")); - nsAutoTArray matches; + AutoTArray matches; nsresult rv = QueryCache(aConn, aCacheId, aRequest, params, matches); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } - nsAutoTArray deletedSecurityIdList; + AutoTArray deletedSecurityIdList; rv = DeleteEntries(aConn, matches, aDeletedBodyIdListOut, deletedSecurityIdList); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -814,7 +814,7 @@ CacheDelete(mozIStorageConnection* aConn, CacheId aCacheId, *aSuccessOut = false; - nsAutoTArray matches; + AutoTArray matches; nsresult rv = QueryCache(aConn, aCacheId, aRequest, aParams, matches); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -822,7 +822,7 @@ CacheDelete(mozIStorageConnection* aConn, CacheId aCacheId, return rv; } - nsAutoTArray deletedSecurityIdList; + AutoTArray deletedSecurityIdList; rv = DeleteEntries(aConn, matches, aDeletedBodyIdListOut, deletedSecurityIdList); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -845,7 +845,7 @@ CacheKeys(mozIStorageConnection* aConn, CacheId aCacheId, MOZ_ASSERT(aConn); nsresult rv; - nsAutoTArray matches; + AutoTArray matches; if (aRequestOrVoid.type() == CacheRequestOrVoid::Tvoid_t) { rv = QueryAll(aConn, aCacheId, matches); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -912,7 +912,7 @@ StorageMatch(mozIStorageConnection* aConn, rv = state->BindInt32ByName(NS_LITERAL_CSTRING("namespace"), aNamespace); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } - nsAutoTArray cacheIdList; + AutoTArray cacheIdList; bool hasMoreData = false; while (NS_SUCCEEDED(state->ExecuteStep(&hasMoreData)) && hasMoreData) { @@ -1218,7 +1218,7 @@ MatchByVaryHeader(mozIStorageConnection* aConn, rv = state->BindInt32ByName(NS_LITERAL_CSTRING("entry_id"), entryId); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } - nsAutoTArray varyValues; + AutoTArray varyValues; bool hasMoreData = false; while (NS_SUCCEEDED(state->ExecuteStep(&hasMoreData)) && hasMoreData) { diff --git a/dom/cache/Manager.cpp b/dom/cache/Manager.cpp index 4a9f9e0a1c2..0e425035632 100644 --- a/dom/cache/Manager.cpp +++ b/dom/cache/Manager.cpp @@ -74,12 +74,12 @@ public: mozIStorageConnection::TRANSACTION_IMMEDIATE); // Clean up orphaned Cache objects - nsAutoTArray orphanedCacheIdList; + AutoTArray orphanedCacheIdList; nsresult rv = db::FindOrphanedCacheIds(aConn, orphanedCacheIdList); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } for (uint32_t i = 0; i < orphanedCacheIdList.Length(); ++i) { - nsAutoTArray deletedBodyIdList; + AutoTArray deletedBodyIdList; rv = db::DeleteCacheId(aConn, orphanedCacheIdList[i], deletedBodyIdList); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -88,7 +88,7 @@ public: } // Clean up orphaned body objects - nsAutoTArray knownBodyIdList; + AutoTArray knownBodyIdList; rv = db::GetKnownBodyIds(aConn, knownBodyIdList); rv = BodyDeleteOrphanedFiles(aDBDir, knownBodyIdList); @@ -1373,7 +1373,7 @@ Manager::Listener::OnOpComplete(ErrorResult&& aRv, const CacheOpResult& aResult, const SavedResponse& aSavedResponse, StreamList* aStreamList) { - nsAutoTArray responseList; + AutoTArray responseList; responseList.AppendElement(aSavedResponse); OnOpComplete(Move(aRv), aResult, INVALID_CACHE_ID, responseList, nsTArray(), aStreamList); @@ -1902,7 +1902,7 @@ Manager::NoteOrphanedBodyIdList(const nsTArray& aDeletedBodyIdList) { NS_ASSERT_OWNINGTHREAD(Manager); - nsAutoTArray deleteNowList; + AutoTArray deleteNowList; deleteNowList.SetCapacity(aDeletedBodyIdList.Length()); for (uint32_t i = 0; i < aDeletedBodyIdList.Length(); ++i) { diff --git a/dom/cache/ReadStream.cpp b/dom/cache/ReadStream.cpp index d4a74c0084f..7cdd3d3a765 100644 --- a/dom/cache/ReadStream.cpp +++ b/dom/cache/ReadStream.cpp @@ -222,7 +222,7 @@ ReadStream::Inner::Serialize(CacheReadStream* aReadStreamOut) aReadStreamOut->id() = mId; mControl->SerializeControl(aReadStreamOut); - nsAutoTArray fds; + AutoTArray fds; SerializeInputStream(mStream, aReadStreamOut->params(), fds); mControl->SerializeFds(aReadStreamOut, fds); @@ -451,7 +451,7 @@ ReadStream::Create(const CacheReadStream& aReadStream) } MOZ_ASSERT(control); - nsAutoTArray fds; + AutoTArray fds; control->DeserializeFds(aReadStream, fds); nsCOMPtr stream = diff --git a/dom/cache/TypeUtils.cpp b/dom/cache/TypeUtils.cpp index ad373b26737..dce6909509f 100644 --- a/dom/cache/TypeUtils.cpp +++ b/dom/cache/TypeUtils.cpp @@ -44,7 +44,7 @@ namespace { static bool HasVaryStar(mozilla::dom::InternalHeaders* aHeaders) { - nsAutoTArray varyHeaders; + AutoTArray varyHeaders; ErrorResult rv; aHeaders->GetAll(NS_LITERAL_CSTRING("vary"), varyHeaders, rv); MOZ_ALWAYS_TRUE(!rv.Failed()); @@ -67,7 +67,7 @@ HasVaryStar(mozilla::dom::InternalHeaders* aHeaders) void SerializeNormalStream(nsIInputStream* aStream, CacheReadStream& aReadStreamOut) { - nsAutoTArray fds; + AutoTArray fds; SerializeInputStream(aStream, aReadStreamOut.params(), fds); PFileDescriptorSetChild* fdSet = nullptr; @@ -94,7 +94,7 @@ ToHeadersEntryList(nsTArray& aOut, InternalHeaders* aHeaders) { MOZ_ASSERT(aHeaders); - nsAutoTArray entryList; + AutoTArray entryList; aHeaders->GetEntries(entryList); for (uint32_t i = 0; i < entryList.Length(); ++i) { diff --git a/dom/camera/GonkCameraControl.cpp b/dom/camera/GonkCameraControl.cpp index 9d06e9e00b9..280a77391c0 100644 --- a/dom/camera/GonkCameraControl.cpp +++ b/dom/camera/GonkCameraControl.cpp @@ -247,7 +247,7 @@ nsGonkCameraControl::Initialize() DOM_CAMERA_LOGI(" - flash: NOT supported\n"); } - nsAutoTArray sizes; + AutoTArray sizes; mParams.Get(CAMERA_PARAM_SUPPORTED_VIDEOSIZES, sizes); if (sizes.Length() > 0) { mSeparateVideoAndPreviewSizesSupported = true; @@ -264,7 +264,7 @@ nsGonkCameraControl::Initialize() mLastRecorderSize = mCurrentConfiguration.mPreviewSize; } - nsAutoTArray modes; + AutoTArray modes; mParams.Get(CAMERA_PARAM_SUPPORTED_METERINGMODES, modes); if (!modes.IsEmpty()) { nsString mode; @@ -302,7 +302,7 @@ nsGonkCameraControl::~nsGonkCameraControl() nsresult nsGonkCameraControl::ValidateConfiguration(const Configuration& aConfig, Configuration& aValidatedConfig) { - nsAutoTArray supportedSizes; + AutoTArray supportedSizes; Get(CAMERA_PARAM_SUPPORTED_PICTURESIZES, supportedSizes); nsresult rv = GetSupportedSize(aConfig.mPictureSize, supportedSizes, @@ -923,7 +923,7 @@ nsGonkCameraControl::SetThumbnailSizeImpl(const Size& aSize) uint32_t smallestDeltaIndex = UINT32_MAX; int targetArea = aSize.width * aSize.height; - nsAutoTArray supportedSizes; + AutoTArray supportedSizes; Get(CAMERA_PARAM_SUPPORTED_JPEG_THUMBNAIL_SIZES, supportedSizes); for (uint32_t i = 0; i < supportedSizes.Length(); ++i) { @@ -1028,7 +1028,7 @@ nsGonkCameraControl::SetPictureSizeImpl(const Size& aSize) return NS_OK; } - nsAutoTArray supportedSizes; + AutoTArray supportedSizes; Get(CAMERA_PARAM_SUPPORTED_PICTURESIZES, supportedSizes); Size best; @@ -1727,7 +1727,7 @@ nsGonkCameraControl::SelectCaptureAndPreviewSize(const Size& aPreviewSize, aPreviewSize.width, aPreviewSize.height, aMaxSize.width, aMaxSize.height); - nsAutoTArray sizes; + AutoTArray sizes; nsresult rv = Get(CAMERA_PARAM_SUPPORTED_PREVIEWSIZES, sizes); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; diff --git a/dom/canvas/CanvasRenderingContext2D.h b/dom/canvas/CanvasRenderingContext2D.h index 291ec80d743..e2a5ecf194b 100644 --- a/dom/canvas/CanvasRenderingContext2D.h +++ b/dom/canvas/CanvasRenderingContext2D.h @@ -1034,7 +1034,7 @@ protected: bool fontExplicitLanguage; }; - nsAutoTArray mStyleStack; + AutoTArray mStyleStack; inline ContextState& CurrentState() { return mStyleStack[mStyleStack.Length() - 1]; diff --git a/dom/canvas/ImageBitmapRenderingContext.cpp b/dom/canvas/ImageBitmapRenderingContext.cpp index b8b079eeb5c..e3009918618 100644 --- a/dom/canvas/ImageBitmapRenderingContext.cpp +++ b/dom/canvas/ImageBitmapRenderingContext.cpp @@ -239,7 +239,7 @@ ImageBitmapRenderingContext::GetCanvasLayer(nsDisplayListBuilder* aBuilder, imageLayer->SetContainer(imageContainer); } - nsAutoTArray imageList; + AutoTArray imageList; RefPtr image = ClipToIntrinsicSize(); imageList.AppendElement(ImageContainer::NonOwningImage(image)); imageContainer->SetCurrentImages(imageList); diff --git a/dom/events/Event.h b/dom/events/Event.h index 2dd50c50961..85fb0642d09 100644 --- a/dom/events/Event.h +++ b/dom/events/Event.h @@ -30,6 +30,7 @@ namespace mozilla { namespace dom { class EventTarget; +class EventMessageAutoOverride; class WantsPopupControlCheck; #define GENERATED_EVENT(EventClass_) class EventClass_; #include "mozilla/dom/GeneratedEventList.h" @@ -239,6 +240,7 @@ protected: void SetEventType(const nsAString& aEventTypeArg); already_AddRefed GetTargetFromFrame(); + friend class EventMessageAutoOverride; friend class WantsPopupControlCheck; void SetWantsPopupControlCheck(bool aCheck) { @@ -268,6 +270,48 @@ protected: bool mWantsPopupControlCheck; }; +/** + * RAII helper-class to override an event's message (i.e. its DOM-exposed + * type), for as long as the object is alive. Restores the original + * EventMessage when destructed. + * + * Notable requirements: + * - The original & overriding messages must be known (not eUnidentifiedEvent). + * - The original & overriding messages must be different. + * - The passed-in nsIDOMEvent must outlive this RAII helper. + */ +class MOZ_RAII EventMessageAutoOverride +{ +public: + explicit EventMessageAutoOverride(nsIDOMEvent* aEvent, + EventMessage aOverridingMessage) + : mEvent(aEvent->InternalDOMEvent()), + mOrigMessage(mEvent->mEvent->mMessage) + { + MOZ_ASSERT(aOverridingMessage != mOrigMessage, + "Don't use this class if you're not actually overriding"); + MOZ_ASSERT(aOverridingMessage != eUnidentifiedEvent, + "Only use this class with a valid overriding EventMessage"); + MOZ_ASSERT(mOrigMessage != eUnidentifiedEvent && + mEvent->mEvent->typeString.IsEmpty(), + "Only use this class on events whose overridden type is " + "known (so we can restore it properly)"); + + mEvent->mEvent->mMessage = aOverridingMessage; + } + + ~EventMessageAutoOverride() + { + mEvent->mEvent->mMessage = mOrigMessage; + } + +protected: + // Non-owning ref, which should be safe since we're a stack-allocated object + // with limited lifetime. Whoever creates us should keep mEvent alive. + Event* const MOZ_NON_OWNING_REF mEvent; + const EventMessage mOrigMessage; +}; + class MOZ_STACK_CLASS WantsPopupControlCheck { public: diff --git a/dom/events/EventListenerManager.cpp b/dom/events/EventListenerManager.cpp index 3ddb7dd9e48..bb4e09079b4 100644 --- a/dom/events/EventListenerManager.cpp +++ b/dom/events/EventListenerManager.cpp @@ -19,7 +19,9 @@ #include "mozilla/HalSensor.h" #include "mozilla/InternalMutationEvent.h" #include "mozilla/JSEventHandler.h" +#include "mozilla/Maybe.h" #include "mozilla/MemoryReporting.h" +#include "mozilla/Preferences.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/Element.h" #include "mozilla/dom/Event.h" @@ -95,6 +97,21 @@ MutationBitForEventType(EventMessage aEventType) uint32_t EventListenerManager::sMainThreadCreatedCount = 0; +static bool +IsWebkitPrefixSupportEnabled() +{ + static bool sIsWebkitPrefixSupportEnabled; + static bool sIsPrefCached = false; + + if (!sIsPrefCached) { + sIsPrefCached = true; + Preferences::AddBoolVarCache(&sIsWebkitPrefixSupportEnabled, + "layout.css.prefixes.webkit"); + } + + return sIsWebkitPrefixSupportEnabled; +} + EventListenerManagerBase::EventListenerManagerBase() : mNoListenerForEvent(eVoidEvent) , mMayHavePaintEventListener(false) @@ -603,9 +620,15 @@ EventListenerManager::RemoveEventListenerInternal( } bool -EventListenerManager::ListenerCanHandle(Listener* aListener, - WidgetEvent* aEvent) +EventListenerManager::ListenerCanHandle(const Listener* aListener, + const WidgetEvent* aEvent, + EventMessage aEventMessage) const + { + MOZ_ASSERT(aEventMessage == aEvent->mMessage || + aEventMessage == GetLegacyEventMessage(aEvent->mMessage), + "aEvent and aEventMessage should agree, modulo legacyness"); + // This is slightly different from EVENT_TYPE_EQUALS in that it returns // true even when aEvent->mMessage == eUnidentifiedEvent and // aListener=>mEventMessage != eUnidentifiedEvent as long as the atoms are @@ -620,7 +643,7 @@ EventListenerManager::ListenerCanHandle(Listener* aListener, return aListener->mTypeString.Equals(aEvent->typeString); } MOZ_ASSERT(mIsMainThreadELM); - return aListener->mEventMessage == aEvent->mMessage; + return aListener->mEventMessage == aEventMessage; } void @@ -1048,6 +1071,30 @@ EventListenerManager::HandleEventSubType(Listener* aListener, return result; } +EventMessage +EventListenerManager::GetLegacyEventMessage(EventMessage aEventMessage) const +{ + // (If we're off-main-thread, we can't check the pref; so we just behave as + // if it's disabled.) + if (mIsMainThreadELM && IsWebkitPrefixSupportEnabled()) { + // webkit-prefixed legacy events: + if (aEventMessage == eTransitionEnd) { + return eWebkitTransitionEnd; + } + if (aEventMessage == eAnimationStart) { + return eWebkitAnimationStart; + } + if (aEventMessage == eAnimationEnd) { + return eWebkitAnimationEnd; + } + if (aEventMessage == eAnimationIteration) { + return eWebkitAnimationIteration; + } + } + + return aEventMessage; +} + nsIDocShell* EventListenerManager::GetDocShellForTarget() { @@ -1104,77 +1151,107 @@ EventListenerManager::HandleEventInternal(nsPresContext* aPresContext, aEvent->mFlags.mDefaultPrevented = true; } - nsAutoTObserverArray::EndLimitedIterator iter(mListeners); Maybe popupStatePusher; if (mIsMainThreadELM) { popupStatePusher.emplace(Event::GetEventPopupControlState(aEvent, *aDOMEvent)); } bool hasListener = false; - while (iter.HasMore()) { - if (aEvent->mFlags.mImmediatePropagationStopped) { - break; - } - Listener* listener = &iter.GetNext(); - // Check that the phase is same in event and event listener. - // Handle only trusted events, except when listener permits untrusted events. - if (ListenerCanHandle(listener, aEvent)) { - hasListener = true; - if (listener->IsListening(aEvent) && - (aEvent->mFlags.mIsTrusted || - listener->mFlags.mAllowUntrustedEvents)) { - if (!*aDOMEvent) { - // This is tiny bit slow, but happens only once per event. - nsCOMPtr et = - do_QueryInterface(aEvent->originalTarget); - RefPtr event = EventDispatcher::CreateEvent(et, aPresContext, + bool usingLegacyMessage = false; + EventMessage eventMessage = aEvent->mMessage; + + while (true) { + nsAutoTObserverArray::EndLimitedIterator iter(mListeners); + Maybe legacyAutoOverride; + while (iter.HasMore()) { + if (aEvent->mFlags.mImmediatePropagationStopped) { + break; + } + Listener* listener = &iter.GetNext(); + // Check that the phase is same in event and event listener. + // Handle only trusted events, except when listener permits untrusted events. + if (ListenerCanHandle(listener, aEvent, eventMessage)) { + hasListener = true; + if (listener->IsListening(aEvent) && + (aEvent->mFlags.mIsTrusted || + listener->mFlags.mAllowUntrustedEvents)) { + if (!*aDOMEvent) { + // This is tiny bit slow, but happens only once per event. + nsCOMPtr et = + do_QueryInterface(aEvent->originalTarget); + RefPtr event = EventDispatcher::CreateEvent(et, aPresContext, aEvent, EmptyString()); - event.forget(aDOMEvent); - } - if (*aDOMEvent) { - if (!aEvent->currentTarget) { - aEvent->currentTarget = aCurrentTarget->GetTargetForDOMEvent(); - if (!aEvent->currentTarget) { - break; - } + event.forget(aDOMEvent); } - - // Maybe add a marker to the docshell's timeline, but only - // bother with all the logic if some docshell is recording. - nsDocShell* docShell; - RefPtr timelines = TimelineConsumers::Get(); - bool needsEndEventMarker = false; - - if (mIsMainThreadELM && - listener->mListenerType != Listener::eNativeListener) { - nsCOMPtr docShellComPtr = GetDocShellForTarget(); - if (docShellComPtr) { - docShell = static_cast(docShellComPtr.get()); - if (timelines && timelines->HasConsumer(docShell)) { - needsEndEventMarker = true; - nsAutoString typeStr; - (*aDOMEvent)->GetType(typeStr); - uint16_t phase; - (*aDOMEvent)->GetEventPhase(&phase); - timelines->AddMarkerForDocShell(docShell, Move( - MakeUnique( - typeStr, phase, MarkerTracingType::START))); + if (*aDOMEvent) { + if (!aEvent->currentTarget) { + aEvent->currentTarget = aCurrentTarget->GetTargetForDOMEvent(); + if (!aEvent->currentTarget) { + break; } } - } + if (usingLegacyMessage && !legacyAutoOverride) { + // Override the aDOMEvent's event-message (its .type) until we + // finish traversing listeners (when legacyAutoOverride destructs) + legacyAutoOverride.emplace(*aDOMEvent, eventMessage); + } - if (NS_FAILED(HandleEventSubType(listener, *aDOMEvent, aCurrentTarget))) { - aEvent->mFlags.mExceptionHasBeenRisen = true; - } + // Maybe add a marker to the docshell's timeline, but only + // bother with all the logic if some docshell is recording. + nsDocShell* docShell; + RefPtr timelines = TimelineConsumers::Get(); + bool needsEndEventMarker = false; - if (needsEndEventMarker) { - timelines->AddMarkerForDocShell( - docShell, "DOMEvent", MarkerTracingType::END); + if (mIsMainThreadELM && + listener->mListenerType != Listener::eNativeListener) { + nsCOMPtr docShellComPtr = GetDocShellForTarget(); + if (docShellComPtr) { + docShell = static_cast(docShellComPtr.get()); + if (timelines && timelines->HasConsumer(docShell)) { + needsEndEventMarker = true; + nsAutoString typeStr; + (*aDOMEvent)->GetType(typeStr); + uint16_t phase; + (*aDOMEvent)->GetEventPhase(&phase); + timelines->AddMarkerForDocShell(docShell, Move( + MakeUnique( + typeStr, phase, MarkerTracingType::START))); + } + } + } + + if (NS_FAILED(HandleEventSubType(listener, *aDOMEvent, aCurrentTarget))) { + aEvent->mFlags.mExceptionHasBeenRisen = true; + } + + if (needsEndEventMarker) { + timelines->AddMarkerForDocShell( + docShell, "DOMEvent", MarkerTracingType::END); + } } } } } + + // If we didn't find any matching listeners, and our event has a legacy + // version, we'll now switch to looking for that legacy version and we'll + // recheck our listeners. + if (hasListener || usingLegacyMessage) { + // (No need to recheck listeners, because we already found a match, or we + // already rechecked them.) + break; + } + EventMessage legacyEventMessage = GetLegacyEventMessage(eventMessage); + if (legacyEventMessage == eventMessage) { + break; // There's no legacy version of our event; no need to recheck. + } + MOZ_ASSERT(GetLegacyEventMessage(legacyEventMessage) == legacyEventMessage, + "Legacy event messages should not themselves have legacy versions"); + + // Recheck our listeners, using the legacy event message we just looked up: + eventMessage = legacyEventMessage; + usingLegacyMessage = true; } aEvent->currentTarget = nullptr; diff --git a/dom/events/EventListenerManager.h b/dom/events/EventListenerManager.h index 85660e77b37..57095bfb1d5 100644 --- a/dom/events/EventListenerManager.h +++ b/dom/events/EventListenerManager.h @@ -458,6 +458,13 @@ protected: nsIDOMEvent* aDOMEvent, dom::EventTarget* aCurrentTarget); + /** + * If the given EventMessage has a legacy version that we support, then this + * function returns that legacy version. Otherwise, this function simply + * returns the passed-in EventMessage. + */ + EventMessage GetLegacyEventMessage(EventMessage aEventMessage) const; + nsIDocShell* GetDocShellForTarget(); /** @@ -571,7 +578,9 @@ protected: nsPIDOMWindowInner* GetInnerWindowForTarget(); already_AddRefed GetTargetAsInnerWindow() const; - bool ListenerCanHandle(Listener* aListener, WidgetEvent* aEvent); + bool ListenerCanHandle(const Listener* aListener, + const WidgetEvent* aEvent, + EventMessage aEventMessage) const; // BE AWARE, a lot of instances of EventListenerManager will be created. // Therefor, we need to keep this class compact. When you add integer diff --git a/dom/events/EventNameList.h b/dom/events/EventNameList.h index 1fb978f32ef..b3846b3ee3d 100644 --- a/dom/events/EventNameList.h +++ b/dom/events/EventNameList.h @@ -924,6 +924,7 @@ NON_IDL_EVENT(MozEdgeUICompleted, EventNameType_None, eSimpleGestureEventClass) +// CSS Transition & Animation events: NON_IDL_EVENT(transitionend, eTransitionEnd, EventNameType_None, @@ -941,6 +942,24 @@ NON_IDL_EVENT(animationiteration, EventNameType_None, eAnimationEventClass) +// Webkit-prefixed versions of Transition & Animation events, for web compat: +NON_IDL_EVENT(webkitTransitionEnd, + eWebkitTransitionEnd, + EventNameType_None, + eTransitionEventClass) +NON_IDL_EVENT(webkitAnimationEnd, + eWebkitAnimationEnd, + EventNameType_None, + eAnimationEventClass) +NON_IDL_EVENT(webkitAnimationIteration, + eWebkitAnimationIteration, + EventNameType_None, + eAnimationEventClass) +NON_IDL_EVENT(webkitAnimationStart, + eWebkitAnimationStart, + EventNameType_None, + eAnimationEventClass) + NON_IDL_EVENT(audioprocess, eAudioProcess, EventNameType_None, diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index a324f80eb75..8b365157f43 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -731,7 +731,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext, if (modifierMask && (modifierMask == Prefs::ChromeAccessModifierMask() || modifierMask == Prefs::ContentAccessModifierMask())) { - nsAutoTArray accessCharCodes; + AutoTArray accessCharCodes; nsContentUtils::GetAccessKeyCandidates(keyEvent, accessCharCodes); if (HandleAccessKey(aPresContext, accessCharCodes, @@ -1291,7 +1291,7 @@ EventStateManager::HandleCrossProcessEvent(WidgetEvent* aEvent, // event to. // // NB: the elements of |targets| must be unique, for correctness. - nsAutoTArray, 1> targets; + AutoTArray, 1> targets; if (aEvent->mClass != eTouchEventClass || aEvent->mMessage == eTouchStart) { // If this event only has one target, and it's remote, add it to // the array. diff --git a/dom/events/TextComposition.h b/dom/events/TextComposition.h index f99da8ef09a..103d0b81e2c 100644 --- a/dom/events/TextComposition.h +++ b/dom/events/TextComposition.h @@ -429,7 +429,7 @@ private: */ class TextCompositionArray final : - public nsAutoTArray, 2> + public AutoTArray, 2> { public: // Looking for per native IME context. diff --git a/dom/events/test/mochitest.ini b/dom/events/test/mochitest.ini index 732087811a3..91e6582dc27 100644 --- a/dom/events/test/mochitest.ini +++ b/dom/events/test/mochitest.ini @@ -168,6 +168,7 @@ skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_eventTimeStamp.html] [test_focus_disabled.html] skip-if = buildapp == 'mulet' +[test_legacy_event.html] [test_messageEvent.html] [test_moz_mouse_pixel_scroll_event.html] skip-if = buildapp == 'b2g' # bug 1126090, no wheel events on b2g diff --git a/dom/events/test/test_legacy_event.html b/dom/events/test/test_legacy_event.html new file mode 100644 index 00000000000..c877975e080 --- /dev/null +++ b/dom/events/test/test_legacy_event.html @@ -0,0 +1,256 @@ + + + + + + Test for Bug 1236979 (events that have legacy alternative versions) + + + + + +Mozilla Bug 1236979 +

    + +
    +
    +
    + + diff --git a/dom/fetch/FetchDriver.cpp b/dom/fetch/FetchDriver.cpp index c05823ed248..21bb9faba18 100644 --- a/dom/fetch/FetchDriver.cpp +++ b/dom/fetch/FetchDriver.cpp @@ -338,7 +338,7 @@ FetchDriver::HttpFetch() // nsCORSListenerProxy. We just inform it which unsafe headers are included // in the request. if (mRequest->Mode() == RequestMode::Cors) { - nsAutoTArray unsafeHeaders; + AutoTArray unsafeHeaders; mRequest->Headers()->GetUnsafeHeaders(unsafeHeaders); nsCOMPtr loadInfo = chan->GetLoadInfo(); loadInfo->SetCorsPreflightInfo(unsafeHeaders, false); @@ -709,7 +709,7 @@ FetchDriver::SetRequestHeaders(nsIHttpChannel* aChannel) const { MOZ_ASSERT(aChannel); - nsAutoTArray headers; + AutoTArray headers; mRequest->Headers()->GetEntries(headers); bool hasAccept = false; for (uint32_t i = 0; i < headers.Length(); ++i) { diff --git a/dom/fetch/InternalHeaders.cpp b/dom/fetch/InternalHeaders.cpp index fccc9fc18f0..e8d1a76e7df 100644 --- a/dom/fetch/InternalHeaders.cpp +++ b/dom/fetch/InternalHeaders.cpp @@ -309,7 +309,7 @@ InternalHeaders::CORSHeaders(InternalHeaders* aHeaders) aHeaders->Get(NS_LITERAL_CSTRING("Access-Control-Expose-Headers"), acExposedNames, result); MOZ_ASSERT(!result.Failed()); - nsAutoTArray exposeNamesArray; + AutoTArray exposeNamesArray; nsCCharSeparatedTokenizer exposeTokens(acExposedNames, ','); while (exposeTokens.hasMoreTokens()) { const nsDependentCSubstring& token = exposeTokens.nextToken(); diff --git a/dom/gamepad/linux/LinuxGamepad.cpp b/dom/gamepad/linux/LinuxGamepad.cpp index 420f277d880..7cc52ec53ed 100644 --- a/dom/gamepad/linux/LinuxGamepad.cpp +++ b/dom/gamepad/linux/LinuxGamepad.cpp @@ -77,7 +77,7 @@ private: struct udev_monitor* mMonitor; guint mMonitorSourceID; // Information about currently connected gamepads. - nsAutoTArray mGamepads; + AutoTArray mGamepads; }; // singleton instance diff --git a/dom/html/HTMLAllCollection.cpp b/dom/html/HTMLAllCollection.cpp index 098fd3ffcf2..ff0c0c2a661 100644 --- a/dom/html/HTMLAllCollection.cpp +++ b/dom/html/HTMLAllCollection.cpp @@ -173,7 +173,7 @@ HTMLAllCollection::GetSupportedNames(unsigned aFlags, nsTArray& aNames // XXXbz this is very similar to nsContentList::GetSupportedNames, // but has to check IsAllNamedElement for the name case. - nsAutoTArray atoms; + AutoTArray atoms; for (uint32_t i = 0; i < Length(); ++i) { nsIContent *content = Item(i); if (content->HasID()) { diff --git a/dom/html/HTMLOptionsCollection.cpp b/dom/html/HTMLOptionsCollection.cpp index b4611aaf497..1435706179b 100644 --- a/dom/html/HTMLOptionsCollection.cpp +++ b/dom/html/HTMLOptionsCollection.cpp @@ -287,7 +287,7 @@ HTMLOptionsCollection::GetSupportedNames(unsigned aFlags, return; } - nsAutoTArray atoms; + AutoTArray atoms; for (uint32_t i = 0; i < mElements.Length(); ++i) { HTMLOptionElement* content = mElements.ElementAt(i); if (content) { diff --git a/dom/html/TimeRanges.cpp b/dom/html/TimeRanges.cpp index c817b53e203..debb81a2fa9 100644 --- a/dom/html/TimeRanges.cpp +++ b/dom/html/TimeRanges.cpp @@ -112,7 +112,7 @@ void TimeRanges::Normalize(double aTolerance) { if (mRanges.Length() >= 2) { - nsAutoTArray normalized; + AutoTArray normalized; mRanges.Sort(CompareTimeRanges()); @@ -147,7 +147,7 @@ TimeRanges::Union(const TimeRanges* aOtherRanges, double aTolerance) void TimeRanges::Intersection(const TimeRanges* aOtherRanges) { - nsAutoTArray intersection; + AutoTArray intersection; const nsTArray& otherRanges = aOtherRanges->mRanges; for (index_type i = 0, j = 0; i < mRanges.Length() && j < otherRanges.Length();) { diff --git a/dom/html/TimeRanges.h b/dom/html/TimeRanges.h index 5e9bb6f0047..306fe3ff0b8 100644 --- a/dom/html/TimeRanges.h +++ b/dom/html/TimeRanges.h @@ -93,7 +93,7 @@ private: } }; - nsAutoTArray mRanges; + AutoTArray mRanges; nsCOMPtr mParent; diff --git a/dom/html/nsHTMLContentSink.cpp b/dom/html/nsHTMLContentSink.cpp index 3a3b1c43d87..5be802274ed 100644 --- a/dom/html/nsHTMLContentSink.cpp +++ b/dom/html/nsHTMLContentSink.cpp @@ -160,7 +160,7 @@ protected: RefPtr mBody; RefPtr mHead; - nsAutoTArray mContextStack; + AutoTArray mContextStack; SinkContext* mCurrentContext; SinkContext* mHeadContext; diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp index 026580c7a52..b2d6f87d084 100644 --- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -838,10 +838,9 @@ MakeCompressedIndexDataValues( } nsresult -ReadCompressedIndexDataValuesFromBlob( - const uint8_t* aBlobData, - uint32_t aBlobDataLength, - FallibleTArray& aIndexValues) +ReadCompressedIndexDataValuesFromBlob(const uint8_t* aBlobData, + uint32_t aBlobDataLength, + nsTArray& aIndexValues) { MOZ_ASSERT(!NS_IsMainThread()); MOZ_ASSERT(!IsOnBackgroundThread()); @@ -916,10 +915,9 @@ ReadCompressedIndexDataValuesFromBlob( // static template nsresult -ReadCompressedIndexDataValuesFromSource( - T* aSource, - uint32_t aColumnIndex, - FallibleTArray& aIndexValues) +ReadCompressedIndexDataValuesFromSource(T* aSource, + uint32_t aColumnIndex, + nsTArray& aIndexValues) { MOZ_ASSERT(!NS_IsMainThread()); MOZ_ASSERT(!IsOnBackgroundThread()); @@ -963,7 +961,7 @@ ReadCompressedIndexDataValuesFromSource( nsresult ReadCompressedIndexDataValues(mozIStorageStatement* aStatement, uint32_t aColumnIndex, - FallibleTArray& aIndexValues) + nsTArray& aIndexValues) { return ReadCompressedIndexDataValuesFromSource(aStatement, aColumnIndex, @@ -973,7 +971,7 @@ ReadCompressedIndexDataValues(mozIStorageStatement* aStatement, nsresult ReadCompressedIndexDataValues(mozIStorageValueArray* aValues, uint32_t aColumnIndex, - FallibleTArray& aIndexValues) + nsTArray& aIndexValues) { return ReadCompressedIndexDataValuesFromSource(aValues, aColumnIndex, @@ -2768,7 +2766,7 @@ InsertIndexDataValuesFunction::OnFunctionCall(mozIStorageValueArray* aValues, // Read out the previous value. It may be NULL, in which case we'll just end // up with an empty array. - AutoFallibleTArray indexValues; + AutoTArray indexValues; nsresult rv = ReadCompressedIndexDataValues(aValues, 0, indexValues); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; @@ -3866,7 +3864,7 @@ private: nsresult ReadOldCompressedIDVFromBlob(const uint8_t* aBlobData, uint32_t aBlobDataLength, - FallibleTArray& aIndexValues); + nsTArray& aIndexValues); NS_IMETHOD OnFunctionCall(mozIStorageValueArray* aArguments, @@ -3879,7 +3877,7 @@ nsresult UpgradeIndexDataValuesFunction::ReadOldCompressedIDVFromBlob( const uint8_t* aBlobData, uint32_t aBlobDataLength, - FallibleTArray& aIndexValues) + nsTArray& aIndexValues) { MOZ_ASSERT(!NS_IsMainThread()); MOZ_ASSERT(!IsOnBackgroundThread()); @@ -3991,7 +3989,7 @@ UpgradeIndexDataValuesFunction::OnFunctionCall(mozIStorageValueArray* aArguments return rv; } - AutoFallibleTArray oldIdv; + AutoTArray oldIdv; rv = ReadOldCompressedIDVFromBlob(oldBlob, oldBlobLength, oldIdv); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; @@ -5862,10 +5860,9 @@ protected: Maybe& aMaybeUniqueIndexTable); static nsresult - IndexDataValuesFromUpdateInfos( - const nsTArray& aUpdateInfos, - const UniqueIndexTable& aUniqueIndexTable, - FallibleTArray& aIndexValues); + IndexDataValuesFromUpdateInfos(const nsTArray& aUpdateInfos, + const UniqueIndexTable& aUniqueIndexTable, + nsTArray& aIndexValues); static nsresult InsertIndexTableRows(DatabaseConnection* aConnection, @@ -7912,7 +7909,7 @@ private: nsresult RemoveReferencesToIndex(DatabaseConnection* aConnection, const Key& aObjectDataKey, - FallibleTArray& aIndexValues); + nsTArray& aIndexValues); virtual nsresult DoDatabaseWork(DatabaseConnection* aConnection) override; @@ -8050,7 +8047,7 @@ class ObjectStoreGetRequestOp final const uint32_t mObjectStoreId; RefPtr mDatabase; const OptionalKeyRange mOptionalKeyRange; - AutoFallibleTArray mResponse; + AutoTArray mResponse; PBackgroundParent* mBackgroundParent; const uint32_t mLimit; const bool mGetAll; @@ -8211,7 +8208,7 @@ class IndexGetRequestOp final RefPtr mDatabase; const OptionalKeyRange mOptionalKeyRange; - AutoFallibleTArray mResponse; + AutoTArray mResponse; PBackgroundParent* mBackgroundParent; const uint32_t mLimit; const bool mGetAll; @@ -8238,7 +8235,7 @@ class IndexGetKeyRequestOp final friend class TransactionBase; const OptionalKeyRange mOptionalKeyRange; - AutoFallibleTArray mResponse; + AutoTArray mResponse; const uint32_t mLimit; const bool mGetAll; @@ -16352,10 +16349,10 @@ QuotaClient::InitOrigin(PersistenceType aPersistenceType, // are database files then we need to cleanup stored files (if it's needed) // and also get the usage. - nsAutoTArray subdirsToProcess; + AutoTArray subdirsToProcess; nsTArray> unknownFiles; nsTHashtable validSubdirs(20); - nsAutoTArray initInfos; + AutoTArray initInfos; nsCOMPtr entries; rv = directory->GetDirectoryEntries(getter_AddRefs(entries)); @@ -18202,7 +18199,7 @@ DatabaseOperationBase::GetStructuredCloneReadInfoFromBlob( return NS_ERROR_FILE_CORRUPTED; } - AutoFallibleTArray uncompressed; + AutoTArray uncompressed; if (NS_WARN_IF(!uncompressed.SetLength(uncompressedLength, fallible))) { return NS_ERROR_OUT_OF_MEMORY; } @@ -18217,7 +18214,7 @@ DatabaseOperationBase::GetStructuredCloneReadInfoFromBlob( aInfo->mData.SwapElements(uncompressed); if (!aFileIds.IsVoid()) { - nsAutoTArray array; + AutoTArray array; nsresult rv = ConvertFileIdsToArray(aFileIds, array); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; @@ -18403,7 +18400,7 @@ nsresult DatabaseOperationBase::IndexDataValuesFromUpdateInfos( const nsTArray& aUpdateInfos, const UniqueIndexTable& aUniqueIndexTable, - FallibleTArray& aIndexValues) + nsTArray& aIndexValues) { MOZ_ASSERT(aIndexValues.IsEmpty()); MOZ_ASSERT_IF(!aUpdateInfos.IsEmpty(), aUniqueIndexTable.Count()); @@ -18723,7 +18720,7 @@ DatabaseOperationBase::DeleteObjectStoreDataTableRowsWithIndexes( } DatabaseConnection::CachedStatement deleteStmt; - AutoFallibleTArray indexValues; + AutoTArray indexValues; DebugOnly resultCountDEBUG = 0; @@ -23344,7 +23341,7 @@ UpdateIndexDataValuesFunction::OnFunctionCall(mozIStorageValueArray* aValues, const IndexMetadata& metadata = mOp->mMetadata; const int64_t& objectStoreId = mOp->mObjectStoreId; - nsAutoTArray updateInfos; + AutoTArray updateInfos; rv = IDBObjectStore::AppendIndexUpdateInfo(metadata.id(), metadata.keyPath(), metadata.unique(), @@ -23410,7 +23407,7 @@ UpdateIndexDataValuesFunction::OnFunctionCall(mozIStorageValueArray* aValues, return rv; } - AutoFallibleTArray indexValues; + AutoTArray indexValues; rv = ReadCompressedIndexDataValues(aValues, 1, indexValues); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; @@ -23509,10 +23506,9 @@ DeleteIndexOp::DeleteIndexOp(VersionChangeTransaction* aTransaction, } nsresult -DeleteIndexOp::RemoveReferencesToIndex( - DatabaseConnection* aConnection, - const Key& aObjectStoreKey, - FallibleTArray& aIndexValues) +DeleteIndexOp::RemoveReferencesToIndex(DatabaseConnection* aConnection, + const Key& aObjectStoreKey, + nsTArray& aIndexValues) { MOZ_ASSERT(!NS_IsMainThread()); MOZ_ASSERT(!IsOnBackgroundThread()); @@ -23767,7 +23763,7 @@ DeleteIndexOp::DoDatabaseWork(DatabaseConnection* aConnection) DatabaseConnection::CachedStatement nullIndexDataValuesStmt; Key lastObjectStoreKey; - AutoFallibleTArray lastIndexValues; + AutoTArray lastIndexValues; bool hasResult; while (NS_SUCCEEDED(rv = selectStmt->ExecuteStep(&hasResult)) && hasResult) { @@ -24111,7 +24107,7 @@ ObjectStoreAddOrPutRequestOp::RemoveOldIndexDataValues( } if (hasResult) { - AutoFallibleTArray existingIndexValues; + AutoTArray existingIndexValues; rv = ReadCompressedIndexDataValues(indexValuesStmt, 0, existingIndexValues); @@ -24639,7 +24635,7 @@ ObjectStoreAddOrPutRequestOp::DoDatabaseWork(DatabaseConnection* aConnection) MOZ_ASSERT(mUniqueIndexTable.isSome()); // Write the index_data_values column. - AutoFallibleTArray indexValues; + AutoTArray indexValues; rv = IndexDataValuesFromUpdateInfos(mParams.indexUpdateInfos(), mUniqueIndexTable.ref(), indexValues); diff --git a/dom/indexedDB/IDBDatabase.cpp b/dom/indexedDB/IDBDatabase.cpp index e9fb101b58e..c7ec6ecd30f 100644 --- a/dom/indexedDB/IDBDatabase.cpp +++ b/dom/indexedDB/IDBDatabase.cpp @@ -667,7 +667,7 @@ IDBDatabase::Transaction(const StringOrStringSequence& aStoreNames, return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR; } - nsAutoTArray stackSequence; + AutoTArray stackSequence; if (aStoreNames.IsString()) { stackSequence.AppendElement(aStoreNames.GetAsString()); @@ -848,8 +848,8 @@ IDBDatabase::AbortTransactions(bool aShouldWarn) class MOZ_STACK_CLASS Helper final { - typedef nsAutoTArray, 20> StrongTransactionArray; - typedef nsAutoTArray WeakTransactionArray; + typedef AutoTArray, 20> StrongTransactionArray; + typedef AutoTArray WeakTransactionArray; public: static void diff --git a/dom/indexedDB/Key.cpp b/dom/indexedDB/Key.cpp index fe3c8d4f1b1..c7fd28048c2 100644 --- a/dom/indexedDB/Key.cpp +++ b/dom/indexedDB/Key.cpp @@ -470,7 +470,7 @@ Key::EncodeLocaleString(const nsDependentString& aString, uint8_t aTypeOffset, } MOZ_ASSERT(collator); - nsAutoTArray keyBuffer; + AutoTArray keyBuffer; int32_t sortKeyLength = ucol_getSortKey(collator, ustr, length, keyBuffer.Elements(), keyBuffer.Length()); diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 5cfaaddebd0..79c37ba4151 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -607,7 +607,7 @@ ContentParentsMemoryReporter::CollectReports(nsIMemoryReporterCallback* cb, nsISupports* aClosure, bool aAnonymize) { - nsAutoTArray cps; + AutoTArray cps; ContentParent::GetAllEvenIfDead(cps); for (uint32_t i = 0; i < cps.Length(); i++) { @@ -911,7 +911,7 @@ ContentParent::JoinAllSubprocesses() { MOZ_ASSERT(NS_IsMainThread()); - nsAutoTArray processes; + AutoTArray processes; GetAll(processes); if (processes.IsEmpty()) { printf_stderr("There are no live subprocesses."); @@ -5145,7 +5145,7 @@ ContentParent::IgnoreIPCPrincipal() void ContentParent::NotifyUpdatedDictionaries() { - nsAutoTArray processes; + AutoTArray processes; GetAll(processes); nsCOMPtr spellChecker(do_GetService(NS_SPELLCHECKER_CONTRACTID)); diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index 5563adb6962..db35c241ba4 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -70,6 +70,7 @@ using class mozilla::dom::ipc::StructuredCloneData from "ipc/IPCMessageUtils.h"; using mozilla::EventMessage from "mozilla/EventForwards.h"; using nsEventStatus from "mozilla/EventForwards.h"; using nsSizeMode from "nsIWidgetListener.h"; +using mozilla::widget::CandidateWindowPosition from "ipc/nsGUIEventIPC.h"; namespace mozilla { namespace dom { @@ -284,7 +285,7 @@ parent: /** * Set IME candidate window by windowless plugin if plugin has focus. */ - async SetCandidateWindowForPlugin(int32_t aX, int32_t aY); + async SetCandidateWindowForPlugin(CandidateWindowPosition aPosition); /** * When plugin event isn't consumed, call this diff --git a/dom/ipc/PreallocatedProcessManager.cpp b/dom/ipc/PreallocatedProcessManager.cpp index 8bce3dc1a32..46c12f65780 100644 --- a/dom/ipc/PreallocatedProcessManager.cpp +++ b/dom/ipc/PreallocatedProcessManager.cpp @@ -71,8 +71,8 @@ private: CancelableTask* mPreallocateAppProcessTask; // The array containing the preallocated processes. 4 as the inline storage size - // should be enough so we don't need to grow the nsAutoTArray. - nsAutoTArray, 4> mSpareProcesses; + // should be enough so we don't need to grow the AutoTArray. + AutoTArray, 4> mSpareProcesses; // Nuwa process is ready for creating new process. bool mIsNuwaReady; diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index b403e39d2a8..42af6977f05 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -706,7 +706,7 @@ private: // Whether we have already received a FileDescriptor for the app package. bool mAppPackageFileDescriptorRecved; // At present only 1 of these is really expected. - nsAutoTArray, 1> + AutoTArray, 1> mCachedFileDescriptorInfos; nscolor mLastBackgroundColor; bool mDidFakeShow; @@ -734,7 +734,7 @@ private: CSSSize mUnscaledInnerSize; bool mDidSetRealShowInfo; - nsAutoTArray mAudioChannelsActive; + AutoTArray mAudioChannelsActive; DISALLOW_EVIL_CONSTRUCTORS(TabChild); }; diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 95de646b84c..3b0928980d4 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -1497,9 +1497,9 @@ bool TabParent::RecvRequestNativeKeyBindings(const WidgetKeyboardEvent& aEvent, MaybeNativeKeyBinding* aBindings) { - AutoInfallibleTArray singleLine; - AutoInfallibleTArray multiLine; - AutoInfallibleTArray richText; + AutoTArray singleLine; + AutoTArray multiLine; + AutoTArray richText; *aBindings = mozilla::void_t(); @@ -1711,9 +1711,9 @@ bool TabParent::SendRealKeyEvent(WidgetKeyboardEvent& event) if (event.mMessage == eKeyPress) { nsCOMPtr widget = GetWidget(); - AutoInfallibleTArray singleLine; - AutoInfallibleTArray multiLine; - AutoInfallibleTArray richText; + AutoTArray singleLine; + AutoTArray multiLine; + AutoTArray richText; widget->ExecuteNativeKeyBinding(nsIWidget::NativeKeyBindingsForSingleLineEditor, event, DoCommandCallback, &singleLine); @@ -2392,15 +2392,15 @@ TabParent::RecvSetPluginFocused(const bool& aFocused) } bool -TabParent::RecvSetCandidateWindowForPlugin(const int32_t& aX, - const int32_t& aY) +TabParent::RecvSetCandidateWindowForPlugin( + const CandidateWindowPosition& aPosition) { nsCOMPtr widget = GetWidget(); if (!widget) { return true; } - widget->SetCandidateWindowForPlugin(aX, aY); + widget->SetCandidateWindowForPlugin(aPosition); return true; } diff --git a/dom/ipc/TabParent.h b/dom/ipc/TabParent.h index ae221996501..080ff547c29 100644 --- a/dom/ipc/TabParent.h +++ b/dom/ipc/TabParent.h @@ -238,8 +238,8 @@ public: virtual bool RecvSetPluginFocused(const bool& aFocused) override; - virtual bool RecvSetCandidateWindowForPlugin(const int32_t& aX, - const int32_t& aY) override; + virtual bool RecvSetCandidateWindowForPlugin( + const widget::CandidateWindowPosition& aPosition) override; virtual bool RecvDefaultProcOfPluginEvent(const WidgetPluginEvent& aEvent) override; diff --git a/dom/locales/en-US/chrome/dom/dom.properties b/dom/locales/en-US/chrome/dom/dom.properties index c68d464b7c0..b8b874b5e6e 100644 --- a/dom/locales/en-US/chrome/dom/dom.properties +++ b/dom/locales/en-US/chrome/dom/dom.properties @@ -189,6 +189,16 @@ InterceptionRejectedResponseWithURL=Failed to load '%1$S'. A ServiceWorker passe # LOCALIZATION NOTE: Do not translate "ServiceWorker", "promise", "FetchEvent.respondWith()", or "Response". %1$S is a URL. %2$S is an error string. InterceptedNonResponseWithURL=Failed to load '%1$S'. A ServiceWorker passed a promise to FetchEvent.respondWith() that resolved with non-Response value '%2$S'. ExecCommandCutCopyDeniedNotInputDriven=document.execCommand('cut'/'copy') was denied because it was not called from inside a short running user-generated event handler. +ManifestShouldBeObject=Manifest should be an object. +ManifestScopeURLInvalid=The scope URL is invalid. +ManifestScopeNotSameOrigin=The scope URL must be same origin as document. +ManifestStartURLOutsideScope=The start URL is outside the scope, so the scope is invalid. +ManifestStartURLInvalid=The start URL is invalid. +ManifestStartURLShouldBeSameOrigin=The start URL must be same origin as document. +# LOCALIZATION NOTE: %1$S is the name of the object whose property is invalid. %2$S is the name of the invalid property. %3$S is the expected type of the property value. E.g. "Expected the manifest's start_url member to be a string." +ManifestInvalidType=Expected the %1$S's %2$S member to be a %3$S. +# LOCALIZATION NOTE: %1$S is the name of the property whose value is invalid. %2$S is the (invalid) value of the property. E.g. "theme_color: 42 is not a valid CSS color." +ManifestInvalidCSSColor=%1$S: %2$S is not a valid CSS color. PatternAttributeCompileFailure=Unable to check because the pattern is not a valid regexp: %S # LOCALIZATION NOTE: Do not translate "postMessage" or DOMWindow. %S values are origins, like https://domain.com:port TargetPrincipalDoesNotMatch=Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('%S') does not match the recipient window's origin ('%S'). diff --git a/dom/manifest/ImageObjectProcessor.jsm b/dom/manifest/ImageObjectProcessor.jsm index 33392048076..ab1975e3cea 100644 --- a/dom/manifest/ImageObjectProcessor.jsm +++ b/dom/manifest/ImageObjectProcessor.jsm @@ -6,7 +6,7 @@ * Implementation of Image Object processing algorithms from: * http://www.w3.org/TR/appmanifest/#image-object-and-its-members * - * This is intended to be used in conjunction with ManifestProcessor.js + * This is intended to be used in conjunction with ManifestProcessor.jsm * * Creates an object to process Image Objects as defined by the * W3C specification. This is used to process things like the diff --git a/dom/manifest/ManifestProcessor.jsm b/dom/manifest/ManifestProcessor.jsm index 71b1e9066c3..6d5e6e38a73 100644 --- a/dom/manifest/ManifestProcessor.jsm +++ b/dom/manifest/ManifestProcessor.jsm @@ -33,6 +33,7 @@ const orientationTypes = new Set(['any', 'natural', 'landscape', 'portrait', 'landscape-secondary' ]); Cu.import('resource://gre/modules/Console.jsm'); +Cu.import("resource://gre/modules/Services.jsm"); // ValueExtractor is used by the various processors to get values // from the manifest and to report errors. Cu.import('resource://gre/modules/ValueExtractor.jsm'); @@ -60,6 +61,8 @@ this.ManifestProcessor = { // jshint ignore:line manifestURL: aManifestURL, docURL: aDocURL }) { + const domBundle = Services.strings.createBundle("chrome://global/locale/dom/dom.properties"); + const console = new ConsoleAPI({ prefix: 'Web Manifest' }); @@ -70,11 +73,10 @@ this.ManifestProcessor = { // jshint ignore:line rawManifest = JSON.parse(jsonText); } catch (e) {} if (typeof rawManifest !== 'object' || rawManifest === null) { - let msg = 'Manifest needs to be an object.'; - console.warn(msg); + console.warn(domBundle.GetStringFromName('ManifestShouldBeObject')); rawManifest = {}; } - const extractor = new ValueExtractor(console); + const extractor = new ValueExtractor(console, domBundle); const imgObjProcessor = new ImageObjectProcessor(console, extractor); const processedManifest = { 'lang': processLangMember(), @@ -165,21 +167,17 @@ this.ManifestProcessor = { // jshint ignore:line try { scopeURL = new URL(value, manifestURL); } catch (e) { - let msg = 'The URL of scope is invalid.'; - console.warn(msg); + console.warn(domBundle.GetStringFromName('ManifestScopeURLInvalid')); return undefined; } if (scopeURL.origin !== docURL.origin) { - let msg = 'Scope needs to be same-origin as Document.'; - console.warn(msg); + console.warn(domBundle.GetStringFromName('ManifestScopeNotSameOrigin')); return undefined; } // If start URL is not within scope of scope URL: let isSameOrigin = startURL && startURL.origin !== scopeURL.origin; if (isSameOrigin || !startURL.pathname.startsWith(scopeURL.pathname)) { - let msg = - 'The start URL is outside the scope, so scope is invalid.'; - console.warn(msg); + console.warn(domBundle.GetStringFromName('ManifestStartURLOutsideScope')); return undefined; } return scopeURL.href; @@ -202,12 +200,11 @@ this.ManifestProcessor = { // jshint ignore:line try { potentialResult = new URL(value, manifestURL); } catch (e) { - console.warn('Invalid URL.'); + console.warn(domBundle.GetStringFromName('ManifestStartURLInvalid')) return result; } if (potentialResult.origin !== docURL.origin) { - let msg = 'start_url must be same origin as document.'; - console.warn(msg); + console.warn(domBundle.GetStringFromName('ManifestStartURLShouldBeSameOrigin')); } else { result = potentialResult.href; } diff --git a/dom/manifest/ValueExtractor.jsm b/dom/manifest/ValueExtractor.jsm index b1dd034a3a8..f3dd259053c 100644 --- a/dom/manifest/ValueExtractor.jsm +++ b/dom/manifest/ValueExtractor.jsm @@ -12,8 +12,9 @@ const { interfaces: Ci } = Components; -function ValueExtractor(aConsole) { +function ValueExtractor(aConsole, aBundle) { this.console = aConsole; + this.domBundle = aBundle; } ValueExtractor.prototype = { @@ -32,9 +33,9 @@ ValueExtractor.prototype = { const type = (isArray) ? 'array' : typeof value; if (type !== expectedType) { if (type !== 'undefined') { - let msg = `Expected the ${objectName}'s ${property} `; - msg += `member to be a ${expectedType}.`; - this.console.log(msg); + this.console.warn(this.domBundle.formatStringFromName("ManifestInvalidType", + [objectName, property, expectedType], + 3)); } return undefined; } @@ -53,8 +54,9 @@ ValueExtractor.prototype = { if (DOMUtils.isValidCSSColor(value)) { color = value; } else if (value) { - const msg = `${spec.property}: ${value} is not a valid CSS color.`; - this.console.warn(msg); + this.console.warn(this.domBundle.formatStringFromName("ManifestInvalidCSSColor", + [spec.property, value], + 2)); } return color; } diff --git a/dom/manifest/test/mochitest.ini b/dom/manifest/test/mochitest.ini index 086896de07d..73c7dd6c071 100644 --- a/dom/manifest/test/mochitest.ini +++ b/dom/manifest/test/mochitest.ini @@ -17,3 +17,4 @@ support-files = [test_ManifestProcessor_scope.html] [test_ManifestProcessor_splash_screens.html] [test_ManifestProcessor_start_url.html] +[test_ManifestProcessor_warnings.html] diff --git a/dom/manifest/test/test_ManifestProcessor_warnings.html b/dom/manifest/test/test_ManifestProcessor_warnings.html new file mode 100644 index 00000000000..e8190918b3e --- /dev/null +++ b/dom/manifest/test/test_ManifestProcessor_warnings.html @@ -0,0 +1,90 @@ + + + + + + Test for Bug 1086997 + + + + + diff --git a/dom/media/AbstractMediaDecoder.h b/dom/media/AbstractMediaDecoder.h index 8ca77ce008b..f4764bbbd3f 100644 --- a/dom/media/AbstractMediaDecoder.h +++ b/dom/media/AbstractMediaDecoder.h @@ -37,11 +37,6 @@ static inline bool IsCurrentThread(nsIThread* aThread) { return NS_GetCurrentThread() == aThread; } -enum class MediaDecoderEventVisibility : int8_t { - Observable, - Suppressed -}; - /** * The AbstractMediaDecoder class describes the public interface for a media decoder * and is used by the MediaReader classes. diff --git a/dom/media/AudioCaptureStream.cpp b/dom/media/AudioCaptureStream.cpp index 459d1cba81e..5d192d8320f 100644 --- a/dom/media/AudioCaptureStream.cpp +++ b/dom/media/AudioCaptureStream.cpp @@ -102,8 +102,8 @@ AudioCaptureStream::MixerCallback(AudioDataValue* aMixedBuffer, AudioSampleFormat aFormat, uint32_t aChannels, uint32_t aFrames, uint32_t aSampleRate) { - nsAutoTArray, MONO> output; - nsAutoTArray bufferPtrs; + AutoTArray, MONO> output; + AutoTArray bufferPtrs; output.SetLength(MONO); bufferPtrs.SetLength(MONO); diff --git a/dom/media/AudioSegment.cpp b/dom/media/AudioSegment.cpp index 56a4f46cf37..1f242157323 100644 --- a/dom/media/AudioSegment.cpp +++ b/dom/media/AudioSegment.cpp @@ -85,9 +85,9 @@ void AudioSegment::Mix(AudioMixer& aMixer, uint32_t aOutputChannels, uint32_t aSampleRate) { - nsAutoTArray + AutoTArray buf; - nsAutoTArray channelData; + AutoTArray channelData; uint32_t offsetSamples = 0; uint32_t duration = GetDuration(); @@ -132,7 +132,7 @@ AudioSegment::Mix(AudioMixer& aMixer, uint32_t aOutputChannels, MOZ_ASSERT(channelData.Length() == aOutputChannels); } else if (channelData.Length() > aOutputChannels) { // Down mix. - nsAutoTArray outChannelPtrs; + AutoTArray outChannelPtrs; outChannelPtrs.SetLength(aOutputChannels); uint32_t offsetSamples = 0; for (uint32_t channel = 0; channel < aOutputChannels; channel++) { @@ -166,7 +166,7 @@ AudioSegment::Mix(AudioMixer& aMixer, uint32_t aOutputChannels, void AudioSegment::WriteTo(uint64_t aID, AudioMixer& aMixer, uint32_t aOutputChannels, uint32_t aSampleRate) { - nsAutoTArray buf; + AutoTArray buf; // Offset in the buffer that will be written to the mixer, in samples. uint32_t offset = 0; diff --git a/dom/media/AudioSegment.h b/dom/media/AudioSegment.h index e2880dadc37..252b7e5747c 100644 --- a/dom/media/AudioSegment.h +++ b/dom/media/AudioSegment.h @@ -118,8 +118,8 @@ DownmixAndInterleave(const nsTArray& aChannelData, InterleaveAndConvertBuffer(aChannelData.Elements(), aDuration, aVolume, aOutputChannels, aOutput); } else { - nsAutoTArray outputChannelData; - nsAutoTArray outputBuffers; + AutoTArray outputChannelData; + AutoTArray outputBuffers; outputChannelData.SetLength(aOutputChannels); outputBuffers.SetLength(aDuration * aOutputChannels); for (uint32_t i = 0; i < aOutputChannels; i++) { @@ -254,8 +254,8 @@ public: #endif for (ChunkIterator ci(*this); !ci.IsEnded(); ci.Next()) { - nsAutoTArray, GUESS_AUDIO_CHANNELS> output; - nsAutoTArray bufferPtrs; + AutoTArray, GUESS_AUDIO_CHANNELS> output; + AutoTArray bufferPtrs; AudioChunk& c = *ci; // If this chunk is null, don't bother resampling, just alter its duration if (c.IsNull()) { @@ -395,7 +395,7 @@ void WriteChunk(AudioChunk& aChunk, uint32_t aOutputChannels, AudioDataValue* aOutputBuffer) { - nsAutoTArray channelData; + AutoTArray channelData; channelData = aChunk.ChannelData(); diff --git a/dom/media/AudioStream.cpp b/dom/media/AudioStream.cpp index 087a0b5a474..4290669caab 100644 --- a/dom/media/AudioStream.cpp +++ b/dom/media/AudioStream.cpp @@ -113,7 +113,7 @@ public: } } private: - nsAutoTArray mChunks; + AutoTArray mChunks; int64_t mBaseOffset; double mBasePosition; }; @@ -287,7 +287,7 @@ WriteDumpFile(FILE* aDumpFile, AudioStream* aStream, uint32_t aFrames, } NS_ASSERTION(AUDIO_OUTPUT_FORMAT == AUDIO_FORMAT_FLOAT32, "bad format"); - nsAutoTArray buf; + AutoTArray buf; buf.SetLength(samples*2); float* input = static_cast(aBuffer); uint8_t* output = buf.Elements(); @@ -616,7 +616,7 @@ AudioStream::GetTimeStretched(AudioBufferWriter& aWriter) mTimeStretcher->putSamples(c->Data(), c->Frames()); } else { // Write silence if downmixing fails. - nsAutoTArray buf; + AutoTArray buf; buf.SetLength(mOutChannels * c->Frames()); memset(buf.Elements(), 0, buf.Length() * sizeof(AudioDataValue)); mTimeStretcher->putSamples(buf.Elements(), c->Frames()); diff --git a/dom/media/DOMMediaStream.h b/dom/media/DOMMediaStream.h index 03d622242ae..ffb30b13d5b 100644 --- a/dom/media/DOMMediaStream.h +++ b/dom/media/DOMMediaStream.h @@ -583,10 +583,10 @@ protected: RefPtr mPlaybackPort; // MediaStreamTracks corresponding to tracks in our mOwnedStream. - nsAutoTArray, 2> mOwnedTracks; + AutoTArray, 2> mOwnedTracks; // MediaStreamTracks corresponding to tracks in our mPlaybackStream. - nsAutoTArray, 2> mTracks; + AutoTArray, 2> mTracks; RefPtr mOwnedListener; RefPtr mPlaybackListener; diff --git a/dom/media/FileBlockCache.h b/dom/media/FileBlockCache.h index a32bfb638a2..58ac3942277 100644 --- a/dom/media/FileBlockCache.h +++ b/dom/media/FileBlockCache.h @@ -202,7 +202,7 @@ private: // main thread). nsCOMPtr mThread; // Queue of pending block indexes that need to be written or moved. - //nsAutoTArray mChangeIndexList; + //AutoTArray mChangeIndexList; Int32Queue mChangeIndexList; // True if we've dispatched an event to commit all pending block changes // to file on mThread. diff --git a/dom/media/GraphDriver.cpp b/dom/media/GraphDriver.cpp index 24532b6432f..82325f6bdf4 100644 --- a/dom/media/GraphDriver.cpp +++ b/dom/media/GraphDriver.cpp @@ -1098,7 +1098,7 @@ AudioCallbackDriver::EnqueueStreamAndPromiseForOperation(MediaStream* aStream, void AudioCallbackDriver::CompleteAudioContextOperations(AsyncCubebOperation aOperation) { - nsAutoTArray array; + AutoTArray array; // We can't lock for the whole function because AudioContextOperationCompleted // will grab the monitor diff --git a/dom/media/GraphDriver.h b/dom/media/GraphDriver.h index 319bdda05c8..b079f8cce8b 100644 --- a/dom/media/GraphDriver.h +++ b/dom/media/GraphDriver.h @@ -519,7 +519,7 @@ private: * shutdown of the audio stream. */ nsCOMPtr mInitShutdownThread; /* This must be accessed with the graph monitor held. */ - nsAutoTArray mPromisesForOperation; + AutoTArray mPromisesForOperation; /* This is set during initialization, and can be read safely afterwards. */ dom::AudioChannel mAudioChannel; /* Used to queue us to add the mixer callback on first run. */ diff --git a/dom/media/Intervals.h b/dom/media/Intervals.h index fa3ea2ed08e..4e0cbf161ff 100644 --- a/dom/media/Intervals.h +++ b/dom/media/Intervals.h @@ -255,7 +255,7 @@ class IntervalSet public: typedef IntervalSet SelfType; typedef Interval ElemType; - typedef nsAutoTArray ContainerType; + typedef AutoTArray ContainerType; typedef typename ContainerType::index_type IndexType; IntervalSet() diff --git a/dom/media/MediaCache.cpp b/dom/media/MediaCache.cpp index a9c76e7621b..0ee735272e4 100644 --- a/dom/media/MediaCache.cpp +++ b/dom/media/MediaCache.cpp @@ -794,7 +794,7 @@ MediaCache::FindReusableBlock(TimeStamp aNow, // predicted time of next use". We can exploit the fact that the block // linked lists are ordered by increasing time of next use. This is // actually the whole point of having the linked lists. - nsAutoTArray candidates; + AutoTArray candidates; for (uint32_t i = 0; i < mStreams.Length(); ++i) { MediaCacheStream* stream = mStreams[i]; if (stream->mPinCount > 0) { @@ -1040,7 +1040,7 @@ MediaCache::Update() // decisions while holding the cache lock but implement those decisions // without holding the cache lock, since we need to call out to // stream, decoder and element code. - nsAutoTArray actions; + AutoTArray actions; { ReentrantMonitorAutoEnter mon(mReentrantMonitor); diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index 323294ca958..db5b9ed9159 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -805,9 +805,7 @@ MediaDecoder::Seek(double aTime, SeekTarget::Type aSeekType) MOZ_ASSERT(!mIsDormant, "should be out of dormant by now"); MOZ_ASSERT(aTime >= 0.0, "Cannot seek to a negative value."); - int64_t timeUsecs = 0; - nsresult rv = SecondsToUsecs(aTime, timeUsecs); - NS_ENSURE_SUCCESS(rv, rv); + int64_t timeUsecs = TimeUnit::FromSeconds(aTime).ToMicroseconds(); mLogicalPosition = aTime; mWasEndedWhenEnteredDormant = false; diff --git a/dom/media/MediaDecoder.h b/dom/media/MediaDecoder.h index 72b01840034..0542703cca7 100644 --- a/dom/media/MediaDecoder.h +++ b/dom/media/MediaDecoder.h @@ -36,6 +36,7 @@ #include "MediaStatistics.h" #include "MediaStreamGraph.h" #include "TimeUnits.h" +#include "SeekTarget.h" class nsIStreamListener; class nsIPrincipal; @@ -53,51 +54,6 @@ enum class MediaEventType : int8_t; #undef GetCurrentTime #endif -// Stores the seek target; the time to seek to, and whether an Accurate, -// or "Fast" (nearest keyframe) seek was requested. -struct SeekTarget { - enum Type { - Invalid, - PrevSyncPoint, - Accurate - }; - SeekTarget() - : mTime(-1.0) - , mType(SeekTarget::Invalid) - , mEventVisibility(MediaDecoderEventVisibility::Observable) - { - } - SeekTarget(int64_t aTimeUsecs, - Type aType, - MediaDecoderEventVisibility aEventVisibility = - MediaDecoderEventVisibility::Observable) - : mTime(aTimeUsecs) - , mType(aType) - , mEventVisibility(aEventVisibility) - { - } - SeekTarget(const SeekTarget& aOther) - : mTime(aOther.mTime) - , mType(aOther.mType) - , mEventVisibility(aOther.mEventVisibility) - { - } - bool IsValid() const { - return mType != SeekTarget::Invalid; - } - void Reset() { - mTime = -1; - mType = SeekTarget::Invalid; - } - // Seek target time in microseconds. - int64_t mTime; - // Whether we should seek "Fast", or "Accurate". - // "Fast" seeks to the seek point preceeding mTime, whereas - // "Accurate" seeks as close as possible to mTime. - Type mType; - MediaDecoderEventVisibility mEventVisibility; -}; - class MediaDecoder : public AbstractMediaDecoder { public: diff --git a/dom/media/MediaDecoderReader.h b/dom/media/MediaDecoderReader.h index 1cc1d55f0c2..30d55438601 100644 --- a/dom/media/MediaDecoderReader.h +++ b/dom/media/MediaDecoderReader.h @@ -17,6 +17,7 @@ #include "AudioCompactor.h" #include "Intervals.h" #include "TimeUnits.h" +#include "SeekTarget.h" namespace mozilla { @@ -78,7 +79,7 @@ public: MozPromise, NotDecodedReason, IsExclusive>; using VideoDataPromise = MozPromise, NotDecodedReason, IsExclusive>; - using SeekPromise = MozPromise; + using SeekPromise = MozPromise; // Note that, conceptually, WaitForData makes sense in a non-exclusive sense. // But in the current architecture it's only ever used exclusively (by MDSM), @@ -177,7 +178,7 @@ public: // Moves the decode head to aTime microseconds. aEndTime denotes the end // time of the media in usecs. This is only needed for OggReader, and should // probably be removed somehow. - virtual RefPtr Seek(int64_t aTime, int64_t aEndTime) = 0; + virtual RefPtr Seek(SeekTarget aTarget, int64_t aEndTime) = 0; // Called to move the reader into idle state. When the reader is // created it is assumed to be active (i.e. not idle). When the media diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index ea38cb8a5a0..772555428b3 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -647,8 +647,8 @@ MediaDecoderStateMachine::OnAudioDecoded(MediaData* aAudioSample) if (!mDropAudioUntilNextDiscontinuity) { // We must be after the discontinuity; we're receiving samples // at or after the seek target. - if (mCurrentSeek.mTarget.mType == SeekTarget::PrevSyncPoint && - mCurrentSeek.mTarget.mTime > mCurrentTimeBeforeSeek && + if (mCurrentSeek.mTarget.IsFast() && + mCurrentSeek.mTarget.GetTime().ToMicroseconds() > mCurrentTimeBeforeSeek && audio->mTime < mCurrentTimeBeforeSeek) { // We are doing a fastSeek, but we ended up *before* the previous // playback position. This is surprising UX, so switch to an accurate @@ -656,9 +656,9 @@ MediaDecoderStateMachine::OnAudioDecoded(MediaData* aAudioSample) // spec, fastSeek should always be fast, but until we get the time to // change all Readers to seek to the keyframe after the currentTime // in this case, we'll just decode forward. Bug 1026330. - mCurrentSeek.mTarget.mType = SeekTarget::Accurate; + mCurrentSeek.mTarget.SetType(SeekTarget::Accurate); } - if (mCurrentSeek.mTarget.mType == SeekTarget::PrevSyncPoint) { + if (mCurrentSeek.mTarget.IsFast()) { // Non-precise seek; we can stop the seek at the first sample. Push(audio, MediaData::AUDIO_DATA); } else { @@ -967,8 +967,8 @@ MediaDecoderStateMachine::OnVideoDecoded(MediaData* aVideoSample) if (!mDropVideoUntilNextDiscontinuity) { // We must be after the discontinuity; we're receiving samples // at or after the seek target. - if (mCurrentSeek.mTarget.mType == SeekTarget::PrevSyncPoint && - mCurrentSeek.mTarget.mTime > mCurrentTimeBeforeSeek && + if (mCurrentSeek.mTarget.IsFast() && + mCurrentSeek.mTarget.GetTime().ToMicroseconds() > mCurrentTimeBeforeSeek && video->mTime < mCurrentTimeBeforeSeek) { // We are doing a fastSeek, but we ended up *before* the previous // playback position. This is surprising UX, so switch to an accurate @@ -976,9 +976,9 @@ MediaDecoderStateMachine::OnVideoDecoded(MediaData* aVideoSample) // spec, fastSeek should always be fast, but until we get the time to // change all Readers to seek to the keyframe after the currentTime // in this case, we'll just decode forward. Bug 1026330. - mCurrentSeek.mTarget.mType = SeekTarget::Accurate; + mCurrentSeek.mTarget.SetType(SeekTarget::Accurate); } - if (mCurrentSeek.mTarget.mType == SeekTarget::PrevSyncPoint || + if (mCurrentSeek.mTarget.IsFast() || mPendingSeek.Exists()) { // Non-precise seek; or a pending seek exists ; we can stop the seek // at the first sample. @@ -1524,7 +1524,7 @@ MediaDecoderStateMachine::Seek(SeekTarget aTarget) mPendingSeek.RejectIfExists(__func__); mPendingSeek.mTarget = aTarget; - DECODER_LOG("Changed state to SEEKING (to %lld)", mPendingSeek.mTarget.mTime); + DECODER_LOG("Changed state to SEEKING (to %lld)", mPendingSeek.mTarget.GetTime().ToMicroseconds()); SetState(DECODER_STATE_SEEKING); ScheduleStateMachine(); @@ -1618,12 +1618,12 @@ MediaDecoderStateMachine::InitiateSeek() // Bound the seek time to be inside the media range. int64_t end = Duration().ToMicroseconds(); NS_ASSERTION(end != -1, "Should know end time by now"); - int64_t seekTime = mCurrentSeek.mTarget.mTime; + int64_t seekTime = mCurrentSeek.mTarget.GetTime().ToMicroseconds(); seekTime = std::min(seekTime, end); seekTime = std::max(int64_t(0), seekTime); NS_ASSERTION(seekTime >= 0 && seekTime <= end, "Can only seek in range [0,duration]"); - mCurrentSeek.mTarget.mTime = seekTime; + mCurrentSeek.mTarget.SetTime(media::TimeUnit::FromMicroseconds(seekTime)); mDropAudioUntilNextDiscontinuity = HasAudio(); mDropVideoUntilNextDiscontinuity = HasVideo(); @@ -1633,7 +1633,7 @@ MediaDecoderStateMachine::InitiateSeek() // dispatching SeekingStarted, playback doesn't advance and mess with // mCurrentPosition that we've setting to seekTime here. StopPlayback(); - UpdatePlaybackPositionInternal(mCurrentSeek.mTarget.mTime); + UpdatePlaybackPositionInternal(mCurrentSeek.mTarget.GetTime().ToMicroseconds()); mOnSeekingStart.Notify(mCurrentSeek.mTarget.mEventVisibility); @@ -1642,11 +1642,13 @@ MediaDecoderStateMachine::InitiateSeek() // Do the seek. RefPtr self = this; + SeekTarget seekTarget = mCurrentSeek.mTarget; + seekTarget.SetTime(seekTarget.GetTime() + media::TimeUnit::FromMicroseconds(StartTime())); mSeekRequest.Begin(InvokeAsync(DecodeTaskQueue(), mReader.get(), __func__, - &MediaDecoderReader::Seek, mCurrentSeek.mTarget.mTime + StartTime(), + &MediaDecoderReader::Seek, seekTarget, Duration().ToMicroseconds()) ->Then(OwnerThread(), __func__, - [self] (int64_t) -> void { + [self] (media::TimeUnit) -> void { self->mSeekRequest.Complete(); // We must decode the first samples of active streams, so we can determine // the new stream time. So dispatch tasks to do that. @@ -2080,7 +2082,7 @@ MediaDecoderStateMachine::SeekCompleted() MOZ_ASSERT(OnTaskQueue()); MOZ_ASSERT(mState == DECODER_STATE_SEEKING); - int64_t seekTime = mCurrentSeek.mTarget.mTime; + int64_t seekTime = mCurrentSeek.mTarget.GetTime().ToMicroseconds(); int64_t newCurrentTime = seekTime; // Setup timestamp state. @@ -2095,9 +2097,16 @@ MediaDecoderStateMachine::SeekCompleted() // While seeking to a position where there's only either audio or video, or // seeking to a position lies before audio or video, we need to check if // seekTime is bounded in suitable duration. See Bug 1112438. - int64_t videoStart = video ? video->mTime : seekTime; int64_t audioStart = audio ? audio->mTime : seekTime; - newCurrentTime = std::min(audioStart, videoStart); + // We only pin the seek time to the video start time if the video frame + // contains the seek time. We also perform this operation if there's no + // video in order to get around bug 1244639. + if (!video || (video->mTime <= seekTime && video->GetEndTime() > seekTime)) { + int64_t videoStart = video ? video->mTime : seekTime; + newCurrentTime = std::min(audioStart, videoStart); + } else { + newCurrentTime = audioStart; + } } else { newCurrentTime = video ? video->mTime : seekTime; } @@ -2505,7 +2514,7 @@ MediaDecoderStateMachine::DropVideoUpToSeekTarget(MediaData* aSample) DECODER_LOG("DropVideoUpToSeekTarget() frame [%lld, %lld]", video->mTime, video->GetEndTime()); MOZ_ASSERT(mCurrentSeek.Exists()); - const int64_t target = mCurrentSeek.mTarget.mTime; + const int64_t target = mCurrentSeek.mTarget.GetTime().ToMicroseconds(); // If the frame end time is less than the seek target, we won't want // to display this frame after the seek, so discard it. @@ -2539,7 +2548,7 @@ MediaDecoderStateMachine::DropAudioUpToSeekTarget(MediaData* aSample) RefPtr audio(aSample->As()); MOZ_ASSERT(audio && mCurrentSeek.Exists() && - mCurrentSeek.mTarget.mType == SeekTarget::Accurate); + mCurrentSeek.mTarget.IsAccurate()); CheckedInt64 sampleDuration = FramesToUsecs(audio->mFrames, mInfo.mAudio.mRate); @@ -2547,13 +2556,13 @@ MediaDecoderStateMachine::DropAudioUpToSeekTarget(MediaData* aSample) return NS_ERROR_FAILURE; } - if (audio->mTime + sampleDuration.value() <= mCurrentSeek.mTarget.mTime) { + if (audio->mTime + sampleDuration.value() <= mCurrentSeek.mTarget.GetTime().ToMicroseconds()) { // Our seek target lies after the frames in this AudioData. Don't // push it onto the audio queue, and keep decoding forwards. return NS_OK; } - if (audio->mTime > mCurrentSeek.mTarget.mTime) { + if (audio->mTime > mCurrentSeek.mTarget.GetTime().ToMicroseconds()) { // The seek target doesn't lie in the audio block just after the last // audio frames we've seen which were before the seek target. This // could have been the first audio data we've seen after seek, i.e. the @@ -2569,13 +2578,13 @@ MediaDecoderStateMachine::DropAudioUpToSeekTarget(MediaData* aSample) // The seek target lies somewhere in this AudioData's frames, strip off // any frames which lie before the seek target, so we'll begin playback // exactly at the seek target. - NS_ASSERTION(mCurrentSeek.mTarget.mTime >= audio->mTime, + NS_ASSERTION(mCurrentSeek.mTarget.GetTime().ToMicroseconds() >= audio->mTime, "Target must at or be after data start."); - NS_ASSERTION(mCurrentSeek.mTarget.mTime < audio->mTime + sampleDuration.value(), + NS_ASSERTION(mCurrentSeek.mTarget.GetTime().ToMicroseconds() < audio->mTime + sampleDuration.value(), "Data must end after target."); CheckedInt64 framesToPrune = - UsecsToFrames(mCurrentSeek.mTarget.mTime - audio->mTime, mInfo.mAudio.mRate); + UsecsToFrames(mCurrentSeek.mTarget.GetTime().ToMicroseconds() - audio->mTime, mInfo.mAudio.mRate); if (!framesToPrune.isValid()) { return NS_ERROR_FAILURE; } @@ -2596,7 +2605,7 @@ MediaDecoderStateMachine::DropAudioUpToSeekTarget(MediaData* aSample) return NS_ERROR_FAILURE; } RefPtr data(new AudioData(audio->mOffset, - mCurrentSeek.mTarget.mTime, + mCurrentSeek.mTarget.GetTime().ToMicroseconds(), duration.value(), frames, Move(audioData), diff --git a/dom/media/MediaFormatReader.cpp b/dom/media/MediaFormatReader.cpp index f7d06bfcc84..b3e9590c418 100644 --- a/dom/media/MediaFormatReader.cpp +++ b/dom/media/MediaFormatReader.cpp @@ -929,8 +929,8 @@ MediaFormatReader::HandleDemuxedSamples(TrackType aTrack, decoder.mQueuedSamples.AppendElements(Move(samples)); NotifyDecodingRequested(aTrack); } else { - SeekTarget seekTarget = - decoder.mTimeThreshold.refOr(SeekTarget(TimeUnit::FromMicroseconds(sample->mTime), false)); + InternalSeekTarget seekTarget = + decoder.mTimeThreshold.refOr(InternalSeekTarget(TimeUnit::FromMicroseconds(sample->mTime), false)); LOG("Stream change occurred on a non-keyframe. Seeking to:%lld", seekTarget.mTime.ToMicroseconds()); InternalSeek(aTrack, seekTarget); @@ -968,7 +968,7 @@ MediaFormatReader::HandleDemuxedSamples(TrackType aTrack, } void -MediaFormatReader::InternalSeek(TrackType aTrack, const SeekTarget& aTarget) +MediaFormatReader::InternalSeek(TrackType aTrack, const InternalSeekTarget& aTarget) { MOZ_ASSERT(OnTaskQueue()); auto& decoder = GetDecoderData(aTrack); @@ -1058,7 +1058,7 @@ MediaFormatReader::Update(TrackType aTrack) // Drop any frames found prior our internal seek target. while (decoder.mTimeThreshold && decoder.mOutput.Length()) { RefPtr& output = decoder.mOutput[0]; - SeekTarget target = decoder.mTimeThreshold.ref(); + InternalSeekTarget target = decoder.mTimeThreshold.ref(); media::TimeUnit time = media::TimeUnit::FromMicroseconds(output->mTime); if (time >= target.mTime) { // We have reached our internal seek target. @@ -1112,7 +1112,7 @@ MediaFormatReader::Update(TrackType aTrack) // last sample decoded. LOG("Seeking to last sample time: %lld", decoder.mLastSampleTime.ref().ToMicroseconds()); - InternalSeek(aTrack, SeekTarget(decoder.mLastSampleTime.ref(), true)); + InternalSeek(aTrack, InternalSeekTarget(decoder.mLastSampleTime.ref(), true)); } LOG("Rejecting %s promise: WAITING_FOR_DATA", TrackTypeToStr(aTrack)); decoder.RejectPromise(WAITING_FOR_DATA, __func__); @@ -1403,11 +1403,11 @@ MediaFormatReader::OnVideoSkipFailed(MediaTrackDemuxer::SkipFailureHolder aFailu } RefPtr -MediaFormatReader::Seek(int64_t aTime, int64_t aUnused) +MediaFormatReader::Seek(SeekTarget aTarget, int64_t aUnused) { MOZ_ASSERT(OnTaskQueue()); - LOG("aTime=(%lld)", aTime); + LOG("aTarget=(%lld)", aTarget.GetTime().ToMicroseconds()); MOZ_DIAGNOSTIC_ASSERT(mSeekPromise.IsEmpty()); MOZ_DIAGNOSTIC_ASSERT(!mVideo.HasPromise()); @@ -1425,8 +1425,8 @@ MediaFormatReader::Seek(int64_t aTime, int64_t aUnused) return SeekPromise::CreateAndReject(NS_ERROR_FAILURE, __func__); } - mOriginalSeekTime = Some(media::TimeUnit::FromMicroseconds(aTime)); - mPendingSeekTime = mOriginalSeekTime; + mOriginalSeekTarget = Some(aTarget); + mPendingSeekTime = Some(aTarget.GetTime()); RefPtr p = mSeekPromise.Ensure(__func__); @@ -1470,8 +1470,8 @@ MediaFormatReader::OnSeekFailed(TrackType aTrack, DemuxerFailureReason aResult) if (aResult == DemuxerFailureReason::WAITING_FOR_DATA) { if (HasVideo() && aTrack == TrackType::kAudioTrack && - mOriginalSeekTime.isSome() && - mPendingSeekTime.ref() != mOriginalSeekTime.ref()) { + mOriginalSeekTarget.isSome() && + mPendingSeekTime.ref() != mOriginalSeekTarget.ref().GetTime()) { // We have failed to seek audio where video seeked to earlier. // Attempt to seek instead to the closest point that we know we have in // order to limit A/V sync discrepency. @@ -1487,11 +1487,11 @@ MediaFormatReader::OnSeekFailed(TrackType aTrack, DemuxerFailureReason aResult) } } if (nextSeekTime.isNothing() || - nextSeekTime.ref() > mOriginalSeekTime.ref()) { - nextSeekTime = mOriginalSeekTime; + nextSeekTime.ref() > mOriginalSeekTarget.ref().GetTime()) { + nextSeekTime = Some(mOriginalSeekTarget.ref().GetTime()); LOG("Unable to seek audio to video seek time. A/V sync may be broken"); } else { - mOriginalSeekTime.reset(); + mOriginalSeekTarget.reset(); } mPendingSeekTime = nextSeekTime; DoAudioSeek(); @@ -1525,12 +1525,16 @@ MediaFormatReader::OnVideoSeekCompleted(media::TimeUnit aTime) mVideo.mSeekRequest.Complete(); if (HasAudio()) { - MOZ_ASSERT(mPendingSeekTime.isSome()); - mPendingSeekTime = Some(aTime); + MOZ_ASSERT(mPendingSeekTime.isSome() && mOriginalSeekTarget.isSome()); + if (mOriginalSeekTarget.ref().IsFast()) { + // We are performing a fast seek. We need to seek audio to where the + // video seeked to, to ensure proper A/V sync once playback resume. + mPendingSeekTime = Some(aTime); + } DoAudioSeek(); } else { mPendingSeekTime.reset(); - mSeekPromise.Resolve(aTime.ToMicroseconds(), __func__); + mSeekPromise.Resolve(aTime, __func__); } } @@ -1553,7 +1557,7 @@ MediaFormatReader::OnAudioSeekCompleted(media::TimeUnit aTime) LOGV("Audio seeked to %lld", aTime.ToMicroseconds()); mAudio.mSeekRequest.Complete(); mPendingSeekTime.reset(); - mSeekPromise.Resolve(aTime.ToMicroseconds(), __func__); + mSeekPromise.Resolve(aTime, __func__); } media::TimeIntervals diff --git a/dom/media/MediaFormatReader.h b/dom/media/MediaFormatReader.h index 4fe53ed24be..d817abaf590 100644 --- a/dom/media/MediaFormatReader.h +++ b/dom/media/MediaFormatReader.h @@ -48,7 +48,7 @@ public: void ReadUpdatedMetadata(MediaInfo* aInfo) override; RefPtr - Seek(int64_t aTime, int64_t aUnused) override; + Seek(SeekTarget aTarget, int64_t aUnused) override; protected: void NotifyDataArrivedInternal() override; @@ -133,8 +133,8 @@ private: bool DecodeDemuxedSamples(TrackType aTrack, MediaRawData* aSample); - struct SeekTarget { - SeekTarget(const media::TimeUnit& aTime, bool aDropTarget) + struct InternalSeekTarget { + InternalSeekTarget(const media::TimeUnit& aTime, bool aDropTarget) : mTime(aTime) , mDropTarget(aDropTarget) , mWaiting(false) @@ -146,7 +146,7 @@ private: }; // Perform an internal seek to aTime. If aDropTarget is true then // the first sample past the target will be dropped. - void InternalSeek(TrackType aTrack, const SeekTarget& aTarget); + void InternalSeek(TrackType aTrack, const InternalSeekTarget& aTarget); // Drain the current decoder. void DrainDecoder(TrackType aTrack); @@ -300,7 +300,7 @@ private: // If set, all decoded samples prior mTimeThreshold will be dropped. // Used for internal seeking when a change of stream is detected or when // encountering data discontinuity. - Maybe mTimeThreshold; + Maybe mTimeThreshold; // Time of last sample returned. Maybe mLastSampleTime; @@ -466,7 +466,7 @@ private: OnSeekFailed(TrackType::kAudioTrack, aFailure); } // Temporary seek information while we wait for the data - Maybe mOriginalSeekTime; + Maybe mOriginalSeekTarget; Maybe mPendingSeekTime; MozPromiseHolder mSeekPromise; diff --git a/dom/media/MediaStreamGraph.cpp b/dom/media/MediaStreamGraph.cpp index f245979d046..4c3e7824ee9 100644 --- a/dom/media/MediaStreamGraph.cpp +++ b/dom/media/MediaStreamGraph.cpp @@ -606,7 +606,7 @@ MediaStreamGraphImpl::CreateOrDestroyAudioStreams(MediaStream* aStream) STREAM_LOG(LogLevel::Debug, ("Updating AudioOutputStreams for MediaStream %p", aStream)); - nsAutoTArray audioOutputStreamsFound; + AutoTArray audioOutputStreamsFound; for (uint32_t i = 0; i < aStream->mAudioOutputStreams.Length(); ++i) { audioOutputStreamsFound.AppendElement(false); } @@ -791,7 +791,7 @@ MediaStreamGraphImpl::PlayVideo(MediaStream* aStream) TimeStamp currentTimeStamp = CurrentDriver()->GetCurrentTimeStamp(); // Collect any new frames produced in this iteration. - nsAutoTArray newImages; + AutoTArray newImages; RefPtr blackImage; MOZ_ASSERT(mProcessedTime >= aStream->mBufferStartTime, "frame position before buffer?"); @@ -861,14 +861,14 @@ MediaStreamGraphImpl::PlayVideo(MediaStream* aStream) if (!aStream->mLastPlayedVideoFrame.GetImage()) return; - nsAutoTArray images; + AutoTArray images; bool haveMultipleImages = false; for (uint32_t i = 0; i < aStream->mVideoOutputs.Length(); ++i) { VideoFrameContainer* output = aStream->mVideoOutputs[i]; // Find previous frames that may still be valid. - nsAutoTArray previousImages; + AutoTArray previousImages; output->GetImageContainer()->GetCurrentImages(&previousImages); uint32_t j = previousImages.Length(); if (j) { diff --git a/dom/media/SeekTarget.h b/dom/media/SeekTarget.h new file mode 100644 index 00000000000..0d81ac58c6c --- /dev/null +++ b/dom/media/SeekTarget.h @@ -0,0 +1,95 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef SEEK_TARGET_H +#define SEEK_TARGET_H + +#include "TimeUnits.h" + +namespace mozilla { + +enum class MediaDecoderEventVisibility : int8_t { + Observable, + Suppressed +}; + +// Stores the seek target; the time to seek to, and whether an Accurate, +// or "Fast" (nearest keyframe) seek was requested. +struct SeekTarget { + enum Type { + Invalid, + PrevSyncPoint, + Accurate + }; + SeekTarget() + : mEventVisibility(MediaDecoderEventVisibility::Observable) + , mTime(media::TimeUnit::Invalid()) + , mType(SeekTarget::Invalid) + { + } + SeekTarget(int64_t aTimeUsecs, + Type aType, + MediaDecoderEventVisibility aEventVisibility = + MediaDecoderEventVisibility::Observable) + : mEventVisibility(aEventVisibility) + , mTime(media::TimeUnit::FromMicroseconds(aTimeUsecs)) + , mType(aType) + { + } + SeekTarget(const media::TimeUnit& aTime, + Type aType, + MediaDecoderEventVisibility aEventVisibility = + MediaDecoderEventVisibility::Observable) + : mEventVisibility(aEventVisibility) + , mTime(aTime) + , mType(aType) + { + } + SeekTarget(const SeekTarget& aOther) + : mEventVisibility(aOther.mEventVisibility) + , mTime(aOther.mTime) + , mType(aOther.mType) + { + } + bool IsValid() const { + return mType != SeekTarget::Invalid; + } + void Reset() { + mTime = media::TimeUnit::Invalid(); + mType = SeekTarget::Invalid; + } + media::TimeUnit GetTime() const { + NS_ASSERTION(mTime.IsValid(), "Invalid SeekTarget"); + return mTime; + } + void SetTime(const media::TimeUnit& aTime) { + NS_ASSERTION(aTime.IsValid(), "Invalid SeekTarget destination"); + mTime = aTime; + } + void SetType(Type aType) { + mType = aType; + } + bool IsFast() const { + return mType == SeekTarget::Type::PrevSyncPoint; + } + bool IsAccurate() const { + return mType == SeekTarget::Type::Accurate; + } + + MediaDecoderEventVisibility mEventVisibility; + +private: + // Seek target time. + media::TimeUnit mTime; + // Whether we should seek "Fast", or "Accurate". + // "Fast" seeks to the seek point preceeding mTime, whereas + // "Accurate" seeks as close as possible to mTime. + Type mType; +}; + +} // namespace mozilla + +#endif /* SEEK_TARGET_H */ diff --git a/dom/media/TrackUnionStream.cpp b/dom/media/TrackUnionStream.cpp index 9325641970a..06ff80b5136 100644 --- a/dom/media/TrackUnionStream.cpp +++ b/dom/media/TrackUnionStream.cpp @@ -67,8 +67,8 @@ TrackUnionStream::TrackUnionStream(DOMMediaStream* aWrapper) : if (IsFinishedOnGraphThread()) { return; } - nsAutoTArray mappedTracksFinished; - nsAutoTArray mappedTracksWithMatchingInputTracks; + AutoTArray mappedTracksFinished; + AutoTArray mappedTracksWithMatchingInputTracks; for (uint32_t i = 0; i < mTrackMap.Length(); ++i) { mappedTracksFinished.AppendElement(true); mappedTracksWithMatchingInputTracks.AppendElement(false); diff --git a/dom/media/VideoFrameContainer.cpp b/dom/media/VideoFrameContainer.cpp index 2ece19ad2cb..e5a172e0ced 100644 --- a/dom/media/VideoFrameContainer.cpp +++ b/dom/media/VideoFrameContainer.cpp @@ -35,7 +35,7 @@ void VideoFrameContainer::SetCurrentFrame(const gfx::IntSize& aIntrinsicSize, { if (aImage) { MutexAutoLock lock(mMutex); - nsAutoTArray imageList; + AutoTArray imageList; imageList.AppendElement( ImageContainer::NonOwningImage(aImage, aTargetTime, ++mFrameID)); SetCurrentFramesLocked(aIntrinsicSize, imageList); diff --git a/dom/media/android/AndroidMediaReader.cpp b/dom/media/android/AndroidMediaReader.cpp index 130f024e950..34d3c5b4a8f 100644 --- a/dom/media/android/AndroidMediaReader.cpp +++ b/dom/media/android/AndroidMediaReader.cpp @@ -314,7 +314,7 @@ bool AndroidMediaReader::DecodeAudioData() } RefPtr -AndroidMediaReader::Seek(int64_t aTarget, int64_t aEndTime) +AndroidMediaReader::Seek(SeekTarget aTarget, int64_t aEndTime) { MOZ_ASSERT(OnTaskQueue()); @@ -328,21 +328,21 @@ AndroidMediaReader::Seek(int64_t aTarget, int64_t aEndTime) // stream to the preceeding keyframe first, get the stream time, and then // seek the audio stream to match the video stream's time. Otherwise, the // audio and video streams won't be in sync after the seek. - mVideoSeekTimeUs = aTarget; + mVideoSeekTimeUs = aTarget.GetTime().ToMicroseconds(); RefPtr self = this; mSeekRequest.Begin(DecodeToFirstVideoData()->Then(OwnerThread(), __func__, [self] (MediaData* v) { self->mSeekRequest.Complete(); self->mAudioSeekTimeUs = v->mTime; - self->mSeekPromise.Resolve(self->mAudioSeekTimeUs, __func__); + self->mSeekPromise.Resolve(media::TimeUnit::FromMicroseconds(self->mAudioSeekTimeUs), __func__); }, [self, aTarget] () { self->mSeekRequest.Complete(); - self->mAudioSeekTimeUs = aTarget; - self->mSeekPromise.Resolve(aTarget, __func__); + self->mAudioSeekTimeUs = aTarget.GetTime().ToMicroseconds(); + self->mSeekPromise.Resolve(aTarget.GetTime(), __func__); })); } else { - mAudioSeekTimeUs = mVideoSeekTimeUs = aTarget; - mSeekPromise.Resolve(aTarget, __func__); + mAudioSeekTimeUs = mVideoSeekTimeUs = aTarget.GetTime().ToMicroseconds(); + mSeekPromise.Resolve(aTarget.GetTime(), __func__); } return p; diff --git a/dom/media/android/AndroidMediaReader.h b/dom/media/android/AndroidMediaReader.h index 80f43448caa..cb7d264c22d 100644 --- a/dom/media/android/AndroidMediaReader.h +++ b/dom/media/android/AndroidMediaReader.h @@ -48,7 +48,7 @@ public: bool DecodeVideoFrame(bool &aKeyframeSkip, int64_t aTimeThreshold) override; nsresult ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) override; - RefPtr Seek(int64_t aTime, int64_t aEndTime) override; + RefPtr Seek(SeekTarget aTarget, int64_t aEndTime) override; RefPtr Shutdown() override; diff --git a/dom/media/directshow/DirectShowReader.cpp b/dom/media/directshow/DirectShowReader.cpp index 8b60fe8f460..24e6fa72f6b 100644 --- a/dom/media/directshow/DirectShowReader.cpp +++ b/dom/media/directshow/DirectShowReader.cpp @@ -329,13 +329,13 @@ DirectShowReader::DecodeVideoFrame(bool &aKeyframeSkip, } RefPtr -DirectShowReader::Seek(int64_t aTargetUs, int64_t aEndTime) +DirectShowReader::Seek(SeekTarget aTarget, int64_t aEndTime) { - nsresult res = SeekInternal(aTargetUs); + nsresult res = SeekInternal(aTarget.GetTime().ToMicroseconds()); if (NS_FAILED(res)) { return SeekPromise::CreateAndReject(res, __func__); } else { - return SeekPromise::CreateAndResolve(aTargetUs, __func__); + return SeekPromise::CreateAndResolve(aTarget.GetTime(), __func__); } } diff --git a/dom/media/directshow/DirectShowReader.h b/dom/media/directshow/DirectShowReader.h index 5e80c98261f..5e6a8ca35a6 100644 --- a/dom/media/directshow/DirectShowReader.h +++ b/dom/media/directshow/DirectShowReader.h @@ -52,7 +52,7 @@ public: MetadataTags** aTags) override; RefPtr - Seek(int64_t aTime, int64_t aEndTime) override; + Seek(SeekTarget aTarget, int64_t aEndTime) override; protected: void NotifyDataArrivedInternal() override; diff --git a/dom/media/encoder/OpusTrackEncoder.cpp b/dom/media/encoder/OpusTrackEncoder.cpp index 33d96ab6205..3785d7f06d7 100644 --- a/dom/media/encoder/OpusTrackEncoder.cpp +++ b/dom/media/encoder/OpusTrackEncoder.cpp @@ -313,7 +313,7 @@ OpusTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData) } // Start encoding data. - nsAutoTArray pcm; + AutoTArray pcm; pcm.SetLength(GetPacketDuration() * mChannels); AudioSegment::ChunkIterator iter(mSourceSegment); int frameCopied = 0; @@ -344,7 +344,7 @@ OpusTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData) audiodata->SetFrameType(EncodedFrame::OPUS_AUDIO_FRAME); int framesInPCM = frameCopied; if (mResampler) { - nsAutoTArray resamplingDest; + AutoTArray resamplingDest; // We want to consume all the input data, so we slightly oversize the // resampled data buffer so we can fit the output data in. We cannot really // predict the output frame count at each call. diff --git a/dom/media/encoder/TrackEncoder.cpp b/dom/media/encoder/TrackEncoder.cpp index 0e2cc7610ad..6fbceea8c3e 100644 --- a/dom/media/encoder/TrackEncoder.cpp +++ b/dom/media/encoder/TrackEncoder.cpp @@ -140,7 +140,7 @@ AudioTrackEncoder::InterleaveTrackData(AudioChunk& aChunk, { switch(aChunk.mBufferFormat) { case AUDIO_FORMAT_S16: { - nsAutoTArray array; + AutoTArray array; array.SetLength(aOutputChannels); for (uint32_t i = 0; i < array.Length(); i++) { array[i] = static_cast(aChunk.mChannelData[i]); @@ -149,7 +149,7 @@ AudioTrackEncoder::InterleaveTrackData(AudioChunk& aChunk, break; } case AUDIO_FORMAT_FLOAT32: { - nsAutoTArray array; + AutoTArray array; array.SetLength(aOutputChannels); for (uint32_t i = 0; i < array.Length(); i++) { array[i] = static_cast(aChunk.mChannelData[i]); diff --git a/dom/media/encoder/VorbisTrackEncoder.cpp b/dom/media/encoder/VorbisTrackEncoder.cpp index 0899ee8c744..d53228631cc 100644 --- a/dom/media/encoder/VorbisTrackEncoder.cpp +++ b/dom/media/encoder/VorbisTrackEncoder.cpp @@ -202,8 +202,8 @@ VorbisTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData) vorbis_analysis_buffer(&mVorbisDsp, (int)sourceSegment->GetDuration()); int framesCopied = 0; - nsAutoTArray interleavedPcm; - nsAutoTArray nonInterleavedPcm; + AutoTArray interleavedPcm; + AutoTArray nonInterleavedPcm; interleavedPcm.SetLength(sourceSegment->GetDuration() * mChannels); nonInterleavedPcm.SetLength(sourceSegment->GetDuration() * mChannels); while (!iter.IsEnded()) { diff --git a/dom/media/gmp/GMPDecryptorChild.cpp b/dom/media/gmp/GMPDecryptorChild.cpp index 0df7da8d9c5..aec5078e45b 100644 --- a/dom/media/gmp/GMPDecryptorChild.cpp +++ b/dom/media/gmp/GMPDecryptorChild.cpp @@ -157,7 +157,7 @@ GMPDecryptorChild::KeyStatusChanged(const char* aSessionId, uint32_t aKeyIdLength, GMPMediaKeyStatus aStatus) { - nsAutoTArray kid; + AutoTArray kid; kid.AppendElements(aKeyId, aKeyIdLength); CALL_ON_GMP_THREAD(SendKeyStatusChanged, nsCString(aSessionId, aSessionIdLength), kid, diff --git a/dom/media/gtest/TestVorbisTrackEncoder.cpp b/dom/media/gtest/TestVorbisTrackEncoder.cpp index 4f16519364a..9166afcf5b1 100644 --- a/dom/media/gtest/TestVorbisTrackEncoder.cpp +++ b/dom/media/gtest/TestVorbisTrackEncoder.cpp @@ -183,7 +183,7 @@ TEST(VorbisTrackEncoder, EncodedFrame) for (int i = 0; i < rate; i++) { data[i] = ((i%8)*4000) - (7*4000)/2; } - nsAutoTArray channelData; + AutoTArray channelData; channelData.AppendElement(data); AudioSegment segment; segment.AppendFrames(samples.forget(), channelData, 44100); diff --git a/dom/media/mediasink/DecodedStream.cpp b/dom/media/mediasink/DecodedStream.cpp index 687994ad023..aced1eec833 100644 --- a/dom/media/mediasink/DecodedStream.cpp +++ b/dom/media/mediasink/DecodedStream.cpp @@ -500,7 +500,7 @@ SendStreamAudio(DecodedStreamData* aStream, int64_t aStartTime, audio->EnsureAudioBuffer(); RefPtr buffer = audio->mAudioBuffer; AudioDataValue* bufferData = static_cast(buffer->Data()); - nsAutoTArray channels; + AutoTArray channels; for (uint32_t i = 0; i < audio->mChannels; ++i) { channels.AppendElement(bufferData + i * audio->mFrames); } @@ -522,7 +522,7 @@ DecodedStream::SendAudio(double aVolume, bool aIsSameOrigin) AudioSegment output; uint32_t rate = mInfo.mAudio.mRate; - nsAutoTArray,10> audio; + AutoTArray,10> audio; TrackID audioTrackId = mInfo.mAudio.mTrackId; SourceMediaStream* sourceStream = mData->mStream; @@ -587,7 +587,7 @@ DecodedStream::SendVideo(bool aIsSameOrigin) VideoSegment output; TrackID videoTrackId = mInfo.mVideo.mTrackId; - nsAutoTArray, 10> video; + AutoTArray, 10> video; SourceMediaStream* sourceStream = mData->mStream; // It's OK to hold references to the VideoData because VideoData diff --git a/dom/media/mediasink/VideoSink.cpp b/dom/media/mediasink/VideoSink.cpp index 5fa85d65833..e12ad7ad18f 100644 --- a/dom/media/mediasink/VideoSink.cpp +++ b/dom/media/mediasink/VideoSink.cpp @@ -314,13 +314,13 @@ VideoSink::RenderVideoFrames(int32_t aMaxFrames, { AssertOwnerThread(); - nsAutoTArray,16> frames; + AutoTArray,16> frames; VideoQueue().GetFirstElements(aMaxFrames, &frames); if (frames.IsEmpty() || !mContainer) { return; } - nsAutoTArray images; + AutoTArray images; TimeStamp lastFrameTime; MediaSink::PlaybackParams params = mAudioSink->GetPlaybackParams(); for (uint32_t i = 0; i < frames.Length(); ++i) { diff --git a/dom/media/mediasource/TrackBuffersManager.cpp b/dom/media/mediasource/TrackBuffersManager.cpp index 81697c90578..20f42b1e0c9 100644 --- a/dom/media/mediasource/TrackBuffersManager.cpp +++ b/dom/media/mediasource/TrackBuffersManager.cpp @@ -786,6 +786,9 @@ TrackBuffersManager::ShutdownDemuxers() mAudioTracks.mDemuxer->BreakCycles(); mAudioTracks.mDemuxer = nullptr; } + // We shouldn't change mInputDemuxer while a demuxer init/reset request is + // being processed. See bug 1239983. + MOZ_DIAGNOSTIC_ASSERT(!mDemuxerInitRequest.Exists()); mInputDemuxer = nullptr; mLastParsedEndTime.reset(); } @@ -843,6 +846,9 @@ TrackBuffersManager::OnDemuxerResetDone(nsresult) RejectAppend(NS_ERROR_ABORT, __func__); return; } + // mInputDemuxer shouldn't have been destroyed while a demuxer init/reset + // request was being processed. See bug 1239983. + MOZ_DIAGNOSTIC_ASSERT(mInputDemuxer); // Recreate track demuxers. uint32_t numVideos = mInputDemuxer->GetNumberTracks(TrackInfo::kVideoTrack); @@ -918,6 +924,9 @@ TrackBuffersManager::OnDemuxerInitDone(nsresult) RejectAppend(NS_ERROR_ABORT, __func__); return; } + // mInputDemuxer shouldn't have been destroyed while a demuxer init/reset + // request was being processed. See bug 1239983. + MOZ_DIAGNOSTIC_ASSERT(mInputDemuxer); MediaInfo info; diff --git a/dom/media/moz.build b/dom/media/moz.build index a76f2cfef46..cc661e746a6 100644 --- a/dom/media/moz.build +++ b/dom/media/moz.build @@ -133,6 +133,7 @@ EXPORTS += [ 'MP3FrameParser.h', 'nsIDocumentActivity.h', 'RtspMediaResource.h', + 'SeekTarget.h', 'SelfRef.h', 'SharedBuffer.h', 'StreamBuffer.h', diff --git a/dom/media/ogg/OggReader.cpp b/dom/media/ogg/OggReader.cpp index 3bb3de595d9..e00d40fa72b 100644 --- a/dom/media/ogg/OggReader.cpp +++ b/dom/media/ogg/OggReader.cpp @@ -296,7 +296,7 @@ void OggReader::SetupTargetSkeleton(SkeletonState* aSkeletonState) } else if (ReadHeaders(aSkeletonState) && aSkeletonState->HasIndex()) { // Extract the duration info out of the index, so we don't need to seek to // the end of resource to get it. - nsAutoTArray tracks; + AutoTArray tracks; BuildSerialList(tracks); int64_t duration = 0; if (NS_SUCCEEDED(aSkeletonState->GetDuration(tracks, duration))) { @@ -395,7 +395,7 @@ nsresult OggReader::ReadMetadata(MediaInfo* aInfo, *aTags = nullptr; ogg_page page; - nsAutoTArray bitstreams; + AutoTArray bitstreams; nsTArray serials; bool readAllBOS = false; while (!readAllBOS) { @@ -1254,7 +1254,7 @@ OggReader::IndexedSeekResult OggReader::SeekToKeyframeUsingIndex(int64_t aTarget return SEEK_INDEX_FAIL; } // We have an index from the Skeleton track, try to use it to seek. - nsAutoTArray tracks; + AutoTArray tracks; BuildSerialList(tracks); SkeletonState::nsSeekTarget keyframe; if (NS_FAILED(mSkeletonState->IndexedSeekTarget(aTarget, @@ -1408,13 +1408,13 @@ nsresult OggReader::SeekInUnbuffered(int64_t aTarget, } RefPtr -OggReader::Seek(int64_t aTarget, int64_t aEndTime) +OggReader::Seek(SeekTarget aTarget, int64_t aEndTime) { - nsresult res = SeekInternal(aTarget, aEndTime); + nsresult res = SeekInternal(aTarget.GetTime().ToMicroseconds(), aEndTime); if (NS_FAILED(res)) { return SeekPromise::CreateAndReject(res, __func__); } else { - return SeekPromise::CreateAndResolve(aTarget, __func__); + return SeekPromise::CreateAndResolve(aTarget.GetTime(), __func__); } } @@ -1449,7 +1449,7 @@ nsresult OggReader::SeekInternal(int64_t aTarget, int64_t aEndTime) // No index or other non-fatal index-related failure. Try to seek // using a bisection search. Determine the already downloaded data // in the media cache, so we can try to seek in the cached data first. - nsAutoTArray ranges; + AutoTArray ranges; res = GetSeekRanges(ranges); NS_ENSURE_SUCCESS(res,res); diff --git a/dom/media/ogg/OggReader.h b/dom/media/ogg/OggReader.h index a7eff650306..c5eea1e44c6 100644 --- a/dom/media/ogg/OggReader.h +++ b/dom/media/ogg/OggReader.h @@ -60,7 +60,7 @@ public: bool DecodeVideoFrame(bool &aKeyframeSkip, int64_t aTimeThreshold) override; nsresult ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) override; - RefPtr Seek(int64_t aTime, int64_t aEndTime) override; + RefPtr Seek(SeekTarget aTarget, int64_t aEndTime) override; media::TimeIntervals GetBuffered() override; private: diff --git a/dom/media/omx/AudioOffloadPlayer.cpp b/dom/media/omx/AudioOffloadPlayer.cpp index cb8a7df9c04..05e5a45e67a 100644 --- a/dom/media/omx/AudioOffloadPlayer.cpp +++ b/dom/media/omx/AudioOffloadPlayer.cpp @@ -345,11 +345,12 @@ status_t AudioOffloadPlayer::DoSeek() MOZ_ASSERT(mSeekTarget.IsValid()); CHECK(mAudioSink.get()); - AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("DoSeek ( %lld )", mSeekTarget.mTime)); + AUDIO_OFFLOAD_LOG(LogLevel::Debug, + ("DoSeek ( %lld )", mSeekTarget.GetTime().ToMicroseconds())); mReachedEOS = false; mPositionTimeMediaUs = -1; - mStartPosUs = mSeekTarget.mTime; + mStartPosUs = mSeekTarget.GetTime().ToMicroseconds(); if (!mSeekPromise.IsEmpty()) { nsCOMPtr nsEvent = @@ -387,7 +388,7 @@ int64_t AudioOffloadPlayer::GetMediaTimeUs() int64_t playPosition = 0; if (mSeekTarget.IsValid()) { - return mSeekTarget.mTime; + return mSeekTarget.GetTime().ToMicroseconds(); } if (!mStarted) { return mPositionTimeMediaUs; @@ -505,7 +506,7 @@ size_t AudioOffloadPlayer::FillBuffer(void* aData, size_t aSize) android::Mutex::Autolock autoLock(mLock); if (mSeekTarget.IsValid()) { - seekTimeUs = mSeekTarget.mTime; + seekTimeUs = mSeekTarget.GetTime().ToMicroseconds(); options.setSeekTo(seekTimeUs); refreshSeekTime = true; @@ -557,7 +558,8 @@ size_t AudioOffloadPlayer::FillBuffer(void* aData, size_t aSize) kKeyTime, &mPositionTimeMediaUs)); } - if (mSeekTarget.IsValid() && seekTimeUs == mSeekTarget.mTime) { + if (mSeekTarget.IsValid() && + seekTimeUs == mSeekTarget.GetTime().ToMicroseconds()) { MOZ_ASSERT(mSeekTarget.IsValid()); mSeekTarget.Reset(); if (!mSeekPromise.IsEmpty()) { diff --git a/dom/media/omx/MediaOmxReader.cpp b/dom/media/omx/MediaOmxReader.cpp index f5098ca3d41..d237bef0ae5 100644 --- a/dom/media/omx/MediaOmxReader.cpp +++ b/dom/media/omx/MediaOmxReader.cpp @@ -523,7 +523,7 @@ bool MediaOmxReader::DecodeAudioData() } RefPtr -MediaOmxReader::Seek(int64_t aTarget, int64_t aEndTime) +MediaOmxReader::Seek(SeekTarget aTarget, int64_t aEndTime) { MOZ_ASSERT(OnTaskQueue()); EnsureActive(); @@ -538,21 +538,21 @@ MediaOmxReader::Seek(int64_t aTarget, int64_t aEndTime) // stream to the preceeding keyframe first, get the stream time, and then // seek the audio stream to match the video stream's time. Otherwise, the // audio and video streams won't be in sync after the seek. - mVideoSeekTimeUs = aTarget; + mVideoSeekTimeUs = aTarget.GetTime().ToMicroseconds(); RefPtr self = this; mSeekRequest.Begin(DecodeToFirstVideoData()->Then(OwnerThread(), __func__, [self] (MediaData* v) { self->mSeekRequest.Complete(); self->mAudioSeekTimeUs = v->mTime; - self->mSeekPromise.Resolve(self->mAudioSeekTimeUs, __func__); + self->mSeekPromise.Resolve(media::TimeUnit::FromMicroseconds(self->mAudioSeekTimeUs), __func__); }, [self, aTarget] () { self->mSeekRequest.Complete(); - self->mAudioSeekTimeUs = aTarget; - self->mSeekPromise.Resolve(aTarget, __func__); + self->mAudioSeekTimeUs = aTarget.GetTime().ToMicroseconds(); + self->mSeekPromise.Resolve(aTarget.GetTime(), __func__); })); } else { - mAudioSeekTimeUs = mVideoSeekTimeUs = aTarget; - mSeekPromise.Resolve(aTarget, __func__); + mAudioSeekTimeUs = mVideoSeekTimeUs = aTarget.GetTime().ToMicroseconds(); + mSeekPromise.Resolve(aTarget.GetTime(), __func__); } return p; diff --git a/dom/media/omx/MediaOmxReader.h b/dom/media/omx/MediaOmxReader.h index 21abbd00810..4f2fce278ae 100644 --- a/dom/media/omx/MediaOmxReader.h +++ b/dom/media/omx/MediaOmxReader.h @@ -89,7 +89,7 @@ public: RefPtr AsyncReadMetadata() override; RefPtr - Seek(int64_t aTime, int64_t aEndTime) override; + Seek(SeekTarget aTarget, int64_t aEndTime) override; void SetIdle() override; diff --git a/dom/media/omx/OMXCodecWrapper.cpp b/dom/media/omx/OMXCodecWrapper.cpp index 08892213750..b6e3f566bab 100644 --- a/dom/media/omx/OMXCodecWrapper.cpp +++ b/dom/media/omx/OMXCodecWrapper.cpp @@ -751,7 +751,7 @@ public: UpdateAfterSendChunk(chunkSamples, bytesCopied, aSamplesRead); } else { // Interleave data to a temporary buffer. - nsAutoTArray pcm; + AutoTArray pcm; pcm.SetLength(bytesToCopy); AudioDataValue* interleavedSource = pcm.Elements(); AudioTrackEncoder::InterleaveTrackData(aChunk, chunkSamples, @@ -853,7 +853,7 @@ private: * mOMXAEncoder.mChannels * sizeof(AudioDataValue); uint32_t dstSamplesCopied = aSamplesNum; if (mOMXAEncoder.mResampler) { - nsAutoTArray pcm; + AutoTArray pcm; pcm.SetLength(bytesToCopy); AudioTrackEncoder::InterleaveTrackData(aSource, aSamplesNum, mOMXAEncoder.mChannels, diff --git a/dom/media/omx/RtspOmxReader.cpp b/dom/media/omx/RtspOmxReader.cpp index 07e6d8ed406..29948c4716c 100644 --- a/dom/media/omx/RtspOmxReader.cpp +++ b/dom/media/omx/RtspOmxReader.cpp @@ -33,14 +33,14 @@ nsresult RtspOmxReader::InitOmxDecoder() } RefPtr -RtspOmxReader::Seek(int64_t aTime, int64_t aEndTime) +RtspOmxReader::Seek(SeekTarget aTarget, int64_t aEndTime) { // The seek function of Rtsp is time-based, we call the SeekTime function in // RtspMediaResource. The SeekTime function finally send a seek command to // Rtsp stream server through network and also clear the buffer data in // RtspMediaResource. if (mRtspResource) { - mRtspResource->SeekTime(aTime); + mRtspResource->SeekTime(aTarget.GetTime().ToMicroseconds()); mRtspResource->EnablePlayoutDelay(); } @@ -49,7 +49,7 @@ RtspOmxReader::Seek(int64_t aTime, int64_t aEndTime) // that store the decoded data and also call the |DecodeToTarget| to pass // the seek time to OMX a/v decoders. mEnsureActiveFromSeek = true; - return MediaOmxReader::Seek(aTime, aEndTime); + return MediaOmxReader::Seek(aTarget, aEndTime); } void RtspOmxReader::SetIdle() { diff --git a/dom/media/omx/RtspOmxReader.h b/dom/media/omx/RtspOmxReader.h index 4da19d81df7..973da14d060 100644 --- a/dom/media/omx/RtspOmxReader.h +++ b/dom/media/omx/RtspOmxReader.h @@ -48,7 +48,7 @@ public: } // Implement a time-based seek instead of byte-based.. - RefPtr Seek(int64_t aTime, int64_t aEndTime) final override; + RefPtr Seek(SeekTarget aTarget, int64_t aEndTime) final override; // Override GetBuffered() to do nothing for below reasons: // 1. Because the Rtsp stream is a/v separated. The buffered data in a/v diff --git a/dom/media/platforms/agnostic/VorbisDecoder.cpp b/dom/media/platforms/agnostic/VorbisDecoder.cpp index c51c03d5a1b..50906e442c5 100644 --- a/dom/media/platforms/agnostic/VorbisDecoder.cpp +++ b/dom/media/platforms/agnostic/VorbisDecoder.cpp @@ -71,8 +71,8 @@ VorbisDataDecoder::Init() PodZero(&mVorbisDsp); PodZero(&mVorbisBlock); - nsAutoTArray headers; - nsAutoTArray headerLens; + AutoTArray headers; + AutoTArray headerLens; if (!XiphExtradataToHeaders(headers, headerLens, mInfo.mCodecSpecificConfig->Elements(), mInfo.mCodecSpecificConfig->Length())) { diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h index 7f3896b210d..91a6e38ec6e 100644 --- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h +++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h @@ -123,7 +123,7 @@ private: } private: - nsAutoTArray mMap; + AutoTArray mMap; }; DurationMap mDurationMap; diff --git a/dom/media/raw/RawReader.cpp b/dom/media/raw/RawReader.cpp index cfe775c1a9c..aa562d53d98 100644 --- a/dom/media/raw/RawReader.cpp +++ b/dom/media/raw/RawReader.cpp @@ -206,14 +206,14 @@ bool RawReader::DecodeVideoFrame(bool &aKeyframeSkip, } RefPtr -RawReader::Seek(int64_t aTime, int64_t aEndTime) +RawReader::Seek(SeekTarget aTarget, int64_t aEndTime) { MOZ_ASSERT(OnTaskQueue()); uint32_t frame = mCurrentFrame; - if (aTime >= UINT_MAX) + if (aTarget.GetTime().ToMicroseconds() >= UINT_MAX) return SeekPromise::CreateAndReject(NS_ERROR_FAILURE, __func__); - mCurrentFrame = aTime * mFrameRate / USECS_PER_S; + mCurrentFrame = aTarget.GetTime().ToMicroseconds() * mFrameRate / USECS_PER_S; CheckedUint32 offset = CheckedUint32(mCurrentFrame) * mFrameSize; offset += sizeof(RawVideoHeader); @@ -230,15 +230,15 @@ RawReader::Seek(int64_t aTime, int64_t aEndTime) NS_ENSURE_TRUE(!self->mShutdown, false); bool skip = false; return self->DecodeVideoFrame(skip, 0); - }, [self, aTime] () { + }, [self, aTarget] () { MOZ_ASSERT(self->OnTaskQueue()); return self->mVideoQueue.Peek() && - self->mVideoQueue.Peek()->GetEndTime() >= aTime; - })->Then(OwnerThread(), __func__, [self, p, aTime] () { + self->mVideoQueue.Peek()->GetEndTime() >= aTarget.GetTime().ToMicroseconds(); + })->Then(OwnerThread(), __func__, [self, p, aTarget] () { while (self->mVideoQueue.GetSize() >= 2) { RefPtr releaseMe = self->mVideoQueue.PopFront(); } - p->Resolve(aTime, __func__); + p->Resolve(aTarget.GetTime(), __func__); }, [self, p, frame] { self->mCurrentFrame = frame; self->mVideoQueue.Reset(); diff --git a/dom/media/raw/RawReader.h b/dom/media/raw/RawReader.h index 9742d26010c..d73d22fc328 100644 --- a/dom/media/raw/RawReader.h +++ b/dom/media/raw/RawReader.h @@ -28,7 +28,7 @@ public: nsresult ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) override; - RefPtr Seek(int64_t aTime, int64_t aEndTime) override; + RefPtr Seek(SeekTarget aTarget, int64_t aEndTime) override; media::TimeIntervals GetBuffered() override; diff --git a/dom/media/systemservices/MediaUtils.h b/dom/media/systemservices/MediaUtils.h index bde0c913fae..dad43bd3499 100644 --- a/dom/media/systemservices/MediaUtils.h +++ b/dom/media/systemservices/MediaUtils.h @@ -321,7 +321,7 @@ private: static uint32_t counter = 0; return ++counter; }; - nsAutoTArray mElements; + AutoTArray mElements; }; /* media::Refcountable - Add threadsafe ref-counting to something that isn't. diff --git a/dom/media/test/external/requirements.txt b/dom/media/test/external/requirements.txt index 3934f929ffd..85dd07f338a 100644 --- a/dom/media/test/external/requirements.txt +++ b/dom/media/test/external/requirements.txt @@ -15,9 +15,8 @@ mozrunner==6.11 moztest==0.7 mozversion==1.4 wptserve==1.3.0 -marionette-client == 2.1.0 -marionette-driver == 1.2.0 -marionette-transport == 1.1.0 +marionette-client==2.1.0 +marionette-driver==1.2.0 firefox-puppeteer==3.1.0 # Install the firefox media tests package diff --git a/dom/media/test/manifest.js b/dom/media/test/manifest.js index 88da24fa794..6c74c46b652 100644 --- a/dom/media/test/manifest.js +++ b/dom/media/test/manifest.js @@ -480,7 +480,10 @@ var gSeekTests = [ { name:"detodos.opus", type:"audio/ogg; codecs=opus", duration:2.9135 }, { name:"gizmo.mp4", type:"video/mp4", duration:5.56 }, { name:"owl.mp3", type:"audio/mpeg", duration:3.343 }, - { name:"bogus.duh", type:"bogus/duh", duration:123 } + { name:"bogus.duh", type:"bogus/duh", duration:123 }, + + // Bug 1242338: hit a numerical problem while seeking to the duration. + { name:"bug482461-theora.ogv", type:"video/ogg", duration:4.138 }, ]; var gFastSeekTests = [ diff --git a/dom/media/test/mochitest.ini b/dom/media/test/mochitest.ini index 84ac2aeed39..4540ee6087a 100644 --- a/dom/media/test/mochitest.ini +++ b/dom/media/test/mochitest.ini @@ -601,6 +601,7 @@ skip-if = os == 'win' && !debug # bug 1140675 [test_bug1018933.html] [test_bug1113600.html] tags=capturestream +[test_bug1242338.html] [test_can_play_type.html] [test_can_play_type_mpeg.html] skip-if = buildapp == 'b2g' || (toolkit == 'android' && processor == 'x86') # bug 1021675 #x86 only bug 914439 diff --git a/dom/media/test/test_bug1242338.html b/dom/media/test/test_bug1242338.html new file mode 100644 index 00000000000..c404d7b1dbf --- /dev/null +++ b/dom/media/test/test_bug1242338.html @@ -0,0 +1,66 @@ + + + + Test Bug 1242338 + + + + + +
    +
    +
    + + \ No newline at end of file diff --git a/dom/media/wave/WaveReader.cpp b/dom/media/wave/WaveReader.cpp index 248779bff56..b650ce8cb08 100644 --- a/dom/media/wave/WaveReader.cpp +++ b/dom/media/wave/WaveReader.cpp @@ -272,18 +272,18 @@ bool WaveReader::DecodeVideoFrame(bool &aKeyframeSkip, } RefPtr -WaveReader::Seek(int64_t aTarget, int64_t aEndTime) +WaveReader::Seek(SeekTarget aTarget, int64_t aEndTime) { MOZ_ASSERT(OnTaskQueue()); - LOG(LogLevel::Debug, ("%p About to seek to %lld", mDecoder, aTarget)); + LOG(LogLevel::Debug, ("%p About to seek to %lld", mDecoder, aTarget.GetTime().ToMicroseconds())); if (NS_FAILED(ResetDecode())) { return SeekPromise::CreateAndReject(NS_ERROR_FAILURE, __func__); } double d = BytesToTime(GetDataLength()); NS_ASSERTION(d < INT64_MAX / USECS_PER_S, "Duration overflow"); - int64_t duration = static_cast(d * USECS_PER_S); - double seekTime = std::min(aTarget, duration) / static_cast(USECS_PER_S); + media::TimeUnit duration = media::TimeUnit::FromSeconds(d); + double seekTime = std::min(aTarget.GetTime(), duration).ToSeconds(); int64_t position = RoundDownToFrame(static_cast(TimeToBytes(seekTime))); NS_ASSERTION(INT64_MAX - mWavePCMOffset > position, "Integer overflow during wave seek"); position += mWavePCMOffset; @@ -291,7 +291,7 @@ WaveReader::Seek(int64_t aTarget, int64_t aEndTime) if (NS_FAILED(res)) { return SeekPromise::CreateAndReject(res, __func__); } else { - return SeekPromise::CreateAndResolve(aTarget, __func__); + return SeekPromise::CreateAndResolve(aTarget.GetTime(), __func__); } } diff --git a/dom/media/wave/WaveReader.h b/dom/media/wave/WaveReader.h index ff58939c99b..c0a4e7265ba 100644 --- a/dom/media/wave/WaveReader.h +++ b/dom/media/wave/WaveReader.h @@ -27,7 +27,7 @@ public: int64_t aTimeThreshold) override; nsresult ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) override; - RefPtr Seek(int64_t aTime, int64_t aEndTime) override; + RefPtr Seek(SeekTarget aTarget, int64_t aEndTime) override; media::TimeIntervals GetBuffered() override; diff --git a/dom/media/webaudio/AudioBuffer.h b/dom/media/webaudio/AudioBuffer.h index ee462668f80..abb430d7fef 100644 --- a/dom/media/webaudio/AudioBuffer.h +++ b/dom/media/webaudio/AudioBuffer.h @@ -119,7 +119,7 @@ protected: nsWeakPtr mOwnerWindow; // Float32Arrays - nsAutoTArray, 2> mJSChannels; + AutoTArray, 2> mJSChannels; // mSharedChannels aggregates the data from mJSChannels. This is non-null // if and only if the mJSChannels' buffers are detached. diff --git a/dom/media/webaudio/AudioNodeEngine.h b/dom/media/webaudio/AudioNodeEngine.h index 51e64f7f593..58a9f962121 100644 --- a/dom/media/webaudio/AudioNodeEngine.h +++ b/dom/media/webaudio/AudioNodeEngine.h @@ -128,7 +128,7 @@ public: } private: - nsAutoTArray mContents; + AutoTArray mContents; }; /** @@ -253,7 +253,7 @@ class AudioNodeEngine { public: // This should be compatible with AudioNodeStream::OutputChunks. - typedef nsAutoTArray OutputChunks; + typedef AutoTArray OutputChunks; explicit AudioNodeEngine(dom::AudioNode* aNode) : mNode(aNode) diff --git a/dom/media/webaudio/AudioNodeExternalInputStream.cpp b/dom/media/webaudio/AudioNodeExternalInputStream.cpp index 3ebf9e48798..f7814774a1a 100644 --- a/dom/media/webaudio/AudioNodeExternalInputStream.cpp +++ b/dom/media/webaudio/AudioNodeExternalInputStream.cpp @@ -49,7 +49,7 @@ CopyChunkToBlock(AudioChunk& aInput, AudioBlock *aBlock, uint32_t aOffsetInBlock) { uint32_t blockChannels = aBlock->ChannelCount(); - nsAutoTArray channels; + AutoTArray channels; if (aInput.IsNull()) { channels.SetLength(blockChannels); PodZero(channels.Elements(), blockChannels); @@ -137,7 +137,7 @@ AudioNodeExternalInputStream::ProcessInput(GraphTime aFrom, GraphTime aTo, MOZ_ASSERT(mInputs.Length() == 1); MediaStream* source = mInputs[0]->GetSource(); - nsAutoTArray audioSegments; + AutoTArray audioSegments; uint32_t inputChannels = 0; for (StreamBuffer::TrackIter tracks(source->mBuffer, MediaSegment::AUDIO); !tracks.IsEnded(); tracks.Next()) { @@ -192,7 +192,7 @@ AudioNodeExternalInputStream::ProcessInput(GraphTime aFrom, GraphTime aTo, uint32_t accumulateIndex = 0; if (inputChannels) { - nsAutoTArray downmixBuffer; + AutoTArray downmixBuffer; for (uint32_t i = 0; i < audioSegments.Length(); ++i) { AudioBlock tmpChunk; ConvertSegmentToAudioBlock(&audioSegments[i], &tmpChunk, inputChannels); diff --git a/dom/media/webaudio/AudioNodeStream.cpp b/dom/media/webaudio/AudioNodeStream.cpp index 08c9f1a5a7e..9f0b5b665de 100644 --- a/dom/media/webaudio/AudioNodeStream.cpp +++ b/dom/media/webaudio/AudioNodeStream.cpp @@ -408,7 +408,7 @@ AudioNodeStream::ObtainInputBlock(AudioBlock& aTmpChunk, { uint32_t inputCount = mInputs.Length(); uint32_t outputChannelCount = 1; - nsAutoTArray inputChunks; + AutoTArray inputChunks; for (uint32_t i = 0; i < inputCount; ++i) { if (aPortIndex != mInputs[i]->InputNumber()) { // This input is connected to a different port @@ -454,7 +454,7 @@ AudioNodeStream::ObtainInputBlock(AudioBlock& aTmpChunk, aTmpChunk.AllocateChannels(outputChannelCount); // The static storage here should be 1KB, so it's fine - nsAutoTArray downmixBuffer; + AutoTArray downmixBuffer; for (uint32_t i = 0; i < inputChunkCount; ++i) { AccumulateInputChunk(i, *inputChunks[i], &aTmpChunk, &downmixBuffer); @@ -467,7 +467,7 @@ AudioNodeStream::AccumulateInputChunk(uint32_t aInputIndex, AudioBlock* aBlock, nsTArray* aDownmixBuffer) { - nsAutoTArray channels; + AutoTArray channels; UpMixDownMixChunk(&aChunk, aBlock->ChannelCount(), channels, *aDownmixBuffer); for (uint32_t c = 0; c < channels.Length(); ++c) { @@ -509,7 +509,7 @@ AudioNodeStream::UpMixDownMixChunk(const AudioBlock* aChunk, } } else if (aOutputChannels.Length() > aOutputChannelCount) { if (mChannelInterpretation == ChannelInterpretation::Speakers) { - nsAutoTArray outputChannels; + AutoTArray outputChannels; outputChannels.SetLength(aOutputChannelCount); aDownmixBuffer.SetLength(aOutputChannelCount * WEBAUDIO_BLOCK_SIZE); for (uint32_t j = 0; j < aOutputChannelCount; ++j) { diff --git a/dom/media/webaudio/AudioNodeStream.h b/dom/media/webaudio/AudioNodeStream.h index f0832e072ba..2882578c350 100644 --- a/dom/media/webaudio/AudioNodeStream.h +++ b/dom/media/webaudio/AudioNodeStream.h @@ -41,7 +41,7 @@ public: enum { AUDIO_TRACK = 1 }; - typedef nsAutoTArray OutputChunks; + typedef AutoTArray OutputChunks; // Flags re main thread updates and stream output. typedef unsigned Flags; diff --git a/dom/media/webaudio/DelayBuffer.h b/dom/media/webaudio/DelayBuffer.h index 6109e038f23..e55d0ba83a5 100644 --- a/dom/media/webaudio/DelayBuffer.h +++ b/dom/media/webaudio/DelayBuffer.h @@ -94,7 +94,7 @@ private: // Circular buffer for capturing delayed samples. FallibleTArray mChunks; // Cache upmixed channel arrays. - nsAutoTArray mUpmixChannels; + AutoTArray mUpmixChannels; double mSmoothingRate; // Current delay, in fractional ticks double mCurrentDelay; diff --git a/dom/media/webaudio/WebAudioUtils.cpp b/dom/media/webaudio/WebAudioUtils.cpp index d9e21f35c30..db9fbc38469 100644 --- a/dom/media/webaudio/WebAudioUtils.cpp +++ b/dom/media/webaudio/WebAudioUtils.cpp @@ -36,8 +36,8 @@ WebAudioUtils::SpeexResamplerProcess(SpeexResamplerState* aResampler, float* aOut, uint32_t* aOutLen) { #ifdef MOZ_SAMPLE_TYPE_S16 - nsAutoTArray tmp1; - nsAutoTArray tmp2; + AutoTArray tmp1; + AutoTArray tmp2; tmp1.SetLength(*aInLen); tmp2.SetLength(*aOutLen); ConvertAudioSamples(aIn, tmp1.Elements(), *aInLen); @@ -55,7 +55,7 @@ WebAudioUtils::SpeexResamplerProcess(SpeexResamplerState* aResampler, const int16_t* aIn, uint32_t* aInLen, float* aOut, uint32_t* aOutLen) { - nsAutoTArray tmp; + AutoTArray tmp; #ifdef MOZ_SAMPLE_TYPE_S16 tmp.SetLength(*aOutLen); int result = speex_resampler_process_int(aResampler, aChannel, aIn, aInLen, tmp.Elements(), aOutLen); @@ -78,8 +78,8 @@ WebAudioUtils::SpeexResamplerProcess(SpeexResamplerState* aResampler, #ifdef MOZ_SAMPLE_TYPE_S16 return speex_resampler_process_int(aResampler, aChannel, aIn, aInLen, aOut, aOutLen); #else - nsAutoTArray tmp1; - nsAutoTArray tmp2; + AutoTArray tmp1; + AutoTArray tmp2; tmp1.SetLength(*aInLen); tmp2.SetLength(*aOutLen); ConvertAudioSamples(aIn, tmp1.Elements(), *aInLen); diff --git a/dom/media/webaudio/blink/HRTFElevation.cpp b/dom/media/webaudio/blink/HRTFElevation.cpp index c6e04308859..2300872f3ab 100644 --- a/dom/media/webaudio/blink/HRTFElevation.cpp +++ b/dom/media/webaudio/blink/HRTFElevation.cpp @@ -128,7 +128,7 @@ nsReturnRef HRTFElevation::calculateKernelForAzimuthElevation(int az // Note that depending on the fftSize returned by the panner, we may be truncating the impulse response. const size_t resampledResponseLength = fftSizeForSampleRate(sampleRate) / 2; - nsAutoTArray resampled; + AutoTArray resampled; if (sampleRate == rawSampleRate) { resampledResponse = response; MOZ_ASSERT(resampledResponseLength == ResponseFrameSize); @@ -163,7 +163,7 @@ nsReturnRef HRTFElevation::calculateKernelForAzimuthElevation(int az } #ifdef MOZ_SAMPLE_TYPE_S16 - nsAutoTArray floatArray; + AutoTArray floatArray; floatArray.SetLength(resampledResponseLength); float *floatResponse = floatArray.Elements(); ConvertAudioSamples(resampledResponse, diff --git a/dom/media/webaudio/blink/Reverb.cpp b/dom/media/webaudio/blink/Reverb.cpp index 39f9d59c935..4fca0822b6a 100644 --- a/dom/media/webaudio/blink/Reverb.cpp +++ b/dom/media/webaudio/blink/Reverb.cpp @@ -81,11 +81,11 @@ Reverb::Reverb(ThreadSharedFloatArrayBufferList* impulseResponse, size_t impulse { float scale = 1; - nsAutoTArray irChannels; + AutoTArray irChannels; for (size_t i = 0; i < impulseResponse->GetChannels(); ++i) { irChannels.AppendElement(impulseResponse->GetData(i)); } - nsAutoTArray tempBuf; + AutoTArray tempBuf; if (normalize) { scale = calculateNormalizationScale(impulseResponse, impulseResponseBufferLength, sampleRate); diff --git a/dom/media/webm/WebMBufferedParser.h b/dom/media/webm/WebMBufferedParser.h index c65897407d6..da422cba03f 100644 --- a/dom/media/webm/WebMBufferedParser.h +++ b/dom/media/webm/WebMBufferedParser.h @@ -60,10 +60,19 @@ struct WebMBufferedParser , mInitEndOffset(-1) , mBlockEndOffset(-1) , mState(READ_ELEMENT_ID) + , mNextState(READ_ELEMENT_ID) , mVIntRaw(false) , mLastInitStartOffset(-1) , mClusterSyncPos(0) + , mVIntLeft(0) + , mBlockSize(0) + , mClusterTimecode(0) + , mClusterOffset(0) , mClusterEndOffset(-1) + , mBlockOffset(0) + , mBlockTimecode(0) + , mBlockTimecodeLength(0) + , mSkipBytes(0) , mTimecodeScale(1000000) , mGotTimecodeScale(false) { diff --git a/dom/media/webm/WebMDemuxer.cpp b/dom/media/webm/WebMDemuxer.cpp index 4cf3fe57d42..ebc582bda99 100644 --- a/dom/media/webm/WebMDemuxer.cpp +++ b/dom/media/webm/WebMDemuxer.cpp @@ -389,8 +389,8 @@ WebMDemuxer::ReadMetadata() return NS_ERROR_FAILURE; } - nsAutoTArray headers; - nsAutoTArray headerLens; + AutoTArray headers; + AutoTArray headerLens; for (uint32_t header = 0; header < nheaders; ++header) { unsigned char* data = 0; size_t length = 0; diff --git a/dom/media/webrtc/MediaEngineDefault.cpp b/dom/media/webrtc/MediaEngineDefault.cpp index 9f7d272b87b..93710f97721 100644 --- a/dom/media/webrtc/MediaEngineDefault.cpp +++ b/dom/media/webrtc/MediaEngineDefault.cpp @@ -510,7 +510,7 @@ MediaEngineDefaultAudioSource::AppendToSegment(AudioSegment& aSegment, int16_t* dest = static_cast(buffer->Data()); mSineGenerator->generate(dest, aSamples); - nsAutoTArray channels; + AutoTArray channels; channels.AppendElement(dest); aSegment.AppendFrames(buffer.forget(), channels, aSamples); } diff --git a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp index 4b826650093..10a4c93414b 100644 --- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp +++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp @@ -639,7 +639,7 @@ MediaEngineWebRTCMicrophoneSource::Process(int channel, memcpy(dest, audio10ms, length * sizeof(sample)); nsAutoPtr segment(new AudioSegment()); - nsAutoTArray channels; + AutoTArray channels; channels.AppendElement(dest); segment->AppendFrames(buffer.forget(), channels, length); TimeStamp insertTime; diff --git a/dom/media/webspeech/recognition/SpeechRecognition.cpp b/dom/media/webspeech/recognition/SpeechRecognition.cpp index 1d07e9c513b..f2bcf2bb379 100644 --- a/dom/media/webspeech/recognition/SpeechRecognition.cpp +++ b/dom/media/webspeech/recognition/SpeechRecognition.cpp @@ -932,7 +932,7 @@ SpeechRecognition::CreateAudioSegment(nsTArray>& aChunks) RefPtr buffer = aChunks[i]; const int16_t* chunkData = static_cast(buffer->Data()); - nsAutoTArray channels; + AutoTArray channels; channels.AppendElement(chunkData); segment->AppendFrames(buffer.forget(), channels, mAudioSamplesPerChunk); } @@ -959,7 +959,7 @@ SpeechRecognition::FeedAudioData(already_AddRefed aSamples, uint32_t samplesIndex = 0; const int16_t* samples = static_cast(refSamples->Data()); - nsAutoTArray, 5> chunksToSend; + AutoTArray, 5> chunksToSend; // fill up our buffer and make a chunk out of it, if possible if (mBufferedSamples > 0) { diff --git a/dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm b/dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm index d78a99bb3cc..7ccab6b51e8 100644 --- a/dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm +++ b/dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm @@ -275,7 +275,7 @@ EnumVoicesRunnable::Run() { NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; - nsAutoTArray list; + AutoTArray list; NSArray* voices = [NSSpeechSynthesizer availableVoices]; NSString* defaultVoice = [NSSpeechSynthesizer defaultVoice]; diff --git a/dom/media/webspeech/synth/nsSpeechTask.cpp b/dom/media/webspeech/synth/nsSpeechTask.cpp index 39fab24ceae..4be7290b88a 100644 --- a/dom/media/webspeech/synth/nsSpeechTask.cpp +++ b/dom/media/webspeech/synth/nsSpeechTask.cpp @@ -323,7 +323,7 @@ nsSpeechTask::SendAudioImpl(RefPtr& aSamples, uint32_t aD } AudioSegment segment; - nsAutoTArray channelData; + AutoTArray channelData; channelData.AppendElement(static_cast(aSamples->Data())); segment.AppendFrames(aSamples.forget(), channelData, aDataLen); mStream->AppendToTrack(1, &segment); diff --git a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp index f413c5b3631..59c76d15826 100644 --- a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp +++ b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp @@ -36,7 +36,7 @@ GetAllSpeechSynthActors(InfallibleTArray& MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(aActors.IsEmpty()); - nsAutoTArray contentActors; + AutoTArray contentActors; mozilla::dom::ContentParent::GetAll(contentActors); for (uint32_t contentIndex = 0; @@ -44,7 +44,7 @@ GetAllSpeechSynthActors(InfallibleTArray& ++contentIndex) { MOZ_ASSERT(contentActors[contentIndex]); - AutoInfallibleTArray speechsynthActors; + AutoTArray speechsynthActors; contentActors[contentIndex]->ManagedPSpeechSynthesisParent(speechsynthActors); for (uint32_t speechsynthIndex = 0; diff --git a/dom/messagechannel/MessagePort.cpp b/dom/messagechannel/MessagePort.cpp index 7fc5b927cd8..9b0f012d61a 100644 --- a/dom/messagechannel/MessagePort.cpp +++ b/dom/messagechannel/MessagePort.cpp @@ -475,10 +475,10 @@ MessagePort::PostMessage(JSContext* aCx, JS::Handle aMessage, MOZ_ASSERT(mActor); MOZ_ASSERT(mMessagesForTheOtherPort.IsEmpty()); - nsAutoTArray, 1> array; + AutoTArray, 1> array; array.AppendElement(data); - nsAutoTArray messages; + AutoTArray messages; SharedMessagePortMessage::FromSharedToMessagesChild(mActor, array, messages); mActor->SendPostMessages(messages); } diff --git a/dom/mobilemessage/ipc/SmsChild.cpp b/dom/mobilemessage/ipc/SmsChild.cpp index d0594450c9c..5bc2289fc21 100644 --- a/dom/mobilemessage/ipc/SmsChild.cpp +++ b/dom/mobilemessage/ipc/SmsChild.cpp @@ -349,10 +349,10 @@ MobileMessageCursorChild::DoNotifyResult(const nsTArray& aDat const uint32_t length = aDataArray.Length(); MOZ_ASSERT(length); - AutoFallibleTArray autoArray; + AutoTArray autoArray; NS_ENSURE_TRUE_VOID(autoArray.SetCapacity(length, fallible)); - AutoFallibleTArray, 1> messages; + AutoTArray, 1> messages; NS_ENSURE_TRUE_VOID(messages.SetCapacity(length, fallible)); for (uint32_t i = 0; i < length; i++) { @@ -370,10 +370,10 @@ MobileMessageCursorChild::DoNotifyResult(const nsTArray& aDataArray) const uint32_t length = aDataArray.Length(); MOZ_ASSERT(length); - AutoFallibleTArray autoArray; + AutoTArray autoArray; NS_ENSURE_TRUE_VOID(autoArray.SetCapacity(length, fallible)); - AutoFallibleTArray, 1> threads; + AutoTArray, 1> threads; NS_ENSURE_TRUE_VOID(threads.SetCapacity(length, fallible)); for (uint32_t i = 0; i < length; i++) { diff --git a/dom/notification/Notification.cpp b/dom/notification/Notification.cpp index 5bb688b8cd4..e68e510c7af 100644 --- a/dom/notification/Notification.cpp +++ b/dom/notification/Notification.cpp @@ -158,7 +158,7 @@ public: MOZ_ASSERT(ok); ErrorResult result; - nsAutoTArray, 5> notifications; + AutoTArray, 5> notifications; for (uint32_t i = 0; i < mStrings.Length(); ++i) { RefPtr n = @@ -2094,7 +2094,7 @@ public: RefPtr workerPromise = mPromiseProxy->WorkerPromise(); ErrorResult result; - nsAutoTArray, 5> notifications; + AutoTArray, 5> notifications; for (uint32_t i = 0; i < mStrings.Length(); ++i) { RefPtr n = Notification::ConstructFromFields(aWorkerPrivate->GlobalScope(), diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index 708f46d0970..f769e93fc2f 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -1693,7 +1693,7 @@ _releasevariantvalue(NPVariant* variant) } else { void *p = (void *)s->UTF8Characters; DWORD nheaps = 0; - nsAutoTArray heaps; + AutoTArray heaps; nheaps = GetProcessHeaps(0, heaps.Elements()); heaps.AppendElements(nheaps); GetProcessHeaps(nheaps, heaps.Elements()); diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index dae2aec54ff..aad18ebbe43 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -2111,7 +2111,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, if (NS_FAILED(rv)) return rv; - nsAutoTArray, 6> pluginFiles; + AutoTArray, 6> pluginFiles; bool hasMore; while (NS_SUCCEEDED(iter->HasMoreElements(&hasMore)) && hasMore) { @@ -3666,7 +3666,7 @@ nsPluginHost::ParsePostBufferToFixHeaders(const char *inPostData, uint32_t inPos const char CRLFCRLF[] = {CR,LF,CR,LF,'\0'}; // C string"\r\n\r\n" const char ContentLenHeader[] = "Content-length"; - nsAutoTArray singleLF; + AutoTArray singleLF; const char *pSCntlh = 0;// pointer to start of ContentLenHeader in inPostData const char *pSod = 0; // pointer to start of data in inPostData const char *pEoh = 0; // pointer to end of headers in inPostData diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index 0df46218d34..28518c560f1 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -903,7 +903,7 @@ nsPluginInstanceOwner::GetCompositionString(uint32_t aType, *aLength = aDist->Length(); return true; } - nsAutoTArray clauses; + AutoTArray clauses; clauses.AppendElement(0); for (TextRange& range : *ranges) { if (!range.IsClause()) { @@ -941,7 +941,8 @@ nsPluginInstanceOwner::GetCompositionString(uint32_t aType, } bool -nsPluginInstanceOwner::SetCandidateWindow(int32_t aX, int32_t aY) +nsPluginInstanceOwner::SetCandidateWindow( + const widget::CandidateWindowPosition& aPosition) { if (NS_WARN_IF(!mPluginFrame)) { return false; @@ -955,7 +956,7 @@ nsPluginInstanceOwner::SetCandidateWindow(int32_t aX, int32_t aY) } } - widget->SetCandidateWindowForPlugin(aX, aY); + widget->SetCandidateWindowForPlugin(aPosition); return true; } diff --git a/dom/plugins/base/nsPluginInstanceOwner.h b/dom/plugins/base/nsPluginInstanceOwner.h index 556a9414a6f..69bb08da94f 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.h +++ b/dom/plugins/base/nsPluginInstanceOwner.h @@ -269,7 +269,8 @@ public: bool GetCompositionString(uint32_t aIndex, nsTArray* aString, int32_t* aLength); - bool SetCandidateWindow(int32_t aX, int32_t aY); + bool SetCandidateWindow( + const mozilla::widget::CandidateWindowPosition& aPosition); bool RequestCommitOrCancel(bool aCommitted); private: diff --git a/dom/plugins/base/nsPluginsDirUtils.h b/dom/plugins/base/nsPluginsDirUtils.h index 8fb907c0d1a..178dc6968e7 100644 --- a/dom/plugins/base/nsPluginsDirUtils.h +++ b/dom/plugins/base/nsPluginsDirUtils.h @@ -26,7 +26,7 @@ ParsePluginMimeDescription(const char *mdesc, nsPluginInfo &info) char *mdescDup = PL_strdup(mdesc); // make a dup of intput string we'll change it content char anEmptyString[] = ""; - nsAutoTArray tmpMimeTypeArr; + AutoTArray tmpMimeTypeArr; char delimiters[] = {':',':',';'}; int mimeTypeVariantCount = 0; char *p = mdescDup; // make a dup of intput string we'll change it content diff --git a/dom/plugins/ipc/PPluginInstance.ipdl b/dom/plugins/ipc/PPluginInstance.ipdl index 0067a0dd266..ff09c7f8822 100644 --- a/dom/plugins/ipc/PPluginInstance.ipdl +++ b/dom/plugins/ipc/PPluginInstance.ipdl @@ -31,6 +31,7 @@ using mozilla::layers::SurfaceDescriptorX11 from "gfxipc/ShadowLayerUtils.h"; using nsIntRect from "nsRect.h"; using mozilla::gfx::SurfaceFormat from "mozilla/gfx/Types.h"; using struct DxgiAdapterDesc from "mozilla/D3DMessageUtils.h"; +using struct mozilla::widget::CandidateWindowPosition from "ipc/nsGUIEventIPC.h"; namespace mozilla { namespace plugins { @@ -264,9 +265,8 @@ parent: returns (uint8_t[] aDist, int32_t aLength); // Set candidate window position. // - // @param aX x position of candidate window - // @param aY y position of candidate window - async SetCandidateWindow(int32_t aX, int32_t aY); + // @param aPosition position information of candidate window + async SetCandidateWindow(CandidateWindowPosition aPosition); async RequestCommitOrCancel(bool aCommitted); both: diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp index 7f0144eea60..27b66340402 100644 --- a/dom/plugins/ipc/PluginInstanceChild.cpp +++ b/dom/plugins/ipc/PluginInstanceChild.cpp @@ -2043,7 +2043,7 @@ PluginInstanceChild::ImmGetCompositionStringProc(HIMC aIMC, DWORD aIndex, if (!sCurrentPluginInstance) { return IMM_ERROR_GENERAL; } - nsAutoTArray dist; + AutoTArray dist; int32_t length = 0; // IMM_ERROR_NODATA sCurrentPluginInstance->SendGetCompositionString(aIndex, &dist, &length); if (length == IMM_ERROR_NODATA || length == IMM_ERROR_GENERAL) { @@ -2065,14 +2065,22 @@ PluginInstanceChild::ImmSetCandidateWindowProc(HIMC aIMC, LPCANDIDATEFORM aForm) } if (!sCurrentPluginInstance || - aForm->dwIndex != 0 || - !(aForm->dwStyle & CFS_CANDIDATEPOS)) { - // Flash only uses CFS_CANDIDATEPOS with index == 0. + aForm->dwIndex != 0) { return FALSE; } - sCurrentPluginInstance->SendSetCandidateWindow( - aForm->ptCurrentPos.x, aForm->ptCurrentPos.y); + CandidateWindowPosition position; + position.mPoint.x = aForm->ptCurrentPos.x; + position.mPoint.y = aForm->ptCurrentPos.y; + position.mExcludeRect = !!(aForm->dwStyle & CFS_EXCLUDE); + if (position.mExcludeRect) { + position.mRect.x = aForm->rcArea.left; + position.mRect.y = aForm->rcArea.top; + position.mRect.width = aForm->rcArea.right - aForm->rcArea.left; + position.mRect.height = aForm->rcArea.bottom - aForm->rcArea.top; + } + + sCurrentPluginInstance->SendSetCandidateWindow(position); return TRUE; } diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index 8dcbd99c464..34e6547abcf 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -807,7 +807,7 @@ PluginInstanceParent::SetCurrentImage(Image* aImage) ImageContainer::NonOwningImage holder(aImage); holder.mFrameID = ++mFrameID; - nsAutoTArray imageList; + AutoTArray imageList; imageList.AppendElement(holder); mImageContainer->SetCurrentImages(imageList); @@ -959,7 +959,7 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect, gfxPlatform::GetPlatform()->GetSourceSurfaceForSurface(nullptr, surface); RefPtr image = new SourceSurfaceImage(surface->GetSize(), sourceSurface); - nsAutoTArray imageList; + AutoTArray imageList; imageList.AppendElement( ImageContainer::NonOwningImage(image)); @@ -2396,13 +2396,13 @@ PluginInstanceParent::RecvGetCompositionString(const uint32_t& aIndex, } bool -PluginInstanceParent::RecvSetCandidateWindow(const int32_t& aX, - const int32_t& aY) +PluginInstanceParent::RecvSetCandidateWindow( + const mozilla::widget::CandidateWindowPosition& aPosition) { #if defined(OS_WIN) nsPluginInstanceOwner* owner = GetOwner(); if (owner) { - owner->SetCandidateWindow(aX, aY); + owner->SetCandidateWindow(aPosition); } #endif return true; diff --git a/dom/plugins/ipc/PluginInstanceParent.h b/dom/plugins/ipc/PluginInstanceParent.h index 2e211824c0f..751cc72574d 100644 --- a/dom/plugins/ipc/PluginInstanceParent.h +++ b/dom/plugins/ipc/PluginInstanceParent.h @@ -359,7 +359,8 @@ public: nsTArray* aBuffer, int32_t* aLength) override; virtual bool - RecvSetCandidateWindow(const int32_t& aX, const int32_t& aY) override; + RecvSetCandidateWindow( + const mozilla::widget::CandidateWindowPosition& aPosition) override; virtual bool RecvRequestCommitOrCancel(const bool& aCommitted) override; diff --git a/dom/plugins/ipc/PluginModuleChild.h b/dom/plugins/ipc/PluginModuleChild.h index ffd35558166..61d84487a9d 100644 --- a/dom/plugins/ipc/PluginModuleChild.h +++ b/dom/plugins/ipc/PluginModuleChild.h @@ -363,7 +363,7 @@ private: bool _savedNestableTasksAllowed; }; - nsAutoTArray mIncallPumpingStack; + AutoTArray mIncallPumpingStack; static LRESULT CALLBACK NestedInputEventHook(int code, WPARAM wParam, diff --git a/dom/plugins/ipc/PluginScriptableObjectChild.cpp b/dom/plugins/ipc/PluginScriptableObjectChild.cpp index 29bc46fb9fd..66bb3746eaa 100644 --- a/dom/plugins/ipc/PluginScriptableObjectChild.cpp +++ b/dom/plugins/ipc/PluginScriptableObjectChild.cpp @@ -436,7 +436,7 @@ PluginScriptableObjectChild::ScriptableEnumerate(NPObject* aObject, NS_ASSERTION(actor, "This shouldn't ever be null!"); NS_ASSERTION(actor->Type() == Proxy, "Bad type!"); - AutoInfallibleTArray identifiers; + AutoTArray identifiers; bool success; actor->CallEnumerate(&identifiers, &success); @@ -775,7 +775,7 @@ PluginScriptableObjectChild::AnswerInvoke(const PluginIdentifier& aId, return true; } - AutoFallibleTArray convertedArgs; + AutoTArray convertedArgs; uint32_t argCount = aArgs.Length(); if (!convertedArgs.SetLength(argCount, mozilla::fallible)) { @@ -845,7 +845,7 @@ PluginScriptableObjectChild::AnswerInvokeDefault(InfallibleTArray&& aAr return true; } - AutoFallibleTArray convertedArgs; + AutoTArray convertedArgs; uint32_t argCount = aArgs.Length(); if (!convertedArgs.SetLength(argCount, mozilla::fallible)) { @@ -1096,7 +1096,7 @@ PluginScriptableObjectChild::AnswerConstruct(InfallibleTArray&& aArgs, return true; } - AutoFallibleTArray convertedArgs; + AutoTArray convertedArgs; uint32_t argCount = aArgs.Length(); if (!convertedArgs.SetLength(argCount, mozilla::fallible)) { diff --git a/dom/plugins/ipc/PluginScriptableObjectParent.cpp b/dom/plugins/ipc/PluginScriptableObjectParent.cpp index 5119df3b746..9f042cfc264 100644 --- a/dom/plugins/ipc/PluginScriptableObjectParent.cpp +++ b/dom/plugins/ipc/PluginScriptableObjectParent.cpp @@ -485,7 +485,7 @@ PluginScriptableObjectParent::ScriptableEnumerate(NPObject* aObject, return false; } - AutoInfallibleTArray identifiers; + AutoTArray identifiers; bool success; if (!actor->CallEnumerate(&identifiers, &success)) { NS_WARNING("Failed to send message!"); @@ -830,7 +830,7 @@ PluginScriptableObjectParent::AnswerInvoke(const PluginIdentifier& aId, return true; } - AutoFallibleTArray convertedArgs; + AutoTArray convertedArgs; uint32_t argCount = aArgs.Length(); if (!convertedArgs.SetLength(argCount, fallible)) { @@ -913,7 +913,7 @@ PluginScriptableObjectParent::AnswerInvokeDefault(InfallibleTArray&& aA return true; } - AutoFallibleTArray convertedArgs; + AutoTArray convertedArgs; uint32_t argCount = aArgs.Length(); if (!convertedArgs.SetLength(argCount, fallible)) { @@ -1233,7 +1233,7 @@ PluginScriptableObjectParent::AnswerConstruct(InfallibleTArray&& aArgs, return true; } - AutoFallibleTArray convertedArgs; + AutoTArray convertedArgs; uint32_t argCount = aArgs.Length(); if (!convertedArgs.SetLength(argCount, fallible)) { diff --git a/dom/power/PowerManager.cpp b/dom/power/PowerManager.cpp index e7baeac48e9..64534976da1 100644 --- a/dom/power/PowerManager.cpp +++ b/dom/power/PowerManager.cpp @@ -135,7 +135,7 @@ PowerManager::Callback(const nsAString &aTopic, const nsAString &aState) * because the callbacks may install new listeners. We expect no * more than one listener per window, so it shouldn't be too long. */ - nsAutoTArray, 2> listeners(mListeners); + AutoTArray, 2> listeners(mListeners); for (uint32_t i = 0; i < listeners.Length(); ++i) { listeners[i]->Callback(aTopic, aState); } diff --git a/dom/power/PowerManagerService.cpp b/dom/power/PowerManagerService.cpp index a37a929ece4..5e972e12c05 100644 --- a/dom/power/PowerManagerService.cpp +++ b/dom/power/PowerManagerService.cpp @@ -112,7 +112,7 @@ PowerManagerService::Notify(const WakeLockInformation& aWakeLockInfo) * because the callbacks may install new listeners. We expect no * more than one listener per window, so it shouldn't be too long. */ - nsAutoTArray, 2> listeners(mWakeLockListeners); + AutoTArray, 2> listeners(mWakeLockListeners); for (uint32_t i = 0; i < listeners.Length(); ++i) { listeners[i]->Callback(aWakeLockInfo.topic(), state); diff --git a/dom/quota/ActorsParent.cpp b/dom/quota/ActorsParent.cpp index 665edb9a373..f9ced8a20d3 100644 --- a/dom/quota/ActorsParent.cpp +++ b/dom/quota/ActorsParent.cpp @@ -2476,7 +2476,7 @@ QuotaObject::MaybeUpdateSize(int64_t aSize, bool aTruncate) if (newTemporaryStorageUsage > quotaManager->mTemporaryStorageLimit) { // This will block the thread without holding the lock while waitting. - nsAutoTArray, 10> locks; + AutoTArray, 10> locks; uint64_t sizeToBeFreed = quotaManager->LockedCollectOriginsForEviction(delta, locks); @@ -3801,7 +3801,7 @@ QuotaManager::OpenDirectoryInternal(Nullable aPersistenceType, // All the locks that block this new exclusive lock need to be invalidated. // We also need to notify clients to abort operations for them. - nsAutoTArray>, + AutoTArray>, Client::TYPE_MAX> origins; origins.SetLength(Client::TYPE_MAX); diff --git a/dom/quota/QuotaManager.h b/dom/quota/QuotaManager.h index 4586958f0fb..db7ea977eec 100644 --- a/dom/quota/QuotaManager.h +++ b/dom/quota/QuotaManager.h @@ -500,7 +500,7 @@ private: // by any mutex but it is only ever touched on the IO thread. nsTArray mInitializedOrigins; - nsAutoTArray, Client::TYPE_MAX> mClients; + AutoTArray, Client::TYPE_MAX> mClients; nsString mIndexedDBPath; nsString mStoragePath; diff --git a/dom/security/nsContentSecurityManager.cpp b/dom/security/nsContentSecurityManager.cpp index 12b0d800a02..9751c055af2 100644 --- a/dom/security/nsContentSecurityManager.cpp +++ b/dom/security/nsContentSecurityManager.cpp @@ -143,8 +143,17 @@ DoContentSecurityChecks(nsIURI* aURI, nsILoadInfo* aLoadInfo) break; } - case nsIContentPolicy::TYPE_IMAGE: - case nsIContentPolicy::TYPE_STYLESHEET: + case nsIContentPolicy::TYPE_IMAGE: { + MOZ_ASSERT(false, "contentPolicyType not supported yet"); + break; + } + + case nsIContentPolicy::TYPE_STYLESHEET: { + mimeTypeGuess = NS_LITERAL_CSTRING("text/css"); + requestingContext = aLoadInfo->LoadingNode(); + break; + } + case nsIContentPolicy::TYPE_OBJECT: case nsIContentPolicy::TYPE_DOCUMENT: { MOZ_ASSERT(false, "contentPolicyType not supported yet"); diff --git a/dom/storage/DOMStorageDBUpdater.cpp b/dom/storage/DOMStorageDBUpdater.cpp index 0df68db9027..ec0fea6f91e 100644 --- a/dom/storage/DOMStorageDBUpdater.cpp +++ b/dom/storage/DOMStorageDBUpdater.cpp @@ -336,7 +336,17 @@ nsresult Update(mozIStorageConnection *aWorkerConnection) aWorkerConnection->RemoveFunction(NS_LITERAL_CSTRING("REVERSESTRING")); // Update the scoping to match the new implememntation: split to oa suffix and origin key - // First rename the old table, we want to remove some columns no longer needed. + // First rename the old table, we want to remove some columns no longer needed, + // but even before that drop all indexes from it (CREATE IF NOT EXISTS for index on the + // new table would falsely find the index!) + rv = aWorkerConnection->ExecuteSimpleSQL(NS_LITERAL_CSTRING( + "DROP INDEX IF EXISTS webappsstore2.origin_key_index")); + NS_ENSURE_SUCCESS(rv, rv); + + rv = aWorkerConnection->ExecuteSimpleSQL(NS_LITERAL_CSTRING( + "DROP INDEX IF EXISTS webappsstore2.scope_key_index")); + NS_ENSURE_SUCCESS(rv, rv); + rv = aWorkerConnection->ExecuteSimpleSQL(NS_LITERAL_CSTRING( "ALTER TABLE webappsstore2 RENAME TO webappsstore2_old")); NS_ENSURE_SUCCESS(rv, rv); diff --git a/dom/svg/SVGLengthList.h b/dom/svg/SVGLengthList.h index 4d11e1afb9e..7ca07d1da35 100644 --- a/dom/svg/SVGLengthList.h +++ b/dom/svg/SVGLengthList.h @@ -130,20 +130,20 @@ protected: /* Rationale for using nsTArray and not nsTArray: * - * It might seem like we should use nsAutoTArray instead of + * It might seem like we should use AutoTArray instead of * nsTArray. That would preallocate space for one SVGLength and * avoid an extra memory allocation call in the common case of the 'x' * and 'y' attributes each containing a single length (and the 'dx' and 'dy' * attributes being empty). However, consider this: * - * An empty nsTArray uses sizeof(Header*). An nsAutoTArray on the other hand uses sizeof(Header*) + * (2 * sizeof(uint32_t)) + (N * sizeof(E)), which for one SVGLength is * sizeof(Header*) + 16 bytes. * * Now consider that for text elements we have four length list attributes * (x, y, dx, dy), each of which can have a baseVal and an animVal list. If - * we were to go the nsAutoTArray route for each of these, we'd + * we were to go the AutoTArray route for each of these, we'd * end up using at least 160 bytes for these four attributes alone, even * though we only need storage for two SVGLengths (16 bytes) in the common * case!! diff --git a/dom/system/gonk/GonkGPSGeolocationProvider.cpp b/dom/system/gonk/GonkGPSGeolocationProvider.cpp index 5ad23c67d6e..de068e0cd4f 100644 --- a/dom/system/gonk/GonkGPSGeolocationProvider.cpp +++ b/dom/system/gonk/GonkGPSGeolocationProvider.cpp @@ -538,13 +538,13 @@ GonkGPSGeolocationProvider::RequestSettingValue(const char* aKey) nsCOMPtr lock; nsresult rv = ss->CreateLock(nullptr, getter_AddRefs(lock)); if (NS_FAILED(rv)) { - ERR("error while createLock setting '%s': %d\n", aKey, rv); + ERR("error while createLock setting '%s': %d\n", aKey, uint32_t(rv)); return; } rv = lock->Get(aKey, this); if (NS_FAILED(rv)) { - ERR("error while get setting '%s': %d\n", aKey, rv); + ERR("error while get setting '%s': %d\n", aKey, uint32_t(rv)); return; } } diff --git a/dom/voicemail/Voicemail.h b/dom/voicemail/Voicemail.h index 8cae51f96b0..d9e395bbb67 100644 --- a/dom/voicemail/Voicemail.h +++ b/dom/voicemail/Voicemail.h @@ -87,7 +87,7 @@ private: // |mStatuses| keeps all instantiated VoicemailStatus objects as well as the // empty slots for not interested ones. The length of |mStatuses| is decided // in the constructor and is never changed ever since. - nsAutoTArray, 1> mStatuses; + AutoTArray, 1> mStatuses; // Return a nsIVoicemailProvider instance based on the requests from external // components. Return nullptr if aOptionalServiceId contains an invalid diff --git a/dom/wifi/test/marionette/manifest.ini b/dom/wifi/test/marionette/manifest.ini index c2e398d037a..5d245739c02 100644 --- a/dom/wifi/test/marionette/manifest.ini +++ b/dom/wifi/test/marionette/manifest.ini @@ -10,18 +10,15 @@ qemu = true [test_wifi_auto_connect.js] [test_wifi_static_ip.js] [test_wifi_tethering_wifi_disabled.js] -skip-if = android_version > '15' # Bug 1203075 [test_wifi_tethering_wifi_inactive.js] -skip-if = android_version > '15' # Bug 1203075 [test_wifi_tethering_wifi_active.js] -skip-if = android_version > '15' # Bug 1203075 [test_wifi_manage_server_certificate.js] [test_wifi_manage_user_certificate.js] [test_wifi_manage_pkcs12_certificate.js] [test_wifi_associate_WPA_EAP_PEAP.js] -disabled = Bug 1173697 +skip-if = android_version < '16' # EAP test not working before KK. [test_wifi_associate_WPA_EAP_TTLS.js] -disabled = Bug 1173697 +skip-if = android_version < '16' [test_wifi_associate_WPA_EAP_TLS.js] -disabled = Bug 1173697 +skip-if = android_version < '16' [test_wifi_enable_api.js] diff --git a/dom/workers/Queue.h b/dom/workers/Queue.h index f4f87e985aa..c7a99158bf6 100644 --- a/dom/workers/Queue.h +++ b/dom/workers/Queue.h @@ -17,7 +17,7 @@ BEGIN_WORKERS_NAMESPACE template struct StorageWithTArray { - typedef nsAutoTArray StorageType; + typedef AutoTArray StorageType; static void Reverse(StorageType& aStorage) { diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index 544de2631e7..53319e82617 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -126,7 +126,7 @@ static_assert(MAX_WORKERS_PER_DOMAIN >= 1, PR_BEGIN_MACRO \ AssertIsOnMainThread(); \ \ - nsAutoTArray workers; \ + AutoTArray workers; \ { \ MutexAutoLock lock(mMutex); \ \ @@ -1788,7 +1788,7 @@ RuntimeService::ShutdownIdleThreads(nsITimer* aTimer, void* /* aClosure */) TimeStamp nextExpiration; - nsAutoTArray, 20> expiredThreads; + AutoTArray, 20> expiredThreads; { MutexAutoLock lock(runtime->mMutex); @@ -1992,7 +1992,7 @@ RuntimeService::Shutdown() { MutexAutoLock lock(mMutex); - nsAutoTArray workers; + AutoTArray workers; AddAllTopLevelWorkersToArray(workers); if (!workers.IsEmpty()) { @@ -2033,7 +2033,7 @@ RuntimeService::Cleanup() { MutexAutoLock lock(mMutex); - nsAutoTArray workers; + AutoTArray workers; AddAllTopLevelWorkersToArray(workers); if (!workers.IsEmpty()) { @@ -2042,7 +2042,7 @@ RuntimeService::Cleanup() // Shut down any idle threads. if (!mIdleThreadArray.IsEmpty()) { - nsAutoTArray, 20> idleThreads; + AutoTArray, 20> idleThreads; uint32_t idleThreadCount = mIdleThreadArray.Length(); idleThreads.SetLength(idleThreadCount); @@ -2197,7 +2197,7 @@ RuntimeService::CancelWorkersForWindow(nsPIDOMWindowInner* aWindow) { AssertIsOnMainThread(); - nsAutoTArray workers; + AutoTArray workers; GetWorkersForWindow(aWindow, workers); if (!workers.IsEmpty()) { @@ -2225,7 +2225,7 @@ RuntimeService::FreezeWorkersForWindow(nsPIDOMWindowInner* aWindow) AssertIsOnMainThread(); MOZ_ASSERT(aWindow); - nsAutoTArray workers; + AutoTArray workers; GetWorkersForWindow(aWindow, workers); if (!workers.IsEmpty()) { @@ -2249,7 +2249,7 @@ RuntimeService::ThawWorkersForWindow(nsPIDOMWindowInner* aWindow) AssertIsOnMainThread(); MOZ_ASSERT(aWindow); - nsAutoTArray workers; + AutoTArray workers; GetWorkersForWindow(aWindow, workers); if (!workers.IsEmpty()) { @@ -2273,7 +2273,7 @@ RuntimeService::SuspendWorkersForWindow(nsPIDOMWindowInner* aWindow) AssertIsOnMainThread(); MOZ_ASSERT(aWindow); - nsAutoTArray workers; + AutoTArray workers; GetWorkersForWindow(aWindow, workers); for (uint32_t index = 0; index < workers.Length(); index++) { @@ -2287,7 +2287,7 @@ RuntimeService::ResumeWorkersForWindow(nsPIDOMWindowInner* aWindow) AssertIsOnMainThread(); MOZ_ASSERT(aWindow); - nsAutoTArray workers; + AutoTArray workers; GetWorkersForWindow(aWindow, workers); for (uint32_t index = 0; index < workers.Length(); index++) { diff --git a/dom/workers/ServiceWorkerEvents.cpp b/dom/workers/ServiceWorkerEvents.cpp index 21d4f4c819b..a6b763a679a 100644 --- a/dom/workers/ServiceWorkerEvents.cpp +++ b/dom/workers/ServiceWorkerEvents.cpp @@ -199,7 +199,7 @@ public: mChannel->SynthesizeStatus(mInternalResponse->GetUnfilteredStatus(), mInternalResponse->GetUnfilteredStatusText()); - nsAutoTArray entries; + AutoTArray entries; mInternalResponse->UnfilteredHeaders()->GetEntries(entries); for (uint32_t i = 0; i < entries.Length(); ++i) { mChannel->SynthesizeHeader(entries[i].mName, entries[i].mValue); diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index d91842e24f4..7f4af258525 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -2636,7 +2636,7 @@ ServiceWorkerManager::ReportToAllClients(const nsCString& aScope, return; } - nsAutoTArray windows; + AutoTArray windows; // Report errors to every controlled document. for (auto iter = mControlledDocuments.Iter(); !iter.Done(); iter.Next()) { @@ -5125,7 +5125,7 @@ public: } private: - nsAutoTArray, 1> mInstances; + AutoTArray, 1> mInstances; ServiceWorkerState mState; }; diff --git a/dom/workers/ServiceWorkerManager.h b/dom/workers/ServiceWorkerManager.h index afa7bdb40e4..15d02f4f765 100644 --- a/dom/workers/ServiceWorkerManager.h +++ b/dom/workers/ServiceWorkerManager.h @@ -205,7 +205,7 @@ private: // addition and removal. // There is a high chance of there being at least one ServiceWorker // associated with this all the time. - nsAutoTArray mInstances; + AutoTArray mInstances; RefPtr mServiceWorkerPrivate; bool mSkipWaitingFlag; diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index f6793730270..e2c0b96a651 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -3142,14 +3142,14 @@ WorkerPrivateParent::BroadcastErrorToSharedWorkers( { AssertIsOnMainThread(); - nsAutoTArray, 10> sharedWorkers; + AutoTArray, 10> sharedWorkers; GetAllSharedWorkers(sharedWorkers); if (sharedWorkers.IsEmpty()) { return; } - nsAutoTArray windowActions; + AutoTArray windowActions; nsresult rv; // First fire the error event at all SharedWorker objects. This may include @@ -5168,7 +5168,7 @@ WorkerPrivate::NotifyFeatures(JSContext* aCx, Status aStatus) } } - nsAutoTArray children; + AutoTArray children; children.AppendElements(mChildWorkers); for (uint32_t index = 0; index < children.Length(); index++) { @@ -5965,7 +5965,7 @@ WorkerPrivate::RunExpiredTimeouts(JSContext* aCx) (now - actual_now).ToMilliseconds())); } - nsAutoTArray expiredTimeouts; + AutoTArray expiredTimeouts; for (uint32_t index = 0; index < mTimeouts.Length(); index++) { nsAutoPtr& info = mTimeouts[index]; if (info->mTargetTime > now) { diff --git a/dom/workers/test/serviceworkers/browser.ini b/dom/workers/test/serviceworkers/browser.ini index 106bf096cf3..c0aae30d68f 100644 --- a/dom/workers/test/serviceworkers/browser.ini +++ b/dom/workers/test/serviceworkers/browser.ini @@ -2,8 +2,8 @@ support-files = browser_base_force_refresh.html browser_cached_force_refresh.html - download_window.html - download_worker.js + download/window.html + download/worker.js force_refresh_browser_worker.js [browser_force_refresh.js] diff --git a/dom/workers/test/serviceworkers/browser_download.js b/dom/workers/test/serviceworkers/browser_download.js index 94aafbf3475..f5f2765b8bb 100644 --- a/dom/workers/test/serviceworkers/browser_download.js +++ b/dom/workers/test/serviceworkers/browser_download.js @@ -48,7 +48,7 @@ function test() { ['dom.serviceWorkers.testing.enabled', true], ['dom.serviceWorkers.interception.enabled', true]]}, function() { - var url = gTestRoot + 'download_window.html'; + var url = gTestRoot + 'download/window.html'; var tab = gBrowser.addTab(); gBrowser.selectedTab = tab; diff --git a/dom/workers/test/serviceworkers/browser_force_refresh.js b/dom/workers/test/serviceworkers/browser_force_refresh.js index 5f235f6f5fa..e8fc77653f9 100644 --- a/dom/workers/test/serviceworkers/browser_force_refresh.js +++ b/dom/workers/test/serviceworkers/browser_force_refresh.js @@ -30,7 +30,9 @@ function test() { ['dom.serviceWorkers.exemptFromPerDomainMax', true], ['dom.serviceWorkers.testing.enabled', true], ['dom.serviceWorkers.interception.enabled', true], - ['dom.caches.enabled', true]]}, + ['dom.caches.enabled', true], + ['browser.cache.disk.enable', false], + ['browser.cache.memory.enable', false]]}, function() { var url = gTestRoot + 'browser_base_force_refresh.html'; var tab = gBrowser.addTab(); @@ -39,24 +41,37 @@ function test() { tab.linkedBrowser.messageManager.loadFrameScript("data:,(" + encodeURIComponent(frameScript) + ")()", true); gBrowser.loadURI(url); + function done() { + tab.linkedBrowser.messageManager.removeMessageListener("test:event", eventHandler); + + gBrowser.removeTab(tab); + executeSoon(finish); + } + var cachedLoad = false; + var baseLoadCount = 0; function eventHandler(msg) { if (msg.data.type === 'base-load') { + baseLoadCount += 1; if (cachedLoad) { - tab.linkedBrowser.messageManager.removeMessageListener("test:event", eventHandler); - - gBrowser.removeTab(tab); - executeSoon(finish); + is(baseLoadCount, 2, 'cached load should occur before second base load'); + return done(); + } + if (baseLoadCount !== 1) { + ok(false, 'base load without cached load should only occur once'); + return done(); } } else if (msg.data.type === 'base-register') { ok(!cachedLoad, 'cached load should not occur before base register'); - refresh(); + is(baseLoadCount, 1, 'register should occur after first base load'); } else if (msg.data.type === 'base-sw-ready') { ok(!cachedLoad, 'cached load should not occur before base ready'); + is(baseLoadCount, 1, 'ready should occur after first base load'); refresh(); } else if (msg.data.type === 'cached-load') { ok(!cachedLoad, 'cached load should not occur twice'); + is(baseLoadCount, 1, 'cache load occur after first base load'); cachedLoad = true; forceRefresh(); } diff --git a/dom/workers/test/serviceworkers/download_window.html b/dom/workers/test/serviceworkers/download/window.html similarity index 94% rename from dom/workers/test/serviceworkers/download_window.html rename to dom/workers/test/serviceworkers/download/window.html index 335ed29fc20..7d7893e0e61 100644 --- a/dom/workers/test/serviceworkers/download_window.html +++ b/dom/workers/test/serviceworkers/download/window.html @@ -24,7 +24,7 @@ function wait_until_controlled() { } addEventListener('load', function(event) { var registration; - navigator.serviceWorker.register('download_worker.js').then(function(swr) { + navigator.serviceWorker.register('worker.js').then(function(swr) { registration = swr; // While the iframe below is a navigation, we still wait until we are diff --git a/dom/workers/test/serviceworkers/download_worker.js b/dom/workers/test/serviceworkers/download/worker.js similarity index 100% rename from dom/workers/test/serviceworkers/download_worker.js rename to dom/workers/test/serviceworkers/download/worker.js diff --git a/dom/xbl/nsXBLEventHandler.cpp b/dom/xbl/nsXBLEventHandler.cpp index 790ee374b13..2522419f8e6 100644 --- a/dom/xbl/nsXBLEventHandler.cpp +++ b/dom/xbl/nsXBLEventHandler.cpp @@ -140,7 +140,7 @@ nsXBLKeyEventHandler::HandleEvent(nsIDOMEvent* aEvent) if (!key) return NS_OK; - nsAutoTArray accessKeys; + AutoTArray accessKeys; nsContentUtils::GetAccelKeyCandidates(key, accessKeys); if (accessKeys.IsEmpty()) { diff --git a/dom/xbl/nsXBLService.cpp b/dom/xbl/nsXBLService.cpp index 569fcdb72c0..08f6db50eb9 100644 --- a/dom/xbl/nsXBLService.cpp +++ b/dom/xbl/nsXBLService.cpp @@ -188,7 +188,7 @@ private: ~nsXBLStreamListener(); nsCOMPtr mInner; - nsAutoTArray mBindingRequests; + AutoTArray mBindingRequests; nsCOMPtr mBoundDocument; nsCOMPtr mSink; // Only set until OnStartRequest @@ -647,7 +647,7 @@ nsXBLService::GetBinding(nsIContent* aBoundElement, nsIURI* aURI, bool* aIsReady, nsXBLBinding** aResult) { // More than 6 binding URIs are rare, see bug 55070 comment 18. - nsAutoTArray, 6> uris; + AutoTArray, 6> uris; return GetBinding(aBoundElement, aURI, aPeekOnly, aOriginPrincipal, aIsReady, aResult, uris); } diff --git a/dom/xbl/nsXBLWindowKeyHandler.cpp b/dom/xbl/nsXBLWindowKeyHandler.cpp index fd51f621a33..083a11aa6e4 100644 --- a/dom/xbl/nsXBLWindowKeyHandler.cpp +++ b/dom/xbl/nsXBLWindowKeyHandler.cpp @@ -441,7 +441,7 @@ nsXBLWindowKeyHandler::WalkHandlersInternal(nsIDOMKeyEvent* aKeyEvent, bool aExecute, bool* aOutReservedForChrome) { - nsAutoTArray accessKeys; + AutoTArray accessKeys; nsContentUtils::GetAccelKeyCandidates(aKeyEvent, accessKeys); if (accessKeys.IsEmpty()) { diff --git a/dom/xslt/xpath/txMozillaXPathTreeWalker.cpp b/dom/xslt/xpath/txMozillaXPathTreeWalker.cpp index 231b7ea465b..fee671ea59f 100644 --- a/dom/xslt/xpath/txMozillaXPathTreeWalker.cpp +++ b/dom/xslt/xpath/txMozillaXPathTreeWalker.cpp @@ -604,7 +604,7 @@ txXPathNodeUtils::comparePosition(const txXPathNode& aNode, // same tree. // Get parents up the tree. - nsAutoTArray parents, otherParents; + AutoTArray parents, otherParents; nsINode* node = aNode.mNode; nsINode* otherNode = aOtherNode.mNode; nsINode* parent; diff --git a/dom/xslt/xpath/txXPCOMExtensionFunction.cpp b/dom/xslt/xpath/txXPCOMExtensionFunction.cpp index f70c096b44e..e8d8b61d884 100644 --- a/dom/xslt/xpath/txXPCOMExtensionFunction.cpp +++ b/dom/xslt/xpath/txXPCOMExtensionFunction.cpp @@ -298,7 +298,7 @@ txXPCOMExtensionFunctionCall::GetParamType(const nsXPTParamInfo &aParam, } } -class txParamArrayHolder : public JS::Traceable +class txParamArrayHolder { public: txParamArrayHolder() @@ -319,7 +319,6 @@ public: return mArray.get(); } - static void trace(txParamArrayHolder* holder, JSTracer* trc) { holder->trace(trc); } void trace(JSTracer* trc) { for (uint8_t i = 0; i < mCount; ++i) { if (mArray[i].type == nsXPTType::T_JSVAL) { diff --git a/dom/xslt/xslt/txExecutionState.h b/dom/xslt/xslt/txExecutionState.h index f57a516ddaa..9352f93aca7 100644 --- a/dom/xslt/xslt/txExecutionState.h +++ b/dom/xslt/xslt/txExecutionState.h @@ -150,7 +150,7 @@ private: RefPtr mGlobalVarPlaceholderValue; int32_t mRecursionDepth; - AutoInfallibleTArray mTemplateRules; + AutoTArray mTemplateRules; txIEvalContext* mEvalContext; txIEvalContext* mInitialEvalContext; diff --git a/dom/xul/templates/nsTreeRows.h b/dom/xul/templates/nsTreeRows.h index 75eb1eba976..801af022693 100644 --- a/dom/xul/templates/nsTreeRows.h +++ b/dom/xul/templates/nsTreeRows.h @@ -187,7 +187,7 @@ public: class iterator { protected: int32_t mRowIndex; - nsAutoTArray mLink; + AutoTArray mLink; void Next(); void Prev(); diff --git a/dom/xul/templates/nsXULContentBuilder.cpp b/dom/xul/templates/nsXULContentBuilder.cpp index 95b644fa60a..246494016f6 100644 --- a/dom/xul/templates/nsXULContentBuilder.cpp +++ b/dom/xul/templates/nsXULContentBuilder.cpp @@ -1270,7 +1270,7 @@ nsXULContentBuilder::RemoveGeneratedContent(nsIContent* aElement) { // Keep a queue of "ungenerated" elements that we have to probe // for generated content. - nsAutoTArray ungenerated; + AutoTArray ungenerated; if (ungenerated.AppendElement(aElement) == nullptr) return NS_ERROR_OUT_OF_MEMORY; diff --git a/dom/xul/templates/nsXULTemplateBuilder.cpp b/dom/xul/templates/nsXULTemplateBuilder.cpp index fdcc35f1fdc..a5ea7597076 100644 --- a/dom/xul/templates/nsXULTemplateBuilder.cpp +++ b/dom/xul/templates/nsXULTemplateBuilder.cpp @@ -2358,7 +2358,7 @@ nsXULTemplateBuilder::AddSimpleRuleBindings(nsTemplateRule* aRule, // Crawl the content tree of a "simple" rule, adding a variable // assignment for any attribute whose value is "rdf:". - nsAutoTArray elements; + AutoTArray elements; if (elements.AppendElement(aElement) == nullptr) return NS_ERROR_OUT_OF_MEMORY; diff --git a/dom/xul/templates/nsXULTreeBuilder.cpp b/dom/xul/templates/nsXULTreeBuilder.cpp index e67f5e74d97..8c4e9682a78 100644 --- a/dom/xul/templates/nsXULTreeBuilder.cpp +++ b/dom/xul/templates/nsXULTreeBuilder.cpp @@ -1463,7 +1463,7 @@ nsXULTreeBuilder::OpenSubtreeOf(nsTreeRows::Subtree* aSubtree, nsIXULTemplateResult *aResult, int32_t* aDelta) { - nsAutoTArray open; + AutoTArray open; int32_t count = 0; int32_t rulecount = mQuerySets.Length(); diff --git a/editor/libeditor/nsEditor.cpp b/editor/libeditor/nsEditor.cpp index 2980365d1ca..bc604c141df 100644 --- a/editor/libeditor/nsEditor.cpp +++ b/editor/libeditor/nsEditor.cpp @@ -2664,7 +2664,7 @@ nsEditor::SplitNodeImpl(nsIContent& aExistingRightNode, nsIContent& aNewLeftNode) { // Remember all selection points. - nsAutoTArray savedRanges; + AutoTArray savedRanges; for (size_t i = 0; i < nsISelectionController::NUM_SELECTIONTYPES - 1; ++i) { SelectionType type(1 << i); SavedRange range; @@ -2811,7 +2811,7 @@ nsEditor::JoinNodesImpl(nsINode* aNodeToKeep, nsINode* parent = GetNodeLocation(aNodeToKeep, &keepOffset); // Remember all selection points. - nsAutoTArray savedRanges; + AutoTArray savedRanges; for (size_t i = 0; i < nsISelectionController::NUM_SELECTIONTYPES - 1; ++i) { SelectionType type(1 << i); SavedRange range; diff --git a/embedding/components/commandhandler/nsCommandGroup.cpp b/embedding/components/commandhandler/nsCommandGroup.cpp index 8619e207ad4..696b93f67c2 100644 --- a/embedding/components/commandhandler/nsCommandGroup.cpp +++ b/embedding/components/commandhandler/nsCommandGroup.cpp @@ -214,7 +214,7 @@ nsControllerCommandGroup::AddCommandToGroup(const char* aCommand, nsTArray* commandList = mGroupsHash.Get(groupKey); if (!commandList) { // make this list - commandList = new nsAutoTArray; + commandList = new AutoTArray; mGroupsHash.Put(groupKey, commandList); } diff --git a/extensions/cookie/nsPermissionManager.h b/extensions/cookie/nsPermissionManager.h index a75b2d62b6f..7dfcd443523 100644 --- a/extensions/cookie/nsPermissionManager.h +++ b/extensions/cookie/nsPermissionManager.h @@ -121,7 +121,7 @@ public: } // Force the hashtable to use the copy constructor when shuffling entries - // around, otherwise the Auto part of our nsAutoTArray won't be happy! + // around, otherwise the Auto part of our AutoTArray won't be happy! enum { ALLOW_MEMMOVE = false }; inline nsTArray & GetPermissions() @@ -150,7 +150,7 @@ public: } private: - nsAutoTArray mPermissions; + AutoTArray mPermissions; }; // nsISupports diff --git a/gfx/2d/StackArray.h b/gfx/2d/StackArray.h index e3c2684a0bf..a2451f93059 100644 --- a/gfx/2d/StackArray.h +++ b/gfx/2d/StackArray.h @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* A handy class that will allocate data for size*T objects on the stack and - * otherwise allocate them on the heap. It is similar in purpose to nsAutoTArray */ + * otherwise allocate them on the heap. It is similar in purpose to AutoTArray */ template class StackArray diff --git a/gfx/gl/DecomposeIntoNoRepeatTriangles.h b/gfx/gl/DecomposeIntoNoRepeatTriangles.h index 8e8b27ec5f6..f67d6f93e8a 100644 --- a/gfx/gl/DecomposeIntoNoRepeatTriangles.h +++ b/gfx/gl/DecomposeIntoNoRepeatTriangles.h @@ -45,8 +45,8 @@ public: } private: // Reserve inline storage for one quad (2 triangles, 3 coords). - nsAutoTArray mVertexCoords; - nsAutoTArray mTexCoords; + AutoTArray mVertexCoords; + AutoTArray mTexCoords; static void AppendRectToCoordArray(InfallibleTArray& array, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1); diff --git a/gfx/gl/GLContextProviderGLX.cpp b/gfx/gl/GLContextProviderGLX.cpp index aff5a78e79b..61c3fb46ffa 100644 --- a/gfx/gl/GLContextProviderGLX.cpp +++ b/gfx/gl/GLContextProviderGLX.cpp @@ -778,7 +778,7 @@ TRY_AGAIN_NO_SHARING: GLXContext glxContext = shareContext ? shareContext->mContext : nullptr; if (glx.HasCreateContextAttribs()) { - nsAutoTArray attrib_list; + AutoTArray attrib_list; if (glx.HasRobustness()) { int robust_attribs[] = { LOCAL_GL_CONTEXT_FLAGS_ARB, LOCAL_GL_CONTEXT_ROBUST_ACCESS_BIT_ARB, diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index 25b836f0972..0154a1a2eef 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -293,7 +293,7 @@ ImageContainer::SetCurrentImageInTransaction(Image *aImage) NS_ASSERTION(NS_IsMainThread(), "Should be on main thread."); NS_ASSERTION(!mImageClient, "Should use async image transfer with ImageBridge."); - nsAutoTArray images; + AutoTArray images; images.AppendElement(NonOwningImage(aImage)); SetCurrentImageInternal(images); } diff --git a/gfx/layers/ImageContainer.h b/gfx/layers/ImageContainer.h index c1a693e027f..e94e8875ff9 100644 --- a/gfx/layers/ImageContainer.h +++ b/gfx/layers/ImageContainer.h @@ -634,7 +634,7 @@ public: } private: - nsAutoTArray mImages; + AutoTArray mImages; }; struct PlanarYCbCrData { diff --git a/gfx/layers/LayerTreeInvalidation.cpp b/gfx/layers/LayerTreeInvalidation.cpp index 941d7c7ad6b..74f18051a07 100644 --- a/gfx/layers/LayerTreeInvalidation.cpp +++ b/gfx/layers/LayerTreeInvalidation.cpp @@ -21,7 +21,7 @@ #include "nsHashKeys.h" // for nsPtrHashKey #include "nsISupportsImpl.h" // for Layer::AddRef, etc #include "nsRect.h" // for IntRect -#include "nsTArray.h" // for nsAutoTArray, nsTArray_Impl +#include "nsTArray.h" // for AutoTArray, nsTArray_Impl #include "mozilla/layers/ImageHost.h" #include "mozilla/layers/LayerManagerComposite.h" @@ -383,7 +383,7 @@ struct ContainerLayerProperties : public LayerPropertiesBase } // The old list of children: - nsAutoTArray,1> mChildren; + AutoTArray,1> mChildren; float mPreXScale; float mPreYScale; }; diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index 9fe25c17b20..f6081cadb78 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -1331,7 +1331,7 @@ ContainerLayer::Collect3DContextLeaves(nsTArray& aToSort) void ContainerLayer::SortChildrenBy3DZOrder(nsTArray& aArray) { - nsAutoTArray toSort; + AutoTArray toSort; for (Layer* l = GetFirstChild(); l; l = l->GetNextSibling()) { ContainerLayer* container = l->AsContainerLayer(); diff --git a/gfx/layers/basic/BasicLayerManager.cpp b/gfx/layers/basic/BasicLayerManager.cpp index 46be276dcf1..9c3cfa4dc1a 100644 --- a/gfx/layers/basic/BasicLayerManager.cpp +++ b/gfx/layers/basic/BasicLayerManager.cpp @@ -43,7 +43,7 @@ #include "nsPoint.h" // for nsIntPoint #include "nsRect.h" // for mozilla::gfx::IntRect #include "nsRegion.h" // for nsIntRegion, etc -#include "nsTArray.h" // for nsAutoTArray +#include "nsTArray.h" // for AutoTArray #ifdef MOZ_ENABLE_SKIA #include "skia/include/core/SkCanvas.h" // for SkCanvas #include "skia/include/core/SkBitmapDevice.h" // for SkBitmapDevice @@ -897,7 +897,7 @@ BasicLayerManager::PaintSelfOrChildren(PaintLayerContext& aPaintContext, } else { ContainerLayer* container = static_cast(aPaintContext.mLayer); - nsAutoTArray children; + AutoTArray children; container->SortChildrenBy3DZOrder(children); for (uint32_t i = 0; i < children.Length(); i++) { Layer* layer = children.ElementAt(i); diff --git a/gfx/layers/client/CanvasClient.cpp b/gfx/layers/client/CanvasClient.cpp index 49143d9fadf..2a5c991c457 100644 --- a/gfx/layers/client/CanvasClient.cpp +++ b/gfx/layers/client/CanvasClient.cpp @@ -120,7 +120,7 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) } if (updated) { - nsAutoTArray textures; + AutoTArray textures; CompositableForwarder::TimedTextureClient* t = textures.AppendElement(); t->mTextureClient = mBuffer; t->mPictureRect = nsIntRect(nsIntPoint(0, 0), mBuffer->GetSize()); @@ -476,7 +476,7 @@ CanvasClientSharedSurface::Updated() // Add the new TexClient. MOZ_ALWAYS_TRUE( AddTextureClient(mFront) ); - nsAutoTArray textures; + AutoTArray textures; CompositableForwarder::TimedTextureClient* t = textures.AppendElement(); t->mTextureClient = mFront; t->mPictureRect = nsIntRect(nsIntPoint(0, 0), mFront->GetSize()); diff --git a/gfx/layers/client/ClientContainerLayer.h b/gfx/layers/client/ClientContainerLayer.h index c6ad5b65800..254d2a45a9c 100644 --- a/gfx/layers/client/ClientContainerLayer.h +++ b/gfx/layers/client/ClientContainerLayer.h @@ -13,7 +13,7 @@ #include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, etc #include "nsISupportsUtils.h" // for NS_ADDREF, NS_RELEASE #include "nsRegion.h" // for nsIntRegion -#include "nsTArray.h" // for nsAutoTArray +#include "nsTArray.h" // for AutoTArray #include "ReadbackProcessor.h" #include "ClientPaintedLayer.h" @@ -50,7 +50,7 @@ public: DefaultComputeSupportsComponentAlphaChildren(); - nsAutoTArray children; + AutoTArray children; SortChildrenBy3DZOrder(children); ReadbackProcessor readback; diff --git a/gfx/layers/client/ClientLayerManager.cpp b/gfx/layers/client/ClientLayerManager.cpp index 66797a935eb..cb65eff5ae9 100644 --- a/gfx/layers/client/ClientLayerManager.cpp +++ b/gfx/layers/client/ClientLayerManager.cpp @@ -26,7 +26,7 @@ #include "ClientReadbackLayer.h" // for ClientReadbackLayer #include "nsAString.h" #include "nsIWidgetListener.h" -#include "nsTArray.h" // for AutoInfallibleTArray +#include "nsTArray.h" // for AutoTArray #include "nsXULAppAPI.h" // for XRE_GetProcessType, etc #include "TiledLayerBuffer.h" #include "mozilla/dom/WindowBinding.h" // for Overfill Callback @@ -603,7 +603,7 @@ ClientLayerManager::ForwardTransaction(bool aScheduleComposite) // forward this transaction's changeset to our LayerManagerComposite bool sent; - AutoInfallibleTArray replies; + AutoTArray replies; if (mForwarder->EndTransaction(&replies, mRegionToClear, mLatestTransactionId, aScheduleComposite, mPaintSequenceNumber, mIsRepeatTransaction, transactionStart, &sent)) { diff --git a/gfx/layers/client/ClientLayerManager.h b/gfx/layers/client/ClientLayerManager.h index 7d8b3be4a94..94295c08565 100644 --- a/gfx/layers/client/ClientLayerManager.h +++ b/gfx/layers/client/ClientLayerManager.h @@ -350,8 +350,8 @@ private: APZTestData mApzTestData; RefPtr mForwarder; - nsAutoTArray,2> mTexturePools; - nsAutoTArray mOverfillCallbacks; + AutoTArray,2> mTexturePools; + AutoTArray mOverfillCallbacks; mozilla::TimeStamp mTransactionStart; nsTArray mDidCompositeObservers; diff --git a/gfx/layers/client/ContentClient.cpp b/gfx/layers/client/ContentClient.cpp index 77f37097261..9fc49bd6223 100644 --- a/gfx/layers/client/ContentClient.cpp +++ b/gfx/layers/client/ContentClient.cpp @@ -379,7 +379,7 @@ ContentClientRemoteBuffer::Updated(const nsIntRegion& aRegionToDraw, mForwarder->UseComponentAlphaTextures(this, mTextureClient, mTextureClientOnWhite); } else { - nsAutoTArray textures; + AutoTArray textures; CompositableForwarder::TimedTextureClient* t = textures.AppendElement(); t->mTextureClient = mTextureClient; IntSize size = mTextureClient->GetSize(); diff --git a/gfx/layers/client/ImageClient.cpp b/gfx/layers/client/ImageClient.cpp index 030ba720022..d7fda20665b 100644 --- a/gfx/layers/client/ImageClient.cpp +++ b/gfx/layers/client/ImageClient.cpp @@ -123,7 +123,7 @@ ImageClientSingle::FlushAllImages(AsyncTransactionWaiter* aAsyncTransactionWaite bool ImageClientSingle::UpdateImage(ImageContainer* aContainer, uint32_t aContentFlags) { - nsAutoTArray images; + AutoTArray images; uint32_t generationCounter; aContainer->GetCurrentImages(&images, &generationCounter); @@ -149,7 +149,7 @@ ImageClientSingle::UpdateImage(ImageContainer* aContainer, uint32_t aContentFlag } nsTArray newBuffers; - nsAutoTArray textures; + AutoTArray textures; for (auto& img : images) { Image* image = img.mImage; diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index f4db3f916e4..e44d5e23eee 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -1406,7 +1406,7 @@ AsyncCompositionManager::TransformShadowTree(TimeStamp aCurrentFrame, } #endif } else { - nsAutoTArray scrollableLayers; + AutoTArray scrollableLayers; #ifdef MOZ_WIDGET_ANDROID mLayerManager->GetRootScrollableLayers(scrollableLayers); #else diff --git a/gfx/layers/composite/ContainerLayerComposite.cpp b/gfx/layers/composite/ContainerLayerComposite.cpp index 0c842f937aa..f7a46eeeff9 100755 --- a/gfx/layers/composite/ContainerLayerComposite.cpp +++ b/gfx/layers/composite/ContainerLayerComposite.cpp @@ -29,7 +29,7 @@ #include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, etc #include "nsISupportsUtils.h" // for NS_ADDREF, NS_RELEASE #include "nsRegion.h" // for nsIntRegion -#include "nsTArray.h" // for nsAutoTArray +#include "nsTArray.h" // for AutoTArray #include "TextRenderer.h" // for TextRenderer #include #include "VRManager.h" // for VRManager @@ -190,7 +190,7 @@ ContainerRenderVR(ContainerT* aContainer, compositor->SetRenderTarget(surface); - nsAutoTArray children; + AutoTArray children; aContainer->SortChildrenBy3DZOrder(children); gfx::Matrix4x4 origTransform = aContainer->GetEffectiveTransform(); @@ -336,7 +336,7 @@ NeedToDrawCheckerboardingForLayer(Layer* aLayer, Color* aOutCheckerboardingColor struct PreparedData { RefPtr mTmpTarget; - nsAutoTArray mLayers; + AutoTArray mLayers; bool mNeedsSurfaceCopy; }; @@ -361,7 +361,7 @@ ContainerPrepare(ContainerT* aContainer, /** * Determine which layers to draw. */ - nsAutoTArray children; + AutoTArray children; aContainer->SortChildrenBy3DZOrder(children); for (uint32_t i = 0; i < children.Length(); i++) { diff --git a/gfx/layers/composite/FPSCounter.h b/gfx/layers/composite/FPSCounter.h index bf594093dbc..7a59267fced 100644 --- a/gfx/layers/composite/FPSCounter.h +++ b/gfx/layers/composite/FPSCounter.h @@ -12,7 +12,7 @@ #include "GLDefs.h" // for GLuint #include "mozilla/RefPtr.h" // for already_AddRefed, RefCounted #include "mozilla/TimeStamp.h" // for TimeStamp, TimeDuration -#include "nsTArray.h" // for nsAutoTArray, nsTArray_Impl, etc +#include "nsTArray.h" // for AutoTArray, nsTArray_Impl, etc #include "prio.h" // for NSPR file i/o namespace mozilla { @@ -87,7 +87,7 @@ private: * read at an offset except our latest write * we don't need an explicit read pointer. */ - nsAutoTArray mFrameTimestamps; + AutoTArray mFrameTimestamps; int mWriteIndex; // points to next open write slot int mIteratorIndex; // used only when iterating const char* mFPSName; diff --git a/gfx/layers/composite/FrameUniformityData.h b/gfx/layers/composite/FrameUniformityData.h index 70d9fb0efa6..f7e175f367d 100644 --- a/gfx/layers/composite/FrameUniformityData.h +++ b/gfx/layers/composite/FrameUniformityData.h @@ -30,7 +30,7 @@ struct LayerTransforms { gfx::Point GetStdDev(); // 60 fps * 5 seconds worth of data - nsAutoTArray mTransforms; + AutoTArray mTransforms; }; class LayerTransformRecorder { diff --git a/gfx/layers/d3d11/BlendShaderConstants.h b/gfx/layers/d3d11/BlendShaderConstants.h new file mode 100644 index 00000000000..b548e6e7efd --- /dev/null +++ b/gfx/layers/d3d11/BlendShaderConstants.h @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef MOZILLA_GFX_LAYERS_D3D11_BLENDSHADERCONSTANTS_H_ +#define MOZILLA_GFX_LAYERS_D3D11_BLENDSHADERCONSTANTS_H_ + +// These constants are shared between CompositorD3D11 and the blend pixel shader. +#define PS_LAYER_RGB 0 +#define PS_LAYER_RGBA 1 +#define PS_LAYER_YCBCR 2 +#define PS_LAYER_COLOR 3 + +// These must be in the same order as the Mask enum. +#define PS_MASK_NONE 0 +#define PS_MASK_2D 1 +#define PS_MASK_3D 2 + +// These must be in the same order as CompositionOp. +#define PS_BLEND_MULTIPLY 0 +#define PS_BLEND_SCREEN 1 +#define PS_BLEND_OVERLAY 2 +#define PS_BLEND_DARKEN 3 +#define PS_BLEND_LIGHTEN 4 +#define PS_BLEND_COLOR_DODGE 5 +#define PS_BLEND_COLOR_BURN 6 +#define PS_BLEND_HARD_LIGHT 7 +#define PS_BLEND_SOFT_LIGHT 8 +#define PS_BLEND_DIFFERENCE 9 +#define PS_BLEND_EXCLUSION 10 +#define PS_BLEND_HUE 11 +#define PS_BLEND_SATURATION 12 +#define PS_BLEND_COLOR 13 +#define PS_BLEND_LUMINOSITY 14 + +#if defined(__cplusplus) +namespace mozilla { +namespace layers { + +static inline int +BlendOpToShaderConstant(gfx::CompositionOp aOp) { + return int(aOp) - int(gfx::CompositionOp::OP_MULTIPLY); +} + +} // namespace layers +} // namespace mozilla + +// Sanity checks. +namespace { +static inline void BlendShaderConstantAsserts() { + static_assert(PS_MASK_NONE == int(mozilla::layers::MaskType::MaskNone), "shader constant is out of sync"); + static_assert(PS_MASK_2D == int(mozilla::layers::MaskType::Mask2d), "shader constant is out of sync"); + static_assert(PS_MASK_3D == int(mozilla::layers::MaskType::Mask3d), "shader constant is out of sync"); + static_assert(int(mozilla::gfx::CompositionOp::OP_LUMINOSITY) - int(mozilla::gfx::CompositionOp::OP_MULTIPLY) == 14, + "shader constants are out of sync"); +} +} // anonymous namespace +#endif + +#endif // MOZILLA_GFX_LAYERS_D3D11_BLENDSHADERCONSTANTS_H_ diff --git a/gfx/layers/d3d11/BlendingHelpers.hlslh b/gfx/layers/d3d11/BlendingHelpers.hlslh new file mode 100644 index 00000000000..57d27b23b25 --- /dev/null +++ b/gfx/layers/d3d11/BlendingHelpers.hlslh @@ -0,0 +1,184 @@ +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// Helper functions. +float hardlight(float dest, float src) { + if (src <= 0.5) { + return dest * (2.0 * src); + } else { + // Note: we substitute (2*src-1) into the screen formula below. + return 2.0 * dest + 2.0 * src - 1.0 - 2.0 * dest * src; + } +} + +float dodge(float dest, float src) { + if (dest == 0.0) { + return 0.0; + } else if (src == 1.0) { + return 1.0; + } else { + return min(1.0, dest / (1.0 - src)); + } +} + +float burn(float dest, float src) { + if (dest == 1.0) { + return 1.0; + } else if (src == 0.0) { + return 0.0; + } else { + return 1.0 - min(1.0, (1.0 - dest) / src); + } +} + +float darken(float dest) { + if (dest <= 0.25) { + return ((16.0 * dest - 12.0) * dest + 4.0) * dest; + } else { + return sqrt(dest); + } +} + +float softlight(float dest, float src) { + if (src <= 0.5) { + return dest - (1.0 - 2.0 * src) * dest * (1.0 - dest); + } else { + return dest + (2.0 * src - 1.0) * (darken(dest) - dest); + } +} + +float Lum(float3 c) { + return dot(float3(0.3, 0.59, 0.11), c); +} + +float3 ClipColor(float3 c) { + float L = Lum(c); + float n = min(min(c.r, c.g), c.b); + float x = max(max(c.r, c.g), c.b); + if (n < 0.0) { + c = L + (((c - L) * L) / (L - n)); + } + if (x > 1.0) { + c = L + (((c - L) * (1.0 - L)) / (x - L)); + } + return c; +} + +float3 SetLum(float3 c, float L) { + float d = L - Lum(c); + return ClipColor(float3( + c.r + d, + c.g + d, + c.b + d)); +} + +float Sat(float3 c) { + return max(max(c.r, c.g), c.b) - min(min(c.r, c.g), c.b); +} + +// To use this helper, re-arrange rgb such that r=min, g=mid, and b=max. +float3 SetSatInner(float3 c, float s) { + if (c.b > c.r) { + c.g = (((c.g - c.r) * s) / (c.b - c.r)); + c.b = s; + } else { + c.gb = float2(0.0, 0.0); + } + return float3(0.0, c.g, c.b); +} + +float3 SetSat(float3 c, float s) { + if (c.r <= c.g) { + if (c.g <= c.b) { + c.rgb = SetSatInner(c.rgb, s); + } else if (c.r <= c.b) { + c.rbg = SetSatInner(c.rbg, s); + } else { + c.brg = SetSatInner(c.brg, s); + } + } else if (c.r <= c.b) { + c.grb = SetSatInner(c.grb, s); + } else if (c.g <= c.b) { + c.gbr = SetSatInner(c.gbr, s); + } else { + c.bgr = SetSatInner(c.bgr, s); + } + return c; +} + +float3 BlendMultiply(float3 dest, float3 src) { + return dest * src; +} + +float3 BlendScreen(float3 dest, float3 src) { + return dest + src - (dest * src); +} + +float3 BlendOverlay(float3 dest, float3 src) { + return float3( + hardlight(src.r, dest.r), + hardlight(src.g, dest.g), + hardlight(src.b, dest.b)); +} + +float3 BlendDarken(float3 dest, float3 src) { + return min(dest, src); +} + +float3 BlendLighten(float3 dest, float3 src) { + return max(dest, src); +} + +float3 BlendColorDodge(float3 dest, float3 src) { + return float3( + dodge(dest.r, src.r), + dodge(dest.g, src.g), + dodge(dest.b, src.b)); +} + +float3 BlendColorBurn(float3 dest, float3 src) { + return float3( + burn(dest.r, src.r), + burn(dest.g, src.g), + burn(dest.b, src.b)); +} + +float3 BlendHardLight(float3 dest, float3 src) { + return float3( + hardlight(dest.r, src.r), + hardlight(dest.g, src.g), + hardlight(dest.b, src.b)); +} + +float3 BlendSoftLight(float3 dest, float3 src) { + return float3( + softlight(dest.r, src.r), + softlight(dest.g, src.g), + softlight(dest.b, src.b)); +} + +float3 BlendDifference(float3 dest, float3 src) { + return abs(dest - src); +} + +float3 BlendExclusion(float3 dest, float3 src) { + return dest + src - 2.0 * dest * src; +} + +float3 BlendHue(float3 dest, float3 src) { + return SetLum(SetSat(src, Sat(dest)), Lum(dest)); +} + +float3 BlendSaturation(float3 dest, float3 src) { + return SetLum(SetSat(dest, Sat(src)), Lum(dest)); +} + +float3 BlendColor(float3 dest, float3 src) { + return SetLum(src, Lum(dest)); +} + +float3 BlendLuminosity(float3 dest, float3 src) { + return SetLum(dest, Lum(src)); +} diff --git a/gfx/layers/d3d11/CompositorD3D11.cpp b/gfx/layers/d3d11/CompositorD3D11.cpp index 991aa1a5f46..065164f0088 100644 --- a/gfx/layers/d3d11/CompositorD3D11.cpp +++ b/gfx/layers/d3d11/CompositorD3D11.cpp @@ -24,6 +24,7 @@ #include "mozilla/EnumeratedArray.h" #include "mozilla/Telemetry.h" +#include "BlendShaderConstants.h" #include @@ -47,6 +48,16 @@ static const GUID sLayerManagerCount = const FLOAT sBlendFactor[] = { 0, 0, 0, 0 }; +namespace TexSlot { + static const int RGB = 0; + static const int Y = 1; + static const int Cb = 2; + static const int Cr = 3; + static const int RGBWhite = 4; + static const int Mask = 5; + static const int Backdrop = 6; +} + struct DeviceAttachmentsD3D11 { DeviceAttachmentsD3D11(ID3D11Device* device) @@ -67,11 +78,13 @@ struct DeviceAttachmentsD3D11 RefPtr mVertexBuffer; VertexShaderArray mVSQuadShader; + VertexShaderArray mVSQuadBlendShader; PixelShaderArray mSolidColorShader; PixelShaderArray mRGBAShader; PixelShaderArray mRGBShader; PixelShaderArray mYCbCrShader; PixelShaderArray mComponentAlphaShader; + PixelShaderArray mBlendShader; RefPtr mPSConstantBuffer; RefPtr mVSConstantBuffer; RefPtr mRasterizerState; @@ -447,6 +460,11 @@ CompositorD3D11::GetTextureFactoryIdentifier() ident.mParentProcessId = XRE_GetProcessType(); ident.mParentBackend = LayersBackend::LAYERS_D3D11; ident.mSyncHandle = mAttachments->mSyncHandle; + for (uint8_t op = 0; op < uint8_t(gfx::CompositionOp::OP_COUNT); op++) { + if (BlendOpIsMixBlendMode(gfx::CompositionOp(op))) { + ident.mSupportedBlendModes += gfx::CompositionOp(op); + } + } return ident; } @@ -503,10 +521,10 @@ CompositorD3D11::CreateRenderTarget(const gfx::IntRect& aRect, return rt.forget(); } -already_AddRefed -CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, - const CompositingRenderTarget* aSource, - const gfx::IntPoint &aSourcePoint) +RefPtr +CompositorD3D11::CreateTexture(const gfx::IntRect& aRect, + const CompositingRenderTarget* aSource, + const gfx::IntPoint& aSourcePoint) { MOZ_ASSERT(aRect.width != 0 && aRect.height != 0); @@ -524,7 +542,7 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, RefPtr texture; HRESULT hr = mDevice->CreateTexture2D(&desc, nullptr, getter_AddRefs(texture)); - NS_ASSERTION(texture, "Could not create texture"); + if (FAILED(hr) || !texture) { gfxCriticalNote << "Failed in CreateRenderTargetFromSource " << hexa(hr); HandleError(hr); @@ -559,6 +577,19 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, } } + return texture; +} + +already_AddRefed +CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, + const CompositingRenderTarget* aSource, + const gfx::IntPoint &aSourcePoint) +{ + RefPtr texture = CreateTexture(aRect, aSource, aSourcePoint); + if (!texture) { + return nullptr; + } + RefPtr rt = new CompositingRenderTargetD3D11(texture, aRect.TopLeft()); rt->SetSize(aRect.Size()); @@ -566,6 +597,29 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, return rt.forget(); } +bool +CompositorD3D11::CopyBackdrop(const gfx::IntRect& aRect, + RefPtr* aOutTexture, + RefPtr* aOutView) +{ + RefPtr texture = CreateTexture(aRect, mCurrentRT, aRect.TopLeft()); + if (!texture) { + return false; + } + + CD3D11_SHADER_RESOURCE_VIEW_DESC desc(D3D11_SRV_DIMENSION_TEXTURE2D, DXGI_FORMAT_B8G8R8A8_UNORM); + + RefPtr srv; + HRESULT hr = mDevice->CreateShaderResourceView(texture, &desc, getter_AddRefs(srv)); + if (FAILED(hr) || !srv) { + return false; + } + + *aOutTexture = texture.forget(); + *aOutView = srv.forget(); + return true; +} + void CompositorD3D11::SetRenderTarget(CompositingRenderTarget* aRenderTarget) { @@ -588,30 +642,27 @@ CompositorD3D11::SetRenderTarget(CompositingRenderTarget* aRenderTarget) } } -void -CompositorD3D11::SetPSForEffect(Effect* aEffect, MaskType aMaskType, gfx::SurfaceFormat aFormat) +ID3D11PixelShader* +CompositorD3D11::GetPSForEffect(Effect* aEffect, MaskType aMaskType) { switch (aEffect->mType) { case EffectTypes::SOLID_COLOR: - mContext->PSSetShader(mAttachments->mSolidColorShader[aMaskType], nullptr, 0); - return; + return mAttachments->mSolidColorShader[aMaskType]; case EffectTypes::RENDER_TARGET: - mContext->PSSetShader(mAttachments->mRGBAShader[aMaskType], nullptr, 0); - return; - case EffectTypes::RGB: - mContext->PSSetShader((aFormat == SurfaceFormat::B8G8R8A8 || aFormat == SurfaceFormat::R8G8B8A8) - ? mAttachments->mRGBAShader[aMaskType] - : mAttachments->mRGBShader[aMaskType], nullptr, 0); - return; + return mAttachments->mRGBAShader[aMaskType]; + case EffectTypes::RGB: { + SurfaceFormat format = static_cast(aEffect)->mTexture->GetFormat(); + return (format == SurfaceFormat::B8G8R8A8 || format == SurfaceFormat::R8G8B8A8) + ? mAttachments->mRGBAShader[aMaskType] + : mAttachments->mRGBShader[aMaskType]; + } case EffectTypes::YCBCR: - mContext->PSSetShader(mAttachments->mYCbCrShader[aMaskType], nullptr, 0); - return; + return mAttachments->mYCbCrShader[aMaskType]; case EffectTypes::COMPONENT_ALPHA: - mContext->PSSetShader(mAttachments->mComponentAlphaShader[aMaskType], nullptr, 0); - return; + return mAttachments->mComponentAlphaShader[aMaskType]; default: NS_WARNING("No shader to load"); - return; + return nullptr; } } @@ -798,6 +849,37 @@ CompositorD3D11::DrawVRDistortion(const gfx::Rect& aRect, mContext->IASetInputLayout(mAttachments->mInputLayout); } +static inline bool +EffectHasPremultipliedAlpha(Effect* aEffect) +{ + if (aEffect->mType == EffectTypes::RGB) { + return static_cast(aEffect)->mPremultiplied; + } + return true; +} + +static inline int +EffectToBlendLayerType(Effect* aEffect) +{ + switch (aEffect->mType) { + case EffectTypes::SOLID_COLOR: + return PS_LAYER_COLOR; + case EffectTypes::RGB: { + gfx::SurfaceFormat format = static_cast(aEffect)->mTexture->GetFormat(); + return (format == gfx::SurfaceFormat::B8G8R8A8 || format == gfx::SurfaceFormat::R8G8B8A8) + ? PS_LAYER_RGBA + : PS_LAYER_RGB; + } + case EffectTypes::RENDER_TARGET: + return PS_LAYER_RGBA; + case EffectTypes::YCBCR: + return PS_LAYER_YCBCR; + default: + MOZ_ASSERT_UNREACHABLE("blending not supported for this layer type"); + return 0; + } +} + void CompositorD3D11::DrawQuad(const gfx::Rect& aRect, const gfx::Rect& aClipRect, @@ -846,7 +928,7 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, } ID3D11ShaderResourceView* srView = source->GetShaderResourceView(); - mContext->PSSetShaderResources(3, 1, &srView); + mContext->PSSetShaderResources(TexSlot::Mask, 1, &srView); const gfx::Matrix4x4& maskTransform = maskEffect->mMaskTransform; NS_ASSERTION(maskTransform.Is2D(), "How did we end up with a 3D transform here?!"); @@ -871,16 +953,49 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, scissor.top = clipRect.y; scissor.bottom = clipRect.YMost(); + RefPtr vertexShader = mAttachments->mVSQuadShader[maskType]; + RefPtr pixelShader = GetPSForEffect(aEffectChain.mPrimaryEffect, maskType); + + RefPtr mixBlendBackdrop; + gfx::CompositionOp blendMode = gfx::CompositionOp::OP_OVER; + if (aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE]) { + EffectBlendMode *blendEffect = + static_cast(aEffectChain.mSecondaryEffects[EffectTypes::BLEND_MODE].get()); + blendMode = blendEffect->mBlendMode; + + // If the blend operation needs to read from the backdrop, copy the + // current render target into a new texture and bind it now. + if (BlendOpIsMixBlendMode(blendMode)) { + gfx::Matrix4x4 backdropTransform; + gfx::IntRect rect = ComputeBackdropCopyRect(aRect, aClipRect, aTransform, &backdropTransform); + + RefPtr srv; + if (CopyBackdrop(rect, &mixBlendBackdrop, &srv)) { + vertexShader = mAttachments->mVSQuadBlendShader[maskType]; + pixelShader = mAttachments->mBlendShader[MaskType::MaskNone]; + + ID3D11ShaderResourceView* srView = srv.get(); + mContext->PSSetShaderResources(TexSlot::Backdrop, 1, &srView); + + memcpy(&mVSConstants.backdropTransform, &backdropTransform._11, 64); + + mPSConstants.blendConfig[0] = EffectToBlendLayerType(aEffectChain.mPrimaryEffect); + mPSConstants.blendConfig[1] = int(maskType); + mPSConstants.blendConfig[2] = BlendOpToShaderConstant(blendMode); + mPSConstants.blendConfig[3] = EffectHasPremultipliedAlpha(aEffectChain.mPrimaryEffect); + } + } + } + mContext->RSSetScissorRects(1, &scissor); mContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); - mContext->VSSetShader(mAttachments->mVSQuadShader[maskType], nullptr, 0); + mContext->VSSetShader(vertexShader, nullptr, 0); + mContext->PSSetShader(pixelShader, nullptr, 0); const Rect* pTexCoordRect = nullptr; switch (aEffectChain.mPrimaryEffect->mType) { case EffectTypes::SOLID_COLOR: { - SetPSForEffect(aEffectChain.mPrimaryEffect, maskType, SurfaceFormat::UNKNOWN); - Color color = static_cast(aEffectChain.mPrimaryEffect.get())->mColor; mPSConstants.layerColor[0] = color.r * color.a * aOpacity; @@ -904,10 +1019,8 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, return; } - SetPSForEffect(aEffectChain.mPrimaryEffect, maskType, texturedEffect->mTexture->GetFormat()); - ID3D11ShaderResourceView* srView = source->GetShaderResourceView(); - mContext->PSSetShaderResources(0, 1, &srView); + mContext->PSSetShaderResources(TexSlot::RGB, 1, &srView); if (!texturedEffect->mPremultiplied) { mContext->OMSetBlendState(mAttachments->mNonPremulBlendState, sBlendFactor, 0xFFFFFFFF); @@ -933,8 +1046,6 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, return; } - SetPSForEffect(aEffectChain.mPrimaryEffect, maskType, ycbcrEffect->mTexture->GetFormat()); - if (!source->GetSubSource(Y) || !source->GetSubSource(Cb) || !source->GetSubSource(Cr)) { // This can happen if we failed to upload the textures, most likely // because of unsupported dimensions (we don't tile YCbCr textures). @@ -948,7 +1059,7 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, ID3D11ShaderResourceView* srViews[3] = { sourceY->GetShaderResourceView(), sourceCb->GetShaderResourceView(), sourceCr->GetShaderResourceView() }; - mContext->PSSetShaderResources(0, 3, srViews); + mContext->PSSetShaderResources(TexSlot::Y, 3, srViews); } break; case EffectTypes::COMPONENT_ALPHA: @@ -966,15 +1077,14 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect, return; } - SetPSForEffect(aEffectChain.mPrimaryEffect, maskType, effectComponentAlpha->mOnWhite->GetFormat()); - SetSamplerForFilter(effectComponentAlpha->mFilter); pTexCoordRect = &effectComponentAlpha->mTextureCoords; ID3D11ShaderResourceView* srViews[2] = { sourceOnBlack->GetShaderResourceView(), sourceOnWhite->GetShaderResourceView() }; - mContext->PSSetShaderResources(0, 2, srViews); + mContext->PSSetShaderResources(TexSlot::RGB, 1, &srViews[0]); + mContext->PSSetShaderResources(TexSlot::RGBWhite, 1, &srViews[1]); mContext->OMSetBlendState(mAttachments->mComponentBlendState, sBlendFactor, 0xFFFFFFFF); restoreBlendMode = true; @@ -1126,13 +1236,24 @@ CompositorD3D11::EndFrame() if (oldSize == mSize) { RefPtr chain; HRESULT hr = mSwapChain->QueryInterface((IDXGISwapChain1**)getter_AddRefs(chain)); - nsString vendorID; - nsCOMPtr gfxInfo = services::GetGfxInfo(); - gfxInfo->GetAdapterVendorID(vendorID); - bool isNvidia = vendorID.EqualsLiteral("0x10de") && !gfxWindowsPlatform::GetPlatform()->IsWARP(); - if (SUCCEEDED(hr) && chain && !isNvidia) { - // Avoid partial present on Nvidia hardware to try to work around - // bug 1189940 + // We can force partial present or block partial present, based on the value of + // this preference; the default is to disable it on Nvidia (bug 1189940) + bool allowPartialPresent = false; + + int32_t partialPresentPref = gfxPrefs::PartialPresent(); + if (partialPresentPref > 0) { + allowPartialPresent = true; + } else if (partialPresentPref < 0) { + allowPartialPresent = false; + } else if (partialPresentPref == 0) { + nsString vendorID; + nsCOMPtr gfxInfo = services::GetGfxInfo(); + gfxInfo->GetAdapterVendorID(vendorID); + allowPartialPresent = !vendorID.EqualsLiteral("0x10de") || + gfxWindowsPlatform::GetPlatform()->IsWARP(); + } + + if (SUCCEEDED(hr) && chain && allowPartialPresent) { DXGI_PRESENT_PARAMETERS params; PodZero(¶ms); params.DirtyRectsCount = mInvalidRegion.GetNumRects(); @@ -1375,6 +1496,9 @@ DeviceAttachmentsD3D11::CreateShaders() InitVertexShader(sLayerQuadVS, mVSQuadShader, MaskType::MaskNone); InitVertexShader(sLayerQuadMaskVS, mVSQuadShader, MaskType::Mask2d); InitVertexShader(sLayerQuadMask3DVS, mVSQuadShader, MaskType::Mask3d); + InitVertexShader(sLayerQuadBlendVS, mVSQuadBlendShader, MaskType::MaskNone); + InitVertexShader(sLayerQuadBlendMaskVS, mVSQuadBlendShader, MaskType::Mask2d); + InitVertexShader(sLayerQuadBlendMask3DVS, mVSQuadBlendShader, MaskType::Mask3d); InitPixelShader(sSolidColorShader, mSolidColorShader, MaskType::MaskNone); InitPixelShader(sSolidColorShaderMask, mSolidColorShader, MaskType::Mask2d); @@ -1385,6 +1509,7 @@ DeviceAttachmentsD3D11::CreateShaders() InitPixelShader(sRGBAShaderMask3D, mRGBAShader, MaskType::Mask3d); InitPixelShader(sYCbCrShader, mYCbCrShader, MaskType::MaskNone); InitPixelShader(sYCbCrShaderMask, mYCbCrShader, MaskType::Mask2d); + InitPixelShader(sBlendShader, mBlendShader, MaskType::MaskNone); if (gfxPrefs::ComponentAlphaEnabled()) { InitPixelShader(sComponentAlphaShader, mComponentAlphaShader, MaskType::MaskNone); InitPixelShader(sComponentAlphaShaderMask, mComponentAlphaShader, MaskType::Mask2d); diff --git a/gfx/layers/d3d11/CompositorD3D11.h b/gfx/layers/d3d11/CompositorD3D11.h index a328f474645..1621e039182 100644 --- a/gfx/layers/d3d11/CompositorD3D11.h +++ b/gfx/layers/d3d11/CompositorD3D11.h @@ -27,14 +27,14 @@ struct VertexShaderConstants gfx::Rect textureCoords; gfx::Rect layerQuad; gfx::Rect maskQuad; - float vrEyeToSourceUVScale[2]; - float vrEyeToSourceUVOffset[2]; + float backdropTransform[4][4]; }; struct PixelShaderConstants { float layerColor[4]; float layerOpacity[4]; + int blendConfig[4]; }; struct DeviceAttachmentsD3D11; @@ -168,8 +168,14 @@ private: bool UpdateRenderTarget(); bool UpdateConstantBuffers(); void SetSamplerForFilter(gfx::Filter aFilter); - void SetPSForEffect(Effect *aEffect, MaskType aMaskType, gfx::SurfaceFormat aFormat); + ID3D11PixelShader* GetPSForEffect(Effect *aEffect, MaskType aMaskType); void PaintToTarget(); + RefPtr CreateTexture(const gfx::IntRect& aRect, + const CompositingRenderTarget* aSource, + const gfx::IntPoint& aSourcePoint); + bool CopyBackdrop(const gfx::IntRect& aRect, + RefPtr* aOutTexture, + RefPtr* aOutView); RefPtr mContext; RefPtr mDevice; diff --git a/gfx/layers/d3d11/CompositorD3D11.hlsl b/gfx/layers/d3d11/CompositorD3D11.hlsl index 50fc120b0be..953c090c152 100644 --- a/gfx/layers/d3d11/CompositorD3D11.hlsl +++ b/gfx/layers/d3d11/CompositorD3D11.hlsl @@ -3,6 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "BlendingHelpers.hlslh" +#include "BlendShaderConstants.h" + typedef float4 rect; float4x4 mLayerTransform : register(vs, c0); @@ -11,19 +14,28 @@ float4 vRenderTargetOffset : register(vs, c8); rect vTextureCoords : register(vs, c9); rect vLayerQuad : register(vs, c10); rect vMaskQuad : register(vs, c11); +float4x4 mBackdropTransform : register(vs, c12); float4 fLayerColor : register(ps, c0); float fLayerOpacity : register(ps, c1); +// x = layer type +// y = mask type +// z = blend op +// w = is premultiplied +uint4 iBlendConfig : register(ps, c2); + sampler sSampler : register(ps, s0); -Texture2D tRGB; -Texture2D tY; -Texture2D tCb; -Texture2D tCr; -Texture2D tRGBWhite; -// Always bind this to slot 3 since this is always available! -Texture2D tMask : register(ps, t3); +// The mix-blend mega shader uses all variables, so we have to make sure they +// are assigned fixed slots. +Texture2D tRGB : register(ps, t0); +Texture2D tY : register(ps, t1); +Texture2D tCb : register(ps, t2); +Texture2D tCr : register(ps, t3); +Texture2D tRGBWhite : register(ps, t4); +Texture2D tMask : register(ps, t5); +Texture2D tBackdrop : register(ps, t6); struct VS_INPUT { float2 vPosition : POSITION; @@ -46,6 +58,14 @@ struct VS_MASK_3D_OUTPUT { float3 vMaskCoords : TEXCOORD1; }; +// Combined struct for the mix-blend compatible vertex shaders. +struct VS_BLEND_OUTPUT { + float4 vPosition : SV_Position; + float2 vTexCoords : TEXCOORD0; + float3 vMaskCoords : TEXCOORD1; + float2 vBackdropCoords : TEXCOORD2; +}; + struct PS_OUTPUT { float4 vSrc; float4 vAlpha; @@ -102,6 +122,16 @@ float4 VertexPosition(float4 aTransformedPosition) return result; } +float2 BackdropPosition(float4 aPosition) +{ + // Move the position from clip space (-1,1) into 0..1 space. + float2 pos; + pos.x = (aPosition.x + 1.0) / 2.0; + pos.y = 1.0 - (aPosition.y + 1.0) / 2.0; + + return mul(mBackdropTransform, float4(pos.xy, 0, 1.0)).xy; +} + VS_OUTPUT LayerQuadVS(const VS_INPUT aVertex) { VS_OUTPUT outp; @@ -163,13 +193,6 @@ float4 RGBAShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target return tRGB.Sample(sSampler, aVertex.vTexCoords) * fLayerOpacity * mask; } -float4 RGBAShaderMaskPremul(const VS_MASK_OUTPUT aVertex) : SV_Target -{ - float4 result = RGBAShaderMask(aVertex); - result.rgb *= result.a; - return result; -} - float4 RGBAShaderMask3D(const VS_MASK_3D_OUTPUT aVertex) : SV_Target { float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; @@ -177,13 +200,6 @@ float4 RGBAShaderMask3D(const VS_MASK_3D_OUTPUT aVertex) : SV_Target return tRGB.Sample(sSampler, aVertex.vTexCoords) * fLayerOpacity * mask; } -float4 RGBAShaderMask3DPremul(const VS_MASK_3D_OUTPUT aVertex) : SV_Target -{ - float4 result = RGBAShaderMask3D(aVertex); - result.rgb *= result.a; - return result; -} - float4 RGBShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target { float4 result; @@ -262,13 +278,6 @@ float4 RGBAShader(const VS_OUTPUT aVertex) : SV_Target return tRGB.Sample(sSampler, aVertex.vTexCoords) * fLayerOpacity; } -float4 RGBAShaderPremul(const VS_OUTPUT aVertex) : SV_Target -{ - float4 result = RGBAShader(aVertex); - result.rgb *= result.a; - return result; -} - float4 RGBShader(const VS_OUTPUT aVertex) : SV_Target { float4 result; @@ -298,3 +307,154 @@ float4 SolidColorShader(const VS_OUTPUT aVertex) : SV_Target { return fLayerColor; } + +// Mix-blend compatible vertex shaders. +VS_BLEND_OUTPUT LayerQuadBlendVS(const VS_INPUT aVertex) +{ + VS_OUTPUT v = LayerQuadVS(aVertex); + + VS_BLEND_OUTPUT o; + o.vPosition = v.vPosition; + o.vTexCoords = v.vTexCoords; + o.vMaskCoords = float3(0, 0, 0); + o.vBackdropCoords = BackdropPosition(v.vPosition); + return o; +} + +VS_BLEND_OUTPUT LayerQuadBlendMaskVS(const VS_INPUT aVertex) +{ + VS_MASK_OUTPUT v = LayerQuadMaskVS(aVertex); + + VS_BLEND_OUTPUT o; + o.vPosition = v.vPosition; + o.vTexCoords = v.vTexCoords; + o.vMaskCoords = float3(v.vMaskCoords, 0); + o.vBackdropCoords = BackdropPosition(v.vPosition); + return o; +} + +VS_BLEND_OUTPUT LayerQuadBlendMask3DVS(const VS_INPUT aVertex) +{ + VS_MASK_3D_OUTPUT v = LayerQuadMask3DVS(aVertex); + + VS_BLEND_OUTPUT o; + o.vPosition = v.vPosition; + o.vTexCoords = v.vTexCoords; + o.vMaskCoords = v.vMaskCoords; + o.vBackdropCoords = BackdropPosition(v.vPosition); + return o; +} + +// The layer type and mask type are specified as constants. We use these to +// call the correct pixel shader to determine the source color for blending. +// Unfortunately this also requires some boilerplate to convert VS_BLEND_OUTPUT +// to a compatible pixel shader input. +float4 ComputeBlendSourceColor(const VS_BLEND_OUTPUT aVertex) +{ + if (iBlendConfig.y == PS_MASK_NONE) { + VS_OUTPUT tmp; + tmp.vPosition = aVertex.vPosition; + tmp.vTexCoords = aVertex.vTexCoords; + if (iBlendConfig.x == PS_LAYER_RGB) { + return RGBShader(tmp); + } else if (iBlendConfig.x == PS_LAYER_RGBA) { + return RGBAShader(tmp); + } else if (iBlendConfig.x == PS_LAYER_YCBCR) { + return YCbCrShader(tmp); + } + return SolidColorShader(tmp); + } else if (iBlendConfig.y == PS_MASK_2D) { + VS_MASK_OUTPUT tmp; + tmp.vPosition = aVertex.vPosition; + tmp.vTexCoords = aVertex.vTexCoords; + tmp.vMaskCoords = aVertex.vMaskCoords.xy; + + if (iBlendConfig.x == PS_LAYER_RGB) { + return RGBShaderMask(tmp); + } else if (iBlendConfig.x == PS_LAYER_RGBA) { + return RGBAShaderMask(tmp); + } else if (iBlendConfig.x == PS_LAYER_YCBCR) { + return YCbCrShaderMask(tmp); + } + return SolidColorShaderMask(tmp); + } else if (iBlendConfig.y == PS_MASK_3D) { + // The only Mask 3D shader is RGBA. + VS_MASK_3D_OUTPUT tmp; + tmp.vPosition = aVertex.vPosition; + tmp.vTexCoords = aVertex.vTexCoords; + tmp.vMaskCoords = aVertex.vMaskCoords; + return RGBAShaderMask3D(tmp); + } + + return float4(0.0, 0.0, 0.0, 1.0); +} + +float3 ChooseBlendFunc(float3 dest, float3 src) +{ + [flatten] switch (iBlendConfig.z) { + case PS_BLEND_MULTIPLY: + return BlendMultiply(dest, src); + case PS_BLEND_SCREEN: + return BlendScreen(dest, src); + case PS_BLEND_OVERLAY: + return BlendOverlay(dest, src); + case PS_BLEND_DARKEN: + return BlendDarken(dest, src); + case PS_BLEND_LIGHTEN: + return BlendLighten(dest, src); + case PS_BLEND_COLOR_DODGE: + return BlendColorDodge(dest, src); + case PS_BLEND_COLOR_BURN: + return BlendColorBurn(dest, src); + case PS_BLEND_HARD_LIGHT: + return BlendHardLight(dest, src); + case PS_BLEND_SOFT_LIGHT: + return BlendSoftLight(dest, src); + case PS_BLEND_DIFFERENCE: + return BlendDifference(dest, src); + case PS_BLEND_EXCLUSION: + return BlendExclusion(dest, src); + case PS_BLEND_HUE: + return BlendHue(dest, src); + case PS_BLEND_SATURATION: + return BlendSaturation(dest, src); + case PS_BLEND_COLOR: + return BlendColor(dest, src); + case PS_BLEND_LUMINOSITY: + return BlendLuminosity(dest, src); + default: + return float3(0, 0, 0); + } +} + +float4 BlendShader(const VS_BLEND_OUTPUT aVertex) : SV_Target +{ + float4 backdrop = tBackdrop.Sample(sSampler, aVertex.vBackdropCoords.xy); + float4 source = ComputeBlendSourceColor(aVertex); + + // Shortcut when the backdrop or source alpha is 0, otherwise we may leak + // infinity into the blend function and return incorrect results. + if (backdrop.a == 0.0) { + return source; + } + if (source.a == 0.0) { + return backdrop; + } + + // The spec assumes there is no premultiplied alpha. The backdrop is always + // premultiplied, so undo the premultiply. If the source is premultiplied we + // must fix that as well. + backdrop.rgb /= backdrop.a; + if (iBlendConfig.w) { + source.rgb /= source.a; + } + + float4 result; + result.rgb = ChooseBlendFunc(backdrop.rgb, source.rgb); + result.a = source.a; + + // Factor backdrop alpha, then premultiply for the final OP_OVER. + result.rgb = (1.0 - backdrop.a) * source.rgb + backdrop.a * result.rgb; + result.rgb *= result.a; + return result; +} diff --git a/gfx/layers/d3d11/CompositorD3D11Shaders.h b/gfx/layers/d3d11/CompositorD3D11Shaders.h index 3a348988580..87881303259 100644 --- a/gfx/layers/d3d11/CompositorD3D11Shaders.h +++ b/gfx/layers/d3d11/CompositorD3D11Shaders.h @@ -15,8 +15,10 @@ struct ShaderBytes { const void* mData; size_t mLength; }; // float4 vTextureCoords; // Offset: 144 Size: 16 // float4 vLayerQuad; // Offset: 160 Size: 16 // float4 vMaskQuad; // Offset: 176 Size: 16 [unused] -// float4 fLayerColor; // Offset: 192 Size: 16 [unused] -// float fLayerOpacity; // Offset: 208 Size: 4 [unused] +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 [unused] +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] // // } // @@ -104,15 +106,15 @@ ret const BYTE LayerQuadVS[] = { - 68, 88, 66, 67, 200, 251, - 64, 251, 166, 240, 101, 137, - 191, 140, 75, 217, 9, 168, - 61, 163, 1, 0, 0, 0, - 180, 6, 0, 0, 6, 0, + 68, 88, 66, 67, 141, 229, + 88, 115, 31, 138, 49, 78, + 16, 5, 63, 222, 239, 137, + 213, 18, 1, 0, 0, 0, + 24, 7, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 152, 1, 0, 0, 160, 3, 0, 0, 28, 4, 0, 0, - 40, 6, 0, 0, 92, 6, + 140, 6, 0, 0, 192, 6, 0, 0, 65, 111, 110, 57, 88, 1, 0, 0, 88, 1, 0, 0, 0, 2, 254, 255, @@ -280,11 +282,11 @@ const BYTE LayerQuadVS[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, 69, 70, - 4, 2, 0, 0, 1, 0, + 104, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, 254, 255, - 0, 1, 0, 0, 208, 1, + 0, 1, 0, 0, 52, 2, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -293,41 +295,49 @@ const BYTE LayerQuadVS[] = 0, 0, 0, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, 60, 0, - 0, 0, 8, 0, 0, 0, - 96, 0, 0, 0, 224, 0, + 0, 0, 10, 0, 0, 0, + 96, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 1, + 0, 0, 0, 0, 80, 1, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 2, 0, - 0, 0, 48, 1, 0, 0, - 0, 0, 0, 0, 64, 1, - 0, 0, 64, 0, 0, 0, - 64, 0, 0, 0, 2, 0, - 0, 0, 48, 1, 0, 0, - 0, 0, 0, 0, 76, 1, - 0, 0, 128, 0, 0, 0, - 16, 0, 0, 0, 2, 0, 0, 0, 96, 1, 0, 0, 0, 0, 0, 0, 112, 1, + 0, 0, 64, 0, 0, 0, + 64, 0, 0, 0, 2, 0, + 0, 0, 96, 1, 0, 0, + 0, 0, 0, 0, 124, 1, + 0, 0, 128, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 144, 1, 0, 0, + 0, 0, 0, 0, 160, 1, 0, 0, 144, 0, 0, 0, 16, 0, 0, 0, 2, 0, - 0, 0, 128, 1, 0, 0, - 0, 0, 0, 0, 144, 1, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 192, 1, 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 2, 0, - 0, 0, 128, 1, 0, 0, - 0, 0, 0, 0, 155, 1, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 203, 1, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 128, 1, 0, 0, - 0, 0, 0, 0, 165, 1, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 213, 1, 0, 0, 192, 0, 0, 0, - 16, 0, 0, 0, 0, 0, + 64, 0, 0, 0, 0, 0, 0, 0, 96, 1, 0, 0, - 0, 0, 0, 0, 177, 1, - 0, 0, 208, 0, 0, 0, + 0, 0, 0, 0, 232, 1, + 0, 0, 0, 1, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 144, 1, 0, 0, + 0, 0, 0, 0, 244, 1, + 0, 0, 16, 1, 0, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 192, 1, 0, 0, + 0, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 20, 2, + 0, 0, 32, 1, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 36, 2, 0, 0, 0, 0, 0, 0, 109, 76, 97, 121, 101, 114, 84, 114, 97, 110, 115, 102, 111, 114, @@ -350,46 +360,55 @@ const BYTE LayerQuadVS[] = 0, 0, 118, 76, 97, 121, 101, 114, 81, 117, 97, 100, 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 67, - 111, 108, 111, 114, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 102, 76, 97, 121, 101, 114, + 67, 111, 108, 111, 114, 0, + 102, 76, 97, 121, 101, 114, + 79, 112, 97, 99, 105, 116, + 121, 0, 171, 171, 0, 0, + 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 77, 105, 99, 114, 111, 115, - 111, 102, 116, 32, 40, 82, - 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, - 114, 32, 67, 111, 109, 112, - 105, 108, 101, 114, 32, 54, - 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 3, 3, - 0, 0, 80, 79, 83, 73, - 84, 73, 79, 78, 0, 171, - 171, 171, 79, 83, 71, 78, - 80, 0, 0, 0, 2, 0, + 0, 0, 105, 66, 108, 101, + 110, 100, 67, 111, 110, 102, + 105, 103, 0, 171, 171, 171, + 1, 0, 19, 0, 1, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, + 44, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, - 56, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 68, 0, 0, 0, 0, 0, + 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, - 83, 86, 95, 80, 111, 115, - 105, 116, 105, 111, 110, 0, - 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171 + 3, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 0, 0, + 80, 79, 83, 73, 84, 73, + 79, 78, 0, 171, 171, 171, + 79, 83, 71, 78, 80, 0, + 0, 0, 2, 0, 0, 0, + 8, 0, 0, 0, 56, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 68, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 1, 0, 0, 0, + 3, 12, 0, 0, 83, 86, + 95, 80, 111, 115, 105, 116, + 105, 111, 110, 0, 84, 69, + 88, 67, 79, 79, 82, 68, + 0, 171, 171, 171 }; ShaderBytes sLayerQuadVS = { LayerQuadVS, sizeof(LayerQuadVS) }; #if 0 @@ -404,12 +423,14 @@ ShaderBytes sLayerQuadVS = { LayerQuadVS, sizeof(LayerQuadVS) }; // // float4 fLayerColor; // Offset: 0 Size: 16 // float fLayerOpacity; // Offset: 16 Size: 4 [unused] -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -460,15 +481,15 @@ ret const BYTE SolidColorShader[] = { - 68, 88, 66, 67, 30, 148, - 104, 202, 165, 39, 58, 182, - 100, 205, 95, 195, 52, 137, - 197, 241, 1, 0, 0, 0, - 224, 3, 0, 0, 6, 0, + 68, 88, 66, 67, 46, 104, + 157, 133, 222, 110, 60, 127, + 132, 226, 126, 208, 247, 164, + 42, 238, 1, 0, 0, 0, + 68, 4, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 132, 0, 0, 0, 204, 0, 0, 0, 72, 1, 0, 0, - 84, 3, 0, 0, 172, 3, + 184, 3, 0, 0, 16, 4, 0, 0, 65, 111, 110, 57, 68, 0, 0, 0, 68, 0, 0, 0, 0, 2, 255, 255, @@ -515,12 +536,12 @@ const BYTE SolidColorShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 4, 2, 0, 0, + 69, 70, 104, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, - 209, 1, 0, 0, 60, 0, + 52, 2, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -528,41 +549,49 @@ const BYTE SolidColorShader[] = 0, 0, 0, 0, 0, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, - 60, 0, 0, 0, 8, 0, + 60, 0, 0, 0, 10, 0, 0, 0, 96, 0, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 32, 1, 0, 0, 0, 0, + 80, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 44, 1, + 2, 0, 0, 0, 92, 1, 0, 0, 0, 0, 0, 0, - 60, 1, 0, 0, 16, 0, + 108, 1, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 76, 1, + 0, 0, 0, 0, 124, 1, 0, 0, 0, 0, 0, 0, - 92, 1, 0, 0, 32, 0, + 140, 1, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 156, 1, + 0, 0, 0, 0, 0, 0, + 172, 1, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 108, 1, + 0, 0, 0, 0, 188, 1, 0, 0, 0, 0, 0, 0, - 124, 1, 0, 0, 96, 0, + 204, 1, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 108, 1, + 0, 0, 0, 0, 188, 1, 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 160, 0, + 216, 1, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 44, 1, + 0, 0, 0, 0, 92, 1, 0, 0, 0, 0, 0, 0, - 156, 1, 0, 0, 176, 0, + 236, 1, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 172, 1, + 0, 0, 0, 0, 252, 1, 0, 0, 0, 0, 0, 0, - 188, 1, 0, 0, 192, 0, + 12, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 172, 1, + 0, 0, 0, 0, 252, 1, 0, 0, 0, 0, 0, 0, - 199, 1, 0, 0, 208, 0, + 23, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 172, 1, + 0, 0, 0, 0, 252, 1, + 0, 0, 0, 0, 0, 0, + 33, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 188, 1, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -574,58 +603,66 @@ const BYTE SolidColorShader[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 80, 0, - 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 68, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 80, 0, 0, 0, + 2, 0, 0, 0, 8, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 0, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 }; ShaderBytes sSolidColorShader = { SolidColorShader, sizeof(SolidColorShader) }; #if 0 @@ -640,12 +677,14 @@ ShaderBytes sSolidColorShader = { SolidColorShader, sizeof(SolidColorShader) }; // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -716,15 +755,15 @@ ret const BYTE RGBShader[] = { - 68, 88, 66, 67, 239, 198, - 87, 206, 69, 92, 245, 30, - 125, 195, 239, 77, 37, 241, - 175, 187, 1, 0, 0, 0, - 232, 4, 0, 0, 6, 0, + 68, 88, 66, 67, 65, 119, + 74, 180, 122, 23, 76, 16, + 140, 81, 225, 186, 127, 137, + 70, 249, 1, 0, 0, 0, + 76, 5, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 204, 0, 0, 0, 136, 1, 0, 0, 4, 2, 0, 0, - 92, 4, 0, 0, 180, 4, + 192, 4, 0, 0, 24, 5, 0, 0, 65, 111, 110, 57, 140, 0, 0, 0, 140, 0, 0, 0, 0, 2, 255, 255, @@ -802,12 +841,12 @@ const BYTE RGBShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 80, 2, + 82, 68, 69, 70, 180, 2, 0, 0, 1, 0, 0, 0, 148, 0, 0, 0, 3, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, - 0, 0, 29, 2, 0, 0, + 0, 0, 128, 2, 0, 0, 124, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -818,7 +857,7 @@ const BYTE RGBShader[] = 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 138, 0, + 13, 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -828,41 +867,49 @@ const BYTE RGBShader[] = 101, 114, 0, 116, 82, 71, 66, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, - 138, 0, 0, 0, 8, 0, + 138, 0, 0, 0, 10, 0, 0, 0, 172, 0, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 108, 1, 0, 0, 0, 0, + 156, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, + 0, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, + 184, 1, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 152, 1, + 2, 0, 0, 0, 200, 1, 0, 0, 0, 0, 0, 0, - 168, 1, 0, 0, 32, 0, + 216, 1, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 232, 1, + 0, 0, 0, 0, 0, 0, + 248, 1, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 200, 1, 0, 0, 96, 0, + 24, 2, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 212, 1, 0, 0, 160, 0, + 36, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, + 0, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 232, 1, 0, 0, 176, 0, + 56, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 8, 2, 0, 0, 192, 0, + 88, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 19, 2, 0, 0, 208, 0, + 99, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, + 0, 0, 0, 0, 0, 0, + 109, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -874,58 +921,66 @@ const BYTE RGBShader[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 80, 0, - 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 68, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 80, 0, 0, 0, + 2, 0, 0, 0, 8, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 3, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 }; ShaderBytes sRGBShader = { RGBShader, sizeof(RGBShader) }; #if 0 @@ -940,12 +995,14 @@ ShaderBytes sRGBShader = { RGBShader, sizeof(RGBShader) }; // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -1014,15 +1071,15 @@ ret const BYTE RGBAShader[] = { - 68, 88, 66, 67, 230, 59, - 90, 23, 60, 77, 18, 113, - 14, 129, 183, 152, 233, 55, - 111, 42, 1, 0, 0, 0, - 196, 4, 0, 0, 6, 0, + 68, 88, 66, 67, 134, 186, + 102, 217, 28, 249, 237, 84, + 31, 38, 2, 143, 235, 216, + 237, 103, 1, 0, 0, 0, + 40, 5, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 192, 0, 0, 0, 100, 1, 0, 0, 224, 1, 0, 0, - 56, 4, 0, 0, 144, 4, + 156, 4, 0, 0, 244, 4, 0, 0, 65, 111, 110, 57, 128, 0, 0, 0, 128, 0, 0, 0, 0, 2, 255, 255, @@ -1094,12 +1151,12 @@ const BYTE RGBAShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 80, 2, + 82, 68, 69, 70, 180, 2, 0, 0, 1, 0, 0, 0, 148, 0, 0, 0, 3, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, - 0, 0, 29, 2, 0, 0, + 0, 0, 128, 2, 0, 0, 124, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1110,7 +1167,7 @@ const BYTE RGBAShader[] = 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 138, 0, + 13, 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1120,41 +1177,49 @@ const BYTE RGBAShader[] = 101, 114, 0, 116, 82, 71, 66, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, - 138, 0, 0, 0, 8, 0, + 138, 0, 0, 0, 10, 0, 0, 0, 172, 0, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 108, 1, 0, 0, 0, 0, + 156, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, + 0, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, + 184, 1, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 152, 1, + 2, 0, 0, 0, 200, 1, 0, 0, 0, 0, 0, 0, - 168, 1, 0, 0, 32, 0, + 216, 1, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 232, 1, + 0, 0, 0, 0, 0, 0, + 248, 1, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 200, 1, 0, 0, 96, 0, + 24, 2, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 212, 1, 0, 0, 160, 0, + 36, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, + 0, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 232, 1, 0, 0, 176, 0, + 56, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 8, 2, 0, 0, 192, 0, + 88, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 19, 2, 0, 0, 208, 0, + 99, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, + 0, 0, 0, 0, 0, 0, + 109, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -1166,340 +1231,43 @@ const BYTE RGBAShader[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 80, 0, - 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 68, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 -}; -ShaderBytes sRGBAShader = { RGBAShader, sizeof(RGBAShader) }; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 -// -// -// Buffer Definitions: -// -// cbuffer $Globals -// { -// -// float4 fLayerColor; // Offset: 0 Size: 16 [unused] -// float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] -// -// } -// -// -// Resource Bindings: -// -// Name Type Format Dim Slot Elements -// ------------------------------ ---------- ------- ----------- ---- -------- -// sSampler sampler NA NA 0 1 -// tRGB texture float4 2d 0 1 -// $Globals cbuffer NA NA 0 1 -// -// -// -// Input signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Position 0 xyzw 0 POS float -// TEXCOORD 0 xy 1 NONE float xy -// -// -// Output signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Target 0 xyzw 0 TARGET float xyzw -// -// -// Constant buffer to DX9 shader constant mappings: -// -// Target Reg Buffer Start Reg # of Regs Data Conversion -// ---------- ------- --------- --------- ---------------------- -// c0 cb0 1 1 ( FLT, FLT, FLT, FLT) -// -// -// Sampler/Resource to DX9 shader sampler mappings: -// -// Target Sampler Source Sampler Source Resource -// -------------- --------------- ---------------- -// s0 s0 t0 -// -// -// Level9 shader bytecode: -// - ps_2_x - dcl t0.xy - dcl_2d s0 - texld r0, t0, s0 - mul r0, r0, c0.x - mul r0.xyz, r0.w, r0 - mov oC0, r0 - -// approximately 4 instruction slots used (1 texture, 3 arithmetic) -ps_4_0 -dcl_constantbuffer cb0[2], immediateIndexed -dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t0 -dcl_input_ps linear v1.xy -dcl_output o0.xyzw -dcl_temps 1 -sample r0.xyzw, v1.xyxx, t0.xyzw, s0 -mul r0.xyzw, r0.xyzw, cb0[1].xxxx -mul o0.xyz, r0.wwww, r0.xyzx -mov o0.w, r0.w -ret -// Approximately 5 instruction slots used -#endif - -const BYTE RGBAShaderPremul[] = -{ - 68, 88, 66, 67, 9, 19, - 234, 250, 161, 24, 191, 52, - 148, 34, 157, 98, 40, 39, - 76, 48, 1, 0, 0, 0, - 4, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 208, 0, 0, 0, 164, 1, - 0, 0, 32, 2, 0, 0, - 120, 4, 0, 0, 208, 4, - 0, 0, 65, 111, 110, 57, - 144, 0, 0, 0, 144, 0, - 0, 0, 0, 2, 255, 255, - 92, 0, 0, 0, 52, 0, - 0, 0, 1, 0, 40, 0, - 0, 0, 52, 0, 0, 0, - 52, 0, 1, 0, 36, 0, - 0, 0, 52, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 255, 255, - 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 3, 176, - 31, 0, 0, 2, 0, 0, - 0, 144, 0, 8, 15, 160, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 176, - 0, 8, 228, 160, 5, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 0, 0, - 0, 160, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 255, 128, 0, 0, 228, 128, - 1, 0, 0, 2, 0, 8, - 15, 128, 0, 0, 228, 128, - 255, 255, 0, 0, 83, 72, - 68, 82, 204, 0, 0, 0, - 64, 0, 0, 0, 51, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 90, 0, 0, 3, 0, 96, - 16, 0, 0, 0, 0, 0, - 88, 24, 0, 4, 0, 112, - 16, 0, 0, 0, 0, 0, - 85, 85, 0, 0, 98, 16, - 0, 3, 50, 16, 16, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, - 0, 0, 0, 0, 104, 0, - 0, 2, 1, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 6, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 56, 0, 0, 7, - 114, 32, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 130, 32, - 16, 0, 0, 0, 0, 0, - 58, 0, 16, 0, 0, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 5, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, - 69, 70, 80, 2, 0, 0, - 1, 0, 0, 0, 148, 0, - 0, 0, 3, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 255, 255, 0, 1, 0, 0, - 29, 2, 0, 0, 124, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, - 133, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, - 0, 0, 138, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 83, - 97, 109, 112, 108, 101, 114, - 0, 116, 82, 71, 66, 0, - 36, 71, 108, 111, 98, 97, - 108, 115, 0, 171, 138, 0, - 0, 0, 8, 0, 0, 0, - 172, 0, 0, 0, 224, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 108, 1, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 136, 1, - 0, 0, 16, 0, 0, 0, - 4, 0, 0, 0, 2, 0, - 0, 0, 152, 1, 0, 0, - 0, 0, 0, 0, 168, 1, - 0, 0, 32, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 184, 1, 0, 0, - 0, 0, 0, 0, 200, 1, - 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 184, 1, 0, 0, - 0, 0, 0, 0, 212, 1, - 0, 0, 160, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 232, 1, - 0, 0, 176, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 248, 1, 0, 0, - 0, 0, 0, 0, 8, 2, - 0, 0, 192, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 248, 1, 0, 0, - 0, 0, 0, 0, 19, 2, - 0, 0, 208, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 248, 1, 0, 0, - 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 67, 111, - 108, 111, 114, 0, 1, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 79, 112, 97, 99, - 105, 116, 121, 0, 171, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 76, - 97, 121, 101, 114, 84, 114, - 97, 110, 115, 102, 111, 114, - 109, 0, 3, 0, 3, 0, - 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 118, 82, 101, 110, 100, 101, - 114, 84, 97, 114, 103, 101, - 116, 79, 102, 102, 115, 101, - 116, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 73, 83, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, 71, 78, 80, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0, @@ -1524,7 +1292,7 @@ const BYTE RGBAShaderPremul[] = 83, 86, 95, 84, 97, 114, 103, 101, 116, 0, 171, 171 }; -ShaderBytes sRGBAShaderPremul = { RGBAShaderPremul, sizeof(RGBAShaderPremul) }; +ShaderBytes sRGBAShader = { RGBAShader, sizeof(RGBAShader) }; #if 0 // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 @@ -1537,12 +1305,14 @@ ShaderBytes sRGBAShaderPremul = { RGBAShaderPremul, sizeof(RGBAShaderPremul) }; // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -1553,7 +1323,7 @@ ShaderBytes sRGBAShaderPremul = { RGBAShaderPremul, sizeof(RGBAShaderPremul) }; // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 // tRGB texture float4 2d 0 1 -// tRGBWhite texture float4 2d 1 1 +// tRGBWhite texture float4 2d 4 1 // $Globals cbuffer NA NA 0 1 // // @@ -1586,7 +1356,7 @@ ShaderBytes sRGBAShaderPremul = { RGBAShaderPremul, sizeof(RGBAShaderPremul) }; // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- // s0 s0 t0 -// s1 s0 t1 +// s1 s0 t4 // // // Level9 shader bytecode: @@ -1611,12 +1381,12 @@ ps_4_0 dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t1 +dcl_resource_texture2d (float,float,float,float) t4 dcl_input_ps linear v1.xy dcl_output o0.xyzw dcl_output o1.xyzw dcl_temps 2 -sample r0.xyzw, v1.xyxx, t1.xyzw, s0 +sample r0.xyzw, v1.xyxx, t4.xyzw, s0 sample r1.xyzw, v1.xyxx, t0.xyzw, s0 add r0.xyzw, -r0.xyzw, r1.xyzw add r0.xyzw, r0.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000) @@ -1629,15 +1399,15 @@ ret const BYTE ComponentAlphaShader[] = { - 68, 88, 66, 67, 186, 162, - 72, 42, 69, 36, 160, 68, - 108, 121, 216, 238, 108, 37, - 6, 145, 1, 0, 0, 0, - 68, 6, 0, 0, 6, 0, + 68, 88, 66, 67, 70, 65, + 219, 11, 235, 82, 64, 151, + 37, 101, 86, 144, 19, 4, + 125, 155, 1, 0, 0, 0, + 168, 6, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 64, 1, 0, 0, 160, 2, 0, 0, 28, 3, 0, 0, - 160, 5, 0, 0, 248, 5, + 4, 6, 0, 0, 92, 6, 0, 0, 65, 111, 110, 57, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 255, 255, @@ -1646,7 +1416,7 @@ const BYTE ComponentAlphaShader[] = 0, 0, 56, 0, 0, 0, 56, 0, 2, 0, 36, 0, 0, 0, 56, 0, 0, 0, - 0, 0, 1, 0, 1, 0, + 0, 0, 4, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, 81, 0, @@ -1693,7 +1463,7 @@ const BYTE ComponentAlphaShader[] = 0, 4, 0, 112, 16, 0, 0, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 1, 0, + 0, 112, 16, 0, 4, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, @@ -1706,7 +1476,7 @@ const BYTE ComponentAlphaShader[] = 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 1, 0, 0, 0, + 16, 0, 4, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 69, 0, 0, 9, 242, 0, 16, 0, 1, 0, @@ -1762,12 +1532,12 @@ const BYTE ComponentAlphaShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 124, 2, 0, 0, + 69, 70, 224, 2, 0, 0, 1, 0, 0, 0, 192, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, - 73, 2, 0, 0, 156, 0, + 172, 2, 0, 0, 156, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1777,13 +1547,13 @@ const BYTE ComponentAlphaShader[] = 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, + 1, 0, 0, 0, 13, 0, 0, 0, 170, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 1, 0, + 255, 255, 255, 255, 4, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 180, 0, + 13, 0, 0, 0, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1795,41 +1565,49 @@ const BYTE ComponentAlphaShader[] = 87, 104, 105, 116, 101, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, - 180, 0, 0, 0, 8, 0, + 180, 0, 0, 0, 10, 0, 0, 0, 216, 0, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 152, 1, 0, 0, 0, 0, + 200, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 164, 1, + 0, 0, 0, 0, 212, 1, 0, 0, 0, 0, 0, 0, - 180, 1, 0, 0, 16, 0, + 228, 1, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 196, 1, + 2, 0, 0, 0, 244, 1, 0, 0, 0, 0, 0, 0, - 212, 1, 0, 0, 32, 0, + 4, 2, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 20, 2, + 0, 0, 0, 0, 0, 0, + 36, 2, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 228, 1, + 0, 0, 0, 0, 52, 2, 0, 0, 0, 0, 0, 0, - 244, 1, 0, 0, 96, 0, + 68, 2, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 228, 1, + 0, 0, 0, 0, 52, 2, 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 160, 0, + 80, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 164, 1, + 0, 0, 0, 0, 212, 1, 0, 0, 0, 0, 0, 0, - 20, 2, 0, 0, 176, 0, + 100, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 0, - 52, 2, 0, 0, 192, 0, + 132, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 0, - 63, 2, 0, 0, 208, 0, + 143, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 116, 2, + 0, 0, 0, 0, 0, 0, + 153, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 52, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -1841,62 +1619,70 @@ const BYTE ComponentAlphaShader[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 80, 0, - 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 68, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 68, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 80, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0, - 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 56, 0, 0, 0, - 1, 0, 0, 0, 0, 0, + 0, 0, 68, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 + 1, 0, 0, 0, 3, 3, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 68, 0, 0, 0, 2, 0, + 0, 0, 8, 0, 0, 0, + 56, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 56, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 }; ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlphaShader) }; #if 0 @@ -1911,12 +1697,14 @@ ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlph // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -1926,9 +1714,9 @@ ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlph // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 -// tY texture float4 2d 0 1 -// tCb texture float4 2d 1 1 -// tCr texture float4 2d 2 1 +// tY texture float4 2d 1 1 +// tCb texture float4 2d 2 1 +// tCr texture float4 2d 3 1 // $Globals cbuffer NA NA 0 1 // // @@ -1959,9 +1747,9 @@ ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlph // // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- -// s0 s0 t0 -// s1 s0 t1 -// s2 s0 t2 +// s0 s0 t1 +// s1 s0 t2 +// s2 s0 t3 // // // Level9 shader bytecode: @@ -1993,20 +1781,20 @@ ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlph ps_4_0 dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t2 +dcl_resource_texture2d (float,float,float,float) t3 dcl_input_ps linear v1.xy dcl_output o0.xyzw dcl_temps 3 -sample r0.xyzw, v1.xyxx, t2.xyzw, s0 +sample r0.xyzw, v1.xyxx, t3.xyzw, s0 add r0.x, r0.x, l(-0.501960) mul r0.xy, r0.xxxx, l(1.596030, 0.812970, 0.000000, 0.000000) -sample r1.xyzw, v1.xyxx, t0.xyzw, s0 +sample r1.xyzw, v1.xyxx, t1.xyzw, s0 add r0.z, r1.x, l(-0.062750) mad r0.y, r0.z, l(1.164380), -r0.y mad r1.x, r0.z, l(1.164380), r0.x -sample r2.xyzw, v1.xyxx, t1.xyzw, s0 +sample r2.xyzw, v1.xyxx, t2.xyzw, s0 add r0.x, r2.x, l(-0.501960) mad r1.y, -r0.x, l(0.391760), r0.y mul r0.x, r0.x, l(2.017230) @@ -2019,15 +1807,15 @@ ret const BYTE YCbCrShader[] = { - 68, 88, 66, 67, 127, 202, - 65, 67, 171, 51, 222, 111, - 252, 139, 60, 115, 30, 112, - 240, 10, 1, 0, 0, 0, - 212, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 17, 182, + 131, 145, 148, 37, 135, 136, + 214, 75, 157, 57, 87, 83, + 119, 226, 1, 0, 0, 0, + 56, 8, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 220, 1, 0, 0, 44, 4, 0, 0, 168, 4, 0, 0, - 72, 7, 0, 0, 160, 7, + 172, 7, 0, 0, 4, 8, 0, 0, 65, 111, 110, 57, 156, 1, 0, 0, 156, 1, 0, 0, 0, 2, 255, 255, @@ -2035,9 +1823,9 @@ const BYTE YCbCrShader[] = 0, 0, 1, 0, 48, 0, 0, 0, 60, 0, 0, 0, 60, 0, 3, 0, 36, 0, - 0, 0, 60, 0, 0, 0, - 0, 0, 1, 0, 1, 0, - 2, 0, 2, 0, 0, 0, + 0, 0, 60, 0, 1, 0, + 0, 0, 2, 0, 1, 0, + 3, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, 81, 0, 0, 5, @@ -2107,12 +1895,12 @@ const BYTE YCbCrShader[] = 0, 3, 0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, + 1, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 1, 0, + 0, 112, 16, 0, 2, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 2, 0, 0, 0, + 16, 0, 3, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 101, 0, @@ -2123,7 +1911,7 @@ const BYTE YCbCrShader[] = 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, 16, 0, - 2, 0, 0, 0, 0, 96, + 3, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 18, 0, 16, 0, 0, 0, 0, 0, @@ -2140,7 +1928,7 @@ const BYTE YCbCrShader[] = 242, 0, 16, 0, 1, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 0, 0, 0, 0, + 16, 0, 1, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 66, 0, 16, 0, 0, 0, @@ -2163,7 +1951,7 @@ const BYTE YCbCrShader[] = 0, 9, 242, 0, 16, 0, 2, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 1, 0, + 70, 126, 16, 0, 2, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 18, 0, 16, 0, @@ -2218,12 +2006,12 @@ const BYTE YCbCrShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 152, 2, 0, 0, + 69, 70, 252, 2, 0, 0, 1, 0, 0, 0, 220, 0, 0, 0, 5, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, - 101, 2, 0, 0, 188, 0, + 200, 2, 0, 0, 188, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2232,19 +2020,19 @@ const BYTE YCbCrShader[] = 197, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, - 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, + 255, 255, 1, 0, 0, 0, + 1, 0, 0, 0, 13, 0, 0, 0, 200, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 1, 0, + 255, 255, 255, 255, 2, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 204, 0, + 13, 0, 0, 0, 204, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, - 2, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 13, 0, 0, 0, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2256,41 +2044,49 @@ const BYTE YCbCrShader[] = 116, 67, 114, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, 208, 0, - 0, 0, 8, 0, 0, 0, - 244, 0, 0, 0, 224, 0, + 0, 0, 10, 0, 0, 0, + 244, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 180, 1, + 0, 0, 0, 0, 228, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 192, 1, 0, 0, - 0, 0, 0, 0, 208, 1, + 0, 0, 240, 1, 0, 0, + 0, 0, 0, 0, 0, 2, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, 2, 0, - 0, 0, 224, 1, 0, 0, - 0, 0, 0, 0, 240, 1, + 0, 0, 16, 2, 0, 0, + 0, 0, 0, 0, 32, 2, 0, 0, 32, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 16, 2, - 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 28, 2, - 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 192, 1, 0, 0, - 0, 0, 0, 0, 48, 2, + 0, 0, 48, 2, 0, 0, + 0, 0, 0, 0, 64, 2, + 0, 0, 48, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 80, 2, 0, 0, + 0, 0, 0, 0, 96, 2, + 0, 0, 112, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 80, 2, 0, 0, + 0, 0, 0, 0, 108, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 64, 2, 0, 0, - 0, 0, 0, 0, 80, 2, + 0, 0, 240, 1, 0, 0, + 0, 0, 0, 0, 128, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 64, 2, 0, 0, - 0, 0, 0, 0, 91, 2, + 0, 0, 144, 2, 0, 0, + 0, 0, 0, 0, 160, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 64, 2, 0, 0, + 0, 0, 144, 2, 0, 0, + 0, 0, 0, 0, 171, 2, + 0, 0, 224, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 144, 2, 0, 0, + 0, 0, 0, 0, 181, 2, + 0, 0, 240, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 80, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, 1, 0, @@ -2301,58 +2097,67 @@ const BYTE YCbCrShader[] = 105, 116, 121, 0, 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 76, - 97, 121, 101, 114, 84, 114, - 97, 110, 115, 102, 111, 114, - 109, 0, 3, 0, 3, 0, - 4, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 105, 66, + 108, 101, 110, 100, 67, 111, + 110, 102, 105, 103, 0, 171, + 171, 171, 1, 0, 19, 0, + 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 118, 82, 101, 110, 100, 101, - 114, 84, 97, 114, 103, 101, - 116, 79, 102, 102, 115, 101, - 116, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 73, 83, - 71, 78, 80, 0, 0, 0, - 2, 0, 0, 0, 8, 0, - 0, 0, 56, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 68, 0, 0, 0, + 109, 76, 97, 121, 101, 114, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 3, 0, + 3, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 3, - 0, 0, 83, 86, 95, 80, - 111, 115, 105, 116, 105, 111, - 110, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, - 171, 171, 79, 83, 71, 78, - 44, 0, 0, 0, 1, 0, + 0, 0, 109, 80, 114, 111, + 106, 101, 99, 116, 105, 111, + 110, 0, 118, 82, 101, 110, + 100, 101, 114, 84, 97, 114, + 103, 101, 116, 79, 102, 102, + 115, 101, 116, 0, 118, 84, + 101, 120, 116, 117, 114, 101, + 67, 111, 111, 114, 100, 115, + 0, 171, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 118, 76, 97, 121, 101, 114, + 81, 117, 97, 100, 0, 118, + 77, 97, 115, 107, 81, 117, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, + 80, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, + 56, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, - 83, 86, 95, 84, 97, 114, - 103, 101, 116, 0, 171, 171 + 68, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 3, 3, 0, 0, + 83, 86, 95, 80, 111, 115, + 105, 116, 105, 111, 110, 0, + 84, 69, 88, 67, 79, 79, + 82, 68, 0, 171, 171, 171, + 79, 83, 71, 78, 44, 0, + 0, 0, 1, 0, 0, 0, + 8, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 83, 86, + 95, 84, 97, 114, 103, 101, + 116, 0, 171, 171 }; ShaderBytes sYCbCrShader = { YCbCrShader, sizeof(YCbCrShader) }; #if 0 @@ -2371,8 +2176,10 @@ ShaderBytes sYCbCrShader = { YCbCrShader, sizeof(YCbCrShader) }; // float4 vTextureCoords; // Offset: 144 Size: 16 // float4 vLayerQuad; // Offset: 160 Size: 16 // float4 vMaskQuad; // Offset: 176 Size: 16 -// float4 fLayerColor; // Offset: 192 Size: 16 [unused] -// float fLayerOpacity; // Offset: 208 Size: 4 [unused] +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 [unused] +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] // // } // @@ -2470,15 +2277,15 @@ ret const BYTE LayerQuadMaskVS[] = { - 68, 88, 66, 67, 223, 251, - 10, 17, 13, 90, 47, 25, - 119, 198, 20, 157, 124, 193, - 251, 234, 1, 0, 0, 0, - 120, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 117, 253, + 188, 162, 139, 208, 50, 178, + 49, 2, 251, 153, 144, 237, + 178, 212, 1, 0, 0, 0, + 220, 7, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 224, 1, 0, 0, 76, 4, 0, 0, 200, 4, 0, 0, - 212, 6, 0, 0, 8, 7, + 56, 7, 0, 0, 108, 7, 0, 0, 65, 111, 110, 57, 160, 1, 0, 0, 160, 1, 0, 0, 0, 2, 254, 255, @@ -2674,12 +2481,12 @@ const BYTE LayerQuadMaskVS[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 4, 2, + 82, 68, 69, 70, 104, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, 254, 255, 0, 1, - 0, 0, 208, 1, 0, 0, + 0, 0, 52, 2, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2688,41 +2495,49 @@ const BYTE LayerQuadMaskVS[] = 0, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, 60, 0, 0, 0, - 8, 0, 0, 0, 96, 0, - 0, 0, 224, 0, 0, 0, + 10, 0, 0, 0, 96, 0, + 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 1, 0, 0, + 0, 0, 80, 1, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 2, 0, 0, 0, - 48, 1, 0, 0, 0, 0, - 0, 0, 64, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 48, 1, 0, 0, 0, 0, - 0, 0, 76, 1, 0, 0, - 128, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, 96, 1, 0, 0, 0, 0, 0, 0, 112, 1, 0, 0, + 64, 0, 0, 0, 64, 0, + 0, 0, 2, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 124, 1, 0, 0, + 128, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 160, 1, 0, 0, 144, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 144, 1, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 192, 1, 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 155, 1, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 203, 1, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 165, 1, 0, 0, - 192, 0, 0, 0, 16, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 213, 1, 0, 0, + 192, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 96, 1, 0, 0, 0, 0, - 0, 0, 177, 1, 0, 0, - 208, 0, 0, 0, 4, 0, + 0, 0, 232, 1, 0, 0, + 0, 1, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, - 192, 1, 0, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 244, 1, 0, 0, + 16, 1, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 4, 2, 0, 0, 0, 0, + 0, 0, 20, 2, 0, 0, + 32, 1, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, + 36, 2, 0, 0, 0, 0, 0, 0, 109, 76, 97, 121, 101, 114, 84, 114, 97, 110, 115, 102, 111, 114, 109, 0, @@ -2745,50 +2560,59 @@ const BYTE LayerQuadMaskVS[] = 118, 76, 97, 121, 101, 114, 81, 117, 97, 100, 0, 118, 77, 97, 115, 107, 81, 117, - 97, 100, 0, 102, 76, 97, - 121, 101, 114, 67, 111, 108, - 111, 114, 0, 102, 76, 97, - 121, 101, 114, 79, 112, 97, - 99, 105, 116, 121, 0, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 102, 76, + 97, 121, 101, 114, 67, 111, + 108, 111, 114, 0, 102, 76, + 97, 121, 101, 114, 79, 112, + 97, 99, 105, 116, 121, 0, + 171, 171, 0, 0, 3, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 0, 0, - 80, 79, 83, 73, 84, 73, - 79, 78, 0, 171, 171, 171, - 79, 83, 71, 78, 104, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 77, 105, 99, 114, + 111, 115, 111, 102, 116, 32, + 40, 82, 41, 32, 72, 76, + 83, 76, 32, 83, 104, 97, + 100, 101, 114, 32, 67, 111, + 109, 112, 105, 108, 101, 114, + 32, 54, 46, 51, 46, 57, + 54, 48, 48, 46, 49, 54, + 51, 56, 52, 0, 171, 171, + 73, 83, 71, 78, 44, 0, + 0, 0, 1, 0, 0, 0, + 8, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 3, 3, 0, 0, 80, 79, + 83, 73, 84, 73, 79, 78, + 0, 171, 171, 171, 79, 83, + 71, 78, 104, 0, 0, 0, + 3, 0, 0, 0, 8, 0, + 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 12, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 3, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171 + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 12, + 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 12, 3, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171 }; ShaderBytes sLayerQuadMaskVS = { LayerQuadMaskVS, sizeof(LayerQuadMaskVS) }; #if 0 @@ -2807,8 +2631,10 @@ ShaderBytes sLayerQuadMaskVS = { LayerQuadMaskVS, sizeof(LayerQuadMaskVS) }; // float4 vTextureCoords; // Offset: 144 Size: 16 // float4 vLayerQuad; // Offset: 160 Size: 16 // float4 vMaskQuad; // Offset: 176 Size: 16 -// float4 fLayerColor; // Offset: 192 Size: 16 [unused] -// float fLayerOpacity; // Offset: 208 Size: 4 [unused] +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 [unused] +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] // // } // @@ -2910,15 +2736,15 @@ ret const BYTE LayerQuadMask3DVS[] = { - 68, 88, 66, 67, 151, 141, - 11, 11, 111, 244, 17, 242, - 119, 116, 248, 53, 235, 192, - 38, 193, 1, 0, 0, 0, - 204, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 124, 99, + 104, 27, 0, 223, 159, 8, + 231, 86, 180, 224, 50, 178, + 27, 163, 1, 0, 0, 0, + 48, 8, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 24, 2, 0, 0, 160, 4, 0, 0, 28, 5, 0, 0, - 40, 7, 0, 0, 92, 7, + 140, 7, 0, 0, 192, 7, 0, 0, 65, 111, 110, 57, 216, 1, 0, 0, 216, 1, 0, 0, 0, 2, 254, 255, @@ -3128,12 +2954,12 @@ const BYTE LayerQuadMask3DVS[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 4, 2, + 82, 68, 69, 70, 104, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, 254, 255, 0, 1, - 0, 0, 208, 1, 0, 0, + 0, 0, 52, 2, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -3142,41 +2968,49 @@ const BYTE LayerQuadMask3DVS[] = 0, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 171, 171, 60, 0, 0, 0, - 8, 0, 0, 0, 96, 0, - 0, 0, 224, 0, 0, 0, + 10, 0, 0, 0, 96, 0, + 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 1, 0, 0, + 0, 0, 80, 1, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 2, 0, 0, 0, - 48, 1, 0, 0, 0, 0, - 0, 0, 64, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 48, 1, 0, 0, 0, 0, - 0, 0, 76, 1, 0, 0, - 128, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, 96, 1, 0, 0, 0, 0, 0, 0, 112, 1, 0, 0, + 64, 0, 0, 0, 64, 0, + 0, 0, 2, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 124, 1, 0, 0, + 128, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 160, 1, 0, 0, 144, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 144, 1, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 192, 1, 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 155, 1, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 203, 1, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, - 128, 1, 0, 0, 0, 0, - 0, 0, 165, 1, 0, 0, - 192, 0, 0, 0, 16, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 213, 1, 0, 0, + 192, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 96, 1, 0, 0, 0, 0, - 0, 0, 177, 1, 0, 0, - 208, 0, 0, 0, 4, 0, + 0, 0, 232, 1, 0, 0, + 0, 1, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, - 192, 1, 0, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 244, 1, 0, 0, + 16, 1, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 4, 2, 0, 0, 0, 0, + 0, 0, 20, 2, 0, 0, + 32, 1, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, + 36, 2, 0, 0, 0, 0, 0, 0, 109, 76, 97, 121, 101, 114, 84, 114, 97, 110, 115, 102, 111, 114, 109, 0, @@ -3199,50 +3033,59 @@ const BYTE LayerQuadMask3DVS[] = 118, 76, 97, 121, 101, 114, 81, 117, 97, 100, 0, 118, 77, 97, 115, 107, 81, 117, - 97, 100, 0, 102, 76, 97, - 121, 101, 114, 67, 111, 108, - 111, 114, 0, 102, 76, 97, - 121, 101, 114, 79, 112, 97, - 99, 105, 116, 121, 0, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 102, 76, + 97, 121, 101, 114, 67, 111, + 108, 111, 114, 0, 102, 76, + 97, 121, 101, 114, 79, 112, + 97, 99, 105, 116, 121, 0, + 171, 171, 0, 0, 3, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 0, 0, - 80, 79, 83, 73, 84, 73, - 79, 78, 0, 171, 171, 171, - 79, 83, 71, 78, 104, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 77, 105, 99, 114, + 111, 115, 111, 102, 116, 32, + 40, 82, 41, 32, 72, 76, + 83, 76, 32, 83, 104, 97, + 100, 101, 114, 32, 67, 111, + 109, 112, 105, 108, 101, 114, + 32, 54, 46, 51, 46, 57, + 54, 48, 48, 46, 49, 54, + 51, 56, 52, 0, 171, 171, + 73, 83, 71, 78, 44, 0, + 0, 0, 1, 0, 0, 0, + 8, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 3, 3, 0, 0, 80, 79, + 83, 73, 84, 73, 79, 78, + 0, 171, 171, 171, 79, 83, + 71, 78, 104, 0, 0, 0, + 3, 0, 0, 0, 8, 0, + 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 12, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, - 7, 8, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171 + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 12, + 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 2, 0, 0, 0, 7, 8, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171 }; ShaderBytes sLayerQuadMask3DVS = { LayerQuadMask3DVS, sizeof(LayerQuadMask3DVS) }; #if 0 @@ -3257,12 +3100,14 @@ ShaderBytes sLayerQuadMask3DVS = { LayerQuadMask3DVS, sizeof(LayerQuadMask3DVS) // // float4 fLayerColor; // Offset: 0 Size: 16 // float fLayerOpacity; // Offset: 16 Size: 4 [unused] -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -3272,7 +3117,7 @@ ShaderBytes sLayerQuadMask3DVS = { LayerQuadMask3DVS, sizeof(LayerQuadMask3DVS) // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 -// tMask texture float4 2d 3 1 +// tMask texture float4 2d 5 1 // $Globals cbuffer NA NA 0 1 // // @@ -3304,7 +3149,7 @@ ShaderBytes sLayerQuadMask3DVS = { LayerQuadMask3DVS, sizeof(LayerQuadMask3DVS) // // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- -// s0 s0 t3 +// s0 s0 t5 // // // Level9 shader bytecode: @@ -3321,11 +3166,11 @@ ShaderBytes sLayerQuadMask3DVS = { LayerQuadMask3DVS, sizeof(LayerQuadMask3DVS) ps_4_0 dcl_constantbuffer cb0[1], immediateIndexed dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v1.zw dcl_output o0.xyzw dcl_temps 1 -sample r0.xyzw, v1.zwzz, t3.xyzw, s0 +sample r0.xyzw, v1.zwzz, t5.xyzw, s0 mul o0.xyzw, r0.xxxx, cb0[0].xyzw ret // Approximately 3 instruction slots used @@ -3333,15 +3178,15 @@ ret const BYTE SolidColorShaderMask[] = { - 68, 88, 66, 67, 189, 88, - 190, 169, 235, 115, 239, 219, - 181, 194, 113, 122, 250, 177, - 212, 243, 1, 0, 0, 0, - 232, 4, 0, 0, 6, 0, + 68, 88, 66, 67, 179, 163, + 177, 178, 96, 7, 246, 20, + 94, 198, 166, 18, 116, 245, + 163, 94, 1, 0, 0, 0, + 76, 5, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 204, 0, 0, 0, 112, 1, 0, 0, 236, 1, 0, 0, - 68, 4, 0, 0, 180, 4, + 168, 4, 0, 0, 24, 5, 0, 0, 65, 111, 110, 57, 140, 0, 0, 0, 140, 0, 0, 0, 0, 2, 255, 255, @@ -3349,7 +3194,7 @@ const BYTE SolidColorShaderMask[] = 0, 0, 1, 0, 40, 0, 0, 0, 52, 0, 0, 0, 52, 0, 1, 0, 36, 0, - 0, 0, 52, 0, 3, 0, + 0, 0, 52, 0, 5, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, @@ -3375,7 +3220,7 @@ const BYTE SolidColorShaderMask[] = 0, 0, 90, 0, 0, 3, 0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 3, 0, + 0, 112, 16, 0, 5, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 194, 16, 16, 0, 1, 0, 0, 0, @@ -3386,7 +3231,7 @@ const BYTE SolidColorShaderMask[] = 242, 0, 16, 0, 0, 0, 0, 0, 230, 26, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 56, 0, 0, 8, 242, 32, 16, 0, 0, 0, @@ -3415,12 +3260,12 @@ const BYTE SolidColorShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 80, 2, + 82, 68, 69, 70, 180, 2, 0, 0, 1, 0, 0, 0, 148, 0, 0, 0, 3, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, - 0, 0, 29, 2, 0, 0, + 0, 0, 128, 2, 0, 0, 124, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -3429,7 +3274,7 @@ const BYTE SolidColorShaderMask[] = 0, 0, 133, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 3, 0, + 255, 255, 255, 255, 5, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 139, 0, 0, 0, 0, 0, 0, 0, @@ -3441,41 +3286,49 @@ const BYTE SolidColorShaderMask[] = 101, 114, 0, 116, 77, 97, 115, 107, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, - 139, 0, 0, 0, 8, 0, + 139, 0, 0, 0, 10, 0, 0, 0, 172, 0, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 108, 1, 0, 0, 0, 0, + 156, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, + 2, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, + 184, 1, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 152, 1, + 0, 0, 0, 0, 200, 1, 0, 0, 0, 0, 0, 0, - 168, 1, 0, 0, 32, 0, + 216, 1, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 232, 1, + 0, 0, 0, 0, 0, 0, + 248, 1, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 200, 1, 0, 0, 96, 0, + 24, 2, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 184, 1, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, - 212, 1, 0, 0, 160, 0, + 36, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, + 0, 0, 0, 0, 168, 1, 0, 0, 0, 0, 0, 0, - 232, 1, 0, 0, 176, 0, + 56, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 8, 2, 0, 0, 192, 0, + 88, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, 0, 0, 0, 0, 0, 0, - 19, 2, 0, 0, 208, 0, + 99, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 0, 0, 72, 2, + 0, 0, 0, 0, 0, 0, + 109, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -3487,62 +3340,70 @@ const BYTE SolidColorShaderMask[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 104, 0, 0, 0, + 3, 0, 0, 0, 8, 0, + 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 + 0, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 0, + 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 12, 12, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 }; ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorShaderMask) }; #if 0 @@ -3557,12 +3418,14 @@ ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorSha // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -3573,7 +3436,7 @@ ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorSha // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 // tRGB texture float4 2d 0 1 -// tMask texture float4 2d 3 1 +// tMask texture float4 2d 5 1 // $Globals cbuffer NA NA 0 1 // // @@ -3605,8 +3468,8 @@ ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorSha // // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- -// s0 s0 t3 -// s1 s0 t0 +// s0 s0 t0 +// s1 s0 t5 // // // Level9 shader bytecode: @@ -3616,8 +3479,8 @@ ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorSha dcl_2d s0 dcl_2d s1 mov r0.xy, t0.wzzw - texld r1, t0, s1 - texld r0, r0, s0 + texld r1, t0, s0 + texld r0, r0, s1 mul r1.xyz, r1, c0.x mov r1.w, c0.x mul r0, r0.x, r1 @@ -3628,14 +3491,14 @@ ps_4_0 dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v1.xy dcl_input_ps linear v1.zw dcl_output o0.xyzw dcl_temps 2 sample r0.xyzw, v1.xyxx, t0.xyzw, s0 mul r0.xyz, r0.xyzx, cb0[1].xxxx -sample r1.xyzw, v1.zwzz, t3.xyzw, s0 +sample r1.xyzw, v1.zwzz, t5.xyzw, s0 mov r0.w, cb0[1].x mul o0.xyzw, r0.xyzw, r1.xxxx ret @@ -3644,15 +3507,15 @@ ret const BYTE RGBShaderMask[] = { - 68, 88, 66, 67, 151, 113, - 6, 167, 51, 154, 234, 112, - 72, 240, 46, 160, 193, 164, - 13, 255, 1, 0, 0, 0, - 192, 5, 0, 0, 6, 0, + 68, 88, 66, 67, 194, 201, + 10, 158, 40, 223, 107, 77, + 239, 65, 209, 32, 8, 192, + 127, 244, 1, 0, 0, 0, + 36, 6, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 8, 1, 0, 0, 32, 2, 0, 0, 156, 2, 0, 0, - 28, 5, 0, 0, 140, 5, + 128, 5, 0, 0, 240, 5, 0, 0, 65, 111, 110, 57, 200, 0, 0, 0, 200, 0, 0, 0, 0, 2, 255, 255, @@ -3660,8 +3523,8 @@ const BYTE RGBShaderMask[] = 0, 0, 1, 0, 44, 0, 0, 0, 56, 0, 0, 0, 56, 0, 2, 0, 36, 0, - 0, 0, 56, 0, 3, 0, - 0, 0, 0, 0, 1, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 5, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, 31, 0, @@ -3674,10 +3537,10 @@ const BYTE RGBShaderMask[] = 0, 2, 0, 0, 3, 128, 0, 0, 235, 176, 66, 0, 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 1, 8, + 0, 0, 228, 176, 0, 8, 228, 160, 66, 0, 0, 3, 0, 0, 15, 128, 0, 0, - 228, 128, 0, 8, 228, 160, + 228, 128, 1, 8, 228, 160, 5, 0, 0, 3, 1, 0, 7, 128, 1, 0, 228, 128, 0, 0, 0, 160, 1, 0, @@ -3699,7 +3562,7 @@ const BYTE RGBShaderMask[] = 0, 112, 16, 0, 0, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 98, 16, @@ -3723,7 +3586,7 @@ const BYTE RGBShaderMask[] = 242, 0, 16, 0, 1, 0, 0, 0, 230, 26, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 54, 0, 0, 6, 130, 0, 16, 0, 0, 0, @@ -3756,11 +3619,11 @@ const BYTE RGBShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, 69, 70, - 120, 2, 0, 0, 1, 0, + 220, 2, 0, 0, 1, 0, 0, 0, 188, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, - 0, 1, 0, 0, 69, 2, + 0, 1, 0, 0, 168, 2, 0, 0, 156, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -3771,789 +3634,114 @@ const BYTE RGBShaderMask[] = 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, - 170, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 3, 0, 0, 0, - 1, 0, 0, 0, 13, 0, - 0, 0, 176, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 83, - 97, 109, 112, 108, 101, 114, - 0, 116, 82, 71, 66, 0, - 116, 77, 97, 115, 107, 0, - 36, 71, 108, 111, 98, 97, - 108, 115, 0, 171, 171, 171, - 176, 0, 0, 0, 8, 0, - 0, 0, 212, 0, 0, 0, - 224, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 148, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 160, 1, - 0, 0, 0, 0, 0, 0, - 176, 1, 0, 0, 16, 0, - 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 192, 1, - 0, 0, 0, 0, 0, 0, - 208, 1, 0, 0, 32, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 224, 1, - 0, 0, 0, 0, 0, 0, - 240, 1, 0, 0, 96, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 224, 1, - 0, 0, 0, 0, 0, 0, - 252, 1, 0, 0, 160, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 160, 1, - 0, 0, 0, 0, 0, 0, - 16, 2, 0, 0, 176, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 48, 2, 0, 0, 192, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 59, 2, 0, 0, 208, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 102, 76, 97, 121, 101, 114, - 67, 111, 108, 111, 114, 0, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 -}; -ShaderBytes sRGBShaderMask = { RGBShaderMask, sizeof(RGBShaderMask) }; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 -// -// -// Buffer Definitions: -// -// cbuffer $Globals -// { -// -// float4 fLayerColor; // Offset: 0 Size: 16 [unused] -// float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] -// -// } -// -// -// Resource Bindings: -// -// Name Type Format Dim Slot Elements -// ------------------------------ ---------- ------- ----------- ---- -------- -// sSampler sampler NA NA 0 1 -// tRGB texture float4 2d 0 1 -// tMask texture float4 2d 3 1 -// $Globals cbuffer NA NA 0 1 -// -// -// -// Input signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Position 0 xyzw 0 POS float -// TEXCOORD 0 xy 1 NONE float xy -// TEXCOORD 1 zw 1 NONE float zw -// -// -// Output signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Target 0 xyzw 0 TARGET float xyzw -// -// -// Constant buffer to DX9 shader constant mappings: -// -// Target Reg Buffer Start Reg # of Regs Data Conversion -// ---------- ------- --------- --------- ---------------------- -// c0 cb0 1 1 ( FLT, FLT, FLT, FLT) -// -// -// Sampler/Resource to DX9 shader sampler mappings: -// -// Target Sampler Source Sampler Source Resource -// -------------- --------------- ---------------- -// s0 s0 t3 -// s1 s0 t0 -// -// -// Level9 shader bytecode: -// - ps_2_x - dcl t0 - dcl_2d s0 - dcl_2d s1 - mov r0.xy, t0.wzzw - texld r1, t0, s1 - texld r0, r0, s0 - mul r1, r1, c0.x - mul r0, r0.x, r1 - mov oC0, r0 - -// approximately 6 instruction slots used (2 texture, 4 arithmetic) -ps_4_0 -dcl_constantbuffer cb0[2], immediateIndexed -dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t3 -dcl_input_ps linear v1.xy -dcl_input_ps linear v1.zw -dcl_output o0.xyzw -dcl_temps 2 -sample r0.xyzw, v1.xyxx, t0.xyzw, s0 -mul r0.xyzw, r0.xyzw, cb0[1].xxxx -sample r1.xyzw, v1.zwzz, t3.xyzw, s0 -mul o0.xyzw, r0.xyzw, r1.xxxx -ret -// Approximately 5 instruction slots used -#endif - -const BYTE RGBAShaderMask[] = -{ - 68, 88, 66, 67, 182, 158, - 23, 70, 121, 188, 140, 117, - 148, 125, 14, 205, 185, 113, - 155, 74, 1, 0, 0, 0, - 156, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 252, 0, 0, 0, 252, 1, - 0, 0, 120, 2, 0, 0, - 248, 4, 0, 0, 104, 5, - 0, 0, 65, 111, 110, 57, - 188, 0, 0, 0, 188, 0, - 0, 0, 0, 2, 255, 255, - 132, 0, 0, 0, 56, 0, - 0, 0, 1, 0, 44, 0, - 0, 0, 56, 0, 0, 0, - 56, 0, 2, 0, 36, 0, - 0, 0, 56, 0, 3, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, - 0, 0, 15, 176, 31, 0, - 0, 2, 0, 0, 0, 144, - 0, 8, 15, 160, 31, 0, - 0, 2, 0, 0, 0, 144, - 1, 8, 15, 160, 1, 0, - 0, 2, 0, 0, 3, 128, - 0, 0, 235, 176, 66, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 1, 8, - 228, 160, 66, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 0, 8, 228, 160, - 5, 0, 0, 3, 1, 0, - 15, 128, 1, 0, 228, 128, - 0, 0, 0, 160, 5, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 0, 128, 1, 0, - 228, 128, 1, 0, 0, 2, - 0, 8, 15, 128, 0, 0, - 228, 128, 255, 255, 0, 0, - 83, 72, 68, 82, 248, 0, - 0, 0, 64, 0, 0, 0, - 62, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 90, 0, 0, 3, - 0, 96, 16, 0, 0, 0, - 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 0, 0, - 0, 0, 85, 85, 0, 0, - 88, 24, 0, 4, 0, 112, - 16, 0, 3, 0, 0, 0, - 85, 85, 0, 0, 98, 16, - 0, 3, 50, 16, 16, 0, - 1, 0, 0, 0, 98, 16, - 0, 3, 194, 16, 16, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, - 0, 0, 0, 0, 104, 0, - 0, 2, 2, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 6, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 69, 0, 0, 9, - 242, 0, 16, 0, 1, 0, - 0, 0, 230, 26, 16, 0, - 1, 0, 0, 0, 70, 126, - 16, 0, 3, 0, 0, 0, - 0, 96, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 7, - 242, 32, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 6, 0, - 16, 0, 1, 0, 0, 0, - 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, - 5, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, - 120, 2, 0, 0, 1, 0, - 0, 0, 188, 0, 0, 0, - 4, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 255, 255, - 0, 1, 0, 0, 69, 2, - 0, 0, 156, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 165, 0, - 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, - 170, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 3, 0, 0, 0, - 1, 0, 0, 0, 13, 0, - 0, 0, 176, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 83, - 97, 109, 112, 108, 101, 114, - 0, 116, 82, 71, 66, 0, - 116, 77, 97, 115, 107, 0, - 36, 71, 108, 111, 98, 97, - 108, 115, 0, 171, 171, 171, - 176, 0, 0, 0, 8, 0, - 0, 0, 212, 0, 0, 0, - 224, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 148, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 160, 1, - 0, 0, 0, 0, 0, 0, - 176, 1, 0, 0, 16, 0, - 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 192, 1, - 0, 0, 0, 0, 0, 0, - 208, 1, 0, 0, 32, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 224, 1, - 0, 0, 0, 0, 0, 0, - 240, 1, 0, 0, 96, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 224, 1, - 0, 0, 0, 0, 0, 0, - 252, 1, 0, 0, 160, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 160, 1, - 0, 0, 0, 0, 0, 0, - 16, 2, 0, 0, 176, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 48, 2, 0, 0, 192, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 59, 2, 0, 0, 208, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 102, 76, 97, 121, 101, 114, - 67, 111, 108, 111, 114, 0, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 -}; -ShaderBytes sRGBAShaderMask = { RGBAShaderMask, sizeof(RGBAShaderMask) }; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 -// -// -// Buffer Definitions: -// -// cbuffer $Globals -// { -// -// float4 fLayerColor; // Offset: 0 Size: 16 [unused] -// float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] -// -// } -// -// -// Resource Bindings: -// -// Name Type Format Dim Slot Elements -// ------------------------------ ---------- ------- ----------- ---- -------- -// sSampler sampler NA NA 0 1 -// tRGB texture float4 2d 0 1 -// tMask texture float4 2d 3 1 -// $Globals cbuffer NA NA 0 1 -// -// -// -// Input signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Position 0 xyzw 0 POS float -// TEXCOORD 0 xy 1 NONE float xy -// TEXCOORD 1 zw 1 NONE float zw -// -// -// Output signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Target 0 xyzw 0 TARGET float xyzw -// -// -// Constant buffer to DX9 shader constant mappings: -// -// Target Reg Buffer Start Reg # of Regs Data Conversion -// ---------- ------- --------- --------- ---------------------- -// c0 cb0 1 1 ( FLT, FLT, FLT, FLT) -// -// -// Sampler/Resource to DX9 shader sampler mappings: -// -// Target Sampler Source Sampler Source Resource -// -------------- --------------- ---------------- -// s0 s0 t3 -// s1 s0 t0 -// -// -// Level9 shader bytecode: -// - ps_2_x - dcl t0 - dcl_2d s0 - dcl_2d s1 - mov r0.xy, t0.wzzw - texld r1, t0, s1 - texld r0, r0, s0 - mul r1, r1, c0.x - mul r0, r0.x, r1 - mul r0.xyz, r0.w, r0 - mov oC0, r0 - -// approximately 7 instruction slots used (2 texture, 5 arithmetic) -ps_4_0 -dcl_constantbuffer cb0[2], immediateIndexed -dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t3 -dcl_input_ps linear v1.xy -dcl_input_ps linear v1.zw -dcl_output o0.xyzw -dcl_temps 2 -sample r0.xyzw, v1.xyxx, t0.xyzw, s0 -mul r0.xyzw, r0.xyzw, cb0[1].xxxx -sample r1.xyzw, v1.zwzz, t3.xyzw, s0 -mul r0.xyzw, r0.xyzw, r1.xxxx -mul o0.xyz, r0.wwww, r0.xyzx -mov o0.w, r0.w -ret -// Approximately 7 instruction slots used -#endif - -const BYTE RGBAShaderMaskPremul[] = -{ - 68, 88, 66, 67, 170, 142, - 83, 183, 24, 153, 194, 125, - 42, 169, 16, 185, 222, 43, - 161, 111, 1, 0, 0, 0, - 220, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 12, 1, 0, 0, 60, 2, - 0, 0, 184, 2, 0, 0, - 56, 5, 0, 0, 168, 5, - 0, 0, 65, 111, 110, 57, - 204, 0, 0, 0, 204, 0, - 0, 0, 0, 2, 255, 255, - 148, 0, 0, 0, 56, 0, - 0, 0, 1, 0, 44, 0, - 0, 0, 56, 0, 0, 0, - 56, 0, 2, 0, 36, 0, - 0, 0, 56, 0, 3, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, - 0, 0, 15, 176, 31, 0, - 0, 2, 0, 0, 0, 144, - 0, 8, 15, 160, 31, 0, - 0, 2, 0, 0, 0, 144, - 1, 8, 15, 160, 1, 0, - 0, 2, 0, 0, 3, 128, - 0, 0, 235, 176, 66, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 1, 8, - 228, 160, 66, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 0, 8, 228, 160, - 5, 0, 0, 3, 1, 0, - 15, 128, 1, 0, 228, 128, - 0, 0, 0, 160, 5, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 0, 128, 1, 0, - 228, 128, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 255, 128, 0, 0, 228, 128, - 1, 0, 0, 2, 0, 8, - 15, 128, 0, 0, 228, 128, - 255, 255, 0, 0, 83, 72, - 68, 82, 40, 1, 0, 0, - 64, 0, 0, 0, 74, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 90, 0, 0, 3, 0, 96, - 16, 0, 0, 0, 0, 0, - 88, 24, 0, 4, 0, 112, - 16, 0, 0, 0, 0, 0, - 85, 85, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, - 3, 0, 0, 0, 85, 85, - 0, 0, 98, 16, 0, 3, - 50, 16, 16, 0, 1, 0, - 0, 0, 98, 16, 0, 3, - 194, 16, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, - 242, 32, 16, 0, 0, 0, - 0, 0, 104, 0, 0, 2, - 2, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 16, - 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 0, 0, - 0, 0, 0, 96, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, - 6, 128, 32, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 1, 0, 0, 0, - 230, 26, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 3, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 6, 0, 16, 0, - 1, 0, 0, 0, 56, 0, - 0, 7, 114, 32, 16, 0, - 0, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 70, 2, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, - 130, 32, 16, 0, 0, 0, - 0, 0, 58, 0, 16, 0, - 0, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, - 116, 0, 0, 0, 7, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 120, 2, - 0, 0, 1, 0, 0, 0, - 188, 0, 0, 0, 4, 0, - 0, 0, 28, 0, 0, 0, - 0, 4, 255, 255, 0, 1, - 0, 0, 69, 2, 0, 0, - 156, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 165, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 0, 0, - 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 170, 0, - 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, - 3, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, - 176, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 83, 97, 109, - 112, 108, 101, 114, 0, 116, - 82, 71, 66, 0, 116, 77, - 97, 115, 107, 0, 36, 71, - 108, 111, 98, 97, 108, 115, - 0, 171, 171, 171, 176, 0, - 0, 0, 8, 0, 0, 0, - 212, 0, 0, 0, 224, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 148, 1, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 160, 1, 0, 0, - 0, 0, 0, 0, 176, 1, - 0, 0, 16, 0, 0, 0, - 4, 0, 0, 0, 2, 0, - 0, 0, 192, 1, 0, 0, - 0, 0, 0, 0, 208, 1, - 0, 0, 32, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 224, 1, 0, 0, - 0, 0, 0, 0, 240, 1, - 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 224, 1, 0, 0, - 0, 0, 0, 0, 252, 1, - 0, 0, 160, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 160, 1, 0, 0, - 0, 0, 0, 0, 16, 2, + 170, 0, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 5, 0, 0, 0, + 1, 0, 0, 0, 13, 0, 0, 0, 176, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 32, 2, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 115, 83, + 97, 109, 112, 108, 101, 114, + 0, 116, 82, 71, 66, 0, + 116, 77, 97, 115, 107, 0, + 36, 71, 108, 111, 98, 97, + 108, 115, 0, 171, 171, 171, + 176, 0, 0, 0, 10, 0, + 0, 0, 212, 0, 0, 0, + 48, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 196, 1, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 208, 1, + 0, 0, 0, 0, 0, 0, + 224, 1, 0, 0, 16, 0, + 0, 0, 4, 0, 0, 0, + 2, 0, 0, 0, 240, 1, + 0, 0, 0, 0, 0, 0, + 0, 2, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 16, 2, + 0, 0, 0, 0, 0, 0, + 32, 2, 0, 0, 48, 0, + 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 48, 2, - 0, 0, 192, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 32, 2, 0, 0, - 0, 0, 0, 0, 59, 2, - 0, 0, 208, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 32, 2, 0, 0, + 0, 0, 0, 0, 0, 0, + 64, 2, 0, 0, 112, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 48, 2, + 0, 0, 0, 0, 0, 0, + 76, 2, 0, 0, 176, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 208, 1, + 0, 0, 0, 0, 0, 0, + 96, 2, 0, 0, 192, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 128, 2, 0, 0, 208, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 139, 2, 0, 0, 224, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 149, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 48, 2, + 0, 0, 0, 0, 0, 0, + 102, 76, 97, 121, 101, 114, + 67, 111, 108, 111, 114, 0, + 1, 0, 3, 0, 1, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 67, 111, - 108, 111, 114, 0, 1, 0, + 97, 121, 101, 114, 79, 112, + 97, 99, 105, 116, 121, 0, + 171, 171, 0, 0, 3, 0, + 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 79, 112, 97, 99, - 105, 116, 121, 0, 171, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 76, - 97, 121, 101, 114, 84, 114, - 97, 110, 115, 102, 111, 114, - 109, 0, 3, 0, 3, 0, - 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 118, 82, 101, 110, 100, 101, - 114, 84, 97, 114, 103, 101, - 116, 79, 102, 102, 115, 101, - 116, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 73, 83, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, 71, 78, 104, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 80, 0, 0, 0, @@ -4582,7 +3770,7 @@ const BYTE RGBAShaderMaskPremul[] = 83, 86, 95, 84, 97, 114, 103, 101, 116, 0, 171, 171 }; -ShaderBytes sRGBAShaderMaskPremul = { RGBAShaderMaskPremul, sizeof(RGBAShaderMaskPremul) }; +ShaderBytes sRGBShaderMask = { RGBShaderMask, sizeof(RGBShaderMask) }; #if 0 // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 @@ -4595,12 +3783,371 @@ ShaderBytes sRGBAShaderMaskPremul = { RGBAShaderMaskPremul, sizeof(RGBAShaderMas // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// tRGB texture float4 2d 0 1 +// tMask texture float4 2d 5 1 +// $Globals cbuffer NA NA 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float +// TEXCOORD 0 xy 1 NONE float xy +// TEXCOORD 1 zw 1 NONE float zw +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Target 0 xyzw 0 TARGET float xyzw +// +// +// Constant buffer to DX9 shader constant mappings: +// +// Target Reg Buffer Start Reg # of Regs Data Conversion +// ---------- ------- --------- --------- ---------------------- +// c0 cb0 1 1 ( FLT, FLT, FLT, FLT) +// +// +// Sampler/Resource to DX9 shader sampler mappings: +// +// Target Sampler Source Sampler Source Resource +// -------------- --------------- ---------------- +// s0 s0 t0 +// s1 s0 t5 +// +// +// Level9 shader bytecode: +// + ps_2_x + dcl t0 + dcl_2d s0 + dcl_2d s1 + mov r0.xy, t0.wzzw + texld r1, t0, s0 + texld r0, r0, s1 + mul r1, r1, c0.x + mul r0, r0.x, r1 + mov oC0, r0 + +// approximately 6 instruction slots used (2 texture, 4 arithmetic) +ps_4_0 +dcl_constantbuffer cb0[2], immediateIndexed +dcl_sampler s0, mode_default +dcl_resource_texture2d (float,float,float,float) t0 +dcl_resource_texture2d (float,float,float,float) t5 +dcl_input_ps linear v1.xy +dcl_input_ps linear v1.zw +dcl_output o0.xyzw +dcl_temps 2 +sample r0.xyzw, v1.xyxx, t0.xyzw, s0 +mul r0.xyzw, r0.xyzw, cb0[1].xxxx +sample r1.xyzw, v1.zwzz, t5.xyzw, s0 +mul o0.xyzw, r0.xyzw, r1.xxxx +ret +// Approximately 5 instruction slots used +#endif + +const BYTE RGBAShaderMask[] = +{ + 68, 88, 66, 67, 4, 189, + 159, 243, 83, 63, 56, 82, + 222, 120, 117, 50, 17, 240, + 195, 36, 1, 0, 0, 0, + 0, 6, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 252, 0, 0, 0, 252, 1, + 0, 0, 120, 2, 0, 0, + 92, 5, 0, 0, 204, 5, + 0, 0, 65, 111, 110, 57, + 188, 0, 0, 0, 188, 0, + 0, 0, 0, 2, 255, 255, + 132, 0, 0, 0, 56, 0, + 0, 0, 1, 0, 44, 0, + 0, 0, 56, 0, 0, 0, + 56, 0, 2, 0, 36, 0, + 0, 0, 56, 0, 0, 0, + 0, 0, 5, 0, 1, 0, + 0, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 1, 2, 255, 255, 31, 0, + 0, 2, 0, 0, 0, 128, + 0, 0, 15, 176, 31, 0, + 0, 2, 0, 0, 0, 144, + 0, 8, 15, 160, 31, 0, + 0, 2, 0, 0, 0, 144, + 1, 8, 15, 160, 1, 0, + 0, 2, 0, 0, 3, 128, + 0, 0, 235, 176, 66, 0, + 0, 3, 1, 0, 15, 128, + 0, 0, 228, 176, 0, 8, + 228, 160, 66, 0, 0, 3, + 0, 0, 15, 128, 0, 0, + 228, 128, 1, 8, 228, 160, + 5, 0, 0, 3, 1, 0, + 15, 128, 1, 0, 228, 128, + 0, 0, 0, 160, 5, 0, + 0, 3, 0, 0, 15, 128, + 0, 0, 0, 128, 1, 0, + 228, 128, 1, 0, 0, 2, + 0, 8, 15, 128, 0, 0, + 228, 128, 255, 255, 0, 0, + 83, 72, 68, 82, 248, 0, + 0, 0, 64, 0, 0, 0, + 62, 0, 0, 0, 89, 0, + 0, 4, 70, 142, 32, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 90, 0, 0, 3, + 0, 96, 16, 0, 0, 0, + 0, 0, 88, 24, 0, 4, + 0, 112, 16, 0, 0, 0, + 0, 0, 85, 85, 0, 0, + 88, 24, 0, 4, 0, 112, + 16, 0, 5, 0, 0, 0, + 85, 85, 0, 0, 98, 16, + 0, 3, 50, 16, 16, 0, + 1, 0, 0, 0, 98, 16, + 0, 3, 194, 16, 16, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 242, 32, 16, 0, + 0, 0, 0, 0, 104, 0, + 0, 2, 2, 0, 0, 0, + 69, 0, 0, 9, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 16, 16, 0, 1, 0, + 0, 0, 70, 126, 16, 0, + 0, 0, 0, 0, 0, 96, + 16, 0, 0, 0, 0, 0, + 56, 0, 0, 8, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 0, 0, + 0, 0, 6, 128, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 1, 0, + 0, 0, 230, 26, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 5, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 56, 0, 0, 7, + 242, 32, 16, 0, 0, 0, + 0, 0, 70, 14, 16, 0, + 0, 0, 0, 0, 6, 0, + 16, 0, 1, 0, 0, 0, + 62, 0, 0, 1, 83, 84, + 65, 84, 116, 0, 0, 0, + 5, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 82, 68, 69, 70, + 220, 2, 0, 0, 1, 0, + 0, 0, 188, 0, 0, 0, + 4, 0, 0, 0, 28, 0, + 0, 0, 0, 4, 255, 255, + 0, 1, 0, 0, 168, 2, + 0, 0, 156, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 1, 0, 0, 0, 165, 0, + 0, 0, 2, 0, 0, 0, + 5, 0, 0, 0, 4, 0, + 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 1, 0, + 0, 0, 13, 0, 0, 0, + 170, 0, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 5, 0, 0, 0, + 1, 0, 0, 0, 13, 0, + 0, 0, 176, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 115, 83, + 97, 109, 112, 108, 101, 114, + 0, 116, 82, 71, 66, 0, + 116, 77, 97, 115, 107, 0, + 36, 71, 108, 111, 98, 97, + 108, 115, 0, 171, 171, 171, + 176, 0, 0, 0, 10, 0, + 0, 0, 212, 0, 0, 0, + 48, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 196, 1, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 208, 1, + 0, 0, 0, 0, 0, 0, + 224, 1, 0, 0, 16, 0, + 0, 0, 4, 0, 0, 0, + 2, 0, 0, 0, 240, 1, + 0, 0, 0, 0, 0, 0, + 0, 2, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 16, 2, + 0, 0, 0, 0, 0, 0, + 32, 2, 0, 0, 48, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 48, 2, + 0, 0, 0, 0, 0, 0, + 64, 2, 0, 0, 112, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 48, 2, + 0, 0, 0, 0, 0, 0, + 76, 2, 0, 0, 176, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 208, 1, + 0, 0, 0, 0, 0, 0, + 96, 2, 0, 0, 192, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 128, 2, 0, 0, 208, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 139, 2, 0, 0, 224, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 112, 2, + 0, 0, 0, 0, 0, 0, + 149, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 48, 2, + 0, 0, 0, 0, 0, 0, + 102, 76, 97, 121, 101, 114, + 67, 111, 108, 111, 114, 0, + 1, 0, 3, 0, 1, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 102, 76, + 97, 121, 101, 114, 79, 112, + 97, 99, 105, 116, 121, 0, + 171, 171, 0, 0, 3, 0, + 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 104, 0, 0, 0, + 3, 0, 0, 0, 8, 0, + 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 3, + 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 12, 12, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 +}; +ShaderBytes sRGBAShaderMask = { RGBAShaderMask, sizeof(RGBAShaderMask) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 +// +// +// Buffer Definitions: +// +// cbuffer $Globals +// { +// +// float4 fLayerColor; // Offset: 0 Size: 16 [unused] +// float fLayerOpacity; // Offset: 16 Size: 4 +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -4612,7 +4159,7 @@ ShaderBytes sRGBAShaderMaskPremul = { RGBAShaderMaskPremul, sizeof(RGBAShaderMas // sSampler sampler NA NA 0 1 // LayerTextureSamplerLinear sampler NA NA 1 1 // tRGB texture float4 2d 0 1 -// tMask texture float4 2d 3 1 +// tMask texture float4 2d 5 1 // $Globals cbuffer NA NA 0 1 // // @@ -4645,7 +4192,7 @@ ShaderBytes sRGBAShaderMaskPremul = { RGBAShaderMaskPremul, sizeof(RGBAShaderMas // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- // s0 s0 t0 -// s1 s1 t3 +// s1 s1 t5 // // // Level9 shader bytecode: @@ -4669,13 +4216,13 @@ dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default dcl_sampler s1, mode_default dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v1.xy dcl_input_ps linear v2.xyz dcl_output o0.xyzw dcl_temps 2 div r0.xy, v2.xyxx, v2.zzzz -sample r0.xyzw, r0.xyxx, t3.xyzw, s1 +sample r0.xyzw, r0.xyxx, t5.xyzw, s1 sample r1.xyzw, v1.xyxx, t0.xyzw, s0 mul r1.xyzw, r1.xyzw, cb0[1].xxxx mul o0.xyzw, r0.xxxx, r1.xyzw @@ -4685,15 +4232,15 @@ ret const BYTE RGBAShaderMask3D[] = { - 68, 88, 66, 67, 216, 42, - 250, 215, 154, 11, 43, 24, - 15, 254, 10, 66, 72, 210, - 238, 215, 1, 0, 0, 0, - 24, 6, 0, 0, 6, 0, + 68, 88, 66, 67, 3, 204, + 183, 228, 12, 40, 73, 204, + 169, 156, 99, 236, 238, 160, + 185, 204, 1, 0, 0, 0, + 124, 6, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 24, 1, 0, 0, 64, 2, 0, 0, 188, 2, 0, 0, - 116, 5, 0, 0, 228, 5, + 216, 5, 0, 0, 72, 6, 0, 0, 65, 111, 110, 57, 216, 0, 0, 0, 216, 0, 0, 0, 0, 2, 255, 255, @@ -4702,7 +4249,7 @@ const BYTE RGBAShaderMask3D[] = 0, 0, 56, 0, 0, 0, 56, 0, 2, 0, 36, 0, 0, 0, 56, 0, 0, 0, - 0, 0, 3, 1, 1, 0, + 0, 0, 5, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, 31, 0, @@ -4745,7 +4292,7 @@ const BYTE RGBAShaderMask3D[] = 16, 0, 0, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, - 3, 0, 0, 0, 85, 85, + 5, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 98, 16, 0, 3, @@ -4762,7 +4309,7 @@ const BYTE RGBAShaderMask3D[] = 242, 0, 16, 0, 0, 0, 0, 0, 70, 0, 16, 0, 0, 0, 0, 0, 70, 126, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 0, 96, 16, 0, 1, 0, 0, 0, 69, 0, 0, 9, 242, 0, 16, 0, 1, 0, @@ -4802,12 +4349,12 @@ const BYTE RGBAShaderMask3D[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 176, 2, 0, 0, + 69, 70, 20, 3, 0, 0, 1, 0, 0, 0, 244, 0, 0, 0, 5, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, - 125, 2, 0, 0, 188, 0, + 224, 2, 0, 0, 188, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -4823,11 +4370,11 @@ const BYTE RGBAShaderMask3D[] = 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 228, 0, + 13, 0, 0, 0, 228, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, - 3, 0, 0, 0, 1, 0, + 5, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -4844,41 +4391,49 @@ const BYTE RGBAShaderMask3D[] = 116, 77, 97, 115, 107, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 234, 0, - 0, 0, 8, 0, 0, 0, - 12, 1, 0, 0, 224, 0, + 0, 0, 10, 0, 0, 0, + 12, 1, 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 204, 1, + 0, 0, 0, 0, 252, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 216, 1, 0, 0, - 0, 0, 0, 0, 232, 1, + 0, 0, 8, 2, 0, 0, + 0, 0, 0, 0, 24, 2, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, 2, 0, - 0, 0, 248, 1, 0, 0, - 0, 0, 0, 0, 8, 2, + 0, 0, 40, 2, 0, 0, + 0, 0, 0, 0, 56, 2, 0, 0, 32, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 24, 2, 0, 0, - 0, 0, 0, 0, 40, 2, - 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 24, 2, 0, 0, - 0, 0, 0, 0, 52, 2, - 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 216, 1, 0, 0, - 0, 0, 0, 0, 72, 2, + 0, 0, 72, 2, 0, 0, + 0, 0, 0, 0, 88, 2, + 0, 0, 48, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 104, 2, 0, 0, + 0, 0, 0, 0, 120, 2, + 0, 0, 112, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 104, 2, 0, 0, + 0, 0, 0, 0, 132, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 88, 2, 0, 0, - 0, 0, 0, 0, 104, 2, + 0, 0, 8, 2, 0, 0, + 0, 0, 0, 0, 152, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 88, 2, 0, 0, - 0, 0, 0, 0, 115, 2, + 0, 0, 168, 2, 0, 0, + 0, 0, 0, 0, 184, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 88, 2, 0, 0, + 0, 0, 168, 2, 0, 0, + 0, 0, 0, 0, 195, 2, + 0, 0, 224, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 168, 2, 0, 0, + 0, 0, 0, 0, 205, 2, + 0, 0, 240, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 104, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, 1, 0, @@ -4889,413 +4444,44 @@ const BYTE RGBAShaderMask3D[] = 105, 116, 121, 0, 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 76, - 97, 121, 101, 114, 84, 114, - 97, 110, 115, 102, 111, 114, - 109, 0, 3, 0, 3, 0, - 4, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 118, 82, 101, 110, 100, 101, - 114, 84, 97, 114, 103, 101, - 116, 79, 102, 102, 115, 101, - 116, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 73, 83, - 71, 78, 104, 0, 0, 0, - 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 92, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 3, - 0, 0, 92, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 7, 7, - 0, 0, 83, 86, 95, 80, - 111, 115, 105, 116, 105, 111, - 110, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, - 171, 171, 79, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 83, 86, 95, 84, 97, 114, - 103, 101, 116, 0, 171, 171 -}; -ShaderBytes sRGBAShaderMask3D = { RGBAShaderMask3D, sizeof(RGBAShaderMask3D) }; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 -// -// -// Buffer Definitions: -// -// cbuffer $Globals -// { -// -// float4 fLayerColor; // Offset: 0 Size: 16 [unused] -// float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] -// -// } -// -// -// Resource Bindings: -// -// Name Type Format Dim Slot Elements -// ------------------------------ ---------- ------- ----------- ---- -------- -// sSampler sampler NA NA 0 1 -// LayerTextureSamplerLinear sampler NA NA 1 1 -// tRGB texture float4 2d 0 1 -// tMask texture float4 2d 3 1 -// $Globals cbuffer NA NA 0 1 -// -// -// -// Input signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Position 0 xyzw 0 POS float -// TEXCOORD 0 xy 1 NONE float xy -// TEXCOORD 1 xyz 2 NONE float xyz -// -// -// Output signature: -// -// Name Index Mask Register SysValue Format Used -// -------------------- ----- ------ -------- -------- ------- ------ -// SV_Target 0 xyzw 0 TARGET float xyzw -// -// -// Constant buffer to DX9 shader constant mappings: -// -// Target Reg Buffer Start Reg # of Regs Data Conversion -// ---------- ------- --------- --------- ---------------------- -// c0 cb0 1 1 ( FLT, FLT, FLT, FLT) -// -// -// Sampler/Resource to DX9 shader sampler mappings: -// -// Target Sampler Source Sampler Source Resource -// -------------- --------------- ---------------- -// s0 s0 t0 -// s1 s1 t3 -// -// -// Level9 shader bytecode: -// - ps_2_x - dcl t0.xy - dcl t1.xyz - dcl_2d s0 - dcl_2d s1 - rcp r0.w, t1.z - mul r0.xy, r0.w, t1 - texld r1, t0, s0 - texld r0, r0, s1 - mul r1, r1, c0.x - mul r0, r0.x, r1 - mul r0.xyz, r0.w, r0 - mov oC0, r0 - -// approximately 8 instruction slots used (2 texture, 6 arithmetic) -ps_4_0 -dcl_constantbuffer cb0[2], immediateIndexed -dcl_sampler s0, mode_default -dcl_sampler s1, mode_default -dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t3 -dcl_input_ps linear v1.xy -dcl_input_ps linear v2.xyz -dcl_output o0.xyzw -dcl_temps 2 -div r0.xy, v2.xyxx, v2.zzzz -sample r0.xyzw, r0.xyxx, t3.xyzw, s1 -sample r1.xyzw, v1.xyxx, t0.xyzw, s0 -mul r1.xyzw, r1.xyzw, cb0[1].xxxx -mul r0.xyzw, r0.xxxx, r1.xyzw -mul o0.xyz, r0.wwww, r0.xyzx -mov o0.w, r0.w -ret -// Approximately 8 instruction slots used -#endif - -const BYTE RGBAShaderMask3DPremul[] = -{ - 68, 88, 66, 67, 55, 2, - 221, 89, 65, 95, 19, 52, - 117, 31, 78, 231, 8, 20, - 150, 44, 1, 0, 0, 0, - 88, 6, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 40, 1, 0, 0, 128, 2, - 0, 0, 252, 2, 0, 0, - 180, 5, 0, 0, 36, 6, - 0, 0, 65, 111, 110, 57, - 232, 0, 0, 0, 232, 0, - 0, 0, 0, 2, 255, 255, - 176, 0, 0, 0, 56, 0, - 0, 0, 1, 0, 44, 0, - 0, 0, 56, 0, 0, 0, - 56, 0, 2, 0, 36, 0, - 0, 0, 56, 0, 0, 0, - 0, 0, 3, 1, 1, 0, - 0, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, - 0, 0, 3, 176, 31, 0, - 0, 2, 0, 0, 0, 128, - 1, 0, 7, 176, 31, 0, - 0, 2, 0, 0, 0, 144, - 0, 8, 15, 160, 31, 0, - 0, 2, 0, 0, 0, 144, - 1, 8, 15, 160, 6, 0, - 0, 2, 0, 0, 8, 128, - 1, 0, 170, 176, 5, 0, - 0, 3, 0, 0, 3, 128, - 0, 0, 255, 128, 1, 0, - 228, 176, 66, 0, 0, 3, - 1, 0, 15, 128, 0, 0, - 228, 176, 0, 8, 228, 160, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 1, 8, 228, 160, 5, 0, - 0, 3, 1, 0, 15, 128, - 1, 0, 228, 128, 0, 0, - 0, 160, 5, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 0, 128, 1, 0, 228, 128, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 255, 128, - 0, 0, 228, 128, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 80, 1, 0, 0, 64, 0, - 0, 0, 84, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, - 0, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, - 1, 0, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, - 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 3, 0, - 0, 0, 85, 85, 0, 0, - 98, 16, 0, 3, 50, 16, - 16, 0, 1, 0, 0, 0, - 98, 16, 0, 3, 114, 16, - 16, 0, 2, 0, 0, 0, - 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, - 104, 0, 0, 2, 2, 0, - 0, 0, 14, 0, 0, 7, - 50, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, - 2, 0, 0, 0, 166, 26, - 16, 0, 2, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 0, 16, 0, 0, 0, - 0, 0, 70, 126, 16, 0, - 3, 0, 0, 0, 0, 96, - 16, 0, 1, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 6, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 56, 0, 0, 7, - 242, 0, 16, 0, 0, 0, - 0, 0, 6, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 56, 0, 0, 7, 114, 32, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 54, 0, - 0, 5, 130, 32, 16, 0, - 0, 0, 0, 0, 58, 0, - 16, 0, 0, 0, 0, 0, - 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, - 8, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, - 176, 2, 0, 0, 1, 0, - 0, 0, 244, 0, 0, 0, - 5, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 255, 255, - 0, 1, 0, 0, 125, 2, - 0, 0, 188, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 197, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 223, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, - 0, 0, 228, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 3, 0, - 0, 0, 1, 0, 0, 0, - 13, 0, 0, 0, 234, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 115, 83, 97, 109, 112, 108, - 101, 114, 0, 76, 97, 121, - 101, 114, 84, 101, 120, 116, - 117, 114, 101, 83, 97, 109, - 112, 108, 101, 114, 76, 105, - 110, 101, 97, 114, 0, 116, - 82, 71, 66, 0, 116, 77, - 97, 115, 107, 0, 36, 71, - 108, 111, 98, 97, 108, 115, - 0, 171, 234, 0, 0, 0, - 8, 0, 0, 0, 12, 1, - 0, 0, 224, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 204, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 216, 1, 0, 0, 0, 0, - 0, 0, 232, 1, 0, 0, - 16, 0, 0, 0, 4, 0, - 0, 0, 2, 0, 0, 0, - 248, 1, 0, 0, 0, 0, - 0, 0, 8, 2, 0, 0, - 32, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 24, 2, 0, 0, 0, 0, - 0, 0, 40, 2, 0, 0, - 96, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 24, 2, 0, 0, 0, 0, - 0, 0, 52, 2, 0, 0, - 160, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 216, 1, 0, 0, 0, 0, - 0, 0, 72, 2, 0, 0, - 176, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 88, 2, 0, 0, 0, 0, - 0, 0, 104, 2, 0, 0, - 192, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 88, 2, 0, 0, 0, 0, - 0, 0, 115, 2, 0, 0, - 208, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 88, 2, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 67, 111, 108, 111, - 114, 0, 1, 0, 3, 0, + 0, 0, 0, 0, 105, 66, + 108, 101, 110, 100, 67, 111, + 110, 102, 105, 103, 0, 171, + 171, 171, 1, 0, 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 102, 76, 97, 121, 101, 114, - 79, 112, 97, 99, 105, 116, - 121, 0, 171, 171, 0, 0, - 3, 0, 1, 0, 1, 0, + 109, 76, 97, 121, 101, 114, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 3, 0, + 3, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 76, 97, 121, - 101, 114, 84, 114, 97, 110, - 115, 102, 111, 114, 109, 0, - 3, 0, 3, 0, 4, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 80, - 114, 111, 106, 101, 99, 116, - 105, 111, 110, 0, 118, 82, - 101, 110, 100, 101, 114, 84, - 97, 114, 103, 101, 116, 79, - 102, 102, 115, 101, 116, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, + 0, 0, 109, 80, 114, 111, + 106, 101, 99, 116, 105, 111, + 110, 0, 118, 82, 101, 110, + 100, 101, 114, 84, 97, 114, + 103, 101, 116, 79, 102, 102, + 115, 101, 116, 0, 118, 84, + 101, 120, 116, 117, 114, 101, + 67, 111, 111, 114, 100, 115, + 0, 171, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 77, - 105, 99, 114, 111, 115, 111, - 102, 116, 32, 40, 82, 41, - 32, 72, 76, 83, 76, 32, - 83, 104, 97, 100, 101, 114, - 32, 67, 111, 109, 112, 105, - 108, 101, 114, 32, 54, 46, - 51, 46, 57, 54, 48, 48, - 46, 49, 54, 51, 56, 52, - 0, 171, 73, 83, 71, 78, + 118, 76, 97, 121, 101, 114, + 81, 117, 97, 100, 0, 118, + 77, 97, 115, 107, 81, 117, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, 104, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 80, 0, 0, 0, 0, 0, @@ -5324,7 +4510,7 @@ const BYTE RGBAShaderMask3DPremul[] = 95, 84, 97, 114, 103, 101, 116, 0, 171, 171 }; -ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShaderMask3DPremul) }; +ShaderBytes sRGBAShaderMask3D = { RGBAShaderMask3D, sizeof(RGBAShaderMask3D) }; #if 0 // // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 @@ -5337,12 +4523,14 @@ ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShade // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -5352,10 +4540,10 @@ ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShade // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 -// tY texture float4 2d 0 1 -// tCb texture float4 2d 1 1 -// tCr texture float4 2d 2 1 -// tMask texture float4 2d 3 1 +// tY texture float4 2d 1 1 +// tCb texture float4 2d 2 1 +// tCr texture float4 2d 3 1 +// tMask texture float4 2d 5 1 // $Globals cbuffer NA NA 0 1 // // @@ -5387,10 +4575,10 @@ ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShade // // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- -// s0 s0 t3 -// s1 s0 t0 -// s2 s0 t1 -// s3 s0 t2 +// s0 s0 t1 +// s1 s0 t2 +// s2 s0 t3 +// s3 s0 t5 // // // Level9 shader bytecode: @@ -5403,16 +4591,16 @@ ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShade dcl_2d s1 dcl_2d s2 dcl_2d s3 - texld r0, t0, s1 - texld r1, t0, s3 + texld r0, t0, s0 + texld r1, t0, s2 add r0.y, r1.x, c1.x mul r0.yz, r0.y, c1.xzww add r0.x, r0.x, c1.y mad r0.z, r0.x, c2.x, -r0.z mad r1.x, r0.x, c2.x, r0.y mov r2.xy, t0.wzzw - texld r3, t0, s2 - texld r2, r2, s0 + texld r3, t0, s1 + texld r2, r2, s3 add r0.y, r3.x, c1.x mad r1.y, r0.y, -c2.z, r0.z mul r0.y, r0.y, c2.y @@ -5426,29 +4614,29 @@ ShaderBytes sRGBAShaderMask3DPremul = { RGBAShaderMask3DPremul, sizeof(RGBAShade ps_4_0 dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default -dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t2 dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v1.xy dcl_input_ps linear v1.zw dcl_output o0.xyzw dcl_temps 3 -sample r0.xyzw, v1.xyxx, t2.xyzw, s0 +sample r0.xyzw, v1.xyxx, t3.xyzw, s0 add r0.x, r0.x, l(-0.501960) mul r0.xy, r0.xxxx, l(1.596030, 0.812970, 0.000000, 0.000000) -sample r1.xyzw, v1.xyxx, t0.xyzw, s0 +sample r1.xyzw, v1.xyxx, t1.xyzw, s0 add r0.z, r1.x, l(-0.062750) mad r0.y, r0.z, l(1.164380), -r0.y mad r1.x, r0.z, l(1.164380), r0.x -sample r2.xyzw, v1.xyxx, t1.xyzw, s0 +sample r2.xyzw, v1.xyxx, t2.xyzw, s0 add r0.x, r2.x, l(-0.501960) mad r1.y, -r0.x, l(0.391760), r0.y mul r0.x, r0.x, l(2.017230) mad r1.z, r0.z, l(1.164380), r0.x mov r1.w, l(1.000000) mul r0.xyzw, r1.xyzw, cb0[1].xxxx -sample r1.xyzw, v1.zwzz, t3.xyzw, s0 +sample r1.xyzw, v1.zwzz, t5.xyzw, s0 mul o0.xyzw, r0.xyzw, r1.xxxx ret // Approximately 17 instruction slots used @@ -5456,15 +4644,15 @@ ret const BYTE YCbCrShaderMask[] = { - 68, 88, 66, 67, 154, 30, - 246, 171, 67, 224, 184, 33, - 20, 150, 106, 233, 226, 126, - 80, 130, 1, 0, 0, 0, - 168, 8, 0, 0, 6, 0, + 68, 88, 66, 67, 221, 32, + 127, 20, 214, 189, 35, 93, + 175, 146, 75, 225, 8, 148, + 130, 206, 1, 0, 0, 0, + 12, 9, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 24, 2, 0, 0, 196, 4, 0, 0, 64, 5, 0, 0, - 4, 8, 0, 0, 116, 8, + 104, 8, 0, 0, 216, 8, 0, 0, 65, 111, 110, 57, 216, 1, 0, 0, 216, 1, 0, 0, 0, 2, 255, 255, @@ -5472,9 +4660,9 @@ const BYTE YCbCrShaderMask[] = 0, 0, 1, 0, 52, 0, 0, 0, 64, 0, 0, 0, 64, 0, 4, 0, 36, 0, - 0, 0, 64, 0, 3, 0, - 0, 0, 0, 0, 1, 0, - 1, 0, 2, 0, 2, 0, + 0, 0, 64, 0, 1, 0, + 0, 0, 2, 0, 1, 0, + 3, 0, 2, 0, 5, 0, 3, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, @@ -5498,9 +4686,9 @@ const BYTE YCbCrShaderMask[] = 0, 144, 3, 8, 15, 160, 66, 0, 0, 3, 0, 0, 15, 128, 0, 0, 228, 176, - 1, 8, 228, 160, 66, 0, + 0, 8, 228, 160, 66, 0, 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 3, 8, + 0, 0, 228, 176, 2, 8, 228, 160, 2, 0, 0, 3, 0, 0, 2, 128, 1, 0, 0, 128, 1, 0, 0, 160, @@ -5520,9 +4708,9 @@ const BYTE YCbCrShaderMask[] = 3, 128, 0, 0, 235, 176, 66, 0, 0, 3, 3, 0, 15, 128, 0, 0, 228, 176, - 2, 8, 228, 160, 66, 0, + 1, 8, 228, 160, 66, 0, 0, 3, 2, 0, 15, 128, - 2, 0, 228, 128, 0, 8, + 2, 0, 228, 128, 3, 8, 228, 160, 2, 0, 0, 3, 0, 0, 2, 128, 3, 0, 0, 128, 1, 0, 0, 160, @@ -5554,15 +4742,15 @@ const BYTE YCbCrShaderMask[] = 0, 3, 0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, + 1, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 1, 0, + 0, 112, 16, 0, 2, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 2, 0, 0, 0, + 16, 0, 3, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, - 3, 0, 0, 0, 85, 85, + 5, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 98, 16, 0, 3, @@ -5574,7 +4762,7 @@ const BYTE YCbCrShaderMask[] = 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 2, 0, + 70, 126, 16, 0, 3, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 18, 0, 16, 0, @@ -5592,7 +4780,7 @@ const BYTE YCbCrShaderMask[] = 16, 0, 1, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, + 1, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 66, 0, 16, 0, 0, 0, 0, 0, @@ -5615,7 +4803,7 @@ const BYTE YCbCrShaderMask[] = 242, 0, 16, 0, 2, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 1, 0, 0, 0, + 16, 0, 2, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, 0, 7, 18, 0, 16, 0, 0, 0, @@ -5652,7 +4840,7 @@ const BYTE YCbCrShaderMask[] = 16, 0, 1, 0, 0, 0, 230, 26, 16, 0, 1, 0, 0, 0, 70, 126, 16, 0, - 3, 0, 0, 0, 0, 96, + 5, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 56, 0, 0, 7, 242, 32, 16, 0, 0, 0, 0, 0, @@ -5680,12 +4868,12 @@ const BYTE YCbCrShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 188, 2, + 82, 68, 69, 70, 32, 3, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 6, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, - 0, 0, 137, 2, 0, 0, + 0, 0, 236, 2, 0, 0, 220, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -5694,23 +4882,23 @@ const BYTE YCbCrShaderMask[] = 0, 0, 229, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 0, 0, + 255, 255, 255, 255, 1, 0, 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 232, 0, + 13, 0, 0, 0, 232, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, + 2, 0, 0, 0, 1, 0, + 0, 0, 13, 0, 0, 0, 236, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, - 255, 255, 2, 0, 0, 0, - 1, 0, 0, 0, 12, 0, + 255, 255, 3, 0, 0, 0, + 1, 0, 0, 0, 13, 0, 0, 0, 240, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 3, 0, + 255, 255, 255, 255, 5, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, @@ -5724,41 +4912,49 @@ const BYTE YCbCrShaderMask[] = 114, 0, 116, 77, 97, 115, 107, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, - 246, 0, 0, 0, 8, 0, + 246, 0, 0, 0, 10, 0, 0, 0, 24, 1, 0, 0, - 224, 0, 0, 0, 0, 0, + 48, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 216, 1, 0, 0, 0, 0, + 8, 2, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 228, 1, + 0, 0, 0, 0, 20, 2, 0, 0, 0, 0, 0, 0, - 244, 1, 0, 0, 16, 0, + 36, 2, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 4, 2, + 2, 0, 0, 0, 52, 2, 0, 0, 0, 0, 0, 0, - 20, 2, 0, 0, 32, 0, + 68, 2, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 84, 2, + 0, 0, 0, 0, 0, 0, + 100, 2, 0, 0, 48, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 0, - 52, 2, 0, 0, 96, 0, + 132, 2, 0, 0, 112, 0, 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 0, - 64, 2, 0, 0, 160, 0, + 144, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 228, 1, + 0, 0, 0, 0, 20, 2, 0, 0, 0, 0, 0, 0, - 84, 2, 0, 0, 176, 0, + 164, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 100, 2, + 0, 0, 0, 0, 180, 2, 0, 0, 0, 0, 0, 0, - 116, 2, 0, 0, 192, 0, + 196, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 100, 2, + 0, 0, 0, 0, 180, 2, 0, 0, 0, 0, 0, 0, - 127, 2, 0, 0, 208, 0, + 207, 2, 0, 0, 224, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 100, 2, + 0, 0, 0, 0, 180, 2, + 0, 0, 0, 0, 0, 0, + 217, 2, 0, 0, 240, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 116, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, @@ -5770,62 +4966,70 @@ const BYTE YCbCrShaderMask[] = 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 109, 76, 97, 121, 101, 114, - 84, 114, 97, 110, 115, 102, - 111, 114, 109, 0, 3, 0, - 3, 0, 4, 0, 4, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 73, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 104, 0, 0, 0, + 3, 0, 0, 0, 8, 0, + 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171 + 0, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 3, 3, + 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 12, 12, + 0, 0, 83, 86, 95, 80, + 111, 115, 105, 116, 105, 111, + 110, 0, 84, 69, 88, 67, + 79, 79, 82, 68, 0, 171, + 171, 171, 79, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 83, 86, 95, 84, 97, 114, + 103, 101, 116, 0, 171, 171 }; ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; #if 0 @@ -5840,12 +5044,14 @@ ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; // // float4 fLayerColor; // Offset: 0 Size: 16 [unused] // float fLayerOpacity; // Offset: 16 Size: 4 -// float4x4 mLayerTransform; // Offset: 32 Size: 64 [unused] -// float4x4 mProjection; // Offset: 96 Size: 64 [unused] -// float4 vRenderTargetOffset; // Offset: 160 Size: 16 [unused] -// float4 vTextureCoords; // Offset: 176 Size: 16 [unused] -// float4 vLayerQuad; // Offset: 192 Size: 16 [unused] -// float4 vMaskQuad; // Offset: 208 Size: 16 [unused] +// uint4 iBlendConfig; // Offset: 32 Size: 16 [unused] +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] // // } // @@ -5856,8 +5062,8 @@ ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; // ------------------------------ ---------- ------- ----------- ---- -------- // sSampler sampler NA NA 0 1 // tRGB texture float4 2d 0 1 -// tRGBWhite texture float4 2d 1 1 -// tMask texture float4 2d 3 1 +// tRGBWhite texture float4 2d 4 1 +// tMask texture float4 2d 5 1 // $Globals cbuffer NA NA 0 1 // // @@ -5890,9 +5096,9 @@ ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; // // Target Sampler Source Sampler Source Resource // -------------- --------------- ---------------- -// s0 s0 t3 -// s1 s0 t0 -// s2 s0 t1 +// s0 s0 t0 +// s1 s0 t4 +// s2 s0 t5 // // // Level9 shader bytecode: @@ -5904,10 +5110,10 @@ ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; dcl_2d s1 dcl_2d s2 mov r0.xy, t0.wzzw - texld r0, r0, s0 + texld r0, r0, s2 mul r0.x, r0.x, c0.x - texld r1, t0, s1 - texld r2, t0, s2 + texld r1, t0, s0 + texld r2, t0, s1 add r2, r1, -r2 add r2, r2, c1.x mov r1.w, r2.y @@ -5921,19 +5127,19 @@ ps_4_0 dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 -dcl_resource_texture2d (float,float,float,float) t1 -dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t4 +dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v1.xy dcl_input_ps linear v1.zw dcl_output o0.xyzw dcl_output o1.xyzw dcl_temps 3 -sample r0.xyzw, v1.xyxx, t1.xyzw, s0 +sample r0.xyzw, v1.xyxx, t4.xyzw, s0 sample r1.xyzw, v1.xyxx, t0.xyzw, s0 add r0.xyzw, -r0.xyzw, r1.xyzw add r0.xyzw, r0.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000) mov r1.w, r0.y -sample r2.xyzw, v1.zwzz, t3.xyzw, s0 +sample r2.xyzw, v1.zwzz, t5.xyzw, s0 mul r2.x, r2.x, cb0[1].x mul o0.xyzw, r1.xyzw, r2.xxxx mul o1.xyzw, r0.xyzw, r2.xxxx @@ -5943,15 +5149,15 @@ ret const BYTE ComponentAlphaShaderMask[] = { - 68, 88, 66, 67, 102, 2, - 84, 222, 33, 141, 105, 188, - 152, 82, 64, 100, 57, 101, - 192, 110, 1, 0, 0, 0, - 20, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 231, 247, + 98, 196, 91, 244, 200, 52, + 117, 97, 164, 190, 237, 87, + 108, 62, 1, 0, 0, 0, + 120, 7, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 124, 1, 0, 0, 52, 3, 0, 0, 176, 3, 0, 0, - 88, 6, 0, 0, 200, 6, + 188, 6, 0, 0, 44, 7, 0, 0, 65, 111, 110, 57, 60, 1, 0, 0, 60, 1, 0, 0, 0, 2, 255, 255, @@ -5959,9 +5165,9 @@ const BYTE ComponentAlphaShaderMask[] = 0, 0, 1, 0, 48, 0, 0, 0, 60, 0, 0, 0, 60, 0, 3, 0, 36, 0, - 0, 0, 60, 0, 3, 0, - 0, 0, 0, 0, 1, 0, - 1, 0, 2, 0, 0, 0, + 0, 0, 60, 0, 0, 0, + 0, 0, 4, 0, 1, 0, + 5, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 255, 255, 81, 0, 0, 5, @@ -5980,15 +5186,15 @@ const BYTE ComponentAlphaShaderMask[] = 0, 0, 3, 128, 0, 0, 235, 176, 66, 0, 0, 3, 0, 0, 15, 128, 0, 0, - 228, 128, 0, 8, 228, 160, + 228, 128, 2, 8, 228, 160, 5, 0, 0, 3, 0, 0, 1, 128, 0, 0, 0, 128, 0, 0, 0, 160, 66, 0, 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 1, 8, + 0, 0, 228, 176, 0, 8, 228, 160, 66, 0, 0, 3, 2, 0, 15, 128, 0, 0, - 228, 176, 2, 8, 228, 160, + 228, 176, 1, 8, 228, 160, 2, 0, 0, 3, 2, 0, 15, 128, 1, 0, 228, 128, 2, 0, 228, 129, 2, 0, @@ -6017,10 +5223,10 @@ const BYTE ComponentAlphaShaderMask[] = 0, 4, 0, 112, 16, 0, 0, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 1, 0, + 0, 112, 16, 0, 4, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 98, 16, @@ -6035,7 +5241,7 @@ const BYTE ComponentAlphaShaderMask[] = 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, 70, 126, 16, 0, - 1, 0, 0, 0, 0, 96, + 4, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 69, 0, 0, 9, 242, 0, 16, 0, 1, 0, 0, 0, @@ -6062,7 +5268,7 @@ const BYTE ComponentAlphaShaderMask[] = 242, 0, 16, 0, 2, 0, 0, 0, 230, 26, 16, 0, 1, 0, 0, 0, 70, 126, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 56, 0, 0, 8, 18, 0, 16, 0, 2, 0, @@ -6101,11 +5307,11 @@ const BYTE ComponentAlphaShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, 69, 70, - 160, 2, 0, 0, 1, 0, + 4, 3, 0, 0, 1, 0, 0, 0, 228, 0, 0, 0, 5, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, - 0, 1, 0, 0, 109, 2, + 0, 1, 0, 0, 208, 2, 0, 0, 188, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6116,16 +5322,16 @@ const BYTE ComponentAlphaShaderMask[] = 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, + 0, 0, 13, 0, 0, 0, 202, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, - 255, 255, 1, 0, 0, 0, - 1, 0, 0, 0, 12, 0, + 255, 255, 4, 0, 0, 0, + 1, 0, 0, 0, 13, 0, 0, 0, 212, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 3, 0, + 255, 255, 255, 255, 5, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, 218, 0, 0, 0, 0, 0, 0, 0, @@ -6140,41 +5346,49 @@ const BYTE ComponentAlphaShaderMask[] = 116, 77, 97, 115, 107, 0, 36, 71, 108, 111, 98, 97, 108, 115, 0, 171, 218, 0, - 0, 0, 8, 0, 0, 0, - 252, 0, 0, 0, 224, 0, + 0, 0, 10, 0, 0, 0, + 252, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 188, 1, + 0, 0, 0, 0, 236, 1, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 200, 1, 0, 0, - 0, 0, 0, 0, 216, 1, + 0, 0, 248, 1, 0, 0, + 0, 0, 0, 0, 8, 2, 0, 0, 16, 0, 0, 0, 4, 0, 0, 0, 2, 0, - 0, 0, 232, 1, 0, 0, - 0, 0, 0, 0, 248, 1, + 0, 0, 24, 2, 0, 0, + 0, 0, 0, 0, 40, 2, 0, 0, 32, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 8, 2, 0, 0, - 0, 0, 0, 0, 24, 2, - 0, 0, 96, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 8, 2, 0, 0, - 0, 0, 0, 0, 36, 2, - 0, 0, 160, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 200, 1, 0, 0, - 0, 0, 0, 0, 56, 2, + 0, 0, 56, 2, 0, 0, + 0, 0, 0, 0, 72, 2, + 0, 0, 48, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 88, 2, 0, 0, + 0, 0, 0, 0, 104, 2, + 0, 0, 112, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 88, 2, 0, 0, + 0, 0, 0, 0, 116, 2, 0, 0, 176, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 72, 2, 0, 0, - 0, 0, 0, 0, 88, 2, + 0, 0, 248, 1, 0, 0, + 0, 0, 0, 0, 136, 2, 0, 0, 192, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 72, 2, 0, 0, - 0, 0, 0, 0, 99, 2, + 0, 0, 152, 2, 0, 0, + 0, 0, 0, 0, 168, 2, 0, 0, 208, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 72, 2, 0, 0, + 0, 0, 152, 2, 0, 0, + 0, 0, 0, 0, 179, 2, + 0, 0, 224, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 152, 2, 0, 0, + 0, 0, 0, 0, 189, 2, + 0, 0, 240, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 88, 2, 0, 0, 0, 0, 0, 0, 102, 76, 97, 121, 101, 114, 67, 111, 108, 111, 114, 0, 1, 0, @@ -6185,6 +5399,1060 @@ const BYTE ComponentAlphaShaderMask[] = 105, 116, 121, 0, 171, 171, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 105, 66, + 108, 101, 110, 100, 67, 111, + 110, 102, 105, 103, 0, 171, + 171, 171, 1, 0, 19, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 109, 76, 97, 121, 101, 114, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 3, 0, + 3, 0, 4, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 109, 80, 114, 111, + 106, 101, 99, 116, 105, 111, + 110, 0, 118, 82, 101, 110, + 100, 101, 114, 84, 97, 114, + 103, 101, 116, 79, 102, 102, + 115, 101, 116, 0, 118, 84, + 101, 120, 116, 117, 114, 101, + 67, 111, 111, 114, 100, 115, + 0, 171, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 118, 76, 97, 121, 101, 114, + 81, 117, 97, 100, 0, 118, + 77, 97, 115, 107, 81, 117, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, + 104, 0, 0, 0, 3, 0, + 0, 0, 8, 0, 0, 0, + 80, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 92, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 3, 3, 0, 0, + 92, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 12, 12, 0, 0, + 83, 86, 95, 80, 111, 115, + 105, 116, 105, 111, 110, 0, + 84, 69, 88, 67, 79, 79, + 82, 68, 0, 171, 171, 171, + 79, 83, 71, 78, 68, 0, + 0, 0, 2, 0, 0, 0, + 8, 0, 0, 0, 56, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 56, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 1, 0, 0, 0, + 15, 0, 0, 0, 83, 86, + 95, 84, 97, 114, 103, 101, + 116, 0, 171, 171 +}; +ShaderBytes sComponentAlphaShaderMask = { ComponentAlphaShaderMask, sizeof(ComponentAlphaShaderMask) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 +// +// +// Buffer Definitions: +// +// cbuffer $Globals +// { +// +// float4x4 mLayerTransform; // Offset: 0 Size: 64 +// float4x4 mProjection; // Offset: 64 Size: 64 +// float4 vRenderTargetOffset; // Offset: 128 Size: 16 +// float4 vTextureCoords; // Offset: 144 Size: 16 +// float4 vLayerQuad; // Offset: 160 Size: 16 +// float4 vMaskQuad; // Offset: 176 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// POSITION 0 xy 0 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float xyzw +// TEXCOORD 0 xy 1 NONE float xy +// TEXCOORD 2 zw 1 NONE float zw +// TEXCOORD 1 xyz 2 NONE float xyz +// +// +// Constant buffer to DX9 shader constant mappings: +// +// Target Reg Buffer Start Reg # of Regs Data Conversion +// ---------- ------- --------- --------- ---------------------- +// c1 cb0 0 2 ( FLT, FLT, FLT, FLT) +// c3 cb0 3 8 ( FLT, FLT, FLT, FLT) +// c11 cb0 12 2 ( FLT, FLT, FLT, FLT) +// c13 cb0 15 1 ( FLT, FLT, FLT, FLT) +// +// +// Runtime generated constant mappings: +// +// Target Reg Constant Description +// ---------- -------------------------------------------------- +// c0 Vertex Shader position offset +// +// +// Level9 shader bytecode: +// + vs_2_x + def c14, 1, 0.5, 0, 0 + dcl_texcoord v0 + mad oT0.xy, v0, c9.zwzw, c9 + mad r0.xy, v0, c10.zwzw, c10 + mul r1, r0.y, c2 + mad r0, c1, r0.x, r1 + add r0, r0, c3 + rcp r1.x, r0.w + mul r0.xyz, r0, r1.x + add r0, r0, -c8 + mul r0.xyz, r0.w, r0 + mul r1, r0.y, c5 + mad r1, c4, r0.x, r1 + mad r1, c6, r0.z, r1 + mad r0, c7, r0.w, r1 + add r1.xy, r0, c14.x + mad r1.y, r1.y, -c14.y, c14.x + mul r1.x, r1.x, c14.y + mul r1.yz, r1.y, c12.xyxw + mad r1.xy, c11.yxzw, r1.x, r1.yzzw + add oT0.zw, r1.xyxy, c13.xyyx + mad oPos.xy, r0.w, c0, r0 + mov oPos.zw, r0 + mov oT1.xyz, c14.z + +// approximately 22 instruction slots used +vs_4_0 +dcl_constantbuffer cb0[16], immediateIndexed +dcl_input v0.xy +dcl_output_siv o0.xyzw, position +dcl_output o1.xy +dcl_output o1.zw +dcl_output o2.xyz +dcl_temps 2 +mad r0.xy, v0.xyxx, cb0[10].zwzz, cb0[10].xyxx +mul r1.xyzw, r0.yyyy, cb0[1].xyzw +mad r0.xyzw, cb0[0].xyzw, r0.xxxx, r1.xyzw +add r0.xyzw, r0.xyzw, cb0[3].xyzw +div r0.xyz, r0.xyzx, r0.wwww +add r0.xyzw, r0.xyzw, -cb0[8].xyzw +mul r0.xyz, r0.wwww, r0.xyzx +mul r1.xyzw, r0.yyyy, cb0[5].xyzw +mad r1.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw +mad r1.xyzw, cb0[6].xyzw, r0.zzzz, r1.xyzw +mad r0.xyzw, cb0[7].xyzw, r0.wwww, r1.xyzw +mov o0.xyzw, r0.xyzw +add r0.xy, r0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000) +mad r0.y, -r0.y, l(0.500000), l(1.000000) +mul r0.x, r0.x, l(0.500000) +mul r0.yz, r0.yyyy, cb0[13].xxyx +mad r0.xy, cb0[12].xyxx, r0.xxxx, r0.yzyy +add o1.zw, r0.xxxy, cb0[15].xxxy +mad o1.xy, v0.xyxx, cb0[9].zwzz, cb0[9].xyxx +mov o2.xyz, l(0,0,0,0) +ret +// Approximately 21 instruction slots used +#endif + +const BYTE LayerQuadBlendVS[] = +{ + 68, 88, 66, 67, 238, 0, + 14, 218, 242, 150, 72, 155, + 68, 134, 76, 43, 160, 82, + 75, 24, 1, 0, 0, 0, + 12, 9, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 60, 2, 0, 0, 100, 5, + 0, 0, 224, 5, 0, 0, + 80, 8, 0, 0, 132, 8, + 0, 0, 65, 111, 110, 57, + 252, 1, 0, 0, 252, 1, + 0, 0, 0, 2, 254, 255, + 164, 1, 0, 0, 88, 0, + 0, 0, 4, 0, 36, 0, + 0, 0, 84, 0, 0, 0, + 84, 0, 0, 0, 36, 0, + 1, 0, 84, 0, 0, 0, + 0, 0, 2, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 8, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 12, 0, 2, 0, 11, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 1, 0, 13, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 254, 255, + 81, 0, 0, 5, 14, 0, + 15, 160, 0, 0, 128, 63, + 0, 0, 0, 63, 0, 0, + 0, 0, 0, 0, 0, 0, + 31, 0, 0, 2, 5, 0, + 0, 128, 0, 0, 15, 144, + 4, 0, 0, 4, 0, 0, + 3, 224, 0, 0, 228, 144, + 9, 0, 238, 160, 9, 0, + 228, 160, 4, 0, 0, 4, + 0, 0, 3, 128, 0, 0, + 228, 144, 10, 0, 238, 160, + 10, 0, 228, 160, 5, 0, + 0, 3, 1, 0, 15, 128, + 0, 0, 85, 128, 2, 0, + 228, 160, 4, 0, 0, 4, + 0, 0, 15, 128, 1, 0, + 228, 160, 0, 0, 0, 128, + 1, 0, 228, 128, 2, 0, + 0, 3, 0, 0, 15, 128, + 0, 0, 228, 128, 3, 0, + 228, 160, 6, 0, 0, 2, + 1, 0, 1, 128, 0, 0, + 255, 128, 5, 0, 0, 3, + 0, 0, 7, 128, 0, 0, + 228, 128, 1, 0, 0, 128, + 2, 0, 0, 3, 0, 0, + 15, 128, 0, 0, 228, 128, + 8, 0, 228, 161, 5, 0, + 0, 3, 0, 0, 7, 128, + 0, 0, 255, 128, 0, 0, + 228, 128, 5, 0, 0, 3, + 1, 0, 15, 128, 0, 0, + 85, 128, 5, 0, 228, 160, + 4, 0, 0, 4, 1, 0, + 15, 128, 4, 0, 228, 160, + 0, 0, 0, 128, 1, 0, + 228, 128, 4, 0, 0, 4, + 1, 0, 15, 128, 6, 0, + 228, 160, 0, 0, 170, 128, + 1, 0, 228, 128, 4, 0, + 0, 4, 0, 0, 15, 128, + 7, 0, 228, 160, 0, 0, + 255, 128, 1, 0, 228, 128, + 2, 0, 0, 3, 1, 0, + 3, 128, 0, 0, 228, 128, + 14, 0, 0, 160, 4, 0, + 0, 4, 1, 0, 2, 128, + 1, 0, 85, 128, 14, 0, + 85, 161, 14, 0, 0, 160, + 5, 0, 0, 3, 1, 0, + 1, 128, 1, 0, 0, 128, + 14, 0, 85, 160, 5, 0, + 0, 3, 1, 0, 6, 128, + 1, 0, 85, 128, 12, 0, + 196, 160, 4, 0, 0, 4, + 1, 0, 3, 128, 11, 0, + 225, 160, 1, 0, 0, 128, + 1, 0, 233, 128, 2, 0, + 0, 3, 0, 0, 12, 224, + 1, 0, 68, 128, 13, 0, + 20, 160, 4, 0, 0, 4, + 0, 0, 3, 192, 0, 0, + 255, 128, 0, 0, 228, 160, + 0, 0, 228, 128, 1, 0, + 0, 2, 0, 0, 12, 192, + 0, 0, 228, 128, 1, 0, + 0, 2, 1, 0, 7, 224, + 14, 0, 170, 160, 255, 255, + 0, 0, 83, 72, 68, 82, + 32, 3, 0, 0, 64, 0, + 1, 0, 200, 0, 0, 0, + 89, 0, 0, 4, 70, 142, + 32, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 95, 0, + 0, 3, 50, 16, 16, 0, + 0, 0, 0, 0, 103, 0, + 0, 4, 242, 32, 16, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 50, 32, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 194, 32, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 114, 32, 16, 0, 2, 0, + 0, 0, 104, 0, 0, 2, + 2, 0, 0, 0, 50, 0, + 0, 11, 50, 0, 16, 0, + 0, 0, 0, 0, 70, 16, + 16, 0, 0, 0, 0, 0, + 230, 138, 32, 0, 0, 0, + 0, 0, 10, 0, 0, 0, + 70, 128, 32, 0, 0, 0, + 0, 0, 10, 0, 0, 0, + 56, 0, 0, 8, 242, 0, + 16, 0, 1, 0, 0, 0, + 86, 5, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 50, 0, 0, 10, + 242, 0, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 6, 0, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 8, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 128, + 65, 0, 0, 0, 0, 0, + 0, 0, 8, 0, 0, 0, + 56, 0, 0, 7, 114, 0, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 8, 242, 0, 16, 0, + 1, 0, 0, 0, 86, 5, + 16, 0, 0, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 5, 0, 0, 0, + 50, 0, 0, 10, 242, 0, + 16, 0, 1, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 4, 0, 0, 0, + 6, 0, 16, 0, 0, 0, + 0, 0, 70, 14, 16, 0, + 1, 0, 0, 0, 50, 0, + 0, 10, 242, 0, 16, 0, + 1, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 166, 10, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 1, 0, + 0, 0, 50, 0, 0, 10, + 242, 0, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 7, 0, + 0, 0, 246, 15, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 54, 0, 0, 5, 242, 32, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 10, + 50, 0, 16, 0, 0, 0, + 0, 0, 70, 0, 16, 0, + 0, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 0, 0, 0, 0, + 50, 0, 0, 10, 34, 0, + 16, 0, 0, 0, 0, 0, + 26, 0, 16, 128, 65, 0, + 0, 0, 0, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 63, 1, 64, 0, 0, + 0, 0, 128, 63, 56, 0, + 0, 7, 18, 0, 16, 0, + 0, 0, 0, 0, 10, 0, + 16, 0, 0, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 63, 56, 0, 0, 8, + 98, 0, 16, 0, 0, 0, + 0, 0, 86, 5, 16, 0, + 0, 0, 0, 0, 6, 129, + 32, 0, 0, 0, 0, 0, + 13, 0, 0, 0, 50, 0, + 0, 10, 50, 0, 16, 0, + 0, 0, 0, 0, 70, 128, + 32, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 6, 0, + 16, 0, 0, 0, 0, 0, + 150, 5, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 8, + 194, 32, 16, 0, 1, 0, + 0, 0, 6, 4, 16, 0, + 0, 0, 0, 0, 6, 132, + 32, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 50, 0, + 0, 11, 50, 32, 16, 0, + 1, 0, 0, 0, 70, 16, + 16, 0, 0, 0, 0, 0, + 230, 138, 32, 0, 0, 0, + 0, 0, 9, 0, 0, 0, + 70, 128, 32, 0, 0, 0, + 0, 0, 9, 0, 0, 0, + 54, 0, 0, 8, 114, 32, + 16, 0, 2, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 62, 0, 0, 1, + 83, 84, 65, 84, 116, 0, + 0, 0, 21, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 5, 0, 0, 0, + 18, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 82, 68, + 69, 70, 104, 2, 0, 0, + 1, 0, 0, 0, 72, 0, + 0, 0, 1, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 254, 255, 0, 1, 0, 0, + 52, 2, 0, 0, 60, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 36, 71, 108, 111, 98, 97, + 108, 115, 0, 171, 171, 171, + 60, 0, 0, 0, 10, 0, + 0, 0, 96, 0, 0, 0, + 48, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 80, 1, 0, 0, 0, 0, + 0, 0, 64, 0, 0, 0, + 2, 0, 0, 0, 96, 1, + 0, 0, 0, 0, 0, 0, + 112, 1, 0, 0, 64, 0, + 0, 0, 64, 0, 0, 0, + 2, 0, 0, 0, 96, 1, + 0, 0, 0, 0, 0, 0, + 124, 1, 0, 0, 128, 0, + 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 144, 1, + 0, 0, 0, 0, 0, 0, + 160, 1, 0, 0, 144, 0, + 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 176, 1, + 0, 0, 0, 0, 0, 0, + 192, 1, 0, 0, 160, 0, + 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 176, 1, + 0, 0, 0, 0, 0, 0, + 203, 1, 0, 0, 176, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 176, 1, + 0, 0, 0, 0, 0, 0, + 213, 1, 0, 0, 192, 0, + 0, 0, 64, 0, 0, 0, + 2, 0, 0, 0, 96, 1, + 0, 0, 0, 0, 0, 0, + 232, 1, 0, 0, 0, 1, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 144, 1, + 0, 0, 0, 0, 0, 0, + 244, 1, 0, 0, 16, 1, + 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 4, 2, + 0, 0, 0, 0, 0, 0, + 20, 2, 0, 0, 32, 1, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 0, 0, + 109, 76, 97, 121, 101, 114, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 3, 0, + 3, 0, 4, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 109, 80, 114, 111, + 106, 101, 99, 116, 105, 111, + 110, 0, 118, 82, 101, 110, + 100, 101, 114, 84, 97, 114, + 103, 101, 116, 79, 102, 102, + 115, 101, 116, 0, 1, 0, + 3, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 118, 84, 101, 120, + 116, 117, 114, 101, 67, 111, + 111, 114, 100, 115, 0, 171, + 1, 0, 3, 0, 1, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 118, 76, + 97, 121, 101, 114, 81, 117, + 97, 100, 0, 118, 77, 97, + 115, 107, 81, 117, 97, 100, + 0, 109, 66, 97, 99, 107, + 100, 114, 111, 112, 84, 114, + 97, 110, 115, 102, 111, 114, + 109, 0, 102, 76, 97, 121, + 101, 114, 67, 111, 108, 111, + 114, 0, 102, 76, 97, 121, + 101, 114, 79, 112, 97, 99, + 105, 116, 121, 0, 171, 171, + 0, 0, 3, 0, 1, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 105, 66, + 108, 101, 110, 100, 67, 111, + 110, 102, 105, 103, 0, 171, + 171, 171, 1, 0, 19, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 77, 105, 99, 114, 111, 115, + 111, 102, 116, 32, 40, 82, + 41, 32, 72, 76, 83, 76, + 32, 83, 104, 97, 100, 101, + 114, 32, 67, 111, 109, 112, + 105, 108, 101, 114, 32, 54, + 46, 51, 46, 57, 54, 48, + 48, 46, 49, 54, 51, 56, + 52, 0, 171, 171, 73, 83, + 71, 78, 44, 0, 0, 0, + 1, 0, 0, 0, 8, 0, + 0, 0, 32, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 3, 3, + 0, 0, 80, 79, 83, 73, + 84, 73, 79, 78, 0, 171, + 171, 171, 79, 83, 71, 78, + 128, 0, 0, 0, 4, 0, + 0, 0, 8, 0, 0, 0, + 104, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, + 116, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 3, 12, 0, 0, + 116, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 12, 3, 0, 0, + 116, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 2, 0, + 0, 0, 7, 8, 0, 0, + 83, 86, 95, 80, 111, 115, + 105, 116, 105, 111, 110, 0, + 84, 69, 88, 67, 79, 79, + 82, 68, 0, 171, 171, 171 +}; +ShaderBytes sLayerQuadBlendVS = { LayerQuadBlendVS, sizeof(LayerQuadBlendVS) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 +// +// +// Buffer Definitions: +// +// cbuffer $Globals +// { +// +// float4x4 mLayerTransform; // Offset: 0 Size: 64 +// float4x4 mProjection; // Offset: 64 Size: 64 +// float4 vRenderTargetOffset; // Offset: 128 Size: 16 +// float4 vTextureCoords; // Offset: 144 Size: 16 +// float4 vLayerQuad; // Offset: 160 Size: 16 +// float4 vMaskQuad; // Offset: 176 Size: 16 +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// POSITION 0 xy 0 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float xyzw +// TEXCOORD 0 xy 1 NONE float xy +// TEXCOORD 2 zw 1 NONE float zw +// TEXCOORD 1 xyz 2 NONE float xyz +// +// +// Constant buffer to DX9 shader constant mappings: +// +// Target Reg Buffer Start Reg # of Regs Data Conversion +// ---------- ------- --------- --------- ---------------------- +// c1 cb0 0 2 ( FLT, FLT, FLT, FLT) +// c3 cb0 3 11 ( FLT, FLT, FLT, FLT) +// c14 cb0 15 1 ( FLT, FLT, FLT, FLT) +// +// +// Runtime generated constant mappings: +// +// Target Reg Constant Description +// ---------- -------------------------------------------------- +// c0 Vertex Shader position offset +// +// +// Level9 shader bytecode: +// + vs_2_x + def c15, 1, 0.5, 0, 0 + dcl_texcoord v0 + rcp r0.x, c11.z + mad r0.yz, v0.xxyw, c10.xzww, c10.xxyw + mul r1, r0.z, c2 + mad r1, c1, r0.y, r1 + add r1, r1, c3 + add r0.yz, r1.xxyw, -c11.xxyw + mul oT1.x, r0.x, r0.y + rcp r0.x, c11.w + mul oT1.y, r0.x, r0.z + mad oT0.xy, v0, c9.zwzw, c9 + rcp r0.x, r1.w + mul r1.xyz, r0.x, r1 + add r0, r1, -c8 + mul r0.xyz, r0.w, r0 + mul r1, r0.y, c5 + mad r1, c4, r0.x, r1 + mad r1, c6, r0.z, r1 + mad r0, c7, r0.w, r1 + add r1.xy, r0, c15.x + mad r1.y, r1.y, -c15.y, c15.x + mul r1.x, r1.x, c15.y + mul r1.yz, r1.y, c13.xyxw + mad r1.xy, c12.yxzw, r1.x, r1.yzzw + add oT0.zw, r1.xyxy, c14.xyyx + mad oPos.xy, r0.w, c0, r0 + mov oPos.zw, r0 + mov oT1.z, c15.z + +// approximately 27 instruction slots used +vs_4_0 +dcl_constantbuffer cb0[16], immediateIndexed +dcl_input v0.xy +dcl_output_siv o0.xyzw, position +dcl_output o1.xy +dcl_output o1.zw +dcl_output o2.xyz +dcl_temps 2 +mad r0.xy, v0.xyxx, cb0[10].zwzz, cb0[10].xyxx +mul r1.xyzw, r0.yyyy, cb0[1].xyzw +mad r0.xyzw, cb0[0].xyzw, r0.xxxx, r1.xyzw +add r0.xyzw, r0.xyzw, cb0[3].xyzw +div r1.xyz, r0.xyzx, r0.wwww +mov r1.w, r0.w +add r0.xy, r0.xyxx, -cb0[11].xyxx +div o2.xy, r0.xyxx, cb0[11].zwzz +add r0.xyzw, r1.xyzw, -cb0[8].xyzw +mul r0.xyz, r0.wwww, r0.xyzx +mul r1.xyzw, r0.yyyy, cb0[5].xyzw +mad r1.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw +mad r1.xyzw, cb0[6].xyzw, r0.zzzz, r1.xyzw +mad r0.xyzw, cb0[7].xyzw, r0.wwww, r1.xyzw +mov o0.xyzw, r0.xyzw +add r0.xy, r0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000) +mad r0.y, -r0.y, l(0.500000), l(1.000000) +mul r0.x, r0.x, l(0.500000) +mul r0.yz, r0.yyyy, cb0[13].xxyx +mad r0.xy, cb0[12].xyxx, r0.xxxx, r0.yzyy +add o1.zw, r0.xxxy, cb0[15].xxxy +mad o1.xy, v0.xyxx, cb0[9].zwzz, cb0[9].xyxx +mov o2.z, l(0) +ret +// Approximately 24 instruction slots used +#endif + +const BYTE LayerQuadBlendMaskVS[] = +{ + 68, 88, 66, 67, 120, 167, + 168, 154, 138, 114, 232, 254, + 144, 109, 183, 6, 132, 16, + 244, 173, 1, 0, 0, 0, + 148, 9, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 120, 2, 0, 0, 236, 5, + 0, 0, 104, 6, 0, 0, + 216, 8, 0, 0, 12, 9, + 0, 0, 65, 111, 110, 57, + 56, 2, 0, 0, 56, 2, + 0, 0, 0, 2, 254, 255, + 236, 1, 0, 0, 76, 0, + 0, 0, 3, 0, 36, 0, + 0, 0, 72, 0, 0, 0, + 72, 0, 0, 0, 36, 0, + 1, 0, 72, 0, 0, 0, + 0, 0, 2, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 11, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 1, 0, 14, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 254, 255, + 81, 0, 0, 5, 15, 0, + 15, 160, 0, 0, 128, 63, + 0, 0, 0, 63, 0, 0, + 0, 0, 0, 0, 0, 0, + 31, 0, 0, 2, 5, 0, + 0, 128, 0, 0, 15, 144, + 6, 0, 0, 2, 0, 0, + 1, 128, 11, 0, 170, 160, + 4, 0, 0, 4, 0, 0, + 6, 128, 0, 0, 208, 144, + 10, 0, 248, 160, 10, 0, + 208, 160, 5, 0, 0, 3, + 1, 0, 15, 128, 0, 0, + 170, 128, 2, 0, 228, 160, + 4, 0, 0, 4, 1, 0, + 15, 128, 1, 0, 228, 160, + 0, 0, 85, 128, 1, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 15, 128, 1, 0, + 228, 128, 3, 0, 228, 160, + 2, 0, 0, 3, 0, 0, + 6, 128, 1, 0, 208, 128, + 11, 0, 208, 161, 5, 0, + 0, 3, 1, 0, 1, 224, + 0, 0, 0, 128, 0, 0, + 85, 128, 6, 0, 0, 2, + 0, 0, 1, 128, 11, 0, + 255, 160, 5, 0, 0, 3, + 1, 0, 2, 224, 0, 0, + 0, 128, 0, 0, 170, 128, + 4, 0, 0, 4, 0, 0, + 3, 224, 0, 0, 228, 144, + 9, 0, 238, 160, 9, 0, + 228, 160, 6, 0, 0, 2, + 0, 0, 1, 128, 1, 0, + 255, 128, 5, 0, 0, 3, + 1, 0, 7, 128, 0, 0, + 0, 128, 1, 0, 228, 128, + 2, 0, 0, 3, 0, 0, + 15, 128, 1, 0, 228, 128, + 8, 0, 228, 161, 5, 0, + 0, 3, 0, 0, 7, 128, + 0, 0, 255, 128, 0, 0, + 228, 128, 5, 0, 0, 3, + 1, 0, 15, 128, 0, 0, + 85, 128, 5, 0, 228, 160, + 4, 0, 0, 4, 1, 0, + 15, 128, 4, 0, 228, 160, + 0, 0, 0, 128, 1, 0, + 228, 128, 4, 0, 0, 4, + 1, 0, 15, 128, 6, 0, + 228, 160, 0, 0, 170, 128, + 1, 0, 228, 128, 4, 0, + 0, 4, 0, 0, 15, 128, + 7, 0, 228, 160, 0, 0, + 255, 128, 1, 0, 228, 128, + 2, 0, 0, 3, 1, 0, + 3, 128, 0, 0, 228, 128, + 15, 0, 0, 160, 4, 0, + 0, 4, 1, 0, 2, 128, + 1, 0, 85, 128, 15, 0, + 85, 161, 15, 0, 0, 160, + 5, 0, 0, 3, 1, 0, + 1, 128, 1, 0, 0, 128, + 15, 0, 85, 160, 5, 0, + 0, 3, 1, 0, 6, 128, + 1, 0, 85, 128, 13, 0, + 196, 160, 4, 0, 0, 4, + 1, 0, 3, 128, 12, 0, + 225, 160, 1, 0, 0, 128, + 1, 0, 233, 128, 2, 0, + 0, 3, 0, 0, 12, 224, + 1, 0, 68, 128, 14, 0, + 20, 160, 4, 0, 0, 4, + 0, 0, 3, 192, 0, 0, + 255, 128, 0, 0, 228, 160, + 0, 0, 228, 128, 1, 0, + 0, 2, 0, 0, 12, 192, + 0, 0, 228, 128, 1, 0, + 0, 2, 1, 0, 4, 224, + 15, 0, 170, 160, 255, 255, + 0, 0, 83, 72, 68, 82, + 108, 3, 0, 0, 64, 0, + 1, 0, 219, 0, 0, 0, + 89, 0, 0, 4, 70, 142, + 32, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 95, 0, + 0, 3, 50, 16, 16, 0, + 0, 0, 0, 0, 103, 0, + 0, 4, 242, 32, 16, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 50, 32, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 194, 32, 16, 0, 1, 0, + 0, 0, 101, 0, 0, 3, + 114, 32, 16, 0, 2, 0, + 0, 0, 104, 0, 0, 2, + 2, 0, 0, 0, 50, 0, + 0, 11, 50, 0, 16, 0, + 0, 0, 0, 0, 70, 16, + 16, 0, 0, 0, 0, 0, + 230, 138, 32, 0, 0, 0, + 0, 0, 10, 0, 0, 0, + 70, 128, 32, 0, 0, 0, + 0, 0, 10, 0, 0, 0, + 56, 0, 0, 8, 242, 0, + 16, 0, 1, 0, 0, 0, + 86, 5, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 50, 0, 0, 10, + 242, 0, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 6, 0, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 8, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 0, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 1, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 0, 0, 0, 0, + 54, 0, 0, 5, 130, 0, + 16, 0, 1, 0, 0, 0, + 58, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 9, + 50, 0, 16, 0, 0, 0, + 0, 0, 70, 0, 16, 0, + 0, 0, 0, 0, 70, 128, + 32, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 11, 0, + 0, 0, 14, 0, 0, 8, + 50, 32, 16, 0, 2, 0, + 0, 0, 70, 0, 16, 0, + 0, 0, 0, 0, 230, 138, + 32, 0, 0, 0, 0, 0, + 11, 0, 0, 0, 0, 0, + 0, 9, 242, 0, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 70, 142, 32, 128, 65, 0, + 0, 0, 0, 0, 0, 0, + 8, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 0, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 56, 0, 0, 8, + 242, 0, 16, 0, 1, 0, + 0, 0, 86, 5, 16, 0, + 0, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 50, 0, + 0, 10, 242, 0, 16, 0, + 1, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 6, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 1, 0, + 0, 0, 50, 0, 0, 10, + 242, 0, 16, 0, 1, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 6, 0, + 0, 0, 166, 10, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 50, 0, 0, 10, 242, 0, + 16, 0, 0, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 7, 0, 0, 0, + 246, 15, 16, 0, 0, 0, + 0, 0, 70, 14, 16, 0, + 1, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 10, 50, 0, + 16, 0, 0, 0, 0, 0, + 70, 0, 16, 0, 0, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 0, + 0, 10, 34, 0, 16, 0, + 0, 0, 0, 0, 26, 0, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 63, + 1, 64, 0, 0, 0, 0, + 128, 63, 56, 0, 0, 7, + 18, 0, 16, 0, 0, 0, + 0, 0, 10, 0, 16, 0, + 0, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 63, + 56, 0, 0, 8, 98, 0, + 16, 0, 0, 0, 0, 0, + 86, 5, 16, 0, 0, 0, + 0, 0, 6, 129, 32, 0, + 0, 0, 0, 0, 13, 0, + 0, 0, 50, 0, 0, 10, + 50, 0, 16, 0, 0, 0, + 0, 0, 70, 128, 32, 0, + 0, 0, 0, 0, 12, 0, + 0, 0, 6, 0, 16, 0, + 0, 0, 0, 0, 150, 5, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 194, 32, + 16, 0, 1, 0, 0, 0, + 6, 4, 16, 0, 0, 0, + 0, 0, 6, 132, 32, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 50, 0, 0, 11, + 50, 32, 16, 0, 1, 0, + 0, 0, 70, 16, 16, 0, + 0, 0, 0, 0, 230, 138, + 32, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 70, 128, + 32, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 54, 0, + 0, 5, 66, 32, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 0, + 62, 0, 0, 1, 83, 84, + 65, 84, 116, 0, 0, 0, + 24, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 20, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 82, 68, 69, 70, + 104, 2, 0, 0, 1, 0, + 0, 0, 72, 0, 0, 0, + 1, 0, 0, 0, 28, 0, + 0, 0, 0, 4, 254, 255, + 0, 1, 0, 0, 52, 2, + 0, 0, 60, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 36, 71, + 108, 111, 98, 97, 108, 115, + 0, 171, 171, 171, 60, 0, + 0, 0, 10, 0, 0, 0, + 96, 0, 0, 0, 48, 1, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 80, 1, + 0, 0, 0, 0, 0, 0, + 64, 0, 0, 0, 2, 0, + 0, 0, 96, 1, 0, 0, + 0, 0, 0, 0, 112, 1, + 0, 0, 64, 0, 0, 0, + 64, 0, 0, 0, 2, 0, + 0, 0, 96, 1, 0, 0, + 0, 0, 0, 0, 124, 1, + 0, 0, 128, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 144, 1, 0, 0, + 0, 0, 0, 0, 160, 1, + 0, 0, 144, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 192, 1, + 0, 0, 160, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 203, 1, + 0, 0, 176, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 176, 1, 0, 0, + 0, 0, 0, 0, 213, 1, + 0, 0, 192, 0, 0, 0, + 64, 0, 0, 0, 2, 0, + 0, 0, 96, 1, 0, 0, + 0, 0, 0, 0, 232, 1, + 0, 0, 0, 1, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 144, 1, 0, 0, + 0, 0, 0, 0, 244, 1, + 0, 0, 16, 1, 0, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 4, 2, 0, 0, + 0, 0, 0, 0, 20, 2, + 0, 0, 32, 1, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 36, 2, 0, 0, 0, 0, 0, 0, 109, 76, 97, 121, 101, 114, 84, 114, 97, 110, 115, 102, 111, 114, @@ -6196,54 +6464,4354 @@ const BYTE ComponentAlphaShaderMask[] = 118, 82, 101, 110, 100, 101, 114, 84, 97, 114, 103, 101, 116, 79, 102, 102, 115, 101, - 116, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, + 116, 0, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 118, 84, 101, 120, 116, 117, + 114, 101, 67, 111, 111, 114, + 100, 115, 0, 171, 1, 0, + 3, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 118, 76, 97, 121, + 101, 114, 81, 117, 97, 100, + 0, 118, 77, 97, 115, 107, + 81, 117, 97, 100, 0, 109, + 66, 97, 99, 107, 100, 114, + 111, 112, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 102, 76, 97, 121, 101, 114, + 67, 111, 108, 111, 114, 0, + 102, 76, 97, 121, 101, 114, + 79, 112, 97, 99, 105, 116, + 121, 0, 171, 171, 0, 0, + 3, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 105, 66, 108, 101, + 110, 100, 67, 111, 110, 102, + 105, 103, 0, 171, 171, 171, + 1, 0, 19, 0, 1, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, + 44, 0, 0, 0, 1, 0, + 0, 0, 8, 0, 0, 0, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 0, 0, + 80, 79, 83, 73, 84, 73, + 79, 78, 0, 171, 171, 171, + 79, 83, 71, 78, 128, 0, + 0, 0, 4, 0, 0, 0, + 8, 0, 0, 0, 104, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 116, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 1, 0, 0, 0, + 3, 12, 0, 0, 116, 0, + 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 1, 0, 0, 0, + 12, 3, 0, 0, 116, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 2, 0, 0, 0, + 7, 8, 0, 0, 83, 86, + 95, 80, 111, 115, 105, 116, + 105, 111, 110, 0, 84, 69, + 88, 67, 79, 79, 82, 68, + 0, 171, 171, 171 +}; +ShaderBytes sLayerQuadBlendMaskVS = { LayerQuadBlendMaskVS, sizeof(LayerQuadBlendMaskVS) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 +// +// +// Buffer Definitions: +// +// cbuffer $Globals +// { +// +// float4x4 mLayerTransform; // Offset: 0 Size: 64 +// float4x4 mProjection; // Offset: 64 Size: 64 +// float4 vRenderTargetOffset; // Offset: 128 Size: 16 +// float4 vTextureCoords; // Offset: 144 Size: 16 +// float4 vLayerQuad; // Offset: 160 Size: 16 +// float4 vMaskQuad; // Offset: 176 Size: 16 +// float4x4 mBackdropTransform; // Offset: 192 Size: 64 +// float4 fLayerColor; // Offset: 256 Size: 16 [unused] +// float fLayerOpacity; // Offset: 272 Size: 4 [unused] +// uint4 iBlendConfig; // Offset: 288 Size: 16 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// POSITION 0 xy 0 NONE float xy +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float xyzw +// TEXCOORD 0 xy 1 NONE float xy +// TEXCOORD 2 zw 1 NONE float zw +// TEXCOORD 1 xyz 2 NONE float xyz +// +// +// Constant buffer to DX9 shader constant mappings: +// +// Target Reg Buffer Start Reg # of Regs Data Conversion +// ---------- ------- --------- --------- ---------------------- +// c1 cb0 0 2 ( FLT, FLT, FLT, FLT) +// c3 cb0 3 11 ( FLT, FLT, FLT, FLT) +// c14 cb0 15 1 ( FLT, FLT, FLT, FLT) +// +// +// Runtime generated constant mappings: +// +// Target Reg Constant Description +// ---------- -------------------------------------------------- +// c0 Vertex Shader position offset +// +// +// Level9 shader bytecode: +// + vs_2_x + def c15, 1, 0.5, 0, 0 + dcl_texcoord v0 + mov r0.z, c15.x + rcp r0.w, c11.z + mad r1.xy, v0, c10.zwzw, c10 + mul r2, r1.y, c2 + mad r1, c1, r1.x, r2 + add r1, r1, c3 + rcp r2.x, r1.w + mad r2.yz, r1.xxyw, r2.x, -c11.xxyw + mul r1.xyz, r1, r2.x + mul r0.x, r0.w, r2.y + rcp r0.w, c11.w + mul r0.y, r0.w, r2.z + mul oT1.xyz, r0, r1.w + add r0, r1, -c8 + mad oT0.xy, v0, c9.zwzw, c9 + mul r0.xyz, r0.w, r0 + mul r1, r0.y, c5 + mad r1, c4, r0.x, r1 + mad r1, c6, r0.z, r1 + mad r0, c7, r0.w, r1 + add r1.xy, r0, c15.x + mad r1.y, r1.y, -c15.y, c15.x + mul r1.x, r1.x, c15.y + mul r1.yz, r1.y, c13.xyxw + mad r1.xy, c12.yxzw, r1.x, r1.yzzw + add oT0.zw, r1.xyxy, c14.xyyx + mad oPos.xy, r0.w, c0, r0 + mov oPos.zw, r0 + +// approximately 28 instruction slots used +vs_4_0 +dcl_constantbuffer cb0[16], immediateIndexed +dcl_input v0.xy +dcl_output_siv o0.xyzw, position +dcl_output o1.xy +dcl_output o1.zw +dcl_output o2.xyz +dcl_temps 3 +mad r0.xy, v0.xyxx, cb0[10].zwzz, cb0[10].xyxx +mul r1.xyzw, r0.yyyy, cb0[1].xyzw +mad r0.xyzw, cb0[0].xyzw, r0.xxxx, r1.xyzw +add r0.xyzw, r0.xyzw, cb0[3].xyzw +div r0.xyz, r0.xyzx, r0.wwww +add r1.xyzw, r0.xyzw, -cb0[8].xyzw +add r0.xy, r0.xyxx, -cb0[11].xyxx +div r0.xy, r0.xyxx, cb0[11].zwzz +mul r1.xyz, r1.wwww, r1.xyzx +mul r2.xyzw, r1.yyyy, cb0[5].xyzw +mad r2.xyzw, cb0[4].xyzw, r1.xxxx, r2.xyzw +mad r2.xyzw, cb0[6].xyzw, r1.zzzz, r2.xyzw +mad r1.xyzw, cb0[7].xyzw, r1.wwww, r2.xyzw +mov o0.xyzw, r1.xyzw +add r1.xy, r1.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000) +mad r1.y, -r1.y, l(0.500000), l(1.000000) +mul r1.x, r1.x, l(0.500000) +mul r1.yz, r1.yyyy, cb0[13].xxyx +mad r1.xy, cb0[12].xyxx, r1.xxxx, r1.yzyy +add o1.zw, r1.xxxy, cb0[15].xxxy +mad o1.xy, v0.xyxx, cb0[9].zwzz, cb0[9].xyxx +mov r0.z, l(1.000000) +mul o2.xyz, r0.wwww, r0.xyzx +ret +// Approximately 24 instruction slots used +#endif + +const BYTE LayerQuadBlendMask3DVS[] = +{ + 68, 88, 66, 67, 114, 33, + 168, 234, 171, 245, 21, 91, + 164, 147, 216, 15, 58, 222, + 28, 166, 1, 0, 0, 0, + 176, 9, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 140, 2, 0, 0, 8, 6, + 0, 0, 132, 6, 0, 0, + 244, 8, 0, 0, 40, 9, + 0, 0, 65, 111, 110, 57, + 76, 2, 0, 0, 76, 2, + 0, 0, 0, 2, 254, 255, + 0, 2, 0, 0, 76, 0, + 0, 0, 3, 0, 36, 0, + 0, 0, 72, 0, 0, 0, + 72, 0, 0, 0, 36, 0, + 1, 0, 72, 0, 0, 0, + 0, 0, 2, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 11, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 1, 0, 14, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 254, 255, + 81, 0, 0, 5, 15, 0, + 15, 160, 0, 0, 128, 63, + 0, 0, 0, 63, 0, 0, + 0, 0, 0, 0, 0, 0, + 31, 0, 0, 2, 5, 0, + 0, 128, 0, 0, 15, 144, + 1, 0, 0, 2, 0, 0, + 4, 128, 15, 0, 0, 160, + 6, 0, 0, 2, 0, 0, + 8, 128, 11, 0, 170, 160, + 4, 0, 0, 4, 1, 0, + 3, 128, 0, 0, 228, 144, + 10, 0, 238, 160, 10, 0, + 228, 160, 5, 0, 0, 3, + 2, 0, 15, 128, 1, 0, + 85, 128, 2, 0, 228, 160, + 4, 0, 0, 4, 1, 0, + 15, 128, 1, 0, 228, 160, + 1, 0, 0, 128, 2, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 15, 128, 1, 0, + 228, 128, 3, 0, 228, 160, + 6, 0, 0, 2, 2, 0, + 1, 128, 1, 0, 255, 128, + 4, 0, 0, 4, 2, 0, + 6, 128, 1, 0, 208, 128, + 2, 0, 0, 128, 11, 0, + 208, 161, 5, 0, 0, 3, + 1, 0, 7, 128, 1, 0, + 228, 128, 2, 0, 0, 128, + 5, 0, 0, 3, 0, 0, + 1, 128, 0, 0, 255, 128, + 2, 0, 85, 128, 6, 0, + 0, 2, 0, 0, 8, 128, + 11, 0, 255, 160, 5, 0, + 0, 3, 0, 0, 2, 128, + 0, 0, 255, 128, 2, 0, + 170, 128, 5, 0, 0, 3, + 1, 0, 7, 224, 0, 0, + 228, 128, 1, 0, 255, 128, + 2, 0, 0, 3, 0, 0, + 15, 128, 1, 0, 228, 128, + 8, 0, 228, 161, 4, 0, + 0, 4, 0, 0, 3, 224, + 0, 0, 228, 144, 9, 0, + 238, 160, 9, 0, 228, 160, + 5, 0, 0, 3, 0, 0, + 7, 128, 0, 0, 255, 128, + 0, 0, 228, 128, 5, 0, + 0, 3, 1, 0, 15, 128, + 0, 0, 85, 128, 5, 0, + 228, 160, 4, 0, 0, 4, + 1, 0, 15, 128, 4, 0, + 228, 160, 0, 0, 0, 128, + 1, 0, 228, 128, 4, 0, + 0, 4, 1, 0, 15, 128, + 6, 0, 228, 160, 0, 0, + 170, 128, 1, 0, 228, 128, + 4, 0, 0, 4, 0, 0, + 15, 128, 7, 0, 228, 160, + 0, 0, 255, 128, 1, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 3, 128, 0, 0, + 228, 128, 15, 0, 0, 160, + 4, 0, 0, 4, 1, 0, + 2, 128, 1, 0, 85, 128, + 15, 0, 85, 161, 15, 0, + 0, 160, 5, 0, 0, 3, + 1, 0, 1, 128, 1, 0, + 0, 128, 15, 0, 85, 160, + 5, 0, 0, 3, 1, 0, + 6, 128, 1, 0, 85, 128, + 13, 0, 196, 160, 4, 0, + 0, 4, 1, 0, 3, 128, + 12, 0, 225, 160, 1, 0, + 0, 128, 1, 0, 233, 128, + 2, 0, 0, 3, 0, 0, + 12, 224, 1, 0, 68, 128, + 14, 0, 20, 160, 4, 0, + 0, 4, 0, 0, 3, 192, + 0, 0, 255, 128, 0, 0, + 228, 160, 0, 0, 228, 128, + 1, 0, 0, 2, 0, 0, + 12, 192, 0, 0, 228, 128, + 255, 255, 0, 0, 83, 72, + 68, 82, 116, 3, 0, 0, + 64, 0, 1, 0, 221, 0, + 0, 0, 89, 0, 0, 4, + 70, 142, 32, 0, 0, 0, + 0, 0, 16, 0, 0, 0, + 95, 0, 0, 3, 50, 16, + 16, 0, 0, 0, 0, 0, + 103, 0, 0, 4, 242, 32, + 16, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 50, 32, 16, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 194, 32, 16, 0, + 1, 0, 0, 0, 101, 0, + 0, 3, 114, 32, 16, 0, + 2, 0, 0, 0, 104, 0, + 0, 2, 3, 0, 0, 0, + 50, 0, 0, 11, 50, 0, + 16, 0, 0, 0, 0, 0, + 70, 16, 16, 0, 0, 0, + 0, 0, 230, 138, 32, 0, + 0, 0, 0, 0, 10, 0, + 0, 0, 70, 128, 32, 0, + 0, 0, 0, 0, 10, 0, + 0, 0, 56, 0, 0, 8, + 242, 0, 16, 0, 1, 0, + 0, 0, 86, 5, 16, 0, + 0, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 50, 0, + 0, 10, 242, 0, 16, 0, + 0, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 0, + 16, 0, 0, 0, 0, 0, + 70, 14, 16, 0, 1, 0, + 0, 0, 0, 0, 0, 8, + 242, 0, 16, 0, 0, 0, + 0, 0, 70, 14, 16, 0, + 0, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 14, 0, + 0, 7, 114, 0, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 9, + 242, 0, 16, 0, 1, 0, + 0, 0, 70, 14, 16, 0, + 0, 0, 0, 0, 70, 142, + 32, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 8, 0, + 0, 0, 0, 0, 0, 9, + 50, 0, 16, 0, 0, 0, + 0, 0, 70, 0, 16, 0, + 0, 0, 0, 0, 70, 128, + 32, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 11, 0, + 0, 0, 14, 0, 0, 8, + 50, 0, 16, 0, 0, 0, + 0, 0, 70, 0, 16, 0, + 0, 0, 0, 0, 230, 138, + 32, 0, 0, 0, 0, 0, + 11, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 1, 0, 0, 0, 246, 15, + 16, 0, 1, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 56, 0, 0, 8, + 242, 0, 16, 0, 2, 0, + 0, 0, 86, 5, 16, 0, + 1, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 50, 0, + 0, 10, 242, 0, 16, 0, + 2, 0, 0, 0, 70, 142, + 32, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 6, 0, + 16, 0, 1, 0, 0, 0, + 70, 14, 16, 0, 2, 0, + 0, 0, 50, 0, 0, 10, + 242, 0, 16, 0, 2, 0, + 0, 0, 70, 142, 32, 0, + 0, 0, 0, 0, 6, 0, + 0, 0, 166, 10, 16, 0, + 1, 0, 0, 0, 70, 14, + 16, 0, 2, 0, 0, 0, + 50, 0, 0, 10, 242, 0, + 16, 0, 1, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 7, 0, 0, 0, + 246, 15, 16, 0, 1, 0, + 0, 0, 70, 14, 16, 0, + 2, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 10, 50, 0, + 16, 0, 1, 0, 0, 0, + 70, 0, 16, 0, 1, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 0, + 0, 10, 34, 0, 16, 0, + 1, 0, 0, 0, 26, 0, + 16, 128, 65, 0, 0, 0, + 1, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 63, + 1, 64, 0, 0, 0, 0, + 128, 63, 56, 0, 0, 7, + 18, 0, 16, 0, 1, 0, + 0, 0, 10, 0, 16, 0, + 1, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 63, + 56, 0, 0, 8, 98, 0, + 16, 0, 1, 0, 0, 0, + 86, 5, 16, 0, 1, 0, + 0, 0, 6, 129, 32, 0, + 0, 0, 0, 0, 13, 0, + 0, 0, 50, 0, 0, 10, + 50, 0, 16, 0, 1, 0, + 0, 0, 70, 128, 32, 0, + 0, 0, 0, 0, 12, 0, + 0, 0, 6, 0, 16, 0, + 1, 0, 0, 0, 150, 5, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 8, 194, 32, + 16, 0, 1, 0, 0, 0, + 6, 4, 16, 0, 1, 0, + 0, 0, 6, 132, 32, 0, + 0, 0, 0, 0, 15, 0, + 0, 0, 50, 0, 0, 11, + 50, 32, 16, 0, 1, 0, + 0, 0, 70, 16, 16, 0, + 0, 0, 0, 0, 230, 138, + 32, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 70, 128, + 32, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 54, 0, + 0, 5, 66, 0, 16, 0, + 0, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 128, 63, + 56, 0, 0, 7, 114, 32, + 16, 0, 2, 0, 0, 0, + 246, 15, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 62, 0, + 0, 1, 83, 84, 65, 84, + 116, 0, 0, 0, 24, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 5, 0, + 0, 0, 21, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 82, 68, 69, 70, 104, 2, + 0, 0, 1, 0, 0, 0, + 72, 0, 0, 0, 1, 0, + 0, 0, 28, 0, 0, 0, + 0, 4, 254, 255, 0, 1, + 0, 0, 52, 2, 0, 0, + 60, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 36, 71, 108, 111, + 98, 97, 108, 115, 0, 171, + 171, 171, 60, 0, 0, 0, + 10, 0, 0, 0, 96, 0, + 0, 0, 48, 1, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 80, 1, 0, 0, + 0, 0, 0, 0, 64, 0, + 0, 0, 2, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 112, 1, 0, 0, + 64, 0, 0, 0, 64, 0, + 0, 0, 2, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 124, 1, 0, 0, + 128, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 160, 1, 0, 0, + 144, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 192, 1, 0, 0, + 160, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 203, 1, 0, 0, + 176, 0, 0, 0, 16, 0, + 0, 0, 2, 0, 0, 0, + 176, 1, 0, 0, 0, 0, + 0, 0, 213, 1, 0, 0, + 192, 0, 0, 0, 64, 0, + 0, 0, 2, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 232, 1, 0, 0, + 0, 1, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, + 144, 1, 0, 0, 0, 0, + 0, 0, 244, 1, 0, 0, + 16, 1, 0, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 4, 2, 0, 0, 0, 0, + 0, 0, 20, 2, 0, 0, + 32, 1, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, + 36, 2, 0, 0, 0, 0, + 0, 0, 109, 76, 97, 121, + 101, 114, 84, 114, 97, 110, + 115, 102, 111, 114, 109, 0, + 3, 0, 3, 0, 4, 0, + 4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 109, 80, + 114, 111, 106, 101, 99, 116, + 105, 111, 110, 0, 118, 82, + 101, 110, 100, 101, 114, 84, + 97, 114, 103, 101, 116, 79, + 102, 102, 115, 101, 116, 0, 1, 0, 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 73, 83, - 71, 78, 104, 0, 0, 0, - 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, + 0, 0, 0, 0, 118, 84, + 101, 120, 116, 117, 114, 101, + 67, 111, 111, 114, 100, 115, + 0, 171, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 118, 76, 97, 121, 101, 114, + 81, 117, 97, 100, 0, 118, + 77, 97, 115, 107, 81, 117, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 102, 76, + 97, 121, 101, 114, 67, 111, + 108, 111, 114, 0, 102, 76, + 97, 121, 101, 114, 79, 112, + 97, 99, 105, 116, 121, 0, + 171, 171, 0, 0, 3, 0, + 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 105, 66, 108, 101, 110, 100, + 67, 111, 110, 102, 105, 103, + 0, 171, 171, 171, 1, 0, + 19, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 77, 105, 99, 114, + 111, 115, 111, 102, 116, 32, + 40, 82, 41, 32, 72, 76, + 83, 76, 32, 83, 104, 97, + 100, 101, 114, 32, 67, 111, + 109, 112, 105, 108, 101, 114, + 32, 54, 46, 51, 46, 57, + 54, 48, 48, 46, 49, 54, + 51, 56, 52, 0, 171, 171, + 73, 83, 71, 78, 44, 0, + 0, 0, 1, 0, 0, 0, + 8, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 3, 3, 0, 0, 80, 79, + 83, 73, 84, 73, 79, 78, + 0, 171, 171, 171, 79, 83, + 71, 78, 128, 0, 0, 0, + 4, 0, 0, 0, 8, 0, + 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 92, 0, 0, 0, + 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 3, - 0, 0, 92, 0, 0, 0, + 1, 0, 0, 0, 3, 12, + 0, 0, 116, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 1, 0, 0, 0, 12, 3, + 0, 0, 116, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 12, 12, + 2, 0, 0, 0, 7, 8, 0, 0, 83, 86, 95, 80, 111, 115, 105, 116, 105, 111, 110, 0, 84, 69, 88, 67, 79, 79, 82, 68, 0, 171, - 171, 171, 79, 83, 71, 78, - 68, 0, 0, 0, 2, 0, - 0, 0, 8, 0, 0, 0, - 56, 0, 0, 0, 0, 0, + 171, 171 +}; +ShaderBytes sLayerQuadBlendMask3DVS = { LayerQuadBlendMask3DVS, sizeof(LayerQuadBlendMask3DVS) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 +// +// +// Buffer Definitions: +// +// cbuffer $Globals +// { +// +// float4 fLayerColor; // Offset: 0 Size: 16 +// float fLayerOpacity; // Offset: 16 Size: 4 +// uint4 iBlendConfig; // Offset: 32 Size: 16 +// float4x4 mLayerTransform; // Offset: 48 Size: 64 [unused] +// float4x4 mProjection; // Offset: 112 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 176 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 192 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 208 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 224 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 240 Size: 64 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// LayerTextureSamplerLinear sampler NA NA 1 1 +// tRGB texture float4 2d 0 1 +// tY texture float4 2d 1 1 +// tCb texture float4 2d 2 1 +// tCr texture float4 2d 3 1 +// tMask texture float4 2d 5 1 +// tBackdrop texture float4 2d 6 1 +// $Globals cbuffer NA NA 0 1 +// +// +// +// Input signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Position 0 xyzw 0 POS float +// TEXCOORD 0 xy 1 NONE float xy +// TEXCOORD 2 zw 1 NONE float zw +// TEXCOORD 1 xyz 2 NONE float xyz +// +// +// Output signature: +// +// Name Index Mask Register SysValue Format Used +// -------------------- ----- ------ -------- -------- ------- ------ +// SV_Target 0 xyzw 0 TARGET float xyzw +// +// +// Constant buffer to DX9 shader constant mappings: +// +// Target Reg Buffer Start Reg # of Regs Data Conversion +// ---------- ------- --------- --------- ---------------------- +// c0 cb0 0 2 ( FLT, FLT, FLT, FLT) +// c2 cb0 2 1 (UINT,UINT,UINT,UINT) +// +// +// Sampler/Resource to DX9 shader sampler mappings: +// +// Target Sampler Source Sampler Source Resource +// -------------- --------------- ---------------- +// s0 s0 t0 +// s1 s0 t1 +// s2 s0 t2 +// s3 s0 t3 +// s4 s0 t5 +// s5 s0 t6 +// s6 s1 t5 +// +// +// Level9 shader bytecode: +// + ps_2_x + def c3, -1, -2, -0.50195998, -0.0627499968 + def c4, 1.59603, 0.812969983, 1.16437995, 2.01723003 + def c5, -1, -2, -3, -4 + def c6, -5, -6, -7, -8 + def c7, 1, 0.25, 2, -1 + def c8, 16, -12, -13, -14 + def c9, -9, -10, -11, -12 + def c10, 0.300000012, 0.589999974, 0.109999999, 0 + def c11, 0.391759992, -1, -0, -0.5 + dcl t0 + dcl t1.xyz + dcl_2d s0 + dcl_2d s1 + dcl_2d s2 + dcl_2d s3 + dcl_2d s4 + dcl_2d s5 + dcl_2d s6 + mov r0.x, -c11.z + mov r1.x, -c11.z + mov r2.z, -c11.z + texld r3, t0, s1 + texld r4, t0, s3 + add r0.w, r4.x, c3.z + mul r3.yz, r0.w, c4.xxyw + add r0.w, r3.x, c3.w + mad r1.w, r0.w, c4.z, -r3.z + mad r3.x, r0.w, c4.z, r3.y + texld r4, t1, s4 + texld r5, t0, s2 + add r2.w, r5.x, c3.z + mad r3.y, r2.w, -c11.x, r1.w + mul r1.w, r2.w, c4.w + mad r3.z, r0.w, c4.z, r1.w + mov r3.w, -c3.x + mul r3, r3, c1.x + mul r5, r4.x, r3 + rcp r0.w, t1.z + mul r6.xy, r0.w, t1 + texld r7, t0, s0 + texld r6, r6, s6 + mul r7, r7, c1.x + mul r8, r4.x, r7 + mov r9.xy, c3 + add r10, r9.xyxy, c2.xxyy + mul r10, r10, r10 + cmp r5, -r10.x, r8, r5 + mov r8.xyz, r7 + mov r8.w, c1.x + mul r11, r4.x, r8 + mul r4, r4.x, c0 + cmp r5, -c2.x, r11, r5 + cmp r6.yz, -r10.xyww, c11.y, c11.z + cmp r6.yz, -r10.xxzw, c3.x, r6 + cmp r6.yz, -c2.xxyw, r9.x, r6 + cmp r4, r6.y, r4, r5 + mul r5, r6.x, r7 + cmp r3, -r10.x, r7, r3 + cmp r4, -r10.z, r4, r5 + cmp r3, -c2.x, r8, r3 + cmp r3, r6.y, c0, r3 + cmp r3, -c2.y, r3, r4 + cmp r3, r6.z, -c11.zzzy, r3 + rcp r0.w, r3.w + mul r4.xyz, r0.w, r3 + cmp r4.xyz, -c2.w, r3, r4 + add r5.xy, -r4.yzzw, r4 + cmp r5.zw, r5.x, r4.xyxy, r4.xyyx + max r0.w, r5.z, r4.z + min r1.w, r4.z, r5.w + add r6.w, r0.w, -r1.w + mov r7.xy, t0.wzzw + texld r7, r7, s5 + rcp r0.w, r7.w + mul r8.xyz, r0.w, r7 + mad r5.zw, r7.xyzy, r0.w, -r8.xyxz + mul r9.xy, r6.w, r5.zwzw + mad r10, r7.yxxz, r0.w, -r8.xzyy + rcp r1.w, r10.x + mul r6.y, r1.w, r9.x + cmp r1.yz, r10.z, -c11.z, r6.xwyw + mul r11, r6.w, r10 + rcp r1.w, r5.w + mul r6.x, r1.w, r11.y + cmp r2.xy, r10.w, -c11.z, r6.xwzw + cmp r1.xyz, r5.z, r1, r2 + rcp r1.w, r5.z + mul r6.z, r1.w, r11.x + cmp r0.yz, r10.y, -c11.z, r6.xzww + cmp r0.xyz, r10.w, r0, r1 + mov r1.y, -c11.z + mov r2.y, -c11.z + mov r12.z, -c11.z + rcp r1.w, r10.z + mul r6.y, r1.w, r11.w + cmp r2.xz, r10.x, -c11.z, r6.wyyw + rcp r1.w, r10.y + mul r6.x, r1.w, r9.y + cmp r12.xy, r5.z, -c11.z, r6.wxzw + cmp r2.xyz, r10.w, r2, r12 + rcp r1.w, r10.w + mul r6.z, r1.w, r11.z + cmp r1.xz, r5.w, -c11.z, r6.zyww + cmp r1.xyz, r5.z, r1, r2 + cmp r0.xyz, r10.x, r0, r1 + cmp r1.xy, r10.z, r8, r8.yxzw + dp3 r4.w, c10, r0 + dp3 r8.w, c10, r8 + add r4.w, -r4.w, r8.w + add r0.xyz, r0, r4.w + add r4.w, -r0.y, r0.x + cmp r1.zw, r4.w, r0.xyyx, r0.xyxy + min r4.w, r0.z, r1.z + max r2.x, r1.w, r0.z + dp3 r1.z, c10, r0 + add r1.w, -r4.w, r1.z + rcp r1.w, r1.w + add r2.yzw, r0.xxyz, -r1.z + mul r2.yzw, r1.z, r2 + mad r2.yzw, r2, r1.w, r1.z + cmp r0.xyz, r4.w, r0, r2.yzww + add r2.yzw, -r1.z, r0.xxyz + add r1.w, -r1.z, -c3.x + mul r2.yzw, r1.w, r2 + add r1.w, -r1.z, r2.x + add r4.w, -r2.x, -c3.x + rcp r1.w, r1.w + mad r2.xyz, r2.yzww, r1.w, r1.z + cmp r0.xyz, r4.w, r0, r2 + mov r4.w, c2.z + add r1.zw, r4.w, c8 + mul r1.zw, r1, r1 + dp3 r2.x, c10, r4 + add r2.y, -r8.w, r2.x + add r2.x, -r2.x, r8.w + add r2.xzw, r2.x, r4.xyyz + mad r6.xyz, r7, r0.w, r2.y + add r6.w, -r6.y, r6.x + cmp r5.zw, r6.w, r6.xyyx, r6.xyxy + min r2.y, r6.z, r5.z + max r9.x, r5.w, r6.z + dp3 r6.w, c10, r6 + add r5.z, -r2.y, r6.w + rcp r5.z, r5.z + add r9.yzw, -r6.w, r6.xxyz + mul r9.yzw, r6.w, r9 + mad r9.yzw, r9, r5.z, r6.w + cmp r6.xyz, r2.y, r6, r9.yzww + add r9.yzw, -r6.w, r6.xxyz + add r2.y, -r6.w, -c3.x + mul r9.yzw, r2.y, r9 + add r2.y, -r6.w, r9.x + add r5.z, -r9.x, -c3.x + rcp r5.w, r2.y + mad r9.xyz, r9.yzww, r5.w, r6.w + cmp r6.xyz, r5.z, r6, r9 + cmp r6.xyz, -r1.w, r6, -c11.z + add r1.w, -r2.z, r2.x + cmp r5.zw, r1.w, r2.xyzx, r2.xyxz + min r1.w, r2.w, r5.z + max r6.w, r5.w, r2.w + dp3 r2.y, c10, r2.xzww + add r5.z, -r1.w, r2.y + rcp r5.z, r5.z + add r9.xyz, -r2.y, r2.xzww + mul r9.xyz, r2.y, r9 + mad r9.xyz, r9, r5.z, r2.y + cmp r2.xzw, r1.w, r2, r9.xyyz + add r9.xyz, -r2.y, r2.xzww + add r1.w, -r2.y, -c3.x + mul r9.xyz, r1.w, r9 + add r1.w, -r2.y, r6.w + add r6.w, -r6.w, -c3.x + rcp r1.w, r1.w + mad r9.xyz, r9, r1.w, r2.y + cmp r2.xyz, r6.w, r2.xzww, r9 + cmp r2.xyz, -r1.z, r2, r6 + add r6, r4.w, c9 + mul r6, r6, r6 + cmp r0.xyz, -r6.w, r0, r2 + add r2, -r4.xxzy, r4.yzxz + mov r9.y, -c11.z + mov r10.y, -c11.z + mov r11.z, -c11.z + rcp r6.w, r2.z + max r9.w, r1.x, r8.z + min r10.w, r8.z, r1.y + add r1.w, r9.w, -r10.w + mul r5.zw, r1.w, r5.xyxy + mul r1.x, r6.w, r5.w + cmp r11.xy, r2.y, -c11.z, r1.wxzw + rcp r5.w, r5.x + mul r12, r1.w, r2 + mul r1.y, r5.w, r12.w + cmp r10.xz, r2.x, -c11.z, r1.wyyw + cmp r10.xyz, r2.w, r10, r11 + rcp r5.w, r2.w + mul r1.z, r5.w, r5.z + cmp r9.xz, r5.y, -c11.z, r1.zyww + cmp r9.xyz, r2.y, r9, r10 + mov r10.x, -c11.z + mov r11.x, -c11.z + mov r13.z, -c11.z + rcp r6.w, r2.x + mul r1.y, r6.w, r12.y + cmp r11.yz, r5.x, -c11.z, r1.xwyw + rcp r6.w, r5.y + mul r1.x, r6.w, r12.z + cmp r13.xy, r2.w, -c11.z, r1.xwzw + cmp r5.xyz, r2.y, r11, r13 + rcp r5.w, r2.y + mul r1.z, r5.w, r12.x + cmp r10.yz, r2.z, -c11.z, r1.xzww + cmp r1.xyz, r2.w, r10, r5 + cmp r1.xyz, r2.x, r1, r9 + dp3 r1.w, c10, r1 + add r1.w, -r1.w, r8.w + add r1.xyz, r1.w, r1 + add r1.w, -r1.y, r1.x + cmp r2.xy, r1.w, r1.yxzw, r1 + min r6.w, r1.z, r2.x + max r8.w, r2.y, r1.z + dp3 r1.w, c10, r1 + add r2.x, -r6.w, r1.w + rcp r2.x, r2.x + add r2.yzw, -r1.w, r1.xxyz + mul r2.yzw, r1.w, r2 + mad r2.xyz, r2.yzww, r2.x, r1.w + cmp r1.xyz, r6.w, r1, r2 + add r2.xyz, -r1.w, r1 + add r2.w, -r1.w, -c3.x + mul r2.xyz, r2.w, r2 + add r2.w, -r1.w, r8.w + add r6.w, -r8.w, -c3.x + rcp r2.w, r2.w + mad r2.xyz, r2, r2.w, r1.w + cmp r1.xyz, r6.w, r1, r2 + cmp r0.xyz, -r6.z, r1, r0 + mad r1.xyz, r7, r0.w, r4 + mul r2.xyz, r4, r8 + mad r5.xyz, r2, c3.y, r1 + mad r1.xyz, r8, -r4, r1 + cmp r0.xyz, -r6.y, r5, r0 + mad r5.xyz, r7, r0.w, -r4 + abs r5.xyz, r5 + cmp r0.xyz, -r6.x, r5, r0 + add r5.xy, -r4.yzzw, -c11.w + mad r6.xyz, r4, c7.z, c7.w + mad r1.w, r7.z, -r0.w, c7.y + mad r9.xyz, r8, c8.x, c8.y + mad r9.xyz, r9, r8, -c5.w + mul r9.xyz, r8, r9 + rsq r2.w, r8.z + rcp r2.w, r2.w + cmp r1.w, r1.w, r9.z, r2.w + mad r1.w, r7.z, -r0.w, r1.w + mad r1.w, r6.z, r1.w, r8.z + mad r10.xyz, r4, c3.y, -c3.x + mul r10.xyz, r8, r10 + mad r11, r7.yzxy, -r0.w, c7.xxyy + mad r5.zw, r10.xyyz, -r11.xyxy, r8.xyyz + cmp r12.z, r5.y, r5.w, r1.w + rsq r1.w, r8.y + rcp r1.w, r1.w + cmp r1.w, r11.w, r9.y, r1.w + mad r1.w, r7.y, -r0.w, r1.w + mad r1.w, r6.y, r1.w, r8.y + cmp r12.y, r5.x, r5.z, r1.w + add r13, r4.w, c6 + mul r13, r13, r13 + add r14, -r4.xyzx, -c11.yyyw + rsq r1.w, r8.x + rcp r1.w, r1.w + cmp r1.w, r11.z, r9.x, r1.w + mad r1.w, r7.x, -r0.w, r1.w + mad r1.w, r6.x, r1.w, r8.x + mad r6, r7.xyzx, -r0.w, -c11.wwwy + mad r9.xyz, r7, r0.w, c3.x + mul r9.xyz, r9, r9 + mad r0.w, r10.x, -r6.w, r8.x + cmp r12.x, r14.w, r0.w, r1.w + cmp r0.xyz, -r13.w, r12, r0 + add r10.xyz, r8, r8 + mad r12.xyz, r4, -c3.y, r10 + add r12.xyz, r12, c3.x + mad r15.xyz, r4, -r10, r12 + mul r10.xyz, r4, r10 + add r16.xyz, r4, r4 + mul r17.xyz, r8, r16 + mad r12.xyz, r16, -r8, r12 + cmp r6.xyz, r6, r10, r12 + cmp r5.yz, r5.xxyw, r17, r15 + cmp r5.x, r14.w, r17.x, r15.x + cmp r0.xyz, -r13.z, r5, r0 + rcp r0.w, r4.x + mad r0.w, r6.w, -r0.w, -c3.x + max r1.w, r0.w, -c11.z + mul r5.xyz, r4, r4 + cmp r0.w, -r5.x, -c11.z, r1.w + cmp r10.x, -r9.x, -c3.x, r0.w + rcp r0.w, r4.y + mad r0.w, r11.x, -r0.w, -c3.x + max r1.w, r0.w, -c11.z + cmp r0.w, -r5.y, -c11.z, r1.w + cmp r10.y, -r9.y, -c3.x, r0.w + rcp r0.w, r4.z + mad r0.w, r11.y, -r0.w, -c3.x + max r1.w, r0.w, -c11.z + cmp r0.w, -r5.z, -c11.z, r1.w + cmp r10.z, -r9.z, -c3.x, r0.w + cmp r0.xyz, -r13.y, r10, r0 + add r5.xyz, r4, c3.x + mul r5.xyz, r5, r5 + rcp r0.w, r14.x + mul r0.w, r0.w, r8.x + min r1.w, r0.w, -c3.x + cmp r0.w, -r5.x, -c3.x, r1.w + mul r9.xyz, r8, r8 + cmp r10.x, -r9.x, -c11.z, r0.w + rcp r0.w, r14.y + rcp r1.w, r14.z + mul r1.w, r1.w, r8.z + min r2.w, r1.w, -c3.x + cmp r1.w, -r5.z, -c3.x, r2.w + cmp r10.z, -r9.z, -c11.z, r1.w + mul r0.w, r0.w, r8.y + min r1.w, r0.w, -c3.x + cmp r0.w, -r5.y, -c3.x, r1.w + cmp r10.y, -r9.y, -c11.z, r0.w + cmp r0.xyz, -r13.x, r10, r0 + add r5, r4.w, c5 + mul r5, r5, r5 + max r9.xyz, r8, r4 + min r10.xyz, r4, r8 + cmp r0.xyz, -r5.w, r9, r0 + cmp r0.xyz, -r5.z, r10, r0 + cmp r0.xyz, -r5.y, r6, r0 + cmp r0.xyz, -r5.x, r1, r0 + cmp r0.xyz, -c2.z, r2, r0 + lrp r1.xyz, r7.w, r0, r4 + mul r0.xyz, r3.w, r1 + mul r1.x, r3.w, r3.w + mov r0.w, r3.w + cmp r0, -r1.x, r7, r0 + mul r1.x, r7.w, r7.w + cmp r0, -r1.x, r3, r0 + mov oC0, r0 + +// approximately 329 instruction slots used (7 texture, 322 arithmetic) +ps_4_0 +dcl_constantbuffer cb0[3], immediateIndexed +dcl_sampler s0, mode_default +dcl_sampler s1, mode_default +dcl_resource_texture2d (float,float,float,float) t0 +dcl_resource_texture2d (float,float,float,float) t1 +dcl_resource_texture2d (float,float,float,float) t2 +dcl_resource_texture2d (float,float,float,float) t3 +dcl_resource_texture2d (float,float,float,float) t5 +dcl_resource_texture2d (float,float,float,float) t6 +dcl_input_ps linear v1.xy +dcl_input_ps linear v1.zw +dcl_input_ps linear v2.xyz +dcl_output o0.xyzw +dcl_temps 22 +sample r0.xyzw, v1.zwzz, t6.xyzw, s0 +if_z cb0[2].y + if_z cb0[2].x + sample r1.xyzw, v1.xyxx, t0.xyzw, s0 + mul r1.xyz, r1.xyzx, cb0[1].xxxx + mov r1.w, cb0[1].x + mov r2.x, l(-1) + else + ieq r2.y, l(1), cb0[2].x + if_nz r2.y + sample r3.xyzw, v1.xyxx, t0.xyzw, s0 + mul r1.xyzw, r3.xyzw, cb0[1].xxxx + mov r2.x, l(-1) + else + ieq r2.x, l(2), cb0[2].x + if_nz r2.x + sample r3.xyzw, v1.xyxx, t3.xyzw, s0 + add r2.y, r3.x, l(-0.501960) + sample r3.xyzw, v1.xyxx, t1.xyzw, s0 + add r2.z, r3.x, l(-0.062750) + sample r3.xyzw, v1.xyxx, t2.xyzw, s0 + add r2.w, r3.x, l(-0.501960) + mul r3.xy, r2.yyyy, l(1.596030, 0.812970, 0.000000, 0.000000) + mad r4.x, r2.z, l(1.164380), r3.x + mad r2.y, r2.z, l(1.164380), -r3.y + mul r3.x, r2.w, l(2.017230) + mad r4.y, -r2.w, l(0.391760), r2.y + mad r4.z, r2.z, l(1.164380), r3.x + mov r4.w, l(1.000000) + mul r1.xyzw, r4.xyzw, cb0[1].xxxx + endif + endif + endif + movc r1.xyzw, r2.xxxx, r1.xyzw, cb0[0].xyzw + mov r2.x, l(-1) +else + ieq r2.y, l(1), cb0[2].y + if_nz r2.y + if_z cb0[2].x + sample r3.xyzw, v1.xyxx, t0.xyzw, s0 + mul r3.xyz, r3.xyzx, cb0[1].xxxx + sample r4.xyzw, v2.xyxx, t5.xyzw, s0 + mov r3.w, cb0[1].x + mul r1.xyzw, r3.xyzw, r4.xxxx + mov r2.y, l(-1) + else + ieq r2.z, l(1), cb0[2].x + if_nz r2.z + sample r3.xyzw, v2.xyxx, t5.xyzw, s0 + sample r4.xyzw, v1.xyxx, t0.xyzw, s0 + mul r4.xyzw, r4.xyzw, cb0[1].xxxx + mul r1.xyzw, r3.xxxx, r4.xyzw + mov r2.y, l(-1) + else + ieq r2.y, l(2), cb0[2].x + if_nz r2.y + sample r3.xyzw, v2.xyxx, t5.xyzw, s0 + sample r4.xyzw, v1.xyxx, t3.xyzw, s0 + add r2.z, r4.x, l(-0.501960) + sample r4.xyzw, v1.xyxx, t1.xyzw, s0 + add r2.w, r4.x, l(-0.062750) + sample r4.xyzw, v1.xyxx, t2.xyzw, s0 + add r3.y, r4.x, l(-0.501960) + mul r3.zw, r2.zzzz, l(0.000000, 0.000000, 1.596030, 0.812970) + mad r4.x, r2.w, l(1.164380), r3.z + mad r2.z, r2.w, l(1.164380), -r3.w + mul r3.z, r3.y, l(2.017230) + mad r4.y, -r3.y, l(0.391760), r2.z + mad r4.z, r2.w, l(1.164380), r3.z + mov r4.w, l(1.000000) + mul r4.xyzw, r4.xyzw, cb0[1].xxxx + mul r1.xyzw, r3.xxxx, r4.xyzw + endif + endif + endif + if_z r2.y + sample r3.xyzw, v2.xyxx, t5.xyzw, s0 + mul r1.xyzw, r3.xxxx, cb0[0].xyzw + endif + mov r2.x, l(-1) + else + ieq r2.x, l(2), cb0[2].y + if_nz r2.x + div r2.yz, v2.xxyx, v2.zzzz + sample r3.xyzw, r2.yzyy, t5.xyzw, s1 + sample r4.xyzw, v1.xyxx, t0.xyzw, s0 + mul r4.xyzw, r4.xyzw, cb0[1].xxxx + mul r1.xyzw, r3.xxxx, r4.xyzw + endif + endif +endif +movc r1.xyzw, r2.xxxx, r1.xyzw, l(0,0,0,1.000000) +eq r2.x, r0.w, l(0.000000) +if_nz r2.x + mov o0.xyzw, r1.xyzw + ret +endif +eq r2.x, r1.w, l(0.000000) +if_nz r2.x + mov o0.xyzw, r0.xyzw + ret +endif +div r0.xyz, r0.xyzx, r0.wwww +div r2.xyz, r1.xyzx, r1.wwww +movc r1.xyz, cb0[2].wwww, r2.xyzx, r1.xyzx +mul r2.xyz, r0.xyzx, r1.xyzx +add r3.xyz, r0.xyzx, r1.xyzx +mad r4.xyz, -r0.xyzx, r1.xyzx, r3.xyzx +ge r5.xyzw, l(0.500000, 0.500000, 0.500000, 0.250000), r0.xyzx +add r6.xyz, r0.xyzx, r0.xyzx +mul r7.xyz, r1.xyzx, r6.xyzx +add r8.xyz, r1.xyzx, r1.xyzx +mad r9.xyz, r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), r6.xyzx +add r9.xyz, r9.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000) +mul r10.xyz, r0.xyzx, r8.xyzx +mad r8.xyz, -r8.xyzx, r0.xyzx, r9.xyzx +movc r5.xyz, r5.xyzx, r7.xyzx, r8.xyzx +min r7.xyz, r0.xyzx, r1.xyzx +ieq r8.xyzw, l(1, 2, 3, 4), cb0[2].zzzz +max r11.xyz, r0.xyzx, r1.xyzx +eq r12.xyzw, r0.xyzx, l(0.000000, 0.000000, 0.000000, 1.000000) +eq r13.xyzw, r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +add r14.xyz, -r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +div r14.xyz, r0.xyzx, r14.xyzx +min r14.xyz, r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +movc r13.xyz, r13.xyzx, l(1.000000,1.000000,1.000000,0), r14.xyzx +movc r12.xyz, r12.xyzx, l(0,0,0,0), r13.xyzx +add r13.xyz, -r0.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +div r14.xyz, r13.xyzx, r1.xyzx +min r14.xyz, r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +add r14.xyz, -r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000) +movc r2.w, r13.w, l(0), r14.x +movc r15.x, r12.w, l(1.000000), r2.w +eq r14.xw, r0.yyyz, l(1.000000, 0.000000, 0.000000, 1.000000) +eq r16.xy, r1.yzyy, l(0.000000, 0.000000, 0.000000, 0.000000) +movc r14.yz, r16.xxyx, l(0,0,0,0), r14.yyzy +movc r15.yz, r14.xxwx, l(0,1.000000,1.000000,0), r14.yyzy +ge r14.xyz, l(0.500000, 0.500000, 0.500000, 0.000000), r1.xyzx +mad r6.xyz, -r1.xyzx, r6.xyzx, r9.xyzx +movc r6.xyz, r14.xyzx, r10.xyzx, r6.xyzx +ieq r9.xyzw, l(5, 6, 7, 8), cb0[2].zzzz +mad r10.xyz, -r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000) +mul r10.xyz, r0.xyzx, r10.xyzx +mad r10.xyz, -r10.xyzx, r13.xyzx, r0.xyzx +mad r13.xyz, r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000) +mad r16.xyz, r0.xyzx, l(16.000000, 16.000000, 16.000000, 0.000000), l(-12.000000, -12.000000, -12.000000, 0.000000) +mad r16.xyz, r16.xyzx, r0.xyzx, l(4.000000, 4.000000, 4.000000, 0.000000) +mul r16.xyz, r0.xyzx, r16.xyzx +sqrt r17.xyz, r0.xyzx +movc r2.w, r5.w, r16.x, r17.x +add r2.w, -r0.x, r2.w +mad r2.w, r13.x, r2.w, r0.x +movc r18.x, r14.x, r10.x, r2.w +ge r10.xw, l(0.250000, 0.000000, 0.000000, 0.250000), r0.yyyz +movc r10.xw, r10.xxxw, r16.yyyz, r17.yyyz +add r10.xw, -r0.yyyz, r10.xxxw +mad r10.xw, r13.yyyz, r10.xxxw, r0.yyyz +movc r18.yz, r14.yyzy, r10.yyzy, r10.xxwx +add r10.xyz, r0.xyzx, -r1.xyzx +mad r3.xyz, -r2.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), r3.xyzx +max r2.w, r0.y, r0.x +max r2.w, r0.z, r2.w +min r3.w, r0.y, r0.x +min r3.w, r0.z, r3.w +add r13.w, r2.w, -r3.w +ge r2.w, r1.y, r1.x +if_nz r2.w + lt r14.xyz, r1.xxzx, r1.zyyz + add r16.xyzw, -r1.xxzz, r1.yzxy + mul r17.xyz, r13.wwww, r16.xyzx + div r13.xyz, r17.xyzx, r16.yxwy + and r16.yz, r13.xxwx, r14.xxxx + ge r14.xw, r1.zzzz, r1.yyyx + and r17.yz, r13.wwyw, r14.yyyy + and r19.xy, r13.zwzz, r14.zzzz + mov r17.x, l(0) + mov r19.z, l(0) + movc r14.yzw, r14.wwww, r17.xxyz, r19.xxyz + mov r16.x, l(0) + movc r14.xyz, r14.xxxx, r16.xyzx, r14.yzwy +else + lt r16.xyz, r1.yyzy, r1.zxxz + add r17.xyzw, -r1.yyzz, r1.xzyx + mul r19.xyz, r13.wwww, r17.xyzx + div r13.xyz, r19.xyzx, r17.yxwy + and r17.xz, r13.xxwx, r16.xxxx + ge r16.xw, r1.zzzz, r1.xxxy + and r19.xz, r13.wwyw, r16.yyyy + and r13.xy, r13.wzww, r16.zzzz + mov r19.y, l(0) + mov r13.z, l(0) + movc r13.xyz, r16.wwww, r19.xyzx, r13.xyzx + mov r17.y, l(0) + movc r14.xyz, r16.xxxx, r17.xyzx, r13.xyzx +endif +dp3 r2.w, l(0.300000, 0.590000, 0.110000, 0.000000), r0.xyzx +dp3 r3.w, l(0.300000, 0.590000, 0.110000, 0.000000), r14.xyzx +add r3.w, r2.w, -r3.w +add r13.xyz, r3.wwww, r14.xyzx +dp3 r3.w, l(0.300000, 0.590000, 0.110000, 0.000000), r13.xyzx +min r4.w, r13.y, r13.x +min r4.w, r13.z, r4.w +max r5.w, r13.y, r13.x +max r5.w, r13.z, r5.w +lt r6.w, r4.w, l(0.000000) +add r14.xyz, -r3.wwww, r13.xyzx +mul r14.xyz, r3.wwww, r14.xyzx +add r4.w, r3.w, -r4.w +div r14.xyz, r14.xyzx, r4.wwww +add r14.xyz, r3.wwww, r14.xyzx +movc r13.xyz, r6.wwww, r14.xyzx, r13.xyzx +lt r4.w, l(1.000000), r5.w +add r14.xyz, -r3.wwww, r13.xyzx +add r6.w, -r3.w, l(1.000000) +mul r14.xyz, r6.wwww, r14.xyzx +add r5.w, -r3.w, r5.w +div r14.xyz, r14.xyzx, r5.wwww +add r14.xyz, r3.wwww, r14.xyzx +movc r13.xyz, r4.wwww, r14.xyzx, r13.xyzx +ieq r14.xyzw, l(9, 10, 11, 12), cb0[2].zzzz +max r3.w, r1.y, r1.x +max r3.w, r1.z, r3.w +min r4.w, r1.y, r1.x +min r4.w, r1.z, r4.w +add r16.w, r3.w, -r4.w +ge r3.w, r0.y, r0.x +if_nz r3.w + lt r17.xyz, r0.xxzx, r0.zyyz + add r19.xyzw, -r0.xxzz, r0.yzxy + mul r20.xyz, r16.wwww, r19.xyzx + div r16.xyz, r20.xyzx, r19.yxwy + and r19.yz, r16.xxwx, r17.xxxx + ge r17.xw, r0.zzzz, r0.yyyx + and r20.yz, r16.wwyw, r17.yyyy + and r21.xy, r16.zwzz, r17.zzzz + mov r20.x, l(0) + mov r21.z, l(0) + movc r17.yzw, r17.wwww, r20.xxyz, r21.xxyz + mov r19.x, l(0) + movc r17.xyz, r17.xxxx, r19.xyzx, r17.yzwy +else + lt r19.xyz, r0.yyzy, r0.zxxz + add r20.xyzw, -r0.yyzz, r0.xzyx + mul r21.xyz, r16.wwww, r20.xyzx + div r16.xyz, r21.xyzx, r20.yxwy + and r20.xz, r16.xxwx, r19.xxxx + ge r19.xw, r0.zzzz, r0.xxxy + and r21.xz, r16.wwyw, r19.yyyy + and r16.xy, r16.wzww, r19.zzzz + mov r21.y, l(0) + mov r16.z, l(0) + movc r16.xyz, r19.wwww, r21.xyzx, r16.xyzx + mov r20.y, l(0) + movc r17.xyz, r19.xxxx, r20.xyzx, r16.xyzx +endif +dp3 r3.w, l(0.300000, 0.590000, 0.110000, 0.000000), r17.xyzx +add r3.w, r2.w, -r3.w +add r16.xyz, r3.wwww, r17.xyzx +dp3 r3.w, l(0.300000, 0.590000, 0.110000, 0.000000), r16.xyzx +min r4.w, r16.y, r16.x +min r4.w, r16.z, r4.w +max r5.w, r16.y, r16.x +max r5.w, r16.z, r5.w +lt r6.w, r4.w, l(0.000000) +add r17.xyz, -r3.wwww, r16.xyzx +mul r17.xyz, r3.wwww, r17.xyzx +add r4.w, r3.w, -r4.w +div r17.xyz, r17.xyzx, r4.wwww +add r17.xyz, r3.wwww, r17.xyzx +movc r16.xyz, r6.wwww, r17.xyzx, r16.xyzx +lt r4.w, l(1.000000), r5.w +add r17.xyz, -r3.wwww, r16.xyzx +add r6.w, -r3.w, l(1.000000) +mul r17.xyz, r6.wwww, r17.xyzx +add r5.w, -r3.w, r5.w +div r17.xyz, r17.xyzx, r5.wwww +add r17.xyz, r3.wwww, r17.xyzx +movc r16.xyz, r4.wwww, r17.xyzx, r16.xyzx +dp3 r3.w, l(0.300000, 0.590000, 0.110000, 0.000000), r1.xyzx +add r4.w, r2.w, -r3.w +add r17.xyz, r1.xyzx, r4.wwww +dp3 r4.w, l(0.300000, 0.590000, 0.110000, 0.000000), r17.xyzx +min r5.w, r17.y, r17.x +min r5.w, r17.z, r5.w +max r6.w, r17.y, r17.x +max r6.w, r17.z, r6.w +lt r7.w, r5.w, l(0.000000) +add r19.xyz, -r4.wwww, r17.xyzx +mul r19.xyz, r4.wwww, r19.xyzx +add r5.w, r4.w, -r5.w +div r19.xyz, r19.xyzx, r5.wwww +add r19.xyz, r4.wwww, r19.xyzx +movc r17.xyz, r7.wwww, r19.xyzx, r17.xyzx +lt r5.w, l(1.000000), r6.w +add r19.xyz, -r4.wwww, r17.xyzx +add r7.w, -r4.w, l(1.000000) +mul r19.xyz, r7.wwww, r19.xyzx +add r6.w, -r4.w, r6.w +div r19.xyz, r19.xyzx, r6.wwww +add r19.xyz, r4.wwww, r19.xyzx +movc r17.xyz, r5.wwww, r19.xyzx, r17.xyzx +ieq r19.xy, l(13, 14, 0, 0), cb0[2].zzzz +add r2.w, -r2.w, r3.w +add r0.xyz, r0.xyzx, r2.wwww +dp3 r2.w, l(0.300000, 0.590000, 0.110000, 0.000000), r0.xyzx +min r3.w, r0.y, r0.x +min r3.w, r0.z, r3.w +max r4.w, r0.y, r0.x +max r4.w, r0.z, r4.w +lt r5.w, r3.w, l(0.000000) +add r20.xyz, r0.xyzx, -r2.wwww +mul r20.xyz, r2.wwww, r20.xyzx +add r3.w, r2.w, -r3.w +div r20.xyz, r20.xyzx, r3.wwww +add r20.xyz, r2.wwww, r20.xyzx +movc r0.xyz, r5.wwww, r20.xyzx, r0.xyzx +lt r3.w, l(1.000000), r4.w +add r20.xyz, -r2.wwww, r0.xyzx +add r5.w, -r2.w, l(1.000000) +mul r20.xyz, r5.wwww, r20.xyzx +add r4.w, -r2.w, r4.w +div r20.xyz, r20.xyzx, r4.wwww +add r20.xyz, r2.wwww, r20.xyzx +movc r0.xyz, r3.wwww, r20.xyzx, r0.xyzx +and r0.xyz, r0.xyzx, r19.yyyy +movc r0.xyz, r19.xxxx, r17.xyzx, r0.xyzx +movc r0.xyz, r14.wwww, r16.xyzx, r0.xyzx +movc r0.xyz, r14.zzzz, r13.xyzx, r0.xyzx +movc r0.xyz, r14.yyyy, r3.xyzx, r0.xyzx +movc r0.xyz, r14.xxxx, |r10.xyzx|, r0.xyzx +movc r0.xyz, r9.wwww, r18.xyzx, r0.xyzx +movc r0.xyz, r9.zzzz, r6.xyzx, r0.xyzx +movc r0.xyz, r9.yyyy, r15.xyzx, r0.xyzx +movc r0.xyz, r9.xxxx, r12.xyzx, r0.xyzx +movc r0.xyz, r8.wwww, r11.xyzx, r0.xyzx +movc r0.xyz, r8.zzzz, r7.xyzx, r0.xyzx +movc r0.xyz, r8.yyyy, r5.xyzx, r0.xyzx +movc r0.xyz, r8.xxxx, r4.xyzx, r0.xyzx +movc r0.xyz, cb0[2].zzzz, r0.xyzx, r2.xyzx +add r2.x, -r0.w, l(1.000000) +mul r0.xyz, r0.xyzx, r0.wwww +mad r0.xyz, r2.xxxx, r1.xyzx, r0.xyzx +mul o0.xyz, r1.wwww, r0.xyzx +mov o0.w, r1.w +ret +// Approximately 345 instruction slots used +#endif + +const BYTE BlendShader[] = +{ + 68, 88, 66, 67, 121, 58, + 99, 114, 236, 21, 118, 177, + 57, 125, 153, 182, 56, 164, + 101, 220, 1, 0, 0, 0, + 176, 68, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 152, 23, 0, 0, 200, 63, + 0, 0, 68, 64, 0, 0, + 244, 67, 0, 0, 124, 68, + 0, 0, 65, 111, 110, 57, + 88, 23, 0, 0, 88, 23, + 0, 0, 0, 2, 255, 255, + 0, 23, 0, 0, 88, 0, + 0, 0, 2, 0, 64, 0, + 0, 0, 88, 0, 0, 0, + 88, 0, 7, 0, 36, 0, + 0, 0, 88, 0, 0, 0, + 0, 0, 1, 0, 1, 0, + 2, 0, 2, 0, 3, 0, + 3, 0, 5, 0, 4, 0, + 6, 0, 5, 0, 5, 1, + 6, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, + 1, 0, 2, 0, 3, 3, + 3, 3, 1, 2, 255, 255, + 81, 0, 0, 5, 3, 0, + 15, 160, 0, 0, 128, 191, + 0, 0, 0, 192, 115, 128, + 0, 191, 18, 131, 128, 189, + 81, 0, 0, 5, 4, 0, + 15, 160, 182, 74, 204, 63, + 205, 30, 80, 63, 103, 10, + 149, 63, 76, 26, 1, 64, + 81, 0, 0, 5, 5, 0, + 15, 160, 0, 0, 128, 191, + 0, 0, 0, 192, 0, 0, + 64, 192, 0, 0, 128, 192, + 81, 0, 0, 5, 6, 0, + 15, 160, 0, 0, 160, 192, + 0, 0, 192, 192, 0, 0, + 224, 192, 0, 0, 0, 193, + 81, 0, 0, 5, 7, 0, + 15, 160, 0, 0, 128, 63, + 0, 0, 128, 62, 0, 0, + 0, 64, 0, 0, 128, 191, + 81, 0, 0, 5, 8, 0, + 15, 160, 0, 0, 128, 65, + 0, 0, 64, 193, 0, 0, + 80, 193, 0, 0, 96, 193, + 81, 0, 0, 5, 9, 0, + 15, 160, 0, 0, 16, 193, + 0, 0, 32, 193, 0, 0, + 48, 193, 0, 0, 64, 193, + 81, 0, 0, 5, 10, 0, + 15, 160, 154, 153, 153, 62, + 61, 10, 23, 63, 174, 71, + 225, 61, 0, 0, 0, 0, + 81, 0, 0, 5, 11, 0, + 15, 160, 196, 148, 200, 62, + 0, 0, 128, 191, 0, 0, + 0, 128, 0, 0, 0, 191, + 31, 0, 0, 2, 0, 0, + 0, 128, 0, 0, 15, 176, + 31, 0, 0, 2, 0, 0, + 0, 128, 1, 0, 7, 176, + 31, 0, 0, 2, 0, 0, + 0, 144, 0, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 1, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 2, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 3, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 4, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 5, 8, 15, 160, + 31, 0, 0, 2, 0, 0, + 0, 144, 6, 8, 15, 160, + 1, 0, 0, 2, 0, 0, + 1, 128, 11, 0, 170, 161, + 1, 0, 0, 2, 1, 0, + 1, 128, 11, 0, 170, 161, + 1, 0, 0, 2, 2, 0, + 4, 128, 11, 0, 170, 161, + 66, 0, 0, 3, 3, 0, + 15, 128, 0, 0, 228, 176, + 1, 8, 228, 160, 66, 0, + 0, 3, 4, 0, 15, 128, + 0, 0, 228, 176, 3, 8, + 228, 160, 2, 0, 0, 3, + 0, 0, 8, 128, 4, 0, + 0, 128, 3, 0, 170, 160, + 5, 0, 0, 3, 3, 0, + 6, 128, 0, 0, 255, 128, + 4, 0, 208, 160, 2, 0, + 0, 3, 0, 0, 8, 128, + 3, 0, 0, 128, 3, 0, + 255, 160, 4, 0, 0, 4, + 1, 0, 8, 128, 0, 0, + 255, 128, 4, 0, 170, 160, + 3, 0, 170, 129, 4, 0, + 0, 4, 3, 0, 1, 128, + 0, 0, 255, 128, 4, 0, + 170, 160, 3, 0, 85, 128, + 66, 0, 0, 3, 4, 0, + 15, 128, 1, 0, 228, 176, + 4, 8, 228, 160, 66, 0, + 0, 3, 5, 0, 15, 128, + 0, 0, 228, 176, 2, 8, + 228, 160, 2, 0, 0, 3, + 2, 0, 8, 128, 5, 0, + 0, 128, 3, 0, 170, 160, + 4, 0, 0, 4, 3, 0, + 2, 128, 2, 0, 255, 128, + 11, 0, 0, 161, 1, 0, + 255, 128, 5, 0, 0, 3, + 1, 0, 8, 128, 2, 0, + 255, 128, 4, 0, 255, 160, + 4, 0, 0, 4, 3, 0, + 4, 128, 0, 0, 255, 128, + 4, 0, 170, 160, 1, 0, + 255, 128, 1, 0, 0, 2, + 3, 0, 8, 128, 3, 0, + 0, 161, 5, 0, 0, 3, + 3, 0, 15, 128, 3, 0, + 228, 128, 1, 0, 0, 160, + 5, 0, 0, 3, 5, 0, + 15, 128, 4, 0, 0, 128, + 3, 0, 228, 128, 6, 0, + 0, 2, 0, 0, 8, 128, + 1, 0, 170, 176, 5, 0, + 0, 3, 6, 0, 3, 128, + 0, 0, 255, 128, 1, 0, + 228, 176, 66, 0, 0, 3, + 7, 0, 15, 128, 0, 0, + 228, 176, 0, 8, 228, 160, + 66, 0, 0, 3, 6, 0, + 15, 128, 6, 0, 228, 128, + 6, 8, 228, 160, 5, 0, + 0, 3, 7, 0, 15, 128, + 7, 0, 228, 128, 1, 0, + 0, 160, 5, 0, 0, 3, + 8, 0, 15, 128, 4, 0, + 0, 128, 7, 0, 228, 128, + 1, 0, 0, 2, 9, 0, + 3, 128, 3, 0, 228, 160, + 2, 0, 0, 3, 10, 0, + 15, 128, 9, 0, 68, 128, + 2, 0, 80, 160, 5, 0, + 0, 3, 10, 0, 15, 128, + 10, 0, 228, 128, 10, 0, + 228, 128, 88, 0, 0, 4, + 5, 0, 15, 128, 10, 0, + 0, 129, 8, 0, 228, 128, + 5, 0, 228, 128, 1, 0, + 0, 2, 8, 0, 7, 128, + 7, 0, 228, 128, 1, 0, + 0, 2, 8, 0, 8, 128, + 1, 0, 0, 160, 5, 0, + 0, 3, 11, 0, 15, 128, + 4, 0, 0, 128, 8, 0, + 228, 128, 5, 0, 0, 3, + 4, 0, 15, 128, 4, 0, + 0, 128, 0, 0, 228, 160, + 88, 0, 0, 4, 5, 0, + 15, 128, 2, 0, 0, 161, + 11, 0, 228, 128, 5, 0, + 228, 128, 88, 0, 0, 4, + 6, 0, 6, 128, 10, 0, + 244, 129, 11, 0, 85, 160, + 11, 0, 170, 160, 88, 0, + 0, 4, 6, 0, 6, 128, + 10, 0, 224, 129, 3, 0, + 0, 160, 6, 0, 228, 128, + 88, 0, 0, 4, 6, 0, + 6, 128, 2, 0, 208, 161, + 9, 0, 0, 128, 6, 0, + 228, 128, 88, 0, 0, 4, + 4, 0, 15, 128, 6, 0, + 85, 128, 4, 0, 228, 128, + 5, 0, 228, 128, 5, 0, + 0, 3, 5, 0, 15, 128, + 6, 0, 0, 128, 7, 0, + 228, 128, 88, 0, 0, 4, + 3, 0, 15, 128, 10, 0, + 0, 129, 7, 0, 228, 128, + 3, 0, 228, 128, 88, 0, + 0, 4, 4, 0, 15, 128, + 10, 0, 170, 129, 4, 0, + 228, 128, 5, 0, 228, 128, + 88, 0, 0, 4, 3, 0, + 15, 128, 2, 0, 0, 161, + 8, 0, 228, 128, 3, 0, + 228, 128, 88, 0, 0, 4, + 3, 0, 15, 128, 6, 0, + 85, 128, 0, 0, 228, 160, + 3, 0, 228, 128, 88, 0, + 0, 4, 3, 0, 15, 128, + 2, 0, 85, 161, 3, 0, + 228, 128, 4, 0, 228, 128, + 88, 0, 0, 4, 3, 0, + 15, 128, 6, 0, 170, 128, + 11, 0, 106, 161, 3, 0, + 228, 128, 6, 0, 0, 2, + 0, 0, 8, 128, 3, 0, + 255, 128, 5, 0, 0, 3, + 4, 0, 7, 128, 0, 0, + 255, 128, 3, 0, 228, 128, + 88, 0, 0, 4, 4, 0, + 7, 128, 2, 0, 255, 161, + 3, 0, 228, 128, 4, 0, + 228, 128, 2, 0, 0, 3, + 5, 0, 3, 128, 4, 0, + 233, 129, 4, 0, 228, 128, + 88, 0, 0, 4, 5, 0, + 12, 128, 5, 0, 0, 128, + 4, 0, 68, 128, 4, 0, + 20, 128, 11, 0, 0, 3, + 0, 0, 8, 128, 5, 0, + 170, 128, 4, 0, 170, 128, + 10, 0, 0, 3, 1, 0, + 8, 128, 4, 0, 170, 128, + 5, 0, 255, 128, 2, 0, + 0, 3, 6, 0, 8, 128, + 0, 0, 255, 128, 1, 0, + 255, 129, 1, 0, 0, 2, + 7, 0, 3, 128, 0, 0, + 235, 176, 66, 0, 0, 3, + 7, 0, 15, 128, 7, 0, + 228, 128, 5, 8, 228, 160, + 6, 0, 0, 2, 0, 0, + 8, 128, 7, 0, 255, 128, + 5, 0, 0, 3, 8, 0, + 7, 128, 0, 0, 255, 128, + 7, 0, 228, 128, 4, 0, + 0, 4, 5, 0, 12, 128, + 7, 0, 100, 128, 0, 0, + 255, 128, 8, 0, 132, 129, + 5, 0, 0, 3, 9, 0, + 3, 128, 6, 0, 255, 128, + 5, 0, 238, 128, 4, 0, + 0, 4, 10, 0, 15, 128, + 7, 0, 129, 128, 0, 0, + 255, 128, 8, 0, 88, 129, + 6, 0, 0, 2, 1, 0, + 8, 128, 10, 0, 0, 128, + 5, 0, 0, 3, 6, 0, + 2, 128, 1, 0, 255, 128, + 9, 0, 0, 128, 88, 0, + 0, 4, 1, 0, 6, 128, + 10, 0, 170, 128, 11, 0, + 170, 161, 6, 0, 220, 128, + 5, 0, 0, 3, 11, 0, + 15, 128, 6, 0, 255, 128, + 10, 0, 228, 128, 6, 0, + 0, 2, 1, 0, 8, 128, + 5, 0, 255, 128, 5, 0, + 0, 3, 6, 0, 1, 128, + 1, 0, 255, 128, 11, 0, + 85, 128, 88, 0, 0, 4, + 2, 0, 3, 128, 10, 0, + 255, 128, 11, 0, 170, 161, + 6, 0, 236, 128, 88, 0, + 0, 4, 1, 0, 7, 128, + 5, 0, 170, 128, 1, 0, + 228, 128, 2, 0, 228, 128, + 6, 0, 0, 2, 1, 0, + 8, 128, 5, 0, 170, 128, + 5, 0, 0, 3, 6, 0, + 4, 128, 1, 0, 255, 128, + 11, 0, 0, 128, 88, 0, + 0, 4, 0, 0, 6, 128, + 10, 0, 85, 128, 11, 0, + 170, 161, 6, 0, 248, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 10, 0, 255, 128, + 0, 0, 228, 128, 1, 0, + 228, 128, 1, 0, 0, 2, + 1, 0, 2, 128, 11, 0, + 170, 161, 1, 0, 0, 2, + 2, 0, 2, 128, 11, 0, + 170, 161, 1, 0, 0, 2, + 12, 0, 4, 128, 11, 0, + 170, 161, 6, 0, 0, 2, + 1, 0, 8, 128, 10, 0, + 170, 128, 5, 0, 0, 3, + 6, 0, 2, 128, 1, 0, + 255, 128, 11, 0, 255, 128, + 88, 0, 0, 4, 2, 0, + 5, 128, 10, 0, 0, 128, + 11, 0, 170, 161, 6, 0, + 215, 128, 6, 0, 0, 2, + 1, 0, 8, 128, 10, 0, + 85, 128, 5, 0, 0, 3, + 6, 0, 1, 128, 1, 0, + 255, 128, 9, 0, 85, 128, + 88, 0, 0, 4, 12, 0, + 3, 128, 5, 0, 170, 128, + 11, 0, 170, 161, 6, 0, + 227, 128, 88, 0, 0, 4, + 2, 0, 7, 128, 10, 0, + 255, 128, 2, 0, 228, 128, + 12, 0, 228, 128, 6, 0, + 0, 2, 1, 0, 8, 128, + 10, 0, 255, 128, 5, 0, + 0, 3, 6, 0, 4, 128, + 1, 0, 255, 128, 11, 0, + 170, 128, 88, 0, 0, 4, + 1, 0, 5, 128, 5, 0, + 255, 128, 11, 0, 170, 161, + 6, 0, 246, 128, 88, 0, + 0, 4, 1, 0, 7, 128, + 5, 0, 170, 128, 1, 0, + 228, 128, 2, 0, 228, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 10, 0, 0, 128, + 0, 0, 228, 128, 1, 0, + 228, 128, 88, 0, 0, 4, + 1, 0, 3, 128, 10, 0, + 170, 128, 8, 0, 228, 128, + 8, 0, 225, 128, 8, 0, + 0, 3, 4, 0, 8, 128, + 10, 0, 228, 160, 0, 0, + 228, 128, 8, 0, 0, 3, + 8, 0, 8, 128, 10, 0, + 228, 160, 8, 0, 228, 128, + 2, 0, 0, 3, 4, 0, + 8, 128, 4, 0, 255, 129, + 8, 0, 255, 128, 2, 0, + 0, 3, 0, 0, 7, 128, + 0, 0, 228, 128, 4, 0, + 255, 128, 2, 0, 0, 3, + 4, 0, 8, 128, 0, 0, + 85, 129, 0, 0, 0, 128, + 88, 0, 0, 4, 1, 0, + 12, 128, 4, 0, 255, 128, + 0, 0, 20, 128, 0, 0, + 68, 128, 10, 0, 0, 3, + 4, 0, 8, 128, 0, 0, + 170, 128, 1, 0, 170, 128, + 11, 0, 0, 3, 2, 0, + 1, 128, 1, 0, 255, 128, + 0, 0, 170, 128, 8, 0, + 0, 3, 1, 0, 4, 128, + 10, 0, 228, 160, 0, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 8, 128, 4, 0, + 255, 129, 1, 0, 170, 128, + 6, 0, 0, 2, 1, 0, + 8, 128, 1, 0, 255, 128, + 2, 0, 0, 3, 2, 0, + 14, 128, 0, 0, 144, 128, + 1, 0, 170, 129, 5, 0, + 0, 3, 2, 0, 14, 128, + 1, 0, 170, 128, 2, 0, + 228, 128, 4, 0, 0, 4, + 2, 0, 14, 128, 2, 0, + 228, 128, 1, 0, 255, 128, + 1, 0, 170, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 4, 0, 255, 128, 0, 0, + 228, 128, 2, 0, 249, 128, + 2, 0, 0, 3, 2, 0, + 14, 128, 1, 0, 170, 129, + 0, 0, 144, 128, 2, 0, + 0, 3, 1, 0, 8, 128, + 1, 0, 170, 129, 3, 0, + 0, 161, 5, 0, 0, 3, + 2, 0, 14, 128, 1, 0, + 255, 128, 2, 0, 228, 128, + 2, 0, 0, 3, 1, 0, + 8, 128, 1, 0, 170, 129, + 2, 0, 0, 128, 2, 0, + 0, 3, 4, 0, 8, 128, + 2, 0, 0, 129, 3, 0, + 0, 161, 6, 0, 0, 2, + 1, 0, 8, 128, 1, 0, + 255, 128, 4, 0, 0, 4, + 2, 0, 7, 128, 2, 0, + 249, 128, 1, 0, 255, 128, + 1, 0, 170, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 4, 0, 255, 128, 0, 0, + 228, 128, 2, 0, 228, 128, + 1, 0, 0, 2, 4, 0, + 8, 128, 2, 0, 170, 160, + 2, 0, 0, 3, 1, 0, + 12, 128, 4, 0, 255, 128, + 8, 0, 228, 160, 5, 0, + 0, 3, 1, 0, 12, 128, + 1, 0, 228, 128, 1, 0, + 228, 128, 8, 0, 0, 3, + 2, 0, 1, 128, 10, 0, + 228, 160, 4, 0, 228, 128, + 2, 0, 0, 3, 2, 0, + 2, 128, 8, 0, 255, 129, + 2, 0, 0, 128, 2, 0, + 0, 3, 2, 0, 1, 128, + 2, 0, 0, 129, 8, 0, + 255, 128, 2, 0, 0, 3, + 2, 0, 13, 128, 2, 0, + 0, 128, 4, 0, 148, 128, + 4, 0, 0, 4, 6, 0, + 7, 128, 7, 0, 228, 128, + 0, 0, 255, 128, 2, 0, + 85, 128, 2, 0, 0, 3, + 6, 0, 8, 128, 6, 0, + 85, 129, 6, 0, 0, 128, + 88, 0, 0, 4, 5, 0, + 12, 128, 6, 0, 255, 128, + 6, 0, 20, 128, 6, 0, + 68, 128, 10, 0, 0, 3, + 2, 0, 2, 128, 6, 0, + 170, 128, 5, 0, 170, 128, + 11, 0, 0, 3, 9, 0, + 1, 128, 5, 0, 255, 128, + 6, 0, 170, 128, 8, 0, + 0, 3, 6, 0, 8, 128, + 10, 0, 228, 160, 6, 0, + 228, 128, 2, 0, 0, 3, + 5, 0, 4, 128, 2, 0, + 85, 129, 6, 0, 255, 128, + 6, 0, 0, 2, 5, 0, + 4, 128, 5, 0, 170, 128, + 2, 0, 0, 3, 9, 0, + 14, 128, 6, 0, 255, 129, + 6, 0, 144, 128, 5, 0, + 0, 3, 9, 0, 14, 128, + 6, 0, 255, 128, 9, 0, + 228, 128, 4, 0, 0, 4, + 9, 0, 14, 128, 9, 0, + 228, 128, 5, 0, 170, 128, + 6, 0, 255, 128, 88, 0, + 0, 4, 6, 0, 7, 128, + 2, 0, 85, 128, 6, 0, + 228, 128, 9, 0, 249, 128, + 2, 0, 0, 3, 9, 0, + 14, 128, 6, 0, 255, 129, + 6, 0, 144, 128, 2, 0, + 0, 3, 2, 0, 2, 128, + 6, 0, 255, 129, 3, 0, + 0, 161, 5, 0, 0, 3, + 9, 0, 14, 128, 2, 0, + 85, 128, 9, 0, 228, 128, + 2, 0, 0, 3, 2, 0, + 2, 128, 6, 0, 255, 129, + 9, 0, 0, 128, 2, 0, + 0, 3, 5, 0, 4, 128, + 9, 0, 0, 129, 3, 0, + 0, 161, 6, 0, 0, 2, + 5, 0, 8, 128, 2, 0, + 85, 128, 4, 0, 0, 4, + 9, 0, 7, 128, 9, 0, + 249, 128, 5, 0, 255, 128, + 6, 0, 255, 128, 88, 0, + 0, 4, 6, 0, 7, 128, + 5, 0, 170, 128, 6, 0, + 228, 128, 9, 0, 228, 128, + 88, 0, 0, 4, 6, 0, + 7, 128, 1, 0, 255, 129, + 6, 0, 228, 128, 11, 0, + 170, 161, 2, 0, 0, 3, + 1, 0, 8, 128, 2, 0, + 170, 129, 2, 0, 0, 128, + 88, 0, 0, 4, 5, 0, + 12, 128, 1, 0, 255, 128, + 2, 0, 36, 128, 2, 0, + 132, 128, 10, 0, 0, 3, + 1, 0, 8, 128, 2, 0, + 255, 128, 5, 0, 170, 128, + 11, 0, 0, 3, 6, 0, + 8, 128, 5, 0, 255, 128, + 2, 0, 255, 128, 8, 0, + 0, 3, 2, 0, 2, 128, + 10, 0, 228, 160, 2, 0, + 248, 128, 2, 0, 0, 3, + 5, 0, 4, 128, 1, 0, + 255, 129, 2, 0, 85, 128, + 6, 0, 0, 2, 5, 0, + 4, 128, 5, 0, 170, 128, + 2, 0, 0, 3, 9, 0, + 7, 128, 2, 0, 85, 129, + 2, 0, 248, 128, 5, 0, + 0, 3, 9, 0, 7, 128, + 2, 0, 85, 128, 9, 0, + 228, 128, 4, 0, 0, 4, + 9, 0, 7, 128, 9, 0, + 228, 128, 5, 0, 170, 128, + 2, 0, 85, 128, 88, 0, + 0, 4, 2, 0, 13, 128, + 1, 0, 255, 128, 2, 0, + 228, 128, 9, 0, 148, 128, + 2, 0, 0, 3, 9, 0, + 7, 128, 2, 0, 85, 129, + 2, 0, 248, 128, 2, 0, + 0, 3, 1, 0, 8, 128, + 2, 0, 85, 129, 3, 0, + 0, 161, 5, 0, 0, 3, + 9, 0, 7, 128, 1, 0, + 255, 128, 9, 0, 228, 128, + 2, 0, 0, 3, 1, 0, + 8, 128, 2, 0, 85, 129, + 6, 0, 255, 128, 2, 0, + 0, 3, 6, 0, 8, 128, + 6, 0, 255, 129, 3, 0, + 0, 161, 6, 0, 0, 2, + 1, 0, 8, 128, 1, 0, + 255, 128, 4, 0, 0, 4, + 9, 0, 7, 128, 9, 0, + 228, 128, 1, 0, 255, 128, + 2, 0, 85, 128, 88, 0, + 0, 4, 2, 0, 7, 128, + 6, 0, 255, 128, 2, 0, + 248, 128, 9, 0, 228, 128, + 88, 0, 0, 4, 2, 0, + 7, 128, 1, 0, 170, 129, + 2, 0, 228, 128, 6, 0, + 228, 128, 2, 0, 0, 3, + 6, 0, 15, 128, 4, 0, + 255, 128, 9, 0, 228, 160, + 5, 0, 0, 3, 6, 0, + 15, 128, 6, 0, 228, 128, + 6, 0, 228, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 6, 0, 255, 129, 0, 0, + 228, 128, 2, 0, 228, 128, + 2, 0, 0, 3, 2, 0, + 15, 128, 4, 0, 96, 129, + 4, 0, 137, 128, 1, 0, + 0, 2, 9, 0, 2, 128, + 11, 0, 170, 161, 1, 0, + 0, 2, 10, 0, 2, 128, + 11, 0, 170, 161, 1, 0, + 0, 2, 11, 0, 4, 128, + 11, 0, 170, 161, 6, 0, + 0, 2, 6, 0, 8, 128, + 2, 0, 170, 128, 11, 0, + 0, 3, 9, 0, 8, 128, + 1, 0, 0, 128, 8, 0, + 170, 128, 10, 0, 0, 3, + 10, 0, 8, 128, 8, 0, + 170, 128, 1, 0, 85, 128, + 2, 0, 0, 3, 1, 0, + 8, 128, 9, 0, 255, 128, + 10, 0, 255, 129, 5, 0, + 0, 3, 5, 0, 12, 128, + 1, 0, 255, 128, 5, 0, + 68, 128, 5, 0, 0, 3, + 1, 0, 1, 128, 6, 0, + 255, 128, 5, 0, 255, 128, + 88, 0, 0, 4, 11, 0, + 3, 128, 2, 0, 85, 128, + 11, 0, 170, 161, 1, 0, + 227, 128, 6, 0, 0, 2, + 5, 0, 8, 128, 5, 0, + 0, 128, 5, 0, 0, 3, + 12, 0, 15, 128, 1, 0, + 255, 128, 2, 0, 228, 128, + 5, 0, 0, 3, 1, 0, + 2, 128, 5, 0, 255, 128, + 12, 0, 255, 128, 88, 0, + 0, 4, 10, 0, 5, 128, + 2, 0, 0, 128, 11, 0, + 170, 161, 1, 0, 215, 128, + 88, 0, 0, 4, 10, 0, + 7, 128, 2, 0, 255, 128, + 10, 0, 228, 128, 11, 0, + 228, 128, 6, 0, 0, 2, + 5, 0, 8, 128, 2, 0, + 255, 128, 5, 0, 0, 3, + 1, 0, 4, 128, 5, 0, + 255, 128, 5, 0, 170, 128, + 88, 0, 0, 4, 9, 0, + 5, 128, 5, 0, 85, 128, + 11, 0, 170, 161, 1, 0, + 246, 128, 88, 0, 0, 4, + 9, 0, 7, 128, 2, 0, + 85, 128, 9, 0, 228, 128, + 10, 0, 228, 128, 1, 0, + 0, 2, 10, 0, 1, 128, + 11, 0, 170, 161, 1, 0, + 0, 2, 11, 0, 1, 128, + 11, 0, 170, 161, 1, 0, + 0, 2, 13, 0, 4, 128, + 11, 0, 170, 161, 6, 0, + 0, 2, 6, 0, 8, 128, + 2, 0, 0, 128, 5, 0, + 0, 3, 1, 0, 2, 128, + 6, 0, 255, 128, 12, 0, + 85, 128, 88, 0, 0, 4, + 11, 0, 6, 128, 5, 0, + 0, 128, 11, 0, 170, 161, + 1, 0, 220, 128, 6, 0, + 0, 2, 6, 0, 8, 128, + 5, 0, 85, 128, 5, 0, + 0, 3, 1, 0, 1, 128, + 6, 0, 255, 128, 12, 0, + 170, 128, 88, 0, 0, 4, + 13, 0, 3, 128, 2, 0, + 255, 128, 11, 0, 170, 161, + 1, 0, 236, 128, 88, 0, + 0, 4, 5, 0, 7, 128, + 2, 0, 85, 128, 11, 0, + 228, 128, 13, 0, 228, 128, + 6, 0, 0, 2, 5, 0, + 8, 128, 2, 0, 85, 128, + 5, 0, 0, 3, 1, 0, + 4, 128, 5, 0, 255, 128, + 12, 0, 0, 128, 88, 0, + 0, 4, 10, 0, 6, 128, + 2, 0, 170, 128, 11, 0, + 170, 161, 1, 0, 248, 128, + 88, 0, 0, 4, 1, 0, + 7, 128, 2, 0, 255, 128, + 10, 0, 228, 128, 5, 0, + 228, 128, 88, 0, 0, 4, + 1, 0, 7, 128, 2, 0, + 0, 128, 1, 0, 228, 128, + 9, 0, 228, 128, 8, 0, + 0, 3, 1, 0, 8, 128, + 10, 0, 228, 160, 1, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 8, 128, 1, 0, + 255, 129, 8, 0, 255, 128, + 2, 0, 0, 3, 1, 0, + 7, 128, 1, 0, 255, 128, + 1, 0, 228, 128, 2, 0, + 0, 3, 1, 0, 8, 128, + 1, 0, 85, 129, 1, 0, + 0, 128, 88, 0, 0, 4, + 2, 0, 3, 128, 1, 0, + 255, 128, 1, 0, 225, 128, + 1, 0, 228, 128, 10, 0, + 0, 3, 6, 0, 8, 128, + 1, 0, 170, 128, 2, 0, + 0, 128, 11, 0, 0, 3, + 8, 0, 8, 128, 2, 0, + 85, 128, 1, 0, 170, 128, + 8, 0, 0, 3, 1, 0, + 8, 128, 10, 0, 228, 160, + 1, 0, 228, 128, 2, 0, + 0, 3, 2, 0, 1, 128, + 6, 0, 255, 129, 1, 0, + 255, 128, 6, 0, 0, 2, + 2, 0, 1, 128, 2, 0, + 0, 128, 2, 0, 0, 3, + 2, 0, 14, 128, 1, 0, + 255, 129, 1, 0, 144, 128, + 5, 0, 0, 3, 2, 0, + 14, 128, 1, 0, 255, 128, + 2, 0, 228, 128, 4, 0, + 0, 4, 2, 0, 7, 128, + 2, 0, 249, 128, 2, 0, + 0, 128, 1, 0, 255, 128, + 88, 0, 0, 4, 1, 0, + 7, 128, 6, 0, 255, 128, + 1, 0, 228, 128, 2, 0, + 228, 128, 2, 0, 0, 3, + 2, 0, 7, 128, 1, 0, + 255, 129, 1, 0, 228, 128, + 2, 0, 0, 3, 2, 0, + 8, 128, 1, 0, 255, 129, + 3, 0, 0, 161, 5, 0, + 0, 3, 2, 0, 7, 128, + 2, 0, 255, 128, 2, 0, + 228, 128, 2, 0, 0, 3, + 2, 0, 8, 128, 1, 0, + 255, 129, 8, 0, 255, 128, + 2, 0, 0, 3, 6, 0, + 8, 128, 8, 0, 255, 129, + 3, 0, 0, 161, 6, 0, + 0, 2, 2, 0, 8, 128, + 2, 0, 255, 128, 4, 0, + 0, 4, 2, 0, 7, 128, + 2, 0, 228, 128, 2, 0, + 255, 128, 1, 0, 255, 128, + 88, 0, 0, 4, 1, 0, + 7, 128, 6, 0, 255, 128, + 1, 0, 228, 128, 2, 0, + 228, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 6, 0, + 170, 129, 1, 0, 228, 128, + 0, 0, 228, 128, 4, 0, + 0, 4, 1, 0, 7, 128, + 7, 0, 228, 128, 0, 0, + 255, 128, 4, 0, 228, 128, + 5, 0, 0, 3, 2, 0, + 7, 128, 4, 0, 228, 128, + 8, 0, 228, 128, 4, 0, + 0, 4, 5, 0, 7, 128, + 2, 0, 228, 128, 3, 0, + 85, 160, 1, 0, 228, 128, + 4, 0, 0, 4, 1, 0, + 7, 128, 8, 0, 228, 128, + 4, 0, 228, 129, 1, 0, + 228, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 6, 0, + 85, 129, 5, 0, 228, 128, + 0, 0, 228, 128, 4, 0, + 0, 4, 5, 0, 7, 128, + 7, 0, 228, 128, 0, 0, + 255, 128, 4, 0, 228, 129, + 35, 0, 0, 2, 5, 0, + 7, 128, 5, 0, 228, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 6, 0, 0, 129, + 5, 0, 228, 128, 0, 0, + 228, 128, 2, 0, 0, 3, + 5, 0, 3, 128, 4, 0, + 233, 129, 11, 0, 255, 161, + 4, 0, 0, 4, 6, 0, + 7, 128, 4, 0, 228, 128, + 7, 0, 170, 160, 7, 0, + 255, 160, 4, 0, 0, 4, + 1, 0, 8, 128, 7, 0, + 170, 128, 0, 0, 255, 129, + 7, 0, 85, 160, 4, 0, + 0, 4, 9, 0, 7, 128, + 8, 0, 228, 128, 8, 0, + 0, 160, 8, 0, 85, 160, + 4, 0, 0, 4, 9, 0, + 7, 128, 9, 0, 228, 128, + 8, 0, 228, 128, 5, 0, + 255, 161, 5, 0, 0, 3, + 9, 0, 7, 128, 8, 0, + 228, 128, 9, 0, 228, 128, + 7, 0, 0, 2, 2, 0, + 8, 128, 8, 0, 170, 128, + 6, 0, 0, 2, 2, 0, + 8, 128, 2, 0, 255, 128, + 88, 0, 0, 4, 1, 0, + 8, 128, 1, 0, 255, 128, + 9, 0, 170, 128, 2, 0, + 255, 128, 4, 0, 0, 4, + 1, 0, 8, 128, 7, 0, + 170, 128, 0, 0, 255, 129, + 1, 0, 255, 128, 4, 0, + 0, 4, 1, 0, 8, 128, + 6, 0, 170, 128, 1, 0, + 255, 128, 8, 0, 170, 128, + 4, 0, 0, 4, 10, 0, + 7, 128, 4, 0, 228, 128, + 3, 0, 85, 160, 3, 0, + 0, 161, 5, 0, 0, 3, + 10, 0, 7, 128, 8, 0, + 228, 128, 10, 0, 228, 128, + 4, 0, 0, 4, 11, 0, + 15, 128, 7, 0, 73, 128, + 0, 0, 255, 129, 7, 0, + 80, 160, 4, 0, 0, 4, + 5, 0, 12, 128, 10, 0, + 148, 128, 11, 0, 68, 129, + 8, 0, 148, 128, 88, 0, + 0, 4, 12, 0, 4, 128, + 5, 0, 85, 128, 5, 0, + 255, 128, 1, 0, 255, 128, + 7, 0, 0, 2, 1, 0, + 8, 128, 8, 0, 85, 128, + 6, 0, 0, 2, 1, 0, + 8, 128, 1, 0, 255, 128, + 88, 0, 0, 4, 1, 0, + 8, 128, 11, 0, 255, 128, + 9, 0, 85, 128, 1, 0, + 255, 128, 4, 0, 0, 4, + 1, 0, 8, 128, 7, 0, + 85, 128, 0, 0, 255, 129, + 1, 0, 255, 128, 4, 0, + 0, 4, 1, 0, 8, 128, + 6, 0, 85, 128, 1, 0, + 255, 128, 8, 0, 85, 128, + 88, 0, 0, 4, 12, 0, + 2, 128, 5, 0, 0, 128, + 5, 0, 170, 128, 1, 0, + 255, 128, 2, 0, 0, 3, + 13, 0, 15, 128, 4, 0, + 255, 128, 6, 0, 228, 160, + 5, 0, 0, 3, 13, 0, + 15, 128, 13, 0, 228, 128, + 13, 0, 228, 128, 2, 0, + 0, 3, 14, 0, 15, 128, + 4, 0, 36, 129, 11, 0, + 213, 161, 7, 0, 0, 2, + 1, 0, 8, 128, 8, 0, + 0, 128, 6, 0, 0, 2, + 1, 0, 8, 128, 1, 0, + 255, 128, 88, 0, 0, 4, + 1, 0, 8, 128, 11, 0, + 170, 128, 9, 0, 0, 128, + 1, 0, 255, 128, 4, 0, + 0, 4, 1, 0, 8, 128, + 7, 0, 0, 128, 0, 0, + 255, 129, 1, 0, 255, 128, + 4, 0, 0, 4, 1, 0, + 8, 128, 6, 0, 0, 128, + 1, 0, 255, 128, 8, 0, + 0, 128, 4, 0, 0, 4, + 6, 0, 15, 128, 7, 0, + 36, 128, 0, 0, 255, 129, + 11, 0, 127, 161, 4, 0, + 0, 4, 9, 0, 7, 128, + 7, 0, 228, 128, 0, 0, + 255, 128, 3, 0, 0, 160, + 5, 0, 0, 3, 9, 0, + 7, 128, 9, 0, 228, 128, + 9, 0, 228, 128, 4, 0, + 0, 4, 0, 0, 8, 128, + 10, 0, 0, 128, 6, 0, + 255, 129, 8, 0, 0, 128, + 88, 0, 0, 4, 12, 0, + 1, 128, 14, 0, 255, 128, + 0, 0, 255, 128, 1, 0, + 255, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 13, 0, + 255, 129, 12, 0, 228, 128, + 0, 0, 228, 128, 2, 0, + 0, 3, 10, 0, 7, 128, + 8, 0, 228, 128, 8, 0, + 228, 128, 4, 0, 0, 4, + 12, 0, 7, 128, 4, 0, + 228, 128, 3, 0, 85, 161, + 10, 0, 228, 128, 2, 0, + 0, 3, 12, 0, 7, 128, + 12, 0, 228, 128, 3, 0, + 0, 160, 4, 0, 0, 4, + 15, 0, 7, 128, 4, 0, + 228, 128, 10, 0, 228, 129, + 12, 0, 228, 128, 5, 0, + 0, 3, 10, 0, 7, 128, + 4, 0, 228, 128, 10, 0, + 228, 128, 2, 0, 0, 3, + 16, 0, 7, 128, 4, 0, + 228, 128, 4, 0, 228, 128, + 5, 0, 0, 3, 17, 0, + 7, 128, 8, 0, 228, 128, + 16, 0, 228, 128, 4, 0, + 0, 4, 12, 0, 7, 128, + 16, 0, 228, 128, 8, 0, + 228, 129, 12, 0, 228, 128, + 88, 0, 0, 4, 6, 0, + 7, 128, 6, 0, 228, 128, + 10, 0, 228, 128, 12, 0, + 228, 128, 88, 0, 0, 4, + 5, 0, 6, 128, 5, 0, + 208, 128, 17, 0, 228, 128, + 15, 0, 228, 128, 88, 0, + 0, 4, 5, 0, 1, 128, + 14, 0, 255, 128, 17, 0, + 0, 128, 15, 0, 0, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 13, 0, 170, 129, + 5, 0, 228, 128, 0, 0, + 228, 128, 6, 0, 0, 2, + 0, 0, 8, 128, 4, 0, + 0, 128, 4, 0, 0, 4, + 0, 0, 8, 128, 6, 0, + 255, 128, 0, 0, 255, 129, + 3, 0, 0, 161, 11, 0, + 0, 3, 1, 0, 8, 128, + 0, 0, 255, 128, 11, 0, + 170, 161, 5, 0, 0, 3, + 5, 0, 7, 128, 4, 0, + 228, 128, 4, 0, 228, 128, + 88, 0, 0, 4, 0, 0, + 8, 128, 5, 0, 0, 129, + 11, 0, 170, 161, 1, 0, + 255, 128, 88, 0, 0, 4, + 10, 0, 1, 128, 9, 0, + 0, 129, 3, 0, 0, 161, + 0, 0, 255, 128, 6, 0, + 0, 2, 0, 0, 8, 128, + 4, 0, 85, 128, 4, 0, + 0, 4, 0, 0, 8, 128, + 11, 0, 0, 128, 0, 0, + 255, 129, 3, 0, 0, 161, + 11, 0, 0, 3, 1, 0, + 8, 128, 0, 0, 255, 128, + 11, 0, 170, 161, 88, 0, + 0, 4, 0, 0, 8, 128, + 5, 0, 85, 129, 11, 0, + 170, 161, 1, 0, 255, 128, + 88, 0, 0, 4, 10, 0, + 2, 128, 9, 0, 85, 129, + 3, 0, 0, 161, 0, 0, + 255, 128, 6, 0, 0, 2, + 0, 0, 8, 128, 4, 0, + 170, 128, 4, 0, 0, 4, + 0, 0, 8, 128, 11, 0, + 85, 128, 0, 0, 255, 129, + 3, 0, 0, 161, 11, 0, + 0, 3, 1, 0, 8, 128, + 0, 0, 255, 128, 11, 0, + 170, 161, 88, 0, 0, 4, + 0, 0, 8, 128, 5, 0, + 170, 129, 11, 0, 170, 161, + 1, 0, 255, 128, 88, 0, + 0, 4, 10, 0, 4, 128, + 9, 0, 170, 129, 3, 0, + 0, 161, 0, 0, 255, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 13, 0, 85, 129, + 10, 0, 228, 128, 0, 0, + 228, 128, 2, 0, 0, 3, + 5, 0, 7, 128, 4, 0, + 228, 128, 3, 0, 0, 160, + 5, 0, 0, 3, 5, 0, + 7, 128, 5, 0, 228, 128, + 5, 0, 228, 128, 6, 0, + 0, 2, 0, 0, 8, 128, + 14, 0, 0, 128, 5, 0, + 0, 3, 0, 0, 8, 128, + 0, 0, 255, 128, 8, 0, + 0, 128, 10, 0, 0, 3, + 1, 0, 8, 128, 0, 0, + 255, 128, 3, 0, 0, 161, + 88, 0, 0, 4, 0, 0, + 8, 128, 5, 0, 0, 129, + 3, 0, 0, 161, 1, 0, + 255, 128, 5, 0, 0, 3, + 9, 0, 7, 128, 8, 0, + 228, 128, 8, 0, 228, 128, + 88, 0, 0, 4, 10, 0, + 1, 128, 9, 0, 0, 129, + 11, 0, 170, 161, 0, 0, + 255, 128, 6, 0, 0, 2, + 0, 0, 8, 128, 14, 0, + 85, 128, 6, 0, 0, 2, + 1, 0, 8, 128, 14, 0, + 170, 128, 5, 0, 0, 3, + 1, 0, 8, 128, 1, 0, + 255, 128, 8, 0, 170, 128, + 10, 0, 0, 3, 2, 0, + 8, 128, 1, 0, 255, 128, + 3, 0, 0, 161, 88, 0, + 0, 4, 1, 0, 8, 128, + 5, 0, 170, 129, 3, 0, + 0, 161, 2, 0, 255, 128, + 88, 0, 0, 4, 10, 0, + 4, 128, 9, 0, 170, 129, + 11, 0, 170, 161, 1, 0, + 255, 128, 5, 0, 0, 3, + 0, 0, 8, 128, 0, 0, + 255, 128, 8, 0, 85, 128, + 10, 0, 0, 3, 1, 0, + 8, 128, 0, 0, 255, 128, + 3, 0, 0, 161, 88, 0, + 0, 4, 0, 0, 8, 128, + 5, 0, 85, 129, 3, 0, + 0, 161, 1, 0, 255, 128, + 88, 0, 0, 4, 10, 0, + 2, 128, 9, 0, 85, 129, + 11, 0, 170, 161, 0, 0, + 255, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 13, 0, + 0, 129, 10, 0, 228, 128, + 0, 0, 228, 128, 2, 0, + 0, 3, 5, 0, 15, 128, + 4, 0, 255, 128, 5, 0, + 228, 160, 5, 0, 0, 3, + 5, 0, 15, 128, 5, 0, + 228, 128, 5, 0, 228, 128, + 11, 0, 0, 3, 9, 0, + 7, 128, 8, 0, 228, 128, + 4, 0, 228, 128, 10, 0, + 0, 3, 10, 0, 7, 128, + 4, 0, 228, 128, 8, 0, + 228, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 5, 0, + 255, 129, 9, 0, 228, 128, + 0, 0, 228, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 5, 0, 170, 129, 10, 0, + 228, 128, 0, 0, 228, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 5, 0, 85, 129, + 6, 0, 228, 128, 0, 0, + 228, 128, 88, 0, 0, 4, + 0, 0, 7, 128, 5, 0, + 0, 129, 1, 0, 228, 128, + 0, 0, 228, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 2, 0, 170, 161, 2, 0, + 228, 128, 0, 0, 228, 128, + 18, 0, 0, 4, 1, 0, + 7, 128, 7, 0, 255, 128, + 0, 0, 228, 128, 4, 0, + 228, 128, 5, 0, 0, 3, + 0, 0, 7, 128, 3, 0, + 255, 128, 1, 0, 228, 128, + 5, 0, 0, 3, 1, 0, + 1, 128, 3, 0, 255, 128, + 3, 0, 255, 128, 1, 0, + 0, 2, 0, 0, 8, 128, + 3, 0, 255, 128, 88, 0, + 0, 4, 0, 0, 15, 128, + 1, 0, 0, 129, 7, 0, + 228, 128, 0, 0, 228, 128, + 5, 0, 0, 3, 1, 0, + 1, 128, 7, 0, 255, 128, + 7, 0, 255, 128, 88, 0, + 0, 4, 0, 0, 15, 128, + 1, 0, 0, 129, 3, 0, + 228, 128, 0, 0, 228, 128, + 1, 0, 0, 2, 0, 8, + 15, 128, 0, 0, 228, 128, + 255, 255, 0, 0, 83, 72, + 68, 82, 40, 40, 0, 0, + 64, 0, 0, 0, 10, 10, + 0, 0, 89, 0, 0, 4, + 70, 142, 32, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 90, 0, 0, 3, 0, 96, + 16, 0, 0, 0, 0, 0, + 90, 0, 0, 3, 0, 96, + 16, 0, 1, 0, 0, 0, + 88, 24, 0, 4, 0, 112, + 16, 0, 0, 0, 0, 0, + 85, 85, 0, 0, 88, 24, + 0, 4, 0, 112, 16, 0, + 1, 0, 0, 0, 85, 85, + 0, 0, 88, 24, 0, 4, + 0, 112, 16, 0, 2, 0, + 0, 0, 85, 85, 0, 0, + 88, 24, 0, 4, 0, 112, + 16, 0, 3, 0, 0, 0, + 85, 85, 0, 0, 88, 24, + 0, 4, 0, 112, 16, 0, + 5, 0, 0, 0, 85, 85, + 0, 0, 88, 24, 0, 4, + 0, 112, 16, 0, 6, 0, + 0, 0, 85, 85, 0, 0, + 98, 16, 0, 3, 50, 16, + 16, 0, 1, 0, 0, 0, + 98, 16, 0, 3, 194, 16, + 16, 0, 1, 0, 0, 0, + 98, 16, 0, 3, 114, 16, + 16, 0, 2, 0, 0, 0, + 101, 0, 0, 3, 242, 32, + 16, 0, 0, 0, 0, 0, + 104, 0, 0, 2, 22, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 0, 0, + 0, 0, 230, 26, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 6, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 31, 0, 0, 4, + 26, 128, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 31, 0, 0, 4, 10, 128, + 32, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 1, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 0, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 8, 114, 0, 16, 0, + 1, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 6, 128, 32, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 54, 0, 0, 6, 130, 0, + 16, 0, 1, 0, 0, 0, + 10, 128, 32, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 54, 0, 0, 5, 18, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 255, 255, + 255, 255, 18, 0, 0, 1, + 32, 0, 0, 8, 34, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 1, 0, + 0, 0, 10, 128, 32, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 31, 0, 4, 3, + 26, 0, 16, 0, 2, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 3, 0, + 0, 0, 70, 16, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 0, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 56, 0, 0, 8, + 242, 0, 16, 0, 1, 0, + 0, 0, 70, 14, 16, 0, + 3, 0, 0, 0, 6, 128, + 32, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 54, 0, + 0, 5, 18, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 255, 255, 255, 255, + 18, 0, 0, 1, 32, 0, + 0, 8, 18, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 2, 0, 0, 0, + 10, 128, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 31, 0, 4, 3, 10, 0, + 16, 0, 2, 0, 0, 0, + 69, 0, 0, 9, 242, 0, + 16, 0, 3, 0, 0, 0, + 70, 16, 16, 0, 1, 0, + 0, 0, 70, 126, 16, 0, + 3, 0, 0, 0, 0, 96, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 34, 0, + 16, 0, 2, 0, 0, 0, + 10, 0, 16, 0, 3, 0, + 0, 0, 1, 64, 0, 0, + 115, 128, 0, 191, 69, 0, + 0, 9, 242, 0, 16, 0, + 3, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 1, 0, + 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, + 0, 7, 66, 0, 16, 0, + 2, 0, 0, 0, 10, 0, + 16, 0, 3, 0, 0, 0, + 1, 64, 0, 0, 18, 131, + 128, 189, 69, 0, 0, 9, + 242, 0, 16, 0, 3, 0, + 0, 0, 70, 16, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 2, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 7, + 130, 0, 16, 0, 2, 0, + 0, 0, 10, 0, 16, 0, + 3, 0, 0, 0, 1, 64, + 0, 0, 115, 128, 0, 191, + 56, 0, 0, 10, 50, 0, + 16, 0, 3, 0, 0, 0, + 86, 5, 16, 0, 2, 0, + 0, 0, 2, 64, 0, 0, + 182, 74, 204, 63, 205, 30, + 80, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 0, + 0, 9, 18, 0, 16, 0, + 4, 0, 0, 0, 42, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 103, 10, + 149, 63, 10, 0, 16, 0, + 3, 0, 0, 0, 50, 0, + 0, 10, 34, 0, 16, 0, + 2, 0, 0, 0, 42, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 103, 10, + 149, 63, 26, 0, 16, 128, + 65, 0, 0, 0, 3, 0, + 0, 0, 56, 0, 0, 7, + 18, 0, 16, 0, 3, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 76, 26, 1, 64, + 50, 0, 0, 10, 34, 0, + 16, 0, 4, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 196, 148, + 200, 62, 26, 0, 16, 0, + 2, 0, 0, 0, 50, 0, + 0, 9, 66, 0, 16, 0, + 4, 0, 0, 0, 42, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 103, 10, + 149, 63, 10, 0, 16, 0, + 3, 0, 0, 0, 54, 0, + 0, 5, 130, 0, 16, 0, + 4, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 128, 63, + 56, 0, 0, 8, 242, 0, + 16, 0, 1, 0, 0, 0, + 70, 14, 16, 0, 4, 0, + 0, 0, 6, 128, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 21, 0, 0, 1, + 21, 0, 0, 1, 21, 0, + 0, 1, 55, 0, 0, 10, + 242, 0, 16, 0, 1, 0, + 0, 0, 6, 0, 16, 0, + 2, 0, 0, 0, 70, 14, + 16, 0, 1, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 54, 0, 0, 5, 18, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 255, 255, + 255, 255, 18, 0, 0, 1, + 32, 0, 0, 8, 34, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 1, 0, + 0, 0, 26, 128, 32, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 31, 0, 4, 3, + 26, 0, 16, 0, 2, 0, + 0, 0, 31, 0, 0, 4, + 10, 128, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 69, 0, 0, 9, 242, 0, + 16, 0, 3, 0, 0, 0, + 70, 16, 16, 0, 1, 0, + 0, 0, 70, 126, 16, 0, + 0, 0, 0, 0, 0, 96, + 16, 0, 0, 0, 0, 0, + 56, 0, 0, 8, 114, 0, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 3, 0, + 0, 0, 6, 128, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 4, 0, + 0, 0, 70, 16, 16, 0, + 2, 0, 0, 0, 70, 126, + 16, 0, 5, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 54, 0, 0, 6, + 130, 0, 16, 0, 3, 0, + 0, 0, 10, 128, 32, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 56, 0, 0, 7, + 242, 0, 16, 0, 1, 0, + 0, 0, 70, 14, 16, 0, + 3, 0, 0, 0, 6, 0, + 16, 0, 4, 0, 0, 0, + 54, 0, 0, 5, 34, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 255, 255, + 255, 255, 18, 0, 0, 1, + 32, 0, 0, 8, 66, 0, + 16, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 1, 0, + 0, 0, 10, 128, 32, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 31, 0, 4, 3, + 42, 0, 16, 0, 2, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 3, 0, + 0, 0, 70, 16, 16, 0, + 2, 0, 0, 0, 70, 126, + 16, 0, 5, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 69, 0, 0, 9, + 242, 0, 16, 0, 4, 0, + 0, 0, 70, 16, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 0, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 56, 0, 0, 8, + 242, 0, 16, 0, 4, 0, + 0, 0, 70, 14, 16, 0, + 4, 0, 0, 0, 6, 128, + 32, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 56, 0, + 0, 7, 242, 0, 16, 0, + 1, 0, 0, 0, 6, 0, + 16, 0, 3, 0, 0, 0, + 70, 14, 16, 0, 4, 0, + 0, 0, 54, 0, 0, 5, + 34, 0, 16, 0, 2, 0, + 0, 0, 1, 64, 0, 0, + 255, 255, 255, 255, 18, 0, + 0, 1, 32, 0, 0, 8, + 34, 0, 16, 0, 2, 0, + 0, 0, 1, 64, 0, 0, + 2, 0, 0, 0, 10, 128, + 32, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 31, 0, + 4, 3, 26, 0, 16, 0, + 2, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 3, 0, 0, 0, 70, 16, + 16, 0, 2, 0, 0, 0, + 70, 126, 16, 0, 5, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 4, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 3, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 0, 0, + 0, 7, 66, 0, 16, 0, + 2, 0, 0, 0, 10, 0, + 16, 0, 4, 0, 0, 0, + 1, 64, 0, 0, 115, 128, + 0, 191, 69, 0, 0, 9, + 242, 0, 16, 0, 4, 0, + 0, 0, 70, 16, 16, 0, + 1, 0, 0, 0, 70, 126, + 16, 0, 1, 0, 0, 0, + 0, 96, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 7, + 130, 0, 16, 0, 2, 0, + 0, 0, 10, 0, 16, 0, + 4, 0, 0, 0, 1, 64, + 0, 0, 18, 131, 128, 189, + 69, 0, 0, 9, 242, 0, + 16, 0, 4, 0, 0, 0, + 70, 16, 16, 0, 1, 0, + 0, 0, 70, 126, 16, 0, + 2, 0, 0, 0, 0, 96, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 34, 0, + 16, 0, 3, 0, 0, 0, + 10, 0, 16, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 115, 128, 0, 191, 56, 0, + 0, 10, 194, 0, 16, 0, + 3, 0, 0, 0, 166, 10, + 16, 0, 2, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 182, 74, 204, 63, 205, 30, + 80, 63, 50, 0, 0, 9, + 18, 0, 16, 0, 4, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 103, 10, 149, 63, + 42, 0, 16, 0, 3, 0, + 0, 0, 50, 0, 0, 10, + 66, 0, 16, 0, 2, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 103, 10, 149, 63, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 56, 0, 0, 7, 66, 0, + 16, 0, 3, 0, 0, 0, + 26, 0, 16, 0, 3, 0, + 0, 0, 1, 64, 0, 0, + 76, 26, 1, 64, 50, 0, + 0, 10, 34, 0, 16, 0, + 4, 0, 0, 0, 26, 0, + 16, 128, 65, 0, 0, 0, + 3, 0, 0, 0, 1, 64, + 0, 0, 196, 148, 200, 62, + 42, 0, 16, 0, 2, 0, + 0, 0, 50, 0, 0, 9, + 66, 0, 16, 0, 4, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 103, 10, 149, 63, + 42, 0, 16, 0, 3, 0, + 0, 0, 54, 0, 0, 5, + 130, 0, 16, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 56, 0, + 0, 8, 242, 0, 16, 0, + 4, 0, 0, 0, 70, 14, + 16, 0, 4, 0, 0, 0, + 6, 128, 32, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 56, 0, 0, 7, 242, 0, + 16, 0, 1, 0, 0, 0, + 6, 0, 16, 0, 3, 0, + 0, 0, 70, 14, 16, 0, + 4, 0, 0, 0, 21, 0, + 0, 1, 21, 0, 0, 1, + 21, 0, 0, 1, 31, 0, + 0, 3, 26, 0, 16, 0, + 2, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 3, 0, 0, 0, 70, 16, + 16, 0, 2, 0, 0, 0, + 70, 126, 16, 0, 5, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 8, 242, 0, 16, 0, + 1, 0, 0, 0, 6, 0, + 16, 0, 3, 0, 0, 0, + 70, 142, 32, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 21, 0, 0, 1, 54, 0, + 0, 5, 18, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 255, 255, 255, 255, + 18, 0, 0, 1, 32, 0, + 0, 8, 18, 0, 16, 0, + 2, 0, 0, 0, 1, 64, + 0, 0, 2, 0, 0, 0, + 26, 128, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 31, 0, 4, 3, 10, 0, + 16, 0, 2, 0, 0, 0, + 14, 0, 0, 7, 98, 0, + 16, 0, 2, 0, 0, 0, + 6, 17, 16, 0, 2, 0, + 0, 0, 166, 26, 16, 0, + 2, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 3, 0, 0, 0, 150, 5, + 16, 0, 2, 0, 0, 0, + 70, 126, 16, 0, 5, 0, + 0, 0, 0, 96, 16, 0, + 1, 0, 0, 0, 69, 0, + 0, 9, 242, 0, 16, 0, + 4, 0, 0, 0, 70, 16, + 16, 0, 1, 0, 0, 0, + 70, 126, 16, 0, 0, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 8, 242, 0, 16, 0, + 4, 0, 0, 0, 70, 14, + 16, 0, 4, 0, 0, 0, + 6, 128, 32, 0, 0, 0, + 0, 0, 1, 0, 0, 0, + 56, 0, 0, 7, 242, 0, + 16, 0, 1, 0, 0, 0, + 6, 0, 16, 0, 3, 0, + 0, 0, 70, 14, 16, 0, + 4, 0, 0, 0, 21, 0, + 0, 1, 21, 0, 0, 1, + 21, 0, 0, 1, 55, 0, + 0, 12, 242, 0, 16, 0, + 1, 0, 0, 0, 6, 0, + 16, 0, 2, 0, 0, 0, + 70, 14, 16, 0, 1, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 128, 63, 24, 0, + 0, 7, 18, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 0, 0, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 31, 0, 4, 3, + 10, 0, 16, 0, 2, 0, + 0, 0, 54, 0, 0, 5, + 242, 32, 16, 0, 0, 0, + 0, 0, 70, 14, 16, 0, + 1, 0, 0, 0, 62, 0, + 0, 1, 21, 0, 0, 1, + 24, 0, 0, 7, 18, 0, + 16, 0, 2, 0, 0, 0, + 58, 0, 16, 0, 1, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 31, 0, + 4, 3, 10, 0, 16, 0, + 2, 0, 0, 0, 54, 0, + 0, 5, 242, 32, 16, 0, + 0, 0, 0, 0, 70, 14, + 16, 0, 0, 0, 0, 0, + 62, 0, 0, 1, 21, 0, + 0, 1, 14, 0, 0, 7, + 114, 0, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 0, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 2, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 246, 15, 16, 0, + 1, 0, 0, 0, 55, 0, + 0, 10, 114, 0, 16, 0, + 1, 0, 0, 0, 246, 143, + 32, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 70, 2, + 16, 0, 2, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 56, 0, 0, 7, + 114, 0, 16, 0, 2, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 50, 0, + 0, 10, 114, 0, 16, 0, + 4, 0, 0, 0, 70, 2, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 70, 2, 16, 0, 3, 0, + 0, 0, 29, 0, 0, 10, + 242, 0, 16, 0, 5, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 63, 0, 0, + 0, 63, 0, 0, 0, 63, + 0, 0, 128, 62, 70, 2, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 6, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 7, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 70, 2, 16, 0, 6, 0, + 0, 0, 0, 0, 0, 7, + 114, 0, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 50, 0, 0, 12, 114, 0, + 16, 0, 9, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 64, 0, 0, + 0, 64, 0, 0, 0, 64, + 0, 0, 0, 0, 70, 2, + 16, 0, 6, 0, 0, 0, + 0, 0, 0, 10, 114, 0, + 16, 0, 9, 0, 0, 0, + 70, 2, 16, 0, 9, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 191, 0, 0, + 128, 191, 0, 0, 128, 191, + 0, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 10, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 70, 2, 16, 0, 8, 0, + 0, 0, 50, 0, 0, 10, + 114, 0, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 128, + 65, 0, 0, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 9, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 5, 0, 0, 0, + 70, 2, 16, 0, 5, 0, + 0, 0, 70, 2, 16, 0, + 7, 0, 0, 0, 70, 2, + 16, 0, 8, 0, 0, 0, + 51, 0, 0, 7, 114, 0, + 16, 0, 7, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 32, 0, + 0, 11, 242, 0, 16, 0, + 8, 0, 0, 0, 2, 64, + 0, 0, 1, 0, 0, 0, + 2, 0, 0, 0, 3, 0, + 0, 0, 4, 0, 0, 0, + 166, 138, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 52, 0, 0, 7, 114, 0, + 16, 0, 11, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 24, 0, + 0, 10, 242, 0, 16, 0, + 12, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 128, 63, 24, 0, 0, 10, + 242, 0, 16, 0, 13, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 0, 0, + 0, 0, 0, 11, 114, 0, + 16, 0, 14, 0, 0, 0, + 70, 2, 16, 128, 65, 0, + 0, 0, 1, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 14, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 14, 0, 0, 0, + 51, 0, 0, 10, 114, 0, + 16, 0, 14, 0, 0, 0, + 70, 2, 16, 0, 14, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 0, 0, 55, 0, + 0, 12, 114, 0, 16, 0, + 13, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 70, 2, 16, 0, + 14, 0, 0, 0, 55, 0, + 0, 12, 114, 0, 16, 0, + 12, 0, 0, 0, 70, 2, + 16, 0, 12, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 13, 0, 0, 0, 0, 0, + 0, 11, 114, 0, 16, 0, + 13, 0, 0, 0, 70, 2, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 14, 0, 0, 0, + 70, 2, 16, 0, 13, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 51, 0, + 0, 10, 114, 0, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 14, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 0, 0, 0, 11, + 114, 0, 16, 0, 14, 0, + 0, 0, 70, 2, 16, 128, + 65, 0, 0, 0, 14, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 63, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 0, 0, 55, 0, + 0, 9, 130, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 0, 13, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 10, 0, 16, 0, + 14, 0, 0, 0, 55, 0, + 0, 9, 18, 0, 16, 0, + 15, 0, 0, 0, 58, 0, + 16, 0, 12, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 58, 0, 16, 0, + 2, 0, 0, 0, 24, 0, + 0, 10, 146, 0, 16, 0, + 14, 0, 0, 0, 86, 9, + 16, 0, 0, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 128, 63, 24, 0, 0, 10, + 50, 0, 16, 0, 16, 0, + 0, 0, 150, 5, 16, 0, + 1, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 55, 0, 0, 12, 98, 0, + 16, 0, 14, 0, 0, 0, + 6, 1, 16, 0, 16, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 86, 6, + 16, 0, 14, 0, 0, 0, + 55, 0, 0, 12, 98, 0, + 16, 0, 15, 0, 0, 0, + 6, 3, 16, 0, 14, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 0, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 0, 0, 86, 6, + 16, 0, 14, 0, 0, 0, + 29, 0, 0, 10, 114, 0, + 16, 0, 14, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 50, 0, + 0, 10, 114, 0, 16, 0, + 6, 0, 0, 0, 70, 2, + 16, 128, 65, 0, 0, 0, + 1, 0, 0, 0, 70, 2, + 16, 0, 6, 0, 0, 0, + 70, 2, 16, 0, 9, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 6, 0, + 0, 0, 70, 2, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 10, 0, 0, 0, + 70, 2, 16, 0, 6, 0, + 0, 0, 32, 0, 0, 11, + 242, 0, 16, 0, 9, 0, + 0, 0, 2, 64, 0, 0, + 5, 0, 0, 0, 6, 0, + 0, 0, 7, 0, 0, 0, + 8, 0, 0, 0, 166, 138, + 32, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 50, 0, + 0, 16, 114, 0, 16, 0, + 10, 0, 0, 0, 70, 2, + 16, 128, 65, 0, 0, 0, + 1, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 0, 64, + 0, 0, 0, 64, 0, 0, + 0, 64, 0, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 63, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 56, 0, 0, 7, + 114, 0, 16, 0, 10, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 10, 0, 0, 0, + 50, 0, 0, 10, 114, 0, + 16, 0, 10, 0, 0, 0, + 70, 2, 16, 128, 65, 0, + 0, 0, 10, 0, 0, 0, + 70, 2, 16, 0, 13, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 50, 0, + 0, 15, 114, 0, 16, 0, + 13, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 64, 0, 0, 0, 64, + 0, 0, 0, 64, 0, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 191, 0, 0, + 128, 191, 0, 0, 128, 191, + 0, 0, 0, 0, 50, 0, + 0, 15, 114, 0, 16, 0, + 16, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 65, 0, 0, 128, 65, + 0, 0, 128, 65, 0, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 64, 193, 0, 0, + 64, 193, 0, 0, 64, 193, + 0, 0, 0, 0, 50, 0, + 0, 12, 114, 0, 16, 0, + 16, 0, 0, 0, 70, 2, + 16, 0, 16, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 128, 64, 0, 0, + 128, 64, 0, 0, 128, 64, + 0, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 16, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 75, 0, 0, 5, + 114, 0, 16, 0, 17, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 55, 0, + 0, 9, 130, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 0, 5, 0, 0, 0, + 10, 0, 16, 0, 16, 0, + 0, 0, 10, 0, 16, 0, + 17, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 2, 0, 0, 0, 10, 0, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 58, 0, + 16, 0, 2, 0, 0, 0, + 50, 0, 0, 9, 130, 0, + 16, 0, 2, 0, 0, 0, + 10, 0, 16, 0, 13, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 10, 0, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 18, 0, + 16, 0, 18, 0, 0, 0, + 10, 0, 16, 0, 14, 0, + 0, 0, 10, 0, 16, 0, + 10, 0, 0, 0, 58, 0, + 16, 0, 2, 0, 0, 0, + 29, 0, 0, 10, 146, 0, + 16, 0, 10, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 128, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 128, 62, 86, 9, 16, 0, + 0, 0, 0, 0, 55, 0, + 0, 9, 146, 0, 16, 0, + 10, 0, 0, 0, 6, 12, + 16, 0, 10, 0, 0, 0, + 86, 9, 16, 0, 16, 0, + 0, 0, 86, 9, 16, 0, + 17, 0, 0, 0, 0, 0, + 0, 8, 146, 0, 16, 0, + 10, 0, 0, 0, 86, 9, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 6, 12, + 16, 0, 10, 0, 0, 0, + 50, 0, 0, 9, 146, 0, + 16, 0, 10, 0, 0, 0, + 86, 9, 16, 0, 13, 0, + 0, 0, 6, 12, 16, 0, + 10, 0, 0, 0, 86, 9, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 98, 0, + 16, 0, 18, 0, 0, 0, + 86, 6, 16, 0, 14, 0, + 0, 0, 86, 6, 16, 0, + 10, 0, 0, 0, 6, 3, + 16, 0, 10, 0, 0, 0, + 0, 0, 0, 8, 114, 0, + 16, 0, 10, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 128, + 65, 0, 0, 0, 1, 0, + 0, 0, 50, 0, 0, 13, + 114, 0, 16, 0, 3, 0, + 0, 0, 70, 2, 16, 128, + 65, 0, 0, 0, 2, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 64, 0, 0, + 0, 64, 0, 0, 0, 64, + 0, 0, 0, 0, 70, 2, + 16, 0, 3, 0, 0, 0, + 52, 0, 0, 7, 130, 0, + 16, 0, 2, 0, 0, 0, + 26, 0, 16, 0, 0, 0, + 0, 0, 10, 0, 16, 0, + 0, 0, 0, 0, 52, 0, + 0, 7, 130, 0, 16, 0, + 2, 0, 0, 0, 42, 0, + 16, 0, 0, 0, 0, 0, + 58, 0, 16, 0, 2, 0, + 0, 0, 51, 0, 0, 7, + 130, 0, 16, 0, 3, 0, + 0, 0, 26, 0, 16, 0, + 0, 0, 0, 0, 10, 0, + 16, 0, 0, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 3, 0, 0, 0, + 42, 0, 16, 0, 0, 0, + 0, 0, 58, 0, 16, 0, + 3, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 13, 0, 0, 0, 58, 0, + 16, 0, 2, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 29, 0, 0, 7, 130, 0, + 16, 0, 2, 0, 0, 0, + 26, 0, 16, 0, 1, 0, + 0, 0, 10, 0, 16, 0, + 1, 0, 0, 0, 31, 0, + 4, 3, 58, 0, 16, 0, + 2, 0, 0, 0, 49, 0, + 0, 7, 114, 0, 16, 0, + 14, 0, 0, 0, 6, 2, + 16, 0, 1, 0, 0, 0, + 102, 9, 16, 0, 1, 0, + 0, 0, 0, 0, 0, 8, + 242, 0, 16, 0, 16, 0, + 0, 0, 6, 10, 16, 128, + 65, 0, 0, 0, 1, 0, + 0, 0, 150, 4, 16, 0, + 1, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 17, 0, 0, 0, 246, 15, + 16, 0, 13, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 13, 0, + 0, 0, 70, 2, 16, 0, + 17, 0, 0, 0, 22, 7, + 16, 0, 16, 0, 0, 0, + 1, 0, 0, 7, 98, 0, + 16, 0, 16, 0, 0, 0, + 6, 3, 16, 0, 13, 0, + 0, 0, 6, 0, 16, 0, + 14, 0, 0, 0, 29, 0, + 0, 7, 146, 0, 16, 0, + 14, 0, 0, 0, 166, 10, + 16, 0, 1, 0, 0, 0, + 86, 1, 16, 0, 1, 0, + 0, 0, 1, 0, 0, 7, + 98, 0, 16, 0, 17, 0, + 0, 0, 246, 13, 16, 0, + 13, 0, 0, 0, 86, 5, + 16, 0, 14, 0, 0, 0, + 1, 0, 0, 7, 50, 0, + 16, 0, 19, 0, 0, 0, + 230, 10, 16, 0, 13, 0, + 0, 0, 166, 10, 16, 0, + 14, 0, 0, 0, 54, 0, + 0, 5, 18, 0, 16, 0, + 17, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 0, + 54, 0, 0, 5, 66, 0, + 16, 0, 19, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 226, 0, 16, 0, 14, 0, + 0, 0, 246, 15, 16, 0, + 14, 0, 0, 0, 6, 9, + 16, 0, 17, 0, 0, 0, + 6, 9, 16, 0, 19, 0, + 0, 0, 54, 0, 0, 5, + 18, 0, 16, 0, 16, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 55, 0, + 0, 9, 114, 0, 16, 0, + 14, 0, 0, 0, 6, 0, + 16, 0, 14, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 150, 7, 16, 0, + 14, 0, 0, 0, 18, 0, + 0, 1, 49, 0, 0, 7, + 114, 0, 16, 0, 16, 0, + 0, 0, 86, 6, 16, 0, + 1, 0, 0, 0, 38, 8, + 16, 0, 1, 0, 0, 0, + 0, 0, 0, 8, 242, 0, + 16, 0, 17, 0, 0, 0, + 86, 10, 16, 128, 65, 0, + 0, 0, 1, 0, 0, 0, + 134, 1, 16, 0, 1, 0, + 0, 0, 56, 0, 0, 7, + 114, 0, 16, 0, 19, 0, + 0, 0, 246, 15, 16, 0, + 13, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 13, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 22, 7, 16, 0, + 17, 0, 0, 0, 1, 0, + 0, 7, 82, 0, 16, 0, + 17, 0, 0, 0, 6, 3, + 16, 0, 13, 0, 0, 0, + 6, 0, 16, 0, 16, 0, + 0, 0, 29, 0, 0, 7, + 146, 0, 16, 0, 16, 0, + 0, 0, 166, 10, 16, 0, + 1, 0, 0, 0, 6, 4, + 16, 0, 1, 0, 0, 0, + 1, 0, 0, 7, 82, 0, + 16, 0, 19, 0, 0, 0, + 246, 13, 16, 0, 13, 0, + 0, 0, 86, 5, 16, 0, + 16, 0, 0, 0, 1, 0, + 0, 7, 50, 0, 16, 0, + 13, 0, 0, 0, 182, 15, + 16, 0, 13, 0, 0, 0, + 166, 10, 16, 0, 16, 0, + 0, 0, 54, 0, 0, 5, + 34, 0, 16, 0, 19, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 54, 0, + 0, 5, 66, 0, 16, 0, + 13, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 13, 0, 0, 0, + 246, 15, 16, 0, 16, 0, + 0, 0, 70, 2, 16, 0, + 19, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 54, 0, 0, 5, 34, 0, + 16, 0, 17, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 14, 0, + 0, 0, 6, 0, 16, 0, + 16, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 13, 0, + 0, 0, 21, 0, 0, 1, + 16, 0, 0, 10, 130, 0, + 16, 0, 2, 0, 0, 0, + 2, 64, 0, 0, 154, 153, + 153, 62, 61, 10, 23, 63, + 174, 71, 225, 61, 0, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 16, 0, + 0, 10, 130, 0, 16, 0, + 3, 0, 0, 0, 2, 64, + 0, 0, 154, 153, 153, 62, + 61, 10, 23, 63, 174, 71, + 225, 61, 0, 0, 0, 0, + 70, 2, 16, 0, 14, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 3, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 128, 65, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 7, 114, 0, 16, 0, + 13, 0, 0, 0, 246, 15, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 14, 0, + 0, 0, 16, 0, 0, 10, + 130, 0, 16, 0, 3, 0, + 0, 0, 2, 64, 0, 0, + 154, 153, 153, 62, 61, 10, + 23, 63, 174, 71, 225, 61, + 0, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 4, 0, 0, 0, + 26, 0, 16, 0, 13, 0, + 0, 0, 10, 0, 16, 0, + 13, 0, 0, 0, 51, 0, + 0, 7, 130, 0, 16, 0, + 4, 0, 0, 0, 42, 0, + 16, 0, 13, 0, 0, 0, + 58, 0, 16, 0, 4, 0, + 0, 0, 52, 0, 0, 7, + 130, 0, 16, 0, 5, 0, + 0, 0, 26, 0, 16, 0, + 13, 0, 0, 0, 10, 0, + 16, 0, 13, 0, 0, 0, + 52, 0, 0, 7, 130, 0, + 16, 0, 5, 0, 0, 0, + 42, 0, 16, 0, 13, 0, + 0, 0, 58, 0, 16, 0, + 5, 0, 0, 0, 49, 0, + 0, 7, 130, 0, 16, 0, + 6, 0, 0, 0, 58, 0, + 16, 0, 4, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, + 114, 0, 16, 0, 14, 0, + 0, 0, 246, 15, 16, 128, + 65, 0, 0, 0, 3, 0, + 0, 0, 70, 2, 16, 0, + 13, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 14, 0, 0, 0, 246, 15, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 14, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 4, 0, + 0, 0, 58, 0, 16, 0, + 3, 0, 0, 0, 58, 0, + 16, 128, 65, 0, 0, 0, + 4, 0, 0, 0, 14, 0, + 0, 7, 114, 0, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 14, 0, 0, 0, + 246, 15, 16, 0, 4, 0, + 0, 0, 0, 0, 0, 7, + 114, 0, 16, 0, 14, 0, + 0, 0, 246, 15, 16, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 14, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 13, 0, 0, 0, + 246, 15, 16, 0, 6, 0, + 0, 0, 70, 2, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 49, 0, 0, 7, 130, 0, + 16, 0, 4, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 58, 0, 16, 0, + 5, 0, 0, 0, 0, 0, + 0, 8, 114, 0, 16, 0, + 14, 0, 0, 0, 246, 15, + 16, 128, 65, 0, 0, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 0, 0, 0, 8, 130, 0, + 16, 0, 6, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 56, 0, 0, 7, + 114, 0, 16, 0, 14, 0, + 0, 0, 246, 15, 16, 0, + 6, 0, 0, 0, 70, 2, + 16, 0, 14, 0, 0, 0, + 0, 0, 0, 8, 130, 0, + 16, 0, 5, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 58, 0, 16, 0, 5, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 14, 0, + 0, 0, 70, 2, 16, 0, + 14, 0, 0, 0, 246, 15, + 16, 0, 5, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 14, 0, 0, 0, + 246, 15, 16, 0, 3, 0, + 0, 0, 70, 2, 16, 0, + 14, 0, 0, 0, 55, 0, + 0, 9, 114, 0, 16, 0, + 13, 0, 0, 0, 246, 15, + 16, 0, 4, 0, 0, 0, + 70, 2, 16, 0, 14, 0, + 0, 0, 70, 2, 16, 0, + 13, 0, 0, 0, 32, 0, + 0, 11, 242, 0, 16, 0, + 14, 0, 0, 0, 2, 64, + 0, 0, 9, 0, 0, 0, + 10, 0, 0, 0, 11, 0, + 0, 0, 12, 0, 0, 0, + 166, 138, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 52, 0, 0, 7, 130, 0, + 16, 0, 3, 0, 0, 0, + 26, 0, 16, 0, 1, 0, + 0, 0, 10, 0, 16, 0, + 1, 0, 0, 0, 52, 0, + 0, 7, 130, 0, 16, 0, + 3, 0, 0, 0, 42, 0, + 16, 0, 1, 0, 0, 0, + 58, 0, 16, 0, 3, 0, + 0, 0, 51, 0, 0, 7, + 130, 0, 16, 0, 4, 0, + 0, 0, 26, 0, 16, 0, + 1, 0, 0, 0, 10, 0, + 16, 0, 1, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 4, 0, 0, 0, + 42, 0, 16, 0, 1, 0, + 0, 0, 58, 0, 16, 0, + 4, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 16, 0, 0, 0, 58, 0, + 16, 0, 3, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 4, 0, 0, 0, + 29, 0, 0, 7, 130, 0, + 16, 0, 3, 0, 0, 0, + 26, 0, 16, 0, 0, 0, + 0, 0, 10, 0, 16, 0, + 0, 0, 0, 0, 31, 0, + 4, 3, 58, 0, 16, 0, + 3, 0, 0, 0, 49, 0, + 0, 7, 114, 0, 16, 0, + 17, 0, 0, 0, 6, 2, + 16, 0, 0, 0, 0, 0, + 102, 9, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 8, + 242, 0, 16, 0, 19, 0, + 0, 0, 6, 10, 16, 128, + 65, 0, 0, 0, 0, 0, + 0, 0, 150, 4, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 20, 0, 0, 0, 246, 15, + 16, 0, 16, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 16, 0, + 0, 0, 70, 2, 16, 0, + 20, 0, 0, 0, 22, 7, + 16, 0, 19, 0, 0, 0, + 1, 0, 0, 7, 98, 0, + 16, 0, 19, 0, 0, 0, + 6, 3, 16, 0, 16, 0, + 0, 0, 6, 0, 16, 0, + 17, 0, 0, 0, 29, 0, + 0, 7, 146, 0, 16, 0, + 17, 0, 0, 0, 166, 10, + 16, 0, 0, 0, 0, 0, + 86, 1, 16, 0, 0, 0, + 0, 0, 1, 0, 0, 7, + 98, 0, 16, 0, 20, 0, + 0, 0, 246, 13, 16, 0, + 16, 0, 0, 0, 86, 5, + 16, 0, 17, 0, 0, 0, + 1, 0, 0, 7, 50, 0, + 16, 0, 21, 0, 0, 0, + 230, 10, 16, 0, 16, 0, + 0, 0, 166, 10, 16, 0, + 17, 0, 0, 0, 54, 0, + 0, 5, 18, 0, 16, 0, + 20, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 0, + 54, 0, 0, 5, 66, 0, + 16, 0, 21, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 226, 0, 16, 0, 17, 0, + 0, 0, 246, 15, 16, 0, + 17, 0, 0, 0, 6, 9, + 16, 0, 20, 0, 0, 0, + 6, 9, 16, 0, 21, 0, + 0, 0, 54, 0, 0, 5, + 18, 0, 16, 0, 19, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 55, 0, + 0, 9, 114, 0, 16, 0, + 17, 0, 0, 0, 6, 0, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 150, 7, 16, 0, + 17, 0, 0, 0, 18, 0, + 0, 1, 49, 0, 0, 7, + 114, 0, 16, 0, 19, 0, + 0, 0, 86, 6, 16, 0, + 0, 0, 0, 0, 38, 8, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 242, 0, + 16, 0, 20, 0, 0, 0, + 86, 10, 16, 128, 65, 0, + 0, 0, 0, 0, 0, 0, + 134, 1, 16, 0, 0, 0, + 0, 0, 56, 0, 0, 7, + 114, 0, 16, 0, 21, 0, + 0, 0, 246, 15, 16, 0, + 16, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 16, 0, 0, 0, + 70, 2, 16, 0, 21, 0, + 0, 0, 22, 7, 16, 0, + 20, 0, 0, 0, 1, 0, + 0, 7, 82, 0, 16, 0, + 20, 0, 0, 0, 6, 3, + 16, 0, 16, 0, 0, 0, + 6, 0, 16, 0, 19, 0, + 0, 0, 29, 0, 0, 7, + 146, 0, 16, 0, 19, 0, + 0, 0, 166, 10, 16, 0, + 0, 0, 0, 0, 6, 4, + 16, 0, 0, 0, 0, 0, + 1, 0, 0, 7, 82, 0, + 16, 0, 21, 0, 0, 0, + 246, 13, 16, 0, 16, 0, + 0, 0, 86, 5, 16, 0, + 19, 0, 0, 0, 1, 0, + 0, 7, 50, 0, 16, 0, + 16, 0, 0, 0, 182, 15, + 16, 0, 16, 0, 0, 0, + 166, 10, 16, 0, 19, 0, + 0, 0, 54, 0, 0, 5, + 34, 0, 16, 0, 21, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 54, 0, + 0, 5, 66, 0, 16, 0, + 16, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 16, 0, 0, 0, + 246, 15, 16, 0, 19, 0, + 0, 0, 70, 2, 16, 0, + 21, 0, 0, 0, 70, 2, + 16, 0, 16, 0, 0, 0, + 54, 0, 0, 5, 34, 0, + 16, 0, 20, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 17, 0, + 0, 0, 6, 0, 16, 0, + 19, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 21, 0, 0, 1, + 16, 0, 0, 10, 130, 0, + 16, 0, 3, 0, 0, 0, + 2, 64, 0, 0, 154, 153, + 153, 62, 61, 10, 23, 63, + 174, 71, 225, 61, 0, 0, + 0, 0, 70, 2, 16, 0, + 17, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 3, 0, 0, 0, 58, 0, + 16, 0, 2, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 16, 0, 0, 0, + 246, 15, 16, 0, 3, 0, + 0, 0, 70, 2, 16, 0, + 17, 0, 0, 0, 16, 0, + 0, 10, 130, 0, 16, 0, + 3, 0, 0, 0, 2, 64, + 0, 0, 154, 153, 153, 62, + 61, 10, 23, 63, 174, 71, + 225, 61, 0, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 51, 0, 0, 7, + 130, 0, 16, 0, 4, 0, + 0, 0, 26, 0, 16, 0, + 16, 0, 0, 0, 10, 0, + 16, 0, 16, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 4, 0, 0, 0, + 42, 0, 16, 0, 16, 0, + 0, 0, 58, 0, 16, 0, + 4, 0, 0, 0, 52, 0, + 0, 7, 130, 0, 16, 0, + 5, 0, 0, 0, 26, 0, + 16, 0, 16, 0, 0, 0, + 10, 0, 16, 0, 16, 0, + 0, 0, 52, 0, 0, 7, + 130, 0, 16, 0, 5, 0, + 0, 0, 42, 0, 16, 0, + 16, 0, 0, 0, 58, 0, + 16, 0, 5, 0, 0, 0, + 49, 0, 0, 7, 130, 0, + 16, 0, 6, 0, 0, 0, + 58, 0, 16, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 8, 114, 0, 16, 0, + 17, 0, 0, 0, 246, 15, + 16, 128, 65, 0, 0, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 16, 0, 0, 0, + 56, 0, 0, 7, 114, 0, + 16, 0, 17, 0, 0, 0, + 246, 15, 16, 0, 3, 0, + 0, 0, 70, 2, 16, 0, + 17, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 4, 0, 0, 0, 58, 0, + 16, 0, 3, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 4, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 246, 15, 16, 0, + 4, 0, 0, 0, 0, 0, + 0, 7, 114, 0, 16, 0, + 17, 0, 0, 0, 246, 15, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 16, 0, + 0, 0, 246, 15, 16, 0, + 6, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 49, 0, 0, 7, + 130, 0, 16, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 58, 0, + 16, 0, 5, 0, 0, 0, + 0, 0, 0, 8, 114, 0, + 16, 0, 17, 0, 0, 0, + 246, 15, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 16, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 6, 0, + 0, 0, 58, 0, 16, 128, + 65, 0, 0, 0, 3, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 56, 0, + 0, 7, 114, 0, 16, 0, + 17, 0, 0, 0, 246, 15, + 16, 0, 6, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 5, 0, + 0, 0, 58, 0, 16, 128, + 65, 0, 0, 0, 3, 0, + 0, 0, 58, 0, 16, 0, + 5, 0, 0, 0, 14, 0, + 0, 7, 114, 0, 16, 0, + 17, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 246, 15, 16, 0, 5, 0, + 0, 0, 0, 0, 0, 7, + 114, 0, 16, 0, 17, 0, + 0, 0, 246, 15, 16, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 16, 0, 0, 0, + 246, 15, 16, 0, 4, 0, + 0, 0, 70, 2, 16, 0, + 17, 0, 0, 0, 70, 2, + 16, 0, 16, 0, 0, 0, + 16, 0, 0, 10, 130, 0, + 16, 0, 3, 0, 0, 0, + 2, 64, 0, 0, 154, 153, + 153, 62, 61, 10, 23, 63, + 174, 71, 225, 61, 0, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 4, 0, 0, 0, 58, 0, + 16, 0, 2, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 246, 15, 16, 0, + 4, 0, 0, 0, 16, 0, + 0, 10, 130, 0, 16, 0, + 4, 0, 0, 0, 2, 64, + 0, 0, 154, 153, 153, 62, + 61, 10, 23, 63, 174, 71, + 225, 61, 0, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 51, 0, 0, 7, + 130, 0, 16, 0, 5, 0, + 0, 0, 26, 0, 16, 0, + 17, 0, 0, 0, 10, 0, + 16, 0, 17, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 5, 0, 0, 0, + 42, 0, 16, 0, 17, 0, + 0, 0, 58, 0, 16, 0, + 5, 0, 0, 0, 52, 0, + 0, 7, 130, 0, 16, 0, + 6, 0, 0, 0, 26, 0, + 16, 0, 17, 0, 0, 0, + 10, 0, 16, 0, 17, 0, + 0, 0, 52, 0, 0, 7, + 130, 0, 16, 0, 6, 0, + 0, 0, 42, 0, 16, 0, + 17, 0, 0, 0, 58, 0, + 16, 0, 6, 0, 0, 0, + 49, 0, 0, 7, 130, 0, + 16, 0, 7, 0, 0, 0, + 58, 0, 16, 0, 5, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 8, 114, 0, 16, 0, + 19, 0, 0, 0, 246, 15, + 16, 128, 65, 0, 0, 0, + 4, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 56, 0, 0, 7, 114, 0, + 16, 0, 19, 0, 0, 0, + 246, 15, 16, 0, 4, 0, + 0, 0, 70, 2, 16, 0, + 19, 0, 0, 0, 0, 0, + 0, 8, 130, 0, 16, 0, + 5, 0, 0, 0, 58, 0, + 16, 0, 4, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 5, 0, 0, 0, + 14, 0, 0, 7, 114, 0, + 16, 0, 19, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 246, 15, 16, 0, + 5, 0, 0, 0, 0, 0, + 0, 7, 114, 0, 16, 0, + 19, 0, 0, 0, 246, 15, + 16, 0, 4, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 17, 0, + 0, 0, 246, 15, 16, 0, + 7, 0, 0, 0, 70, 2, + 16, 0, 19, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 49, 0, 0, 7, + 130, 0, 16, 0, 5, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 58, 0, + 16, 0, 6, 0, 0, 0, + 0, 0, 0, 8, 114, 0, + 16, 0, 19, 0, 0, 0, + 246, 15, 16, 128, 65, 0, + 0, 0, 4, 0, 0, 0, + 70, 2, 16, 0, 17, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 7, 0, + 0, 0, 58, 0, 16, 128, + 65, 0, 0, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 0, 0, 128, 63, 56, 0, + 0, 7, 114, 0, 16, 0, + 19, 0, 0, 0, 246, 15, + 16, 0, 7, 0, 0, 0, + 70, 2, 16, 0, 19, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 6, 0, + 0, 0, 58, 0, 16, 128, + 65, 0, 0, 0, 4, 0, + 0, 0, 58, 0, 16, 0, + 6, 0, 0, 0, 14, 0, + 0, 7, 114, 0, 16, 0, + 19, 0, 0, 0, 70, 2, + 16, 0, 19, 0, 0, 0, + 246, 15, 16, 0, 6, 0, + 0, 0, 0, 0, 0, 7, + 114, 0, 16, 0, 19, 0, + 0, 0, 246, 15, 16, 0, + 4, 0, 0, 0, 70, 2, + 16, 0, 19, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 17, 0, 0, 0, + 246, 15, 16, 0, 5, 0, + 0, 0, 70, 2, 16, 0, + 19, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 32, 0, 0, 11, 50, 0, + 16, 0, 19, 0, 0, 0, + 2, 64, 0, 0, 13, 0, + 0, 0, 14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 166, 138, 32, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 2, 0, + 0, 0, 58, 0, 16, 128, + 65, 0, 0, 0, 2, 0, + 0, 0, 58, 0, 16, 0, + 3, 0, 0, 0, 0, 0, + 0, 7, 114, 0, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 2, 0, + 0, 0, 16, 0, 0, 10, + 130, 0, 16, 0, 2, 0, + 0, 0, 2, 64, 0, 0, + 154, 153, 153, 62, 61, 10, + 23, 63, 174, 71, 225, 61, + 0, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 51, 0, 0, 7, 130, 0, + 16, 0, 3, 0, 0, 0, + 26, 0, 16, 0, 0, 0, + 0, 0, 10, 0, 16, 0, + 0, 0, 0, 0, 51, 0, + 0, 7, 130, 0, 16, 0, + 3, 0, 0, 0, 42, 0, + 16, 0, 0, 0, 0, 0, + 58, 0, 16, 0, 3, 0, + 0, 0, 52, 0, 0, 7, + 130, 0, 16, 0, 4, 0, + 0, 0, 26, 0, 16, 0, + 0, 0, 0, 0, 10, 0, + 16, 0, 0, 0, 0, 0, + 52, 0, 0, 7, 130, 0, + 16, 0, 4, 0, 0, 0, + 42, 0, 16, 0, 0, 0, + 0, 0, 58, 0, 16, 0, + 4, 0, 0, 0, 49, 0, + 0, 7, 130, 0, 16, 0, + 5, 0, 0, 0, 58, 0, + 16, 0, 3, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, + 114, 0, 16, 0, 20, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 128, 65, 0, 0, 0, + 2, 0, 0, 0, 56, 0, + 0, 7, 114, 0, 16, 0, + 20, 0, 0, 0, 246, 15, + 16, 0, 2, 0, 0, 0, + 70, 2, 16, 0, 20, 0, + 0, 0, 0, 0, 0, 8, + 130, 0, 16, 0, 3, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 128, 65, 0, 0, 0, + 3, 0, 0, 0, 14, 0, + 0, 7, 114, 0, 16, 0, + 20, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, + 246, 15, 16, 0, 3, 0, + 0, 0, 0, 0, 0, 7, + 114, 0, 16, 0, 20, 0, + 0, 0, 246, 15, 16, 0, + 2, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 5, 0, + 0, 0, 70, 2, 16, 0, + 20, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 49, 0, 0, 7, 130, 0, + 16, 0, 3, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 58, 0, 16, 0, + 4, 0, 0, 0, 0, 0, + 0, 8, 114, 0, 16, 0, + 20, 0, 0, 0, 246, 15, + 16, 128, 65, 0, 0, 0, + 2, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 130, 0, + 16, 0, 5, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 2, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 56, 0, 0, 7, + 114, 0, 16, 0, 20, 0, + 0, 0, 246, 15, 16, 0, + 5, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, + 0, 0, 0, 8, 130, 0, + 16, 0, 4, 0, 0, 0, + 58, 0, 16, 128, 65, 0, + 0, 0, 2, 0, 0, 0, + 58, 0, 16, 0, 4, 0, + 0, 0, 14, 0, 0, 7, + 114, 0, 16, 0, 20, 0, + 0, 0, 70, 2, 16, 0, + 20, 0, 0, 0, 246, 15, + 16, 0, 4, 0, 0, 0, + 0, 0, 0, 7, 114, 0, + 16, 0, 20, 0, 0, 0, + 246, 15, 16, 0, 2, 0, + 0, 0, 70, 2, 16, 0, + 20, 0, 0, 0, 55, 0, + 0, 9, 114, 0, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 20, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 1, 0, + 0, 7, 114, 0, 16, 0, + 0, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 86, 5, 16, 0, 19, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 0, 0, + 0, 0, 6, 0, 16, 0, + 19, 0, 0, 0, 70, 2, + 16, 0, 17, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 0, 0, + 0, 0, 246, 15, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 16, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 0, 0, + 0, 0, 166, 10, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 13, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 55, 0, 0, 9, + 114, 0, 16, 0, 0, 0, + 0, 0, 86, 5, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 55, 0, 0, 10, + 114, 0, 16, 0, 0, 0, + 0, 0, 6, 0, 16, 0, + 14, 0, 0, 0, 70, 2, + 16, 128, 129, 0, 0, 0, + 10, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 9, 0, + 0, 0, 70, 2, 16, 0, + 18, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 166, 10, 16, 0, 9, 0, + 0, 0, 70, 2, 16, 0, + 6, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 86, 5, 16, 0, 9, 0, + 0, 0, 70, 2, 16, 0, + 15, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 6, 0, 16, 0, 9, 0, + 0, 0, 70, 2, 16, 0, + 12, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 246, 15, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 11, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 166, 10, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 7, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 86, 5, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 5, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 9, 114, 0, + 16, 0, 0, 0, 0, 0, + 6, 0, 16, 0, 8, 0, + 0, 0, 70, 2, 16, 0, + 4, 0, 0, 0, 70, 2, + 16, 0, 0, 0, 0, 0, + 55, 0, 0, 10, 114, 0, + 16, 0, 0, 0, 0, 0, + 166, 138, 32, 0, 0, 0, + 0, 0, 2, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 70, 2, 16, 0, + 2, 0, 0, 0, 0, 0, + 0, 8, 18, 0, 16, 0, + 2, 0, 0, 0, 58, 0, + 16, 128, 65, 0, 0, 0, + 0, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 128, 63, + 56, 0, 0, 7, 114, 0, + 16, 0, 0, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 246, 15, 16, 0, + 0, 0, 0, 0, 50, 0, + 0, 9, 114, 0, 16, 0, + 0, 0, 0, 0, 6, 0, + 16, 0, 2, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 70, 2, 16, 0, + 0, 0, 0, 0, 56, 0, + 0, 7, 114, 32, 16, 0, + 0, 0, 0, 0, 246, 15, + 16, 0, 1, 0, 0, 0, + 70, 2, 16, 0, 0, 0, + 0, 0, 54, 0, 0, 5, + 130, 32, 16, 0, 0, 0, + 0, 0, 58, 0, 16, 0, + 1, 0, 0, 0, 62, 0, + 0, 1, 83, 84, 65, 84, + 116, 0, 0, 0, 89, 1, + 0, 0, 22, 0, 0, 0, + 0, 0, 0, 0, 4, 0, + 0, 0, 196, 0, 0, 0, + 10, 0, 0, 0, 13, 0, + 0, 0, 14, 0, 0, 0, + 11, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 25, 0, 0, 0, + 45, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 82, 68, 69, 70, 168, 3, + 0, 0, 1, 0, 0, 0, + 136, 1, 0, 0, 9, 0, + 0, 0, 28, 0, 0, 0, + 0, 4, 255, 255, 0, 1, + 0, 0, 116, 3, 0, 0, + 60, 1, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 1, 0, + 0, 0, 69, 1, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 95, 1, + 0, 0, 2, 0, 0, 0, + 5, 0, 0, 0, 4, 0, + 0, 0, 255, 255, 255, 255, + 0, 0, 0, 0, 1, 0, + 0, 0, 13, 0, 0, 0, + 100, 1, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 1, 0, 0, 0, + 1, 0, 0, 0, 13, 0, + 0, 0, 103, 1, 0, 0, + 2, 0, 0, 0, 5, 0, + 0, 0, 4, 0, 0, 0, + 255, 255, 255, 255, 2, 0, + 0, 0, 1, 0, 0, 0, + 13, 0, 0, 0, 107, 1, + 0, 0, 2, 0, 0, 0, + 5, 0, 0, 0, 4, 0, + 0, 0, 255, 255, 255, 255, + 3, 0, 0, 0, 1, 0, + 0, 0, 13, 0, 0, 0, + 111, 1, 0, 0, 2, 0, + 0, 0, 5, 0, 0, 0, + 4, 0, 0, 0, 255, 255, + 255, 255, 5, 0, 0, 0, + 1, 0, 0, 0, 13, 0, + 0, 0, 117, 1, 0, 0, + 2, 0, 0, 0, 5, 0, + 0, 0, 4, 0, 0, 0, + 255, 255, 255, 255, 6, 0, + 0, 0, 1, 0, 0, 0, + 13, 0, 0, 0, 127, 1, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 115, 83, 97, 109, 112, 108, + 101, 114, 0, 76, 97, 121, + 101, 114, 84, 101, 120, 116, + 117, 114, 101, 83, 97, 109, + 112, 108, 101, 114, 76, 105, + 110, 101, 97, 114, 0, 116, + 82, 71, 66, 0, 116, 89, + 0, 116, 67, 98, 0, 116, + 67, 114, 0, 116, 77, 97, + 115, 107, 0, 116, 66, 97, + 99, 107, 100, 114, 111, 112, + 0, 36, 71, 108, 111, 98, + 97, 108, 115, 0, 127, 1, + 0, 0, 10, 0, 0, 0, + 160, 1, 0, 0, 48, 1, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 144, 2, + 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 156, 2, 0, 0, + 0, 0, 0, 0, 172, 2, + 0, 0, 16, 0, 0, 0, + 4, 0, 0, 0, 2, 0, + 0, 0, 188, 2, 0, 0, + 0, 0, 0, 0, 204, 2, + 0, 0, 32, 0, 0, 0, + 16, 0, 0, 0, 2, 0, + 0, 0, 220, 2, 0, 0, + 0, 0, 0, 0, 236, 2, + 0, 0, 48, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 252, 2, 0, 0, + 0, 0, 0, 0, 12, 3, + 0, 0, 112, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 252, 2, 0, 0, + 0, 0, 0, 0, 24, 3, + 0, 0, 176, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 156, 2, 0, 0, + 0, 0, 0, 0, 44, 3, + 0, 0, 192, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 60, 3, 0, 0, + 0, 0, 0, 0, 76, 3, + 0, 0, 208, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 60, 3, 0, 0, + 0, 0, 0, 0, 87, 3, + 0, 0, 224, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 60, 3, 0, 0, + 0, 0, 0, 0, 97, 3, + 0, 0, 240, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 252, 2, 0, 0, + 0, 0, 0, 0, 102, 76, + 97, 121, 101, 114, 67, 111, + 108, 111, 114, 0, 1, 0, + 3, 0, 1, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 102, 76, 97, 121, + 101, 114, 79, 112, 97, 99, + 105, 116, 121, 0, 171, 171, + 0, 0, 3, 0, 1, 0, + 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 105, 66, + 108, 101, 110, 100, 67, 111, + 110, 102, 105, 103, 0, 171, + 171, 171, 1, 0, 19, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 109, 76, 97, 121, 101, 114, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 3, 0, + 3, 0, 4, 0, 4, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 109, 80, 114, 111, + 106, 101, 99, 116, 105, 111, + 110, 0, 118, 82, 101, 110, + 100, 101, 114, 84, 97, 114, + 103, 101, 116, 79, 102, 102, + 115, 101, 116, 0, 118, 84, + 101, 120, 116, 117, 114, 101, + 67, 111, 111, 114, 100, 115, + 0, 171, 1, 0, 3, 0, + 1, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 118, 76, 97, 121, 101, 114, + 81, 117, 97, 100, 0, 118, + 77, 97, 115, 107, 81, 117, + 97, 100, 0, 109, 66, 97, + 99, 107, 100, 114, 111, 112, + 84, 114, 97, 110, 115, 102, + 111, 114, 109, 0, 77, 105, + 99, 114, 111, 115, 111, 102, + 116, 32, 40, 82, 41, 32, + 72, 76, 83, 76, 32, 83, + 104, 97, 100, 101, 114, 32, + 67, 111, 109, 112, 105, 108, + 101, 114, 32, 54, 46, 51, + 46, 57, 54, 48, 48, 46, + 49, 54, 51, 56, 52, 0, + 171, 171, 73, 83, 71, 78, + 128, 0, 0, 0, 4, 0, + 0, 0, 8, 0, 0, 0, + 104, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, - 56, 0, 0, 0, 1, 0, + 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, - 0, 0, 15, 0, 0, 0, - 83, 86, 95, 84, 97, 114, - 103, 101, 116, 0, 171, 171 + 0, 0, 3, 3, 0, 0, + 116, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 1, 0, + 0, 0, 12, 12, 0, 0, + 116, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 2, 0, + 0, 0, 7, 7, 0, 0, + 83, 86, 95, 80, 111, 115, + 105, 116, 105, 111, 110, 0, + 84, 69, 88, 67, 79, 79, + 82, 68, 0, 171, 171, 171, + 79, 83, 71, 78, 44, 0, + 0, 0, 1, 0, 0, 0, + 8, 0, 0, 0, 32, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 83, 86, + 95, 84, 97, 114, 103, 101, + 116, 0, 171, 171 }; -ShaderBytes sComponentAlphaShaderMask = { ComponentAlphaShaderMask, sizeof(ComponentAlphaShaderMask) }; +ShaderBytes sBlendShader = { BlendShader, sizeof(BlendShader) }; diff --git a/gfx/layers/d3d11/genshaders.sh b/gfx/layers/d3d11/genshaders.sh index 170d70ad538..230da9b5294 100644 --- a/gfx/layers/d3d11/genshaders.sh +++ b/gfx/layers/d3d11/genshaders.sh @@ -33,7 +33,6 @@ makeShaderVS LayerQuadVS makeShaderPS SolidColorShader makeShaderPS RGBShader makeShaderPS RGBAShader -makeShaderPS RGBAShaderPremul makeShaderPS ComponentAlphaShader makeShaderPS YCbCrShader makeShaderVS LayerQuadMaskVS @@ -41,12 +40,16 @@ makeShaderVS LayerQuadMask3DVS makeShaderPS SolidColorShaderMask makeShaderPS RGBShaderMask makeShaderPS RGBAShaderMask -makeShaderPS RGBAShaderMaskPremul makeShaderPS RGBAShaderMask3D -makeShaderPS RGBAShaderMask3DPremul makeShaderPS YCbCrShaderMask makeShaderPS ComponentAlphaShaderMask +# Mix-blend shaders +makeShaderVS LayerQuadBlendVS +makeShaderVS LayerQuadBlendMaskVS +makeShaderVS LayerQuadBlendMask3DVS +makeShaderPS BlendShader + SRC=CompositorD3D11VR.hlsl DEST=CompositorD3D11ShadersVR.h diff --git a/gfx/layers/ipc/CompositableTransactionParent.cpp b/gfx/layers/ipc/CompositableTransactionParent.cpp index cc0b4e1c178..82327c8bee8 100644 --- a/gfx/layers/ipc/CompositableTransactionParent.cpp +++ b/gfx/layers/ipc/CompositableTransactionParent.cpp @@ -172,7 +172,7 @@ CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation const OpUseTexture& op = aEdit.get_OpUseTexture(); CompositableHost* compositable = AsCompositable(op); - nsAutoTArray textures; + AutoTArray textures; for (auto& timedTexture : op.textures()) { CompositableHost::TimedTexture* t = textures.AppendElement(); t->mTexture = diff --git a/gfx/layers/ipc/CompositorChild.cpp b/gfx/layers/ipc/CompositorChild.cpp index 2f7817c3bca..f1600052ab0 100644 --- a/gfx/layers/ipc/CompositorChild.cpp +++ b/gfx/layers/ipc/CompositorChild.cpp @@ -95,7 +95,7 @@ CompositorChild::Destroy() mLayerManager = nullptr; } - nsAutoTArray transactions; + AutoTArray transactions; ManagedPLayerTransactionChild(transactions); for (int i = transactions.Length() - 1; i >= 0; --i) { RefPtr layers = diff --git a/gfx/layers/ipc/CompositorChild.h b/gfx/layers/ipc/CompositorChild.h index 8ca9f84a69a..a8ce648ddc8 100644 --- a/gfx/layers/ipc/CompositorChild.h +++ b/gfx/layers/ipc/CompositorChild.h @@ -195,7 +195,7 @@ private: DISALLOW_EVIL_CONSTRUCTORS(CompositorChild); // When we receive overfill numbers, notify these client layer managers - nsAutoTArray mOverfillObservers; + AutoTArray mOverfillObservers; // True until the beginning of the two-step shutdown sequence of this actor. bool mCanSend; diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChild.cpp index e99fdfb4a3b..edd9edd16ce 100644 --- a/gfx/layers/ipc/ImageBridgeChild.cpp +++ b/gfx/layers/ipc/ImageBridgeChild.cpp @@ -35,8 +35,8 @@ #include "mozilla/mozalloc.h" // for operator new, etc #include "nsAutoPtr.h" // for nsRefPtr #include "nsISupportsImpl.h" // for ImageContainer::AddRef, etc -#include "nsTArray.h" // for nsAutoTArray, nsTArray, etc -#include "nsTArrayForwardDeclare.h" // for AutoInfallibleTArray +#include "nsTArray.h" // for AutoTArray, nsTArray, etc +#include "nsTArrayForwardDeclare.h" // for AutoTArray #include "nsThreadUtils.h" // for NS_IsMainThread #include "nsXULAppAPI.h" // for XRE_GetIOMessageLoop #include "mozilla/StaticPtr.h" // for StaticRefPtr @@ -146,7 +146,7 @@ ImageBridgeChild::UseTextures(CompositableClient* aCompositable, MOZ_ASSERT(aCompositable->GetIPDLActor()); MOZ_ASSERT(aCompositable->IsConnected()); - nsAutoTArray textures; + AutoTArray textures; for (auto& t : aTextures) { MOZ_ASSERT(t.mTextureClient); @@ -654,7 +654,7 @@ ImageBridgeChild::EndTransaction() return; } - AutoInfallibleTArray cset; + AutoTArray cset; cset.SetCapacity(mTxn->mOperations.size()); if (!mTxn->mOperations.empty()) { cset.AppendElements(&mTxn->mOperations.front(), mTxn->mOperations.size()); @@ -664,7 +664,7 @@ ImageBridgeChild::EndTransaction() ShadowLayerForwarder::PlatformSyncBeforeUpdate(); } - AutoInfallibleTArray replies; + AutoTArray replies; if (mTxn->mSwapRequired) { if (!SendUpdate(cset, mTxn->mDestroyedActors, &replies)) { diff --git a/gfx/layers/ipc/ImageBridgeParent.cpp b/gfx/layers/ipc/ImageBridgeParent.cpp index 7e13db32082..7494d412e71 100644 --- a/gfx/layers/ipc/ImageBridgeParent.cpp +++ b/gfx/layers/ipc/ImageBridgeParent.cpp @@ -332,7 +332,7 @@ ImageBridgeParent::NotifyImageComposites(nsTArray& a uint32_t i = 0; bool ok = true; while (i < aNotifications.Length()) { - nsAutoTArray notifications; + AutoTArray notifications; notifications.AppendElement(aNotifications[i]); uint32_t end = i + 1; MOZ_ASSERT(aNotifications[i].imageContainerParent()); diff --git a/gfx/layers/ipc/ImageContainerParent.h b/gfx/layers/ipc/ImageContainerParent.h index 6f1e10edcc0..817aa823163 100644 --- a/gfx/layers/ipc/ImageContainerParent.h +++ b/gfx/layers/ipc/ImageContainerParent.h @@ -26,7 +26,7 @@ public: virtual bool RecvAsyncDelete() override; - nsAutoTArray mImageHosts; + AutoTArray mImageHosts; private: virtual void ActorDestroy(ActorDestroyReason why) override {} diff --git a/gfx/layers/ipc/LayerAnimationUtils.cpp b/gfx/layers/ipc/LayerAnimationUtils.cpp index 82c7fba2d71..efa3364f547 100644 --- a/gfx/layers/ipc/LayerAnimationUtils.cpp +++ b/gfx/layers/ipc/LayerAnimationUtils.cpp @@ -7,7 +7,6 @@ #include "LayerAnimationUtils.h" #include "mozilla/ComputedTimingFunction.h" // For ComputedTimingFunction #include "mozilla/layers/LayersMessages.h" // For TimingFunction etc. -#include "mozilla/Maybe.h" // For Maybe<> namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/LayerAnimationUtils.h b/gfx/layers/ipc/LayerAnimationUtils.h index 1959eaaf3a0..fc807dbea19 100644 --- a/gfx/layers/ipc/LayerAnimationUtils.h +++ b/gfx/layers/ipc/LayerAnimationUtils.h @@ -7,12 +7,16 @@ #ifndef mozilla_layers_LayerAnimationUtils_h #define mozilla_layers_LayerAnimationUtils_h +#include "mozilla/Maybe.h" + namespace mozilla { class ComputedTimingFunction; namespace layers { +class TimingFunction; + class AnimationUtils { public: diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp index f1b11c8dcfb..343dddb3709 100644 --- a/gfx/layers/ipc/ShadowLayers.cpp +++ b/gfx/layers/ipc/ShadowLayers.cpp @@ -29,7 +29,7 @@ #include "mozilla/layers/TextureClient.h" // for TextureClient #include "mozilla/mozalloc.h" // for operator new, etc #include "nsAutoPtr.h" // for nsRefPtr, getter_AddRefs, etc -#include "nsTArray.h" // for nsAutoTArray, nsTArray, etc +#include "nsTArray.h" // for AutoTArray, nsTArray, etc #include "nsXULAppAPI.h" // for XRE_GetProcessType, etc #include "mozilla/ReentrantMonitor.h" @@ -387,7 +387,7 @@ ShadowLayerForwarder::UseTextures(CompositableClient* aCompositable, { MOZ_ASSERT(aCompositable && aCompositable->IsConnected()); - nsAutoTArray textures; + AutoTArray textures; for (auto& t : aTextures) { MOZ_ASSERT(t.mTextureClient); @@ -668,7 +668,7 @@ ShadowLayerForwarder::EndTransaction(InfallibleTArray* aReplies, mTxn->AddEdit(OpSetLayerAttributes(nullptr, Shadow(shadow), attrs)); } - AutoInfallibleTArray cset; + AutoTArray cset; size_t nCsets = mTxn->mCset.size() + mTxn->mPaints.size(); MOZ_ASSERT(nCsets > 0 || mTxn->RotationChanged(), "should have bailed by now"); diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index 04c47b39746..f52ad672bb6 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -1124,10 +1124,11 @@ CompositorOGL::DrawQuad(const Rect& aRect, } if (BlendOpIsMixBlendMode(blendMode)) { - gfx::Matrix4x4 transform; - gfx::IntRect rect = ComputeBackdropCopyRect(aRect, aClipRect, aTransform, &transform); + gfx::Matrix4x4 backdropTransform; + gfx::IntRect rect = ComputeBackdropCopyRect(aRect, aClipRect, aTransform, &backdropTransform); + mixBlendBackdrop = CreateTexture(rect, true, mCurrentRenderTarget->GetFBO()); - program->SetBackdropTransform(transform); + program->SetBackdropTransform(backdropTransform); } program->SetRenderOffset(offset.x, offset.y); diff --git a/gfx/layers/opengl/CompositorOGL.h b/gfx/layers/opengl/CompositorOGL.h index bde7a431090..06947781d65 100644 --- a/gfx/layers/opengl/CompositorOGL.h +++ b/gfx/layers/opengl/CompositorOGL.h @@ -28,7 +28,7 @@ #include "nsCOMPtr.h" // for already_AddRefed #include "nsDebug.h" // for NS_ASSERTION, NS_WARNING #include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, etc -#include "nsTArray.h" // for nsAutoTArray, nsTArray, etc +#include "nsTArray.h" // for AutoTArray, nsTArray, etc #include "nsThreadUtils.h" // for nsRunnable #include "nsXULAppAPI.h" // for XRE_GetProcessType #include "nscore.h" // for NS_IMETHOD diff --git a/gfx/layers/opengl/GrallocTextureHost.cpp b/gfx/layers/opengl/GrallocTextureHost.cpp index 17ea0e71778..62efd68365e 100644 --- a/gfx/layers/opengl/GrallocTextureHost.cpp +++ b/gfx/layers/opengl/GrallocTextureHost.cpp @@ -429,7 +429,7 @@ GrallocTextureHostOGL::WaitAcquireFenceHandleSyncComplete() void GrallocTextureHostOGL::SetCropRect(nsIntRect aCropRect) { - MOZ_ASSERT(aCropRect.TopLeft() == IntPoint(0, 0)); + MOZ_ASSERT(aCropRect.TopLeft() == gfx::IntPoint(0, 0)); MOZ_ASSERT(!aCropRect.IsEmpty()); MOZ_ASSERT(aCropRect.width <= mSize.width); MOZ_ASSERT(aCropRect.height <= mSize.height); diff --git a/gfx/skia/Makefile.in b/gfx/skia/Makefile.in deleted file mode 100644 index c2793d5889c..00000000000 --- a/gfx/skia/Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -ifeq ($(CPU_ARCH)_$(GNU_CC),arm_1) -# The assembly uses the frame pointer register (r7 in Thumb/r11 in -# ARM), the compiler doesn't like that. -CXXFLAGS := $(filter-out -fno-omit-frame-pointer,$(CXXFLAGS)) -fomit-frame-pointer -CFLAGS := $(filter-out -fno-omit-frame-pointer,$(CFLAGS)) -fomit-frame-pointer -endif diff --git a/gfx/src/nsRegion.cpp b/gfx/src/nsRegion.cpp index a90ea659b5e..a46944e6807 100644 --- a/gfx/src/nsRegion.cpp +++ b/gfx/src/nsRegion.cpp @@ -305,7 +305,7 @@ void nsRegion::SimplifyOutwardByArea(uint32_t aThreshold) pixman_box32_t *topRects = boxes; // we need some temporary storage for merging both rows of rectangles - nsAutoTArray tmpStorage; + AutoTArray tmpStorage; tmpStorage.SetCapacity(n); pixman_box32_t *tmpRect = tmpStorage.Elements(); diff --git a/gfx/thebes/gfxCoreTextShaper.cpp b/gfx/thebes/gfxCoreTextShaper.cpp index ab15e09466f..3d460664975 100644 --- a/gfx/thebes/gfxCoreTextShaper.cpp +++ b/gfx/thebes/gfxCoreTextShaper.cpp @@ -349,10 +349,10 @@ gfxCoreTextShaper::SetGlyphsFromRun(gfxShapedText *aShapedText, // Testing indicates that CTRunGetGlyphsPtr (almost?) always succeeds, // and so allocating a new array and copying data with CTRunGetGlyphs // will be extremely rare. - // If this were not the case, we could use an nsAutoTArray<> to + // If this were not the case, we could use an AutoTArray<> to // try and avoid the heap allocation for small runs. // It's possible that some future change to CoreText will mean that - // CTRunGetGlyphsPtr fails more often; if this happens, nsAutoTArray<> + // CTRunGetGlyphsPtr fails more often; if this happens, AutoTArray<> // may become an attractive option. glyphs = ::CTRunGetGlyphsPtr(aCTRun); if (!glyphs) { @@ -390,7 +390,7 @@ gfxCoreTextShaper::SetGlyphsFromRun(gfxShapedText *aShapedText, double runWidth = ::CTRunGetTypographicBounds(aCTRun, ::CFRangeMake(0, 0), nullptr, nullptr, nullptr); - nsAutoTArray detailedGlyphs; + AutoTArray detailedGlyphs; gfxShapedText::CompressedGlyph *charGlyphs = aShapedText->GetCharacterGlyphs() + aOffset; @@ -405,7 +405,7 @@ gfxCoreTextShaper::SetGlyphsFromRun(gfxShapedText *aShapedText, // The charToGlyph array is indexed by char position within the stringRange of the glyph run. static const int32_t NO_GLYPH = -1; - AutoFallibleTArray charToGlyphArray; + AutoTArray charToGlyphArray; if (!charToGlyphArray.SetLength(stringRange.length, fallible)) { return NS_ERROR_OUT_OF_MEMORY; } diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index 808341a445b..15d4da156da 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -70,7 +70,7 @@ GetDirectWriteFontName(IDWriteFont *aFont, nsAString& aFontName) } BOOL exists; - nsAutoTArray faceName; + AutoTArray faceName; UINT32 englishIdx = 0; hr = names->FindLocaleName(L"en-us", &englishIdx, &exists); if (FAILED(hr)) { @@ -114,7 +114,7 @@ GetDirectWriteFaceName(IDWriteFont *aFont, return E_FAIL; } - nsAutoTArray faceName; + AutoTArray faceName; UINT32 englishIdx = 0; hr = infostrings->FindLocaleName(L"en-us", &englishIdx, &exists); if (FAILED(hr)) { @@ -304,7 +304,7 @@ gfxDWriteFontFamily::LocalizedName(nsAString &aLocalizedName) idx = 0; } } - AutoFallibleTArray famName; + AutoTArray famName; UINT32 length; hr = names->GetStringLength(idx, &length); @@ -398,7 +398,7 @@ UsingArabicOrHebrewScriptSystemLocale() nsresult gfxDWriteFontEntry::CopyFontTable(uint32_t aTableTag, - FallibleTArray &aBuffer) + nsTArray &aBuffer) { gfxDWriteFontList *pFontList = gfxDWriteFontList::PlatformFontList(); @@ -633,7 +633,7 @@ gfxDWriteFontEntry::CreateFontFace(IDWriteFontFace **aFontFace, if (FAILED(mFontFace->GetFiles(&numberOfFiles, nullptr))) { return NS_ERROR_FAILURE; } - nsAutoTArray files; + AutoTArray files; files.AppendElements(numberOfFiles); if (FAILED(mFontFace->GetFiles(&numberOfFiles, files.Elements()))) { return NS_ERROR_FAILURE; @@ -679,7 +679,7 @@ gfxDWriteFontEntry::IsCJKFont() mIsCJK = false; const uint32_t kOS2Tag = TRUETYPE_TAG('O','S','/','2'); - AutoFallibleTArray buffer; + AutoTArray buffer; if (CopyFontTable(kOS2Tag, buffer) != NS_OK) { return mIsCJK; } @@ -1065,7 +1065,7 @@ gfxDWriteFontList::GetFontsFromCollection(IDWriteFontCollection* aCollection) englishIdx = 0; } - AutoFallibleTArray enName; + AutoTArray enName; UINT32 length; hr = names->GetStringLength(englishIdx, &length); @@ -1110,7 +1110,7 @@ gfxDWriteFontList::GetFontsFromCollection(IDWriteFontCollection* aCollection) for (nameIndex = 0; nameIndex < nameCount; nameIndex++) { UINT32 nameLen; - AutoFallibleTArray localizedName; + AutoTArray localizedName; // only add other names if (nameIndex == englishIdx) { @@ -1331,7 +1331,7 @@ static HRESULT GetFamilyName(IDWriteFont *aFont, nsString& aFamilyName) index = 0; } - AutoFallibleTArray name; + AutoTArray name; UINT32 length; hr = familyNames->GetStringLength(index, &length); @@ -1517,7 +1517,7 @@ void DirectWriteFontInfo::LoadFontFamilyData(const nsAString& aFamilyName) { // lookup the family - nsAutoTArray famName; + AutoTArray famName; uint32_t len = aFamilyName.Length(); if(!famName.SetLength(len + 1, fallible)) { diff --git a/gfx/thebes/gfxDWriteFontList.h b/gfx/thebes/gfxDWriteFontList.h index 9cf19149c16..e9d992b0d28 100644 --- a/gfx/thebes/gfxDWriteFontList.h +++ b/gfx/thebes/gfxDWriteFontList.h @@ -175,7 +175,7 @@ protected: friend class gfxDWriteFontList; virtual nsresult CopyFontTable(uint32_t aTableTag, - FallibleTArray& aBuffer) override; + nsTArray& aBuffer) override; virtual gfxFont *CreateFontInstance(const gfxFontStyle *aFontStyle, bool aNeedsBold); diff --git a/gfx/thebes/gfxFT2FontList.cpp b/gfx/thebes/gfxFT2FontList.cpp index 8fd86da3236..789961d7338 100644 --- a/gfx/thebes/gfxFT2FontList.cpp +++ b/gfx/thebes/gfxFT2FontList.cpp @@ -457,7 +457,7 @@ FT2FontEntry::ReadCMAP(FontInfoData *aFontInfoData) RefPtr charmap = new gfxCharacterMap(); - AutoFallibleTArray buffer; + AutoTArray buffer; nsresult rv = CopyFontTable(TTAG_cmap, buffer); if (NS_SUCCEEDED(rv)) { @@ -511,8 +511,7 @@ FT2FontEntry::ReadCMAP(FontInfoData *aFontInfoData) } nsresult -FT2FontEntry::CopyFontTable(uint32_t aTableTag, - FallibleTArray& aBuffer) +FT2FontEntry::CopyFontTable(uint32_t aTableTag, nsTArray& aBuffer) { AutoFTFace face(this); if (!face) { @@ -1353,7 +1352,7 @@ gfxFT2FontList::GetSystemFontList(InfallibleTArray* retValue) static void LoadSkipSpaceLookupCheck(nsTHashtable& aSkipSpaceLookupCheck) { - nsAutoTArray skiplist; + AutoTArray skiplist; gfxFontUtils::GetPrefsFontList( "font.whitelist.skip_default_features_space_check", skiplist); diff --git a/gfx/thebes/gfxFT2FontList.h b/gfx/thebes/gfxFT2FontList.h index c5748a704bc..05b7ff27cdb 100644 --- a/gfx/thebes/gfxFT2FontList.h +++ b/gfx/thebes/gfxFT2FontList.h @@ -78,7 +78,7 @@ public: virtual hb_blob_t* GetFontTable(uint32_t aTableTag) override; virtual nsresult CopyFontTable(uint32_t aTableTag, - FallibleTArray& aBuffer) override; + nsTArray& aBuffer) override; // Check for various kinds of brokenness, and set flags on the entry // accordingly so that we avoid using bad font tables diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp index e0b63ce38d2..463bd763da8 100644 --- a/gfx/thebes/gfxFcPlatformFontList.cpp +++ b/gfx/thebes/gfxFcPlatformFontList.cpp @@ -744,7 +744,7 @@ gfxFontconfigFontEntry::CreateFontInstance(const gfxFontStyle *aFontStyle, nsresult gfxFontconfigFontEntry::CopyFontTable(uint32_t aTableTag, - FallibleTArray& aBuffer) + nsTArray& aBuffer) { NS_ASSERTION(!mIsDataUserFont, "data fonts should be reading tables directly from memory"); diff --git a/gfx/thebes/gfxFcPlatformFontList.h b/gfx/thebes/gfxFcPlatformFontList.h index 951e9eb5807..8873a590934 100644 --- a/gfx/thebes/gfxFcPlatformFontList.h +++ b/gfx/thebes/gfxFcPlatformFontList.h @@ -137,7 +137,7 @@ protected: // override to pull data from FTFace virtual nsresult CopyFontTable(uint32_t aTableTag, - FallibleTArray& aBuffer) override; + nsTArray& aBuffer) override; // if HB or GR faces are gone, close down the FT_Face void MaybeReleaseFTFace(); diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index e20d1aee2ea..cdb0fd935fb 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -347,7 +347,7 @@ LookupAlternateValues(gfxFontFeatureValueSet *featureLookup, uint32_t numAlternates = altValue.Length(); for (uint32_t i = 0; i < numAlternates; i++) { const gfxAlternateValue& av = altValue.ElementAt(i); - nsAutoTArray values; + AutoTArray values; // map ==> bool found = @@ -522,7 +522,7 @@ gfxFontShaper::MergeFontFeatures( // add font-specific feature values from style rules if (aStyle->featureValueLookup && numAlts > 0) { - nsAutoTArray featureList; + AutoTArray featureList; // insert list of alternate feature settings LookupAlternateValues(aStyle->featureValueLookup, aFamilyName, @@ -2190,8 +2190,8 @@ gfxFont::RenderColorGlyph(DrawTarget* aDrawTarget, const mozilla::gfx::Point& aPoint, uint32_t aGlyphId) const { - nsAutoTArray layerGlyphs; - nsAutoTArray layerColors; + AutoTArray layerGlyphs; + AutoTArray layerColors; if (!GetFontEntry()->GetColorLayersInfo(aGlyphId, layerGlyphs, layerColors)) { return false; @@ -3148,8 +3148,8 @@ gfxFont::InitFakeSmallCapsRun(DrawTarget *aDrawTarget, // apply uppercase transform to the string nsDependentSubstring origString(aText + runStart, runLength); nsAutoString convertedString; - nsAutoTArray charsToMergeArray; - nsAutoTArray deletedCharsArray; + AutoTArray charsToMergeArray; + AutoTArray deletedCharsArray; bool mergeNeeded = nsCaseTransformTextRunFactory:: TransformString(origString, diff --git a/gfx/thebes/gfxFont.h b/gfx/thebes/gfxFont.h index 511c01d8286..9047c0caccb 100644 --- a/gfx/thebes/gfxFont.h +++ b/gfx/thebes/gfxFont.h @@ -2083,7 +2083,7 @@ protected: nsExpirationState mExpirationState; gfxFontStyle mStyle; - nsAutoTArray mGlyphExtentsArray; + AutoTArray mGlyphExtentsArray; nsAutoPtr > > mGlyphChangeObservers; gfxFloat mAdjustedSize; diff --git a/gfx/thebes/gfxFontEntry.cpp b/gfx/thebes/gfxFontEntry.cpp index 7dd5d9e573b..528a869497e 100644 --- a/gfx/thebes/gfxFontEntry.cpp +++ b/gfx/thebes/gfxFontEntry.cpp @@ -523,12 +523,12 @@ gfxFontEntry::TryGetColorGlyphs() class gfxFontEntry::FontTableBlobData { public: - // Adopts the content of aBuffer. - explicit FontTableBlobData(FallibleTArray& aBuffer) - : mHashtable(nullptr), mHashKey(0) + explicit FontTableBlobData(nsTArray&& aBuffer) + : mTableData(Move(aBuffer)) + , mHashtable(nullptr) + , mHashKey(0) { MOZ_COUNT_CTOR(FontTableBlobData); - mTableData.SwapElements(aBuffer); } ~FontTableBlobData() { @@ -570,8 +570,8 @@ public: } private: - // The font table data block, owned (via adoption) - FallibleTArray mTableData; + // The font table data block + nsTArray mTableData; // The blob destroy function needs to know the owning hashtable // and the hashtable key, so that it can remove the entry. @@ -584,12 +584,12 @@ private: hb_blob_t * gfxFontEntry::FontTableHashEntry:: -ShareTableAndGetBlob(FallibleTArray& aTable, +ShareTableAndGetBlob(nsTArray&& aTable, nsTHashtable *aHashtable) { Clear(); // adopts elements of aTable - mSharedBlobData = new FontTableBlobData(aTable); + mSharedBlobData = new FontTableBlobData(Move(aTable)); mBlob = hb_blob_create(mSharedBlobData->GetTable(), mSharedBlobData->GetTableLength(), HB_MEMORY_MODE_READONLY, @@ -656,7 +656,7 @@ gfxFontEntry::GetExistingFontTable(uint32_t aTag, hb_blob_t **aBlob) hb_blob_t * gfxFontEntry::ShareFontTableAndGetBlob(uint32_t aTag, - FallibleTArray* aBuffer) + nsTArray* aBuffer) { if (MOZ_UNLIKELY(!mFontTableCache)) { // we do this here rather than on fontEntry construction @@ -675,7 +675,7 @@ gfxFontEntry::ShareFontTableAndGetBlob(uint32_t aTag, return nullptr; } - return entry->ShareTableAndGetBlob(*aBuffer, mFontTableCache); + return entry->ShareTableAndGetBlob(Move(*aBuffer), mFontTableCache); } static int @@ -725,7 +725,7 @@ gfxFontEntry::GetFontTable(uint32_t aTag) return blob; } - FallibleTArray buffer; + nsTArray buffer; bool haveTable = NS_SUCCEEDED(CopyFontTable(aTag, buffer)); return ShareFontTableAndGetBlob(aTag, haveTable ? &buffer : nullptr); @@ -1148,7 +1148,7 @@ gfxFontEntry* gfxFontFamily::FindFontForStyle(const gfxFontStyle& aFontStyle, bool& aNeedsSyntheticBold) { - nsAutoTArray matched; + AutoTArray matched; FindAllFontsForStyle(aFontStyle, matched, aNeedsSyntheticBold); if (!matched.IsEmpty()) { return matched[0]; @@ -1636,7 +1636,7 @@ gfxFontFamily::ReadOtherFamilyNamesForFace(gfxPlatformFontList *aPlatformFontLis { uint32_t dataLength; const char *nameData = hb_blob_get_data(aNameTable, &dataLength); - nsAutoTArray otherFamilyNames; + AutoTArray otherFamilyNames; ReadOtherFamilyNamesForFace(mName, nameData, dataLength, otherFamilyNames, useFullName); @@ -1721,7 +1721,7 @@ gfxFontFamily::ReadFaceNames(gfxPlatformFontList *aPlatformFontList, aFontInfoData->mLoadOtherNames && !asyncFontLoaderDisabled) { - nsAutoTArray otherFamilyNames; + AutoTArray otherFamilyNames; bool foundOtherNames = aFontInfoData->GetOtherFamilyNames(mName, otherFamilyNames); if (foundOtherNames) { diff --git a/gfx/thebes/gfxFontEntry.h b/gfx/thebes/gfxFontEntry.h index 2bf1c75576e..1b03a9b251e 100644 --- a/gfx/thebes/gfxFontEntry.h +++ b/gfx/thebes/gfxFontEntry.h @@ -337,7 +337,7 @@ public: // Pass nullptr for aBuffer to indicate that the table is not present and // nullptr will be returned. Also returns nullptr on OOM. hb_blob_t *ShareFontTableAndGetBlob(uint32_t aTag, - FallibleTArray* aTable); + nsTArray* aTable); // Get the font's unitsPerEm from the 'head' table, in the case of an // sfnt resource. Will return kInvalidUPEM for non-sfnt fonts, @@ -469,7 +469,7 @@ protected: // Copy a font table into aBuffer. // The caller will be responsible for ownership of the data. virtual nsresult CopyFontTable(uint32_t aTableTag, - FallibleTArray& aBuffer) { + nsTArray& aBuffer) { NS_NOTREACHED("forgot to override either GetFontTable or CopyFontTable?"); return NS_ERROR_FAILURE; } @@ -605,7 +605,7 @@ private: // recorded in the hashtable entry so that others may use the same // table. hb_blob_t * - ShareTableAndGetBlob(FallibleTArray& aTable, + ShareTableAndGetBlob(nsTArray&& aTable, nsTHashtable *aHashtable); // Return a strong reference to the blob. diff --git a/gfx/thebes/gfxFontconfigFonts.cpp b/gfx/thebes/gfxFontconfigFonts.cpp index f637fc20261..72d25bcc2e5 100644 --- a/gfx/thebes/gfxFontconfigFonts.cpp +++ b/gfx/thebes/gfxFontconfigFonts.cpp @@ -135,7 +135,7 @@ protected: // One pattern is the common case and some subclasses rely on successful // addition of the first element to the array. - AutoFallibleTArray,1> mPatterns; + AutoTArray,1> mPatterns; static cairo_user_data_key_t sFontEntryKey; }; @@ -189,7 +189,7 @@ public: cairo_font_face_reference(mFontFace); cairo_font_face_set_user_data(mFontFace, &sFontEntryKey, this, nullptr); - // mPatterns is an nsAutoTArray with 1 space always available, so the + // mPatterns is an AutoTArray with 1 space always available, so the // AppendElement always succeeds. // FIXME: Make this infallible after bug 968520 is done. MOZ_ALWAYS_TRUE(mPatterns.AppendElement(fallible)); @@ -216,7 +216,7 @@ public: protected: virtual nsresult - CopyFontTable(uint32_t aTableTag, FallibleTArray& aBuffer) override; + CopyFontTable(uint32_t aTableTag, nsTArray& aBuffer) override; void MaybeReleaseFTFace(); @@ -228,7 +228,7 @@ private: nsresult gfxSystemFcFontEntry::CopyFontTable(uint32_t aTableTag, - FallibleTArray& aBuffer) + nsTArray& aBuffer) { if (!mFTFaceInitialized) { mFTFaceInitialized = true; @@ -913,7 +913,7 @@ gfxFcFontSet::SortPreferredFonts(bool &aWaitForUserFont) // but FcConfigSubstitute may add more values (e.g. prepending "en" to // "ja" will use western fonts to render Latin/Arabic numerals in Japanese // text.) - nsAutoTArray requiredLangs; + AutoTArray requiredLangs; for (int v = 0; ; ++v) { FcChar8 *lang; FcResult result = FcPatternGetString(mSortPattern, FC_LANG, v, &lang); @@ -1289,7 +1289,7 @@ gfxPangoFontGroup::FindGenericFontsPFG(FontFamilyType aGenericType, nsIAtom *aLanguage, void *aClosure) { - nsAutoTArray resolvedGenerics; + AutoTArray resolvedGenerics; ResolveGenericFontNamesPFG(aGenericType, aLanguage, resolvedGenerics); uint32_t g = 0, numGenerics = resolvedGenerics.Length(); for (g = 0; g < numGenerics; g++) { @@ -1494,7 +1494,7 @@ gfxPangoFontGroup::MakeFontSet(PangoLanguage *aLang, gfxFloat aSizeAdjustFactor, langGroup = do_GetAtom(lang); } - nsAutoTArray fcFamilyList; + AutoTArray fcFamilyList; EnumerateFontListPFG(langGroup ? langGroup.get() : mStyle.language.get(), &fcFamilyList); diff --git a/gfx/thebes/gfxFontconfigFonts.h b/gfx/thebes/gfxFontconfigFonts.h index d08749745aa..76b3e6b0fa9 100644 --- a/gfx/thebes/gfxFontconfigFonts.h +++ b/gfx/thebes/gfxFontconfigFonts.h @@ -73,7 +73,7 @@ private: }; // There is only one of entry in this array unless characters from scripts // of other languages are measured. - nsAutoTArray mFontSets; + AutoTArray mFontSets; gfxFloat mSizeAdjustFactor; PangoLanguage *mPangoLanguage; diff --git a/gfx/thebes/gfxFontconfigUtils.cpp b/gfx/thebes/gfxFontconfigUtils.cpp index 6b2633bf43b..867f60747ed 100644 --- a/gfx/thebes/gfxFontconfigUtils.cpp +++ b/gfx/thebes/gfxFontconfigUtils.cpp @@ -985,7 +985,7 @@ gfxFontconfigUtils::GetLangSupportEntry(const FcChar8 *aLang, bool aWithFonts) #endif }; - nsAutoTArray fonts; + AutoTArray fonts; for (unsigned fs = 0; fs < ArrayLength(fontSets); ++fs) { FcFontSet *fontSet = fontSets[fs]; diff --git a/gfx/thebes/gfxFontconfigUtils.h b/gfx/thebes/gfxFontconfigUtils.h index de9f27f9065..86e9a2c3b46 100644 --- a/gfx/thebes/gfxFontconfigUtils.h +++ b/gfx/thebes/gfxFontconfigUtils.h @@ -260,11 +260,11 @@ protected: return mFonts; } - // Don't memmove the nsAutoTArray. + // Don't memmove the AutoTArray. enum { ALLOW_MEMMOVE = false }; private: // There is usually only one font, but sometimes more. - nsAutoTArray,1> mFonts; + AutoTArray,1> mFonts; }; class LangSupportEntry : public CopiedFcStrEntry { diff --git a/gfx/thebes/gfxGDIFontList.cpp b/gfx/thebes/gfxGDIFontList.cpp index 0142afcec54..8b7873c71c4 100644 --- a/gfx/thebes/gfxGDIFontList.cpp +++ b/gfx/thebes/gfxGDIFontList.cpp @@ -173,7 +173,7 @@ GDIFontEntry::ReadCMAP(FontInfoData *aFontInfoData) } else { uint32_t kCMAP = TRUETYPE_TAG('c','m','a','p'); charmap = new gfxCharacterMap(); - AutoFallibleTArray cmap; + AutoTArray cmap; rv = CopyFontTable(kCMAP, cmap); if (NS_SUCCEEDED(rv)) { @@ -234,8 +234,7 @@ GDIFontEntry::CreateFontInstance(const gfxFontStyle* aFontStyle, bool aNeedsBold } nsresult -GDIFontEntry::CopyFontTable(uint32_t aTableTag, - FallibleTArray& aBuffer) +GDIFontEntry::CopyFontTable(uint32_t aTableTag, nsTArray& aBuffer) { if (!IsTrueType()) { return NS_ERROR_FAILURE; @@ -975,7 +974,7 @@ int CALLBACK GDIFontInfo::EnumerateFontsForFamily( uint32_t kNAME = NativeEndian::swapToBigEndian(TRUETYPE_TAG('n','a','m','e')); uint32_t nameSize; - AutoFallibleTArray nameData; + AutoTArray nameData; nameSize = ::GetFontData(hdc, kNAME, 0, nullptr, 0); if (nameSize != GDI_ERROR && @@ -1018,7 +1017,7 @@ int CALLBACK GDIFontInfo::EnumerateFontsForFamily( uint32_t kCMAP = NativeEndian::swapToBigEndian(TRUETYPE_TAG('c','m','a','p')); uint32_t cmapSize; - AutoFallibleTArray cmapData; + AutoTArray cmapData; cmapSize = ::GetFontData(hdc, kCMAP, 0, nullptr, 0); if (cmapSize != GDI_ERROR && diff --git a/gfx/thebes/gfxGDIFontList.h b/gfx/thebes/gfxGDIFontList.h index 66d467bbe01..5d6c6ea0a3e 100644 --- a/gfx/thebes/gfxGDIFontList.h +++ b/gfx/thebes/gfxGDIFontList.h @@ -274,7 +274,7 @@ protected: virtual gfxFont *CreateFontInstance(const gfxFontStyle *aFontStyle, bool aNeedsBold); virtual nsresult CopyFontTable(uint32_t aTableTag, - FallibleTArray& aBuffer) override; + nsTArray& aBuffer) override; LOGFONTW mLogFont; }; diff --git a/gfx/thebes/gfxGraphiteShaper.cpp b/gfx/thebes/gfxGraphiteShaper.cpp index 97ac0f4d3ea..91e9b749e4e 100644 --- a/gfx/thebes/gfxGraphiteShaper.cpp +++ b/gfx/thebes/gfxGraphiteShaper.cpp @@ -206,10 +206,10 @@ gfxGraphiteShaper::SetGlyphsFromSegment(DrawTarget *aDrawTarget, uint32_t glyphCount = gr_seg_n_slots(aSegment); // identify clusters; graphite may have reordered/expanded/ligated glyphs. - AutoFallibleTArray clusters; - AutoFallibleTArray gids; - AutoFallibleTArray xLocs; - AutoFallibleTArray yLocs; + AutoTArray clusters; + AutoTArray gids; + AutoTArray xLocs; + AutoTArray yLocs; if (!clusters.SetLength(aLength, fallible) || !gids.SetLength(glyphCount, fallible) || @@ -313,7 +313,7 @@ gfxGraphiteShaper::SetGlyphsFromSegment(DrawTarget *aDrawTarget, charGlyphs[offs].SetSimpleGlyph(appAdvance, gids[c.baseGlyph]); } else { // not a one-to-one mapping with simple metrics: use DetailedGlyph - nsAutoTArray details; + AutoTArray details; float clusterLoc; for (uint32_t j = c.baseGlyph; j < c.baseGlyph + c.nGlyphs; ++j) { gfxShapedText::DetailedGlyph* d = details.AppendElement(); diff --git a/gfx/thebes/gfxHarfBuzzShaper.cpp b/gfx/thebes/gfxHarfBuzzShaper.cpp index 8299ca9d884..3fd195c2f2a 100644 --- a/gfx/thebes/gfxHarfBuzzShaper.cpp +++ b/gfx/thebes/gfxHarfBuzzShaper.cpp @@ -1498,7 +1498,7 @@ gfxHarfBuzzShaper::ShapeText(DrawTarget *aDrawTarget, gfxFontEntry *entry = mFont->GetFontEntry(); // insert any merged features into hb_feature array - nsAutoTArray features; + AutoTArray features; MergeFontFeatures(style, entry->mFeatureSettings, aShapedText->DisableLigatures(), @@ -1579,11 +1579,11 @@ gfxHarfBuzzShaper::SetGlyphsFromRun(DrawTarget *aDrawTarget, return NS_OK; } - nsAutoTArray detailedGlyphs; + AutoTArray detailedGlyphs; uint32_t wordLength = aLength; static const int32_t NO_GLYPH = -1; - AutoFallibleTArray charToGlyphArray; + AutoTArray charToGlyphArray; if (!charToGlyphArray.SetLength(wordLength, fallible)) { return NS_ERROR_OUT_OF_MEMORY; } diff --git a/gfx/thebes/gfxMacPlatformFontList.mm b/gfx/thebes/gfxMacPlatformFontList.mm index 4ee0f0cd415..9d2a85a9965 100644 --- a/gfx/thebes/gfxMacPlatformFontList.mm +++ b/gfx/thebes/gfxMacPlatformFontList.mm @@ -733,7 +733,7 @@ gfxMacPlatformFontList::InitFontList() void gfxMacPlatformFontList::InitSingleFaceList() { - nsAutoTArray singleFaceFonts; + AutoTArray singleFaceFonts; gfxFontUtils::GetPrefsFontList("font.single-face-list", singleFaceFonts); uint32_t numFonts = singleFaceFonts.Length(); @@ -902,7 +902,7 @@ gfxMacPlatformFontList::InitSystemFonts() #endif nsAutoCString en("en"); - nsAutoTArray list; + AutoTArray list; LookupFontCascadeForLang(en, list); mDefaultCascadeFamilies.AppendElements(list); } @@ -1018,7 +1018,7 @@ gfxMacPlatformFontList::GlobalFontFallback(const uint32_t aCh, ::CFStringCompare(familyNameRef, CFSTR("LastResort"), kCFCompareCaseInsensitive) != kCFCompareEqualTo) { - nsAutoTArray buffer; + AutoTArray buffer; CFIndex familyNameLen = ::CFStringGetLength(familyNameRef); buffer.SetLength(familyNameLen+1); ::CFStringGetCharacters(familyNameRef, ::CFRangeMake(0, familyNameLen), @@ -1300,7 +1300,7 @@ gfxMacPlatformFontList::AppendLinkedSystemFamilies(nsIAtom* aLanguage, } // lookup the cascade fonts - nsAutoTArray list; + AutoTArray list; LookupFontCascadeForLang(lang, list); // add cascade to cascade cache @@ -1380,7 +1380,7 @@ MacFontInfo::LoadFontFamilyData(const nsAString& aFamilyName) CFStringRef faceName = (CFStringRef) CTFontDescriptorCopyAttribute(faceDesc, kCTFontNameAttribute); - nsAutoTArray buffer; + AutoTArray buffer; CFIndex len = CFStringGetLength(faceName); buffer.SetLength(len+1); CFStringGetCharacters(faceName, ::CFRangeMake(0, len), diff --git a/gfx/thebes/gfxPlatformFontList.cpp b/gfx/thebes/gfxPlatformFontList.cpp index dd5521c87e8..9ed85639bc2 100644 --- a/gfx/thebes/gfxPlatformFontList.cpp +++ b/gfx/thebes/gfxPlatformFontList.cpp @@ -391,7 +391,7 @@ gfxPlatformFontList::LookupInFaceNameLists(const nsAString& aFaceName) void gfxPlatformFontList::PreloadNamesList() { - nsAutoTArray preloadFonts; + AutoTArray preloadFonts; gfxFontUtils::GetPrefsFontList("font.preload-names-list", preloadFonts); uint32_t numFonts = preloadFonts.Length(); @@ -411,7 +411,7 @@ gfxPlatformFontList::PreloadNamesList() void gfxPlatformFontList::LoadBadUnderlineList() { - nsAutoTArray blacklist; + AutoTArray blacklist; gfxFontUtils::GetPrefsFontList("font.blacklist.underline_offset", blacklist); uint32_t numFonts = blacklist.Length(); for (uint32_t i = 0; i < numFonts; i++) { @@ -568,7 +568,7 @@ gfxPlatformFontList::CommonFontFallback(uint32_t aCh, uint32_t aNextCh, const gfxFontStyle* aMatchStyle, gfxFontFamily** aMatchedFamily) { - nsAutoTArray defaultFallbacks; + AutoTArray defaultFallbacks; uint32_t i, numFallbacks; gfxPlatform::GetPlatform()->GetCommonFallbackFonts(aCh, aNextCh, @@ -795,7 +795,7 @@ gfxPlatformFontList::ResolveGenericFontNames( return; } - nsAutoTArray genericFamilies; + AutoTArray genericFamilies; // load family for "font.name.generic.lang" nsAutoCString prefFontName("font.name."); diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index 17c3a74ed5f..ad2f85f8fa8 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -257,6 +257,7 @@ private: // The maximums here are quite conservative, we can tighten them if problems show up. DECL_GFX_PREF(Once, "gfx.max-alloc-size", MaxAllocSize, int32_t, (int32_t)500000000); DECL_GFX_PREF(Once, "gfx.max-texture-size", MaxTextureSize, int32_t, (int32_t)32767); + DECL_GFX_PREF(Live, "gfx.partialpresent.force", PartialPresent, int32_t, 0); DECL_GFX_PREF(Live, "gfx.perf-warnings.enabled", PerfWarnings, bool, false); DECL_GFX_PREF(Live, "gfx.SurfaceTexture.detach.enabled", SurfaceTextureDetachEnabled, bool, true); DECL_GFX_PREF(Live, "gfx.testing.device-reset", DeviceResetForTesting, int32_t, 0); diff --git a/gfx/thebes/gfxTextRun.cpp b/gfx/thebes/gfxTextRun.cpp index 854557e32eb..aa7207f176e 100644 --- a/gfx/thebes/gfxTextRun.cpp +++ b/gfx/thebes/gfxTextRun.cpp @@ -397,7 +397,7 @@ gfxTextRun::DrawGlyphs(gfxFont *aFont, uint32_t aStart, uint32_t aEnd, uint32_t aSpacingStart, uint32_t aSpacingEnd, TextRunDrawParams& aParams, uint16_t aOrientation) { - nsAutoTArray spacingBuffer; + AutoTArray spacingBuffer; bool haveSpacing = GetAdjustedSpacingArray(aStart, aEnd, aProvider, aSpacingStart, aSpacingEnd, &spacingBuffer); aParams.spacing = haveSpacing ? spacingBuffer.Elements() : nullptr; @@ -711,7 +711,7 @@ gfxTextRun::DrawEmphasisMarks(gfxContext *aContext, gfxTextRun* aMark, inlineCoord += direction * ComputePartialLigatureWidth(start, ligatureRunStart, aProvider); - nsAutoTArray spacingBuffer; + AutoTArray spacingBuffer; bool haveSpacing = GetAdjustedSpacingArray( ligatureRunStart, ligatureRunEnd, aProvider, ligatureRunStart, ligatureRunEnd, &spacingBuffer); @@ -734,7 +734,7 @@ gfxTextRun::AccumulateMetricsForRun(gfxFont *aFont, uint16_t aOrientation, Metrics *aMetrics) { - nsAutoTArray spacingBuffer; + AutoTArray spacingBuffer; bool haveSpacing = GetAdjustedSpacingArray(aStart, aEnd, aProvider, aSpacingStart, aSpacingEnd, &spacingBuffer); Metrics metrics = aFont->Measure(this, aStart, aEnd, aBoundingBoxType, @@ -1027,7 +1027,7 @@ gfxTextRun::GetAdvanceWidth(uint32_t aStart, uint32_t aLength, // processing it along with the glyphs. if (aProvider && (mFlags & gfxTextRunFactory::TEXT_ENABLE_SPACING)) { uint32_t i; - nsAutoTArray spacingBuffer; + AutoTArray spacingBuffer; if (spacingBuffer.AppendElements(aLength)) { GetAdjustedSpacing(this, ligatureRunStart, ligatureRunEnd, aProvider, spacingBuffer.Elements()); @@ -1614,7 +1614,7 @@ gfxFontGroup::BuildFontList() } // initialize fonts in the font family list - nsAutoTArray fonts; + AutoTArray fonts; gfxPlatformFontList *pfl = gfxPlatformFontList::PlatformFontList(); // lookup fonts in the fontlist @@ -1682,7 +1682,7 @@ void gfxFontGroup::AddFamilyToFontList(gfxFontFamily* aFamily) { NS_ASSERTION(aFamily, "trying to add a null font family to fontlist"); - nsAutoTArray fontEntryList; + AutoTArray fontEntryList; bool needsBold; aFamily->FindAllFontsForStyle(mStyle, fontEntryList, needsBold); // add these to the fontlist @@ -1846,7 +1846,7 @@ gfxFontGroup::GetDefaultFont() // that assumes it will be able to get valid metrics for layout, // just look for the first usable font and put in the list. // (see bug 554544) - nsAutoTArray,200> familyList; + AutoTArray,200> familyList; pfl->GetFontFamilyList(familyList); numFonts = familyList.Length(); for (uint32_t i = 0; i < numFonts; ++i) { @@ -2345,7 +2345,7 @@ gfxFontGroup::InitScriptRun(DrawTarget* aDrawTarget, gfxFont *mainFont = GetFirstValidFont(); uint32_t runStart = 0; - nsAutoTArray fontRanges; + AutoTArray fontRanges; ComputeRanges(fontRanges, aString, aLength, aRunScript, aTextRun->GetFlags() & gfxTextRunFactory::TEXT_ORIENT_MASK); uint32_t numRanges = fontRanges.Length(); diff --git a/gfx/thebes/gfxTextRun.h b/gfx/thebes/gfxTextRun.h index d60b5854922..ea576acc5de 100644 --- a/gfx/thebes/gfxTextRun.h +++ b/gfx/thebes/gfxTextRun.h @@ -717,7 +717,7 @@ private: // XXX this should be changed to a GlyphRun plus a maybe-null GlyphRun*, // for smaller size especially in the super-common one-glyphrun case - nsAutoTArray mGlyphRuns; + AutoTArray mGlyphRuns; void *mUserData; gfxFontGroup *mFontGroup; // addrefed on creation, but our reference diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index f7e5341b0b5..48e31c75695 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -1284,7 +1284,7 @@ gfxWindowsPlatform::GetDLLVersion(char16ptr_t aDLLPath, nsAString& aVersion) // version info not available case aVersion.AssignLiteral(MOZ_UTF16("0.0.0.0")); versInfoSize = GetFileVersionInfoSizeW(aDLLPath, nullptr); - nsAutoTArray versionInfo; + AutoTArray versionInfo; if (versInfoSize == 0 || !versionInfo.AppendElements(uint32_t(versInfoSize))) diff --git a/hal/WindowIdentifier.h b/hal/WindowIdentifier.h index 7fbab27a677..01cdef58e6e 100644 --- a/hal/WindowIdentifier.h +++ b/hal/WindowIdentifier.h @@ -100,7 +100,7 @@ private: */ uint64_t GetWindowID() const; - AutoInfallibleTArray mID; + AutoTArray mID; nsCOMPtr mWindow; bool mIsEmpty; }; diff --git a/hal/gonk/GonkSensor.cpp b/hal/gonk/GonkSensor.cpp index 7bffd63fe63..9f94e9b6926 100644 --- a/hal/gonk/GonkSensor.cpp +++ b/hal/gonk/GonkSensor.cpp @@ -183,7 +183,7 @@ public: private: SensorData mSensorData; - nsAutoTArray mSensorValues; + AutoTArray mSensorValues; }; namespace hal_impl { diff --git a/hal/sandbox/SandboxHal.cpp b/hal/sandbox/SandboxHal.cpp index e585a922725..daea88f5492 100644 --- a/hal/sandbox/SandboxHal.cpp +++ b/hal/sandbox/SandboxHal.cpp @@ -50,7 +50,7 @@ Vibrate(const nsTArray& pattern, const WindowIdentifier &id) { HAL_LOG("Vibrate: Sending to parent process."); - AutoInfallibleTArray p(pattern); + AutoTArray p(pattern); WindowIdentifier newID(id); newID.AppendProcessID(); diff --git a/image/RasterImage.cpp b/image/RasterImage.cpp index 2e4e03a9437..fe6ad040e56 100644 --- a/image/RasterImage.cpp +++ b/image/RasterImage.cpp @@ -721,7 +721,7 @@ RasterImage::UpdateImageContainer() } mLastImageContainerDrawResult = drawResult; - nsAutoTArray imageList; + AutoTArray imageList; imageList.AppendElement(ImageContainer::NonOwningImage(image)); container->SetCurrentImages(imageList); } diff --git a/image/decoders/icon/mac/nsIconChannelCocoa.mm b/image/decoders/icon/mac/nsIconChannelCocoa.mm index 2b6c6e12d03..e6208d7be75 100644 --- a/image/decoders/icon/mac/nsIconChannelCocoa.mm +++ b/image/decoders/icon/mac/nsIconChannelCocoa.mm @@ -350,7 +350,7 @@ nsIconChannel::MakeInputStream(nsIInputStream** _retval, // create our buffer int32_t bufferCapacity = 2 + [bitmapRep bytesPerPlane]; - nsAutoTArray iconBuffer; // initial size is for + AutoTArray iconBuffer; // initial size is for // 16x16 iconBuffer.SetLength(bufferCapacity); diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp index 9ce4ccb0244..ac4a8f8589a 100644 --- a/image/imgLoader.cpp +++ b/image/imgLoader.cpp @@ -1356,7 +1356,7 @@ NS_IMETHODIMP_(void) imgLoader::ClearCacheForControlledDocument(nsIDocument* aDoc) { MOZ_ASSERT(aDoc); - nsAutoTArray, 128> entriesToBeRemoved; + AutoTArray, 128> entriesToBeRemoved; imgCacheTable& cache = GetCache(false); for (auto iter = cache.Iter(); !iter.Done(); iter.Next()) { auto& key = iter.Key(); diff --git a/intl/hyphenation/glue/nsHyphenator.cpp b/intl/hyphenation/glue/nsHyphenator.cpp index 8a75090e40f..bcb87baf602 100644 --- a/intl/hyphenation/glue/nsHyphenator.cpp +++ b/intl/hyphenation/glue/nsHyphenator.cpp @@ -43,8 +43,7 @@ nsHyphenator::IsValid() } nsresult -nsHyphenator::Hyphenate(const nsAString& aString, - FallibleTArray& aHyphens) +nsHyphenator::Hyphenate(const nsAString& aString, nsTArray& aHyphens) { if (!aHyphens.SetLength(aString.Length(), mozilla::fallible)) { return NS_ERROR_OUT_OF_MEMORY; @@ -121,7 +120,7 @@ nsHyphenator::Hyphenate(const nsAString& aString, } } - nsAutoTArray utf8hyphens; + AutoTArray utf8hyphens; utf8hyphens.SetLength(utf8.Length() + 5); char **rep = nullptr; int *pos = nullptr; diff --git a/intl/hyphenation/glue/nsHyphenator.h b/intl/hyphenation/glue/nsHyphenator.h index 37b5613da94..96975d25335 100644 --- a/intl/hyphenation/glue/nsHyphenator.h +++ b/intl/hyphenation/glue/nsHyphenator.h @@ -21,7 +21,7 @@ public: bool IsValid(); - nsresult Hyphenate(const nsAString& aText, FallibleTArray& aHyphens); + nsresult Hyphenate(const nsAString& aText, nsTArray& aHyphens); private: ~nsHyphenator(); diff --git a/intl/locale/mac/nsDateTimeFormatMac.cpp b/intl/locale/mac/nsDateTimeFormatMac.cpp index e4ab1fc822f..6ee73292d7a 100644 --- a/intl/locale/mac/nsDateTimeFormatMac.cpp +++ b/intl/locale/mac/nsDateTimeFormatMac.cpp @@ -217,7 +217,7 @@ nsresult nsDateTimeFormatMac::FormatTMTime(nsILocale* locale, CFIndex stringLen = CFStringGetLength(formattedDate); - nsAutoTArray stringBuffer; + AutoTArray stringBuffer; stringBuffer.SetLength(stringLen + 1); CFStringGetCharacters(formattedDate, CFRangeMake(0, stringLen), stringBuffer.Elements()); stringOut.Assign(reinterpret_cast(stringBuffer.Elements()), stringLen); diff --git a/intl/locale/nsLocaleService.cpp b/intl/locale/nsLocaleService.cpp index 76d89abcb55..13b3f7f01b3 100644 --- a/intl/locale/nsLocaleService.cpp +++ b/intl/locale/nsLocaleService.cpp @@ -178,7 +178,7 @@ nsLocaleService::nsLocaleService(void) CFStringRef userLocaleStr = ::CFLocaleGetIdentifier(userLocaleRef); ::CFRetain(userLocaleStr); - nsAutoTArray buffer; + AutoTArray buffer; int size = ::CFStringGetLength(userLocaleStr); buffer.SetLength(size + 1); CFRange range = ::CFRangeMake(0, size); diff --git a/intl/lwbrk/nsJISx4051LineBreaker.cpp b/intl/lwbrk/nsJISx4051LineBreaker.cpp index 1b2a2382e0f..b2d0019df3d 100644 --- a/intl/lwbrk/nsJISx4051LineBreaker.cpp +++ b/intl/lwbrk/nsJISx4051LineBreaker.cpp @@ -774,7 +774,7 @@ nsJISx4051LineBreaker::WordMove(const char16_t* aText, uint32_t aLen, } int32_t ret; - nsAutoTArray breakState; + AutoTArray breakState; if (!textNeedsJISx4051 || !breakState.AppendElements(end - begin)) { // No complex text character, do not try to do complex line break. // (This is required for serializers. See Bug #344816.) diff --git a/intl/lwbrk/nsPangoBreaker.cpp b/intl/lwbrk/nsPangoBreaker.cpp index 8d5104c42d1..c6fcb37cf8b 100644 --- a/intl/lwbrk/nsPangoBreaker.cpp +++ b/intl/lwbrk/nsPangoBreaker.cpp @@ -18,7 +18,7 @@ NS_GetComplexLineBreaks(const char16_t* aText, uint32_t aLength, memset(aBreakBefore, false, aLength * sizeof(uint8_t)); - nsAutoTArray attrBuffer; + AutoTArray attrBuffer; if (!attrBuffer.AppendElements(aLength + 1)) return; diff --git a/intl/lwbrk/nsUniscribeBreaker.cpp b/intl/lwbrk/nsUniscribeBreaker.cpp index 0d29d284a31..2a1b69b2267 100644 --- a/intl/lwbrk/nsUniscribeBreaker.cpp +++ b/intl/lwbrk/nsUniscribeBreaker.cpp @@ -21,7 +21,7 @@ NS_GetComplexLineBreaks(const char16_t* aText, uint32_t aLength, int outItems = 0; HRESULT result; - nsAutoTArray items; + AutoTArray items; char16ptr_t text = aText; memset(aBreakBefore, false, aLength); @@ -42,7 +42,7 @@ NS_GetComplexLineBreaks(const char16_t* aText, uint32_t aLength, for (int iItem = 0; iItem < outItems; ++iItem) { uint32_t endOffset = (iItem + 1 == outItems ? aLength : items[iItem + 1].iCharPos); uint32_t startOffset = items[iItem].iCharPos; - nsAutoTArray sla; + AutoTArray sla; if (!sla.AppendElements(endOffset - startOffset)) return; diff --git a/ipc/glue/IPCMessageUtils.h b/ipc/glue/IPCMessageUtils.h index 1677c586226..93f2aed488d 100644 --- a/ipc/glue/IPCMessageUtils.h +++ b/ipc/glue/IPCMessageUtils.h @@ -542,9 +542,9 @@ struct ParamTraits > }; template -struct ParamTraits> : ParamTraits> +struct ParamTraits> : ParamTraits> { - typedef nsAutoTArray paramType; + typedef AutoTArray paramType; }; template<> diff --git a/ipc/glue/WindowsMessageLoop.cpp b/ipc/glue/WindowsMessageLoop.cpp index fcf0b201368..f743a93e1fc 100644 --- a/ipc/glue/WindowsMessageLoop.cpp +++ b/ipc/glue/WindowsMessageLoop.cpp @@ -830,7 +830,7 @@ MessageChannel::SyncStackFrame::SyncStackFrame(MessageChannel* channel, bool int if (!mStaticPrev) { NS_ASSERTION(!gNeuteredWindows, "Should only set this once!"); - gNeuteredWindows = new nsAutoTArray(); + gNeuteredWindows = new AutoTArray(); NS_ASSERTION(gNeuteredWindows, "Out of memory!"); } } diff --git a/js/public/GCHashTable.h b/js/public/GCHashTable.h index cbc59d85341..a8be05b65c0 100644 --- a/js/public/GCHashTable.h +++ b/js/public/GCHashTable.h @@ -49,8 +49,7 @@ template , typename AllocPolicy = TempAllocPolicy, typename MapSweepPolicy = DefaultMapSweepPolicy> -class GCHashMap : public HashMap, - public JS::Traceable +class GCHashMap : public HashMap { using Base = HashMap; @@ -226,8 +225,7 @@ class HandleBase> template , typename AllocPolicy = TempAllocPolicy> -class GCHashSet : public HashSet, - public JS::Traceable +class GCHashSet : public HashSet { using Base = HashSet; diff --git a/js/public/GCVector.h b/js/public/GCVector.h index 37db34e988e..53c05976e43 100644 --- a/js/public/GCVector.h +++ b/js/public/GCVector.h @@ -33,7 +33,7 @@ namespace js { template -class GCVector : public JS::Traceable +class GCVector { mozilla::Vector vector; diff --git a/js/public/RootingAPI.h b/js/public/RootingAPI.h index 9bf511938d0..b29e90f1c6c 100644 --- a/js/public/RootingAPI.h +++ b/js/public/RootingAPI.h @@ -581,28 +581,15 @@ struct JS_PUBLIC_API(MovableCellHasher>) } /* namespace js */ -namespace JS { - -// Non pointer types -- structs or classes that contain GC pointers, either as -// a member or in a more complex container layout -- can also be stored in a -// [Persistent]Rooted if it derives from JS::Traceable. A JS::Traceable stored -// in a [Persistent]Rooted must implement the method: -// |static void trace(T*, JSTracer*)| -class Traceable -{ -}; - -} /* namespace JS */ - namespace js { template class DispatchWrapper { - static_assert(mozilla::IsBaseOf::value, + static_assert(JS::MapTypeToRootKind::kind == JS::RootKind::Traceable, "DispatchWrapper is intended only for usage with a Traceable"); - using TraceFn = void (*)(T*, JSTracer*); + using TraceFn = void (*)(JSTracer*, T*, const char*); TraceFn tracer; #if JS_BITS_PER_WORD == 32 uint32_t padding; // Ensure the storage fields have CellSize alignment. @@ -612,7 +599,7 @@ class DispatchWrapper public: template MOZ_IMPLICIT DispatchWrapper(U&& initial) - : tracer(&T::trace), + : tracer(&GCPolicy::trace), storage(mozilla::Forward(initial)) { } @@ -624,10 +611,10 @@ class DispatchWrapper // Trace the contained storage (of unknown type) using the trace function // we set aside when we did know the type. - static void TraceWrapped(JSTracer* trc, JS::Traceable* thingp, const char* name) { + static void TraceWrapped(JSTracer* trc, T* thingp, const char* name) { auto wrapper = reinterpret_cast( uintptr_t(thingp) - offsetof(DispatchWrapper, storage)); - wrapper->tracer(&wrapper->storage, trc); + wrapper->tracer(trc, &wrapper->storage, name); } }; @@ -670,9 +657,6 @@ namespace JS { template class MOZ_RAII Rooted : public js::RootedBase { - static_assert(!mozilla::IsConvertible::value, - "Rooted takes pointer or Traceable types but not Traceable* type"); - /* Note: CX is a subclass of either ContextFriendFields or PerThreadDataFriendFields. */ void registerWithRootLists(js::RootLists& roots) { this->stack = &roots.stackRoots_[JS::MapTypeToRootKind::kind]; @@ -727,14 +711,14 @@ class MOZ_RAII Rooted : public js::RootedBase /* * For pointer types, the TraceKind for tracing is based on the list it is - * in (selected via rootKind), so no additional storage is required here. - * All Traceable, however, share the same list, so the function to - * call for tracing is stored adjacent to the struct. Since C++ cannot - * templatize on storage class, this is implemented via the wrapper class - * DispatchWrapper. + * in (selected via MapTypeToRootKind), so no additional storage is + * required here. Non-pointer types, however, share the same list, so the + * function to call for tracing is stored adjacent to the struct. Since C++ + * cannot templatize on storage class, this is implemented via the wrapper + * class DispatchWrapper. */ using MaybeWrapped = typename mozilla::Conditional< - mozilla::IsBaseOf::value, + MapTypeToRootKind::kind == JS::RootKind::Traceable, js::DispatchWrapper, T>::Type; MaybeWrapped ptr; @@ -981,27 +965,15 @@ template class PersistentRooted : public js::PersistentRootedBase, private mozilla::LinkedListElement> { - typedef mozilla::LinkedListElement> ListBase; + using ListBase = mozilla::LinkedListElement>; friend class mozilla::LinkedList; friend class mozilla::LinkedListElement; - friend struct js::gc::PersistentRootedMarker; - - friend void js::gc::FinishPersistentRootedChains(js::RootLists&); - void registerWithRootLists(js::RootLists& roots) { MOZ_ASSERT(!initialized()); JS::RootKind kind = JS::MapTypeToRootKind::kind; roots.heapRoots_[kind].insertBack(reinterpret_cast*>(this)); - // Until marking and destruction support the full set, we assert that - // we don't try to add any unsupported types. - MOZ_ASSERT(kind == JS::RootKind::Object || - kind == JS::RootKind::Script || - kind == JS::RootKind::String || - kind == JS::RootKind::Id || - kind == JS::RootKind::Value || - kind == JS::RootKind::Traceable); } public: @@ -1083,7 +1055,7 @@ class PersistentRooted : public js::PersistentRootedBase, // See the comment above Rooted::ptr. using MaybeWrapped = typename mozilla::Conditional< - mozilla::IsBaseOf::value, + MapTypeToRootKind::kind == JS::RootKind::Traceable, js::DispatchWrapper, T>::Type; diff --git a/js/public/UbiNode.h b/js/public/UbiNode.h index a9bd143d585..0e1a231789d 100644 --- a/js/public/UbiNode.h +++ b/js/public/UbiNode.h @@ -308,7 +308,7 @@ template class ConcreteStackFrame; // valid within the scope of an AutoCheckCannotGC; if the graph being analyzed // is an offline heap snapshot, the JS::ubi::StackFrame is valid as long as the // offline heap snapshot is alive. -class StackFrame : public JS::Traceable { +class StackFrame { // Storage in which we allocate BaseStackFrame subclasses. mozilla::AlignedStorage2 storage; @@ -398,12 +398,6 @@ class StackFrame : public JS::Traceable { size_t sourceLength(); size_t functionDisplayNameLength(); - // JS::Traceable implementation just forwards to our virtual trace method. - static void trace(StackFrame* frame, JSTracer* trc) { - if (frame) - frame->trace(trc); - } - // Methods that forward to virtual calls through BaseStackFrame. void trace(JSTracer* trc) { base()->trace(trc); } diff --git a/js/src/asmjs/AsmJS.cpp b/js/src/asmjs/AsmJS.cpp index d0fe96c6cee..02964e962e6 100644 --- a/js/src/asmjs/AsmJS.cpp +++ b/js/src/asmjs/AsmJS.cpp @@ -4011,8 +4011,7 @@ CheckMathMinMax(FunctionValidator& f, ParseNode* callNode, bool isMax, Type* typ return f.fail(callNode, "Math.min/max must be passed at least 2 arguments"); size_t opcodeAt; - size_t numArgsAt; - if (!f.tempOp(&opcodeAt) || !f.tempU8(&numArgsAt)) + if (!f.tempOp(&opcodeAt)) return false; ParseNode* firstArg = CallArgList(callNode); @@ -4020,28 +4019,31 @@ CheckMathMinMax(FunctionValidator& f, ParseNode* callNode, bool isMax, Type* typ if (!CheckExpr(f, firstArg, &firstType)) return false; + Expr expr; if (firstType.isMaybeDouble()) { *type = Type::Double; firstType = Type::MaybeDouble; - f.patchOp(opcodeAt, isMax ? Expr::F64Max : Expr::F64Min); + expr = isMax ? Expr::F64Max : Expr::F64Min; } else if (firstType.isMaybeFloat()) { *type = Type::Float; firstType = Type::MaybeFloat; - f.patchOp(opcodeAt, isMax ? Expr::F32Max : Expr::F32Min); + expr = isMax ? Expr::F32Max : Expr::F32Min; } else if (firstType.isSigned()) { *type = Type::Signed; firstType = Type::Signed; - f.patchOp(opcodeAt, isMax ? Expr::I32Max : Expr::I32Min); + expr = isMax ? Expr::I32Max : Expr::I32Min; } else { return f.failf(firstArg, "%s is not a subtype of double?, float? or signed", firstType.toChars()); } + f.patchOp(opcodeAt, expr); unsigned numArgs = CallArgListLength(callNode); - f.patchU8(numArgsAt, numArgs); - ParseNode* nextArg = NextNode(firstArg); for (unsigned i = 1; i < numArgs; i++, nextArg = NextNode(nextArg)) { + if (i != numArgs - 1 && !f.writeOp(expr)) + return false; + Type nextType; if (!CheckExpr(f, nextArg, &nextType)) return false; @@ -4564,15 +4566,15 @@ CheckFloatCoercionArg(FunctionValidator& f, ParseNode* inputNode, Type inputType size_t opcodeAt) { if (inputType.isMaybeDouble()) { - f.patchOp(opcodeAt, Expr::F32FromF64); + f.patchOp(opcodeAt, Expr::F32DemoteF64); return true; } if (inputType.isSigned()) { - f.patchOp(opcodeAt, Expr::F32FromS32); + f.patchOp(opcodeAt, Expr::F32ConvertSI32); return true; } if (inputType.isUnsigned()) { - f.patchOp(opcodeAt, Expr::F32FromU32); + f.patchOp(opcodeAt, Expr::F32ConvertUI32); return true; } if (inputType.isFloatish()) { @@ -4820,7 +4822,7 @@ class CheckSimdScalarArgs // We emitted a double literal and actually want a float32. MOZ_ASSERT(patchAt != size_t(-1)); - f.patchOp(patchAt, Expr::F32FromF64); + f.patchOp(patchAt, Expr::F32DemoteF64); return true; } @@ -5411,11 +5413,11 @@ CoerceResult(FunctionValidator& f, ParseNode* expr, ExprType expected, Type actu if (actual.isMaybeDouble()) f.patchOp(patchAt, Expr::Id); else if (actual.isMaybeFloat()) - f.patchOp(patchAt, Expr::F64FromF32); + f.patchOp(patchAt, Expr::F64PromoteF32); else if (actual.isSigned()) - f.patchOp(patchAt, Expr::F64FromS32); + f.patchOp(patchAt, Expr::F64ConvertSI32); else if (actual.isUnsigned()) - f.patchOp(patchAt, Expr::F64FromU32); + f.patchOp(patchAt, Expr::F64ConvertUI32); else return f.failf(expr, "%s is not a subtype of double?, float?, signed or unsigned", actual.toChars()); break; @@ -5631,7 +5633,7 @@ CheckCoerceToInt(FunctionValidator& f, ParseNode* expr, Type* type) return false; if (operandType.isMaybeDouble() || operandType.isMaybeFloat()) { - Expr opcode = operandType.isMaybeDouble() ? Expr::I32SConvertF64 : Expr::I32SConvertF32; + Expr opcode = operandType.isMaybeDouble() ? Expr::I32TruncSF64 : Expr::I32TruncSF32; f.patchOp(opcodeAt, opcode); *type = Type::Signed; return true; diff --git a/js/src/asmjs/Wasm.cpp b/js/src/asmjs/Wasm.cpp index 5d90fbacf48..cd03a5bdb82 100644 --- a/js/src/asmjs/Wasm.cpp +++ b/js/src/asmjs/Wasm.cpp @@ -267,12 +267,36 @@ DecodeBlock(FunctionDecoder& f, ExprType expected) } static bool -DecodeBinaryOperator(FunctionDecoder& f, ExprType expected) +DecodeUnaryOperator(FunctionDecoder& f, ExprType expected, ExprType type) { - return DecodeExpr(f, expected) && + return CheckType(f, type, expected) && DecodeExpr(f, expected); } +static bool +DecodeBinaryOperator(FunctionDecoder& f, ExprType expected, ExprType type) +{ + return CheckType(f, type, expected) && + DecodeExpr(f, type) && + DecodeExpr(f, type); +} + +static bool +DecodeComparisonOperator(FunctionDecoder& f, ExprType expected, ExprType type) +{ + return CheckType(f, ExprType::I32, expected) && + DecodeExpr(f, type) && + DecodeExpr(f, type); +} + +static bool +DecodeConversionOperator(FunctionDecoder& f, ExprType expected, + ExprType dstType, ExprType srcType) +{ + return CheckType(f, dstType, expected) && + DecodeExpr(f, srcType); +} + static bool DecodeExpr(FunctionDecoder& f, ExprType expected) { @@ -295,6 +319,37 @@ DecodeExpr(FunctionDecoder& f, ExprType expected) return DecodeSetLocal(f, expected); case Expr::Block: return DecodeBlock(f, expected); + case Expr::I32Clz: + return DecodeUnaryOperator(f, expected, ExprType::I32); + case Expr::I32Ctz: + return f.fail("NYI: ctz"); + case Expr::I32Popcnt: + return f.fail("NYI: popcnt"); + case Expr::I64Clz: + case Expr::I64Ctz: + case Expr::I64Popcnt: + return f.fail("NYI: i64") && + DecodeUnaryOperator(f, expected, ExprType::I64); + case Expr::F32Abs: + case Expr::F32Neg: + case Expr::F32Ceil: + case Expr::F32Floor: + case Expr::F32Sqrt: + return DecodeUnaryOperator(f, expected, ExprType::F32); + case Expr::F32Trunc: + return f.fail("NYI: trunc"); + case Expr::F32Nearest: + return f.fail("NYI: nearest"); + case Expr::F64Abs: + case Expr::F64Neg: + case Expr::F64Ceil: + case Expr::F64Floor: + case Expr::F64Sqrt: + return DecodeUnaryOperator(f, expected, ExprType::F64); + case Expr::F64Trunc: + return f.fail("NYI: trunc"); + case Expr::F64Nearest: + return f.fail("NYI: nearest"); case Expr::I32Add: case Expr::I32Sub: case Expr::I32Mul: @@ -308,21 +363,122 @@ DecodeExpr(FunctionDecoder& f, ExprType expected) case Expr::I32Shl: case Expr::I32ShrS: case Expr::I32ShrU: + return DecodeBinaryOperator(f, expected, ExprType::I32); + case Expr::I64Add: + case Expr::I64Sub: + case Expr::I64Mul: + case Expr::I64DivS: + case Expr::I64DivU: + case Expr::I64RemS: + case Expr::I64RemU: + case Expr::I64And: + case Expr::I64Or: + case Expr::I64Xor: + case Expr::I64Shl: + case Expr::I64ShrS: + case Expr::I64ShrU: + return f.fail("NYI: i64") && + DecodeBinaryOperator(f, expected, ExprType::I64); case Expr::F32Add: case Expr::F32Sub: case Expr::F32Mul: case Expr::F32Div: case Expr::F32Min: case Expr::F32Max: + return DecodeBinaryOperator(f, expected, ExprType::F32); case Expr::F32CopySign: + return f.fail("NYI: copysign"); case Expr::F64Add: case Expr::F64Sub: case Expr::F64Mul: case Expr::F64Div: case Expr::F64Min: case Expr::F64Max: + return DecodeBinaryOperator(f, expected, ExprType::F64); case Expr::F64CopySign: - return DecodeBinaryOperator(f, expected); + return f.fail("NYI: copysign"); + case Expr::I32Eq: + case Expr::I32Ne: + case Expr::I32LtS: + case Expr::I32LtU: + case Expr::I32LeS: + case Expr::I32LeU: + case Expr::I32GtS: + case Expr::I32GtU: + case Expr::I32GeS: + case Expr::I32GeU: + return DecodeComparisonOperator(f, expected, ExprType::I32); + case Expr::I64Eq: + case Expr::I64Ne: + case Expr::I64LtS: + case Expr::I64LtU: + case Expr::I64LeS: + case Expr::I64LeU: + case Expr::I64GtS: + case Expr::I64GtU: + case Expr::I64GeS: + case Expr::I64GeU: + return f.fail("NYI: i64") && + DecodeComparisonOperator(f, expected, ExprType::I64); + case Expr::F32Eq: + case Expr::F32Ne: + case Expr::F32Lt: + case Expr::F32Le: + case Expr::F32Gt: + case Expr::F32Ge: + return DecodeComparisonOperator(f, expected, ExprType::F32); + case Expr::F64Eq: + case Expr::F64Ne: + case Expr::F64Lt: + case Expr::F64Le: + case Expr::F64Gt: + case Expr::F64Ge: + return DecodeComparisonOperator(f, expected, ExprType::F64); + case Expr::I32WrapI64: + return f.fail("NYI: i64") && + DecodeConversionOperator(f, expected, ExprType::I32, ExprType::I64); + case Expr::I32TruncSF32: + case Expr::I32TruncUF32: + return DecodeConversionOperator(f, expected, ExprType::I32, ExprType::F32); + case Expr::I32ReinterpretF32: + return f.fail("NYI: reinterpret"); + case Expr::I32TruncSF64: + case Expr::I32TruncUF64: + return DecodeConversionOperator(f, expected, ExprType::I32, ExprType::F64); + case Expr::I64ExtendSI32: + case Expr::I64ExtendUI32: + return f.fail("NYI: i64") && + DecodeConversionOperator(f, expected, ExprType::I64, ExprType::I32); + case Expr::I64TruncSF32: + case Expr::I64TruncUF32: + return f.fail("NYI: i64") && + DecodeConversionOperator(f, expected, ExprType::I64, ExprType::F32); + case Expr::I64TruncSF64: + case Expr::I64TruncUF64: + case Expr::I64ReinterpretF64: + return f.fail("NYI: i64") && + DecodeConversionOperator(f, expected, ExprType::I64, ExprType::F64); + case Expr::F32ConvertSI32: + case Expr::F32ConvertUI32: + return DecodeConversionOperator(f, expected, ExprType::F32, ExprType::I32); + case Expr::F32ReinterpretI32: + return f.fail("NYI: reinterpret"); + case Expr::F32ConvertSI64: + case Expr::F32ConvertUI64: + return f.fail("NYI: i64") && + DecodeConversionOperator(f, expected, ExprType::F32, ExprType::I64); + case Expr::F32DemoteF64: + return DecodeConversionOperator(f, expected, ExprType::F32, ExprType::F64); + case Expr::F64ConvertSI32: + case Expr::F64ConvertUI32: + return DecodeConversionOperator(f, expected, ExprType::F64, ExprType::I32); + case Expr::F64ConvertSI64: + case Expr::F64ConvertUI64: + case Expr::F64ReinterpretI64: + return f.fail("NYI: i64") && + DecodeConversionOperator(f, expected, ExprType::F64, ExprType::I64); + case Expr::F64PromoteF32: + return DecodeConversionOperator(f, expected, ExprType::F64, ExprType::F32); default: break; } diff --git a/js/src/asmjs/WasmBinary.h b/js/src/asmjs/WasmBinary.h index 2b70effc5e1..72cc560a9c2 100644 --- a/js/src/asmjs/WasmBinary.h +++ b/js/src/asmjs/WasmBinary.h @@ -71,7 +71,6 @@ enum class Expr : uint16_t CallImport, // Constants and calls - I8Const, I32Const, I64Const, F64Const, @@ -109,6 +108,34 @@ enum class Expr : uint16_t I32Ctz, I32Popcnt, + // I64 opcodes + I64Add, + I64Sub, + I64Mul, + I64DivS, + I64DivU, + I64RemS, + I64RemU, + I64Or, + I64And, + I64Xor, + I64Shl, + I64ShrU, + I64ShrS, + I64Eq, + I64Ne, + I64LtS, + I64LeS, + I64LtU, + I64LeU, + I64GtS, + I64GeS, + I64GtU, + I64GeU, + I64Clz, + I64Ctz, + I64Popcnt, + // F32 opcodes F32Add, F32Sub, @@ -122,7 +149,7 @@ enum class Expr : uint16_t F32Ceil, F32Floor, F32Trunc, - F32NearestInt, + F32Nearest, F32Sqrt, F32Eq, F32Ne, @@ -144,7 +171,7 @@ enum class Expr : uint16_t F64Ceil, F64Floor, F64Trunc, - F64NearestInt, + F64Nearest, F64Sqrt, F64Eq, F64Ne, @@ -154,17 +181,31 @@ enum class Expr : uint16_t F64Ge, // Conversions - I32SConvertF32, - I32SConvertF64, - I32UConvertF32, - I32UConvertF64, - I32ConvertI64, - I64SConvertF32, - I64SConvertF64, - I64UConvertF32, - I64UConvertF64, - I64SConvertI32, - I64UConvertI32, + I32WrapI64, + I64ExtendSI32, + I64ExtendUI32, + I32TruncSF32, + I32TruncSF64, + I32TruncUF32, + I32TruncUF64, + I64TruncSF32, + I64TruncSF64, + I64TruncUF32, + I64TruncUF64, + F32ConvertSI32, + F32ConvertUI32, + F64ConvertSI32, + F64ConvertUI32, + F32ConvertSI64, + F32ConvertUI64, + F64ConvertSI64, + F64ConvertUI64, + F32DemoteF64, + F64PromoteF32, + I32ReinterpretF32, + F32ReinterpretI32, + I64ReinterpretF64, + F64ReinterpretI64, // Load/store operations I32LoadMem8S, @@ -251,10 +292,6 @@ enum class Expr : uint16_t I32Abs, // F32 asm.js opcodes - F32FromF64, - F32FromS32, - F32FromU32, - F32StoreMemF64, // F64 asm.js opcodes @@ -271,10 +308,6 @@ enum class Expr : uint16_t F64Pow, F64Atan2, - F64FromF32, - F64FromS32, - F64FromU32, - F64StoreMemF32, Limit diff --git a/js/src/asmjs/WasmIonCompile.cpp b/js/src/asmjs/WasmIonCompile.cpp index 7eb7ea08290..310f09367d0 100644 --- a/js/src/asmjs/WasmIonCompile.cpp +++ b/js/src/asmjs/WasmIonCompile.cpp @@ -1461,19 +1461,14 @@ typedef bool IsMax; static bool EmitMathMinMax(FunctionCompiler& f, ExprType type, bool isMax, MDefinition** def) { - size_t numArgs = f.readU8(); - MOZ_ASSERT(numArgs >= 2); - MDefinition* lastDef; - if (!EmitExpr(f, type, &lastDef)) + MDefinition* lhs; + if (!EmitExpr(f, type, &lhs)) + return false; + MDefinition* rhs; + if (!EmitExpr(f, type, &rhs)) return false; MIRType mirType = ToMIRType(type); - for (size_t i = 1; i < numArgs; i++) { - MDefinition* next; - if (!EmitExpr(f, type, &next)) - return false; - lastDef = f.minMax(lastDef, next, mirType, isMax); - } - *def = lastDef; + *def = f.minMax(lhs, rhs, mirType, isMax); return true; } @@ -2726,9 +2721,11 @@ EmitExpr(FunctionCompiler& f, ExprType type, MDefinition** def, LabelVector* may return EmitMathMinMax(f, ExprType::I32, IsMax(true), def); case Expr::I32Not: return EmitUnary(f, ExprType::I32, def); - case Expr::I32SConvertF32: + case Expr::I32TruncSF32: + case Expr::I32TruncUF32: return EmitUnary(f, ExprType::F32, def); - case Expr::I32SConvertF64: + case Expr::I32TruncSF64: + case Expr::I32TruncUF64: return EmitUnary(f, ExprType::F64, def); case Expr::I32Clz: return EmitUnary(f, ExprType::I32, def); @@ -2823,11 +2820,11 @@ EmitExpr(FunctionCompiler& f, ExprType type, MDefinition** def, LabelVector* may case Expr::F32Ceil: case Expr::F32Floor: return EmitF32MathBuiltinCall(f, op, def); - case Expr::F32FromF64: + case Expr::F32DemoteF64: return EmitUnary(f, ExprType::F64, def); - case Expr::F32FromS32: + case Expr::F32ConvertSI32: return EmitUnary(f, ExprType::I32, def); - case Expr::F32FromU32: + case Expr::F32ConvertUI32: return EmitUnary(f, ExprType::I32, def); case Expr::F32LoadMem: return EmitLoadArray(f, Scalar::Float32, def); @@ -2871,11 +2868,11 @@ EmitExpr(FunctionCompiler& f, ExprType type, MDefinition** def, LabelVector* may case Expr::F64Pow: case Expr::F64Atan2: return EmitF64MathBuiltinCall(f, op, def); - case Expr::F64FromF32: + case Expr::F64PromoteF32: return EmitUnary(f, ExprType::F32, def); - case Expr::F64FromS32: + case Expr::F64ConvertSI32: return EmitUnary(f, ExprType::I32, def); - case Expr::F64FromU32: + case Expr::F64ConvertUI32: return EmitUnary(f, ExprType::I32, def); case Expr::F64LoadMem: return EmitLoadArray(f, Scalar::Float64, def); @@ -2911,25 +2908,30 @@ EmitExpr(FunctionCompiler& f, ExprType type, MDefinition** def, LabelVector* may case Expr::Select: case Expr::Br: case Expr::BrIf: - case Expr::I8Const: case Expr::I32Ctz: case Expr::I32Popcnt: case Expr::F32CopySign: case Expr::F32Trunc: - case Expr::F32NearestInt: + case Expr::F32Nearest: case Expr::F64CopySign: - case Expr::F64NearestInt: + case Expr::F64Nearest: case Expr::F64Trunc: - case Expr::I32UConvertF32: - case Expr::I32UConvertF64: - case Expr::I32ConvertI64: + case Expr::I32WrapI64: case Expr::I64Const: - case Expr::I64SConvertI32: - case Expr::I64UConvertI32: - case Expr::I64SConvertF32: - case Expr::I64SConvertF64: - case Expr::I64UConvertF32: - case Expr::I64UConvertF64: + case Expr::I64ExtendSI32: + case Expr::I64ExtendUI32: + case Expr::I64TruncSF32: + case Expr::I64TruncSF64: + case Expr::I64TruncUF32: + case Expr::I64TruncUF64: + case Expr::F32ConvertSI64: + case Expr::F32ConvertUI64: + case Expr::F64ConvertSI64: + case Expr::F64ConvertUI64: + case Expr::I64ReinterpretF64: + case Expr::F64ReinterpretI64: + case Expr::I32ReinterpretF32: + case Expr::F32ReinterpretI32: case Expr::I64LoadMem8S: case Expr::I64LoadMem16S: case Expr::I64LoadMem32S: @@ -2941,6 +2943,32 @@ EmitExpr(FunctionCompiler& f, ExprType type, MDefinition** def, LabelVector* may case Expr::I64StoreMem16: case Expr::I64StoreMem32: case Expr::I64StoreMem: + case Expr::I64Clz: + case Expr::I64Ctz: + case Expr::I64Popcnt: + case Expr::I64Add: + case Expr::I64Sub: + case Expr::I64Mul: + case Expr::I64DivS: + case Expr::I64DivU: + case Expr::I64RemS: + case Expr::I64RemU: + case Expr::I64Or: + case Expr::I64And: + case Expr::I64Xor: + case Expr::I64Shl: + case Expr::I64ShrU: + case Expr::I64ShrS: + case Expr::I64Eq: + case Expr::I64Ne: + case Expr::I64LtS: + case Expr::I64LeS: + case Expr::I64LtU: + case Expr::I64LeU: + case Expr::I64GtS: + case Expr::I64GeS: + case Expr::I64GtU: + case Expr::I64GeU: MOZ_CRASH("NYI"); case Expr::Unreachable: break; diff --git a/js/src/asmjs/WasmText.cpp b/js/src/asmjs/WasmText.cpp index 7c75a7c9cd3..f65ee64d410 100644 --- a/js/src/asmjs/WasmText.cpp +++ b/js/src/asmjs/WasmText.cpp @@ -96,10 +96,13 @@ enum class WasmAstExprKind BinaryOperator, Block, Call, + ComparisonOperator, Const, + ConversionOperator, GetLocal, Nop, - SetLocal + SetLocal, + UnaryOperator, }; class WasmAstExpr : public WasmAstNode @@ -312,6 +315,22 @@ class WasmAstModule : public WasmAstNode } }; +class WasmAstUnaryOperator final : public WasmAstExpr +{ + Expr expr_; + WasmAstExpr* op_; + + public: + static const WasmAstExprKind Kind = WasmAstExprKind::UnaryOperator; + explicit WasmAstUnaryOperator(Expr expr, WasmAstExpr* op) + : WasmAstExpr(Kind), + expr_(expr), op_(op) + {} + + Expr expr() const { return expr_; } + WasmAstExpr* op() const { return op_; } +}; + class WasmAstBinaryOperator final : public WasmAstExpr { Expr expr_; @@ -330,6 +349,40 @@ class WasmAstBinaryOperator final : public WasmAstExpr WasmAstExpr* rhs() const { return rhs_; } }; +class WasmAstComparisonOperator final : public WasmAstExpr +{ + Expr expr_; + WasmAstExpr* lhs_; + WasmAstExpr* rhs_; + + public: + static const WasmAstExprKind Kind = WasmAstExprKind::ComparisonOperator; + explicit WasmAstComparisonOperator(Expr expr, WasmAstExpr* lhs, WasmAstExpr* rhs) + : WasmAstExpr(Kind), + expr_(expr), lhs_(lhs), rhs_(rhs) + {} + + Expr expr() const { return expr_; } + WasmAstExpr* lhs() const { return lhs_; } + WasmAstExpr* rhs() const { return rhs_; } +}; + +class WasmAstConversionOperator final : public WasmAstExpr +{ + Expr expr_; + WasmAstExpr* op_; + + public: + static const WasmAstExprKind Kind = WasmAstExprKind::ConversionOperator; + explicit WasmAstConversionOperator(Expr expr, WasmAstExpr* op) + : WasmAstExpr(Kind), + expr_(expr), op_(op) + {} + + Expr expr() const { return expr_; } + WasmAstExpr* op() const { return op_; } +}; + /*****************************************************************************/ // wasm text token stream @@ -343,7 +396,9 @@ class WasmToken Call, CallImport, CloseParen, + ComparisonOpcode, Const, + ConversionOpcode, EndOfFile, Error, Export, @@ -360,6 +415,7 @@ class WasmToken Result, SetLocal, Text, + UnaryOpcode, ValueType }; private: @@ -404,7 +460,8 @@ class WasmToken end_(end) { MOZ_ASSERT(begin != end); - MOZ_ASSERT(kind_ == BinaryOpcode); + MOZ_ASSERT(kind_ == UnaryOpcode || kind_ == BinaryOpcode || kind_ == ComparisonOpcode || + kind_ == ConversionOpcode); u.expr_ = expr; } explicit WasmToken(const char16_t* begin) @@ -437,7 +494,8 @@ class WasmToken return u.valueType_; } Expr expr() const { - MOZ_ASSERT(kind_ == BinaryOpcode); + MOZ_ASSERT(kind_ == UnaryOpcode || kind_ == BinaryOpcode || kind_ == ComparisonOpcode || + kind_ == ConversionOpcode); return u.expr_; } }; @@ -517,9 +575,10 @@ class WasmTokenStream if (cur_ == end_) return WasmToken(WasmToken::EndOfFile, cur_, cur_); - const char16_t* begin = cur_++; + const char16_t* begin = cur_; switch (*begin) { case '"': + cur_++; do { if (cur_ == end_) return fail(begin); @@ -527,19 +586,22 @@ class WasmTokenStream return WasmToken(WasmToken::Text, begin, cur_); case '$': + cur_++; while (cur_ != end_ && IsNameAfterDollar(*cur_)) cur_++; return WasmToken(WasmToken::Name, begin, cur_); case '(': + cur_++; return WasmToken(WasmToken::OpenParen, begin, cur_); case ')': + cur_++; return WasmToken(WasmToken::CloseParen, begin, cur_); case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { - CheckedInt u32 = *begin - '0'; + CheckedInt u32 = 0; while (cur_ != end_ && IsWasmDigit(*cur_)) { u32 *= 10; u32 += *cur_ - '0'; @@ -551,12 +613,12 @@ class WasmTokenStream } case 'b': - if (consume(MOZ_UTF16("lock"))) + if (consume(MOZ_UTF16("block"))) return WasmToken(WasmToken::Block, begin, cur_); break; case 'c': - if (consume(MOZ_UTF16("all"))) { + if (consume(MOZ_UTF16("call"))) { if (consume(MOZ_UTF16("_import"))) return WasmToken(WasmToken::CallImport, begin, cur_); return WasmToken(WasmToken::Call, begin, cur_); @@ -564,33 +626,66 @@ class WasmTokenStream break; case 'e': - if (consume(MOZ_UTF16("xport"))) + if (consume(MOZ_UTF16("export"))) return WasmToken(WasmToken::Export, begin, cur_); break; case 'f': - if (consume(MOZ_UTF16("unc"))) + if (consume(MOZ_UTF16("func"))) return WasmToken(WasmToken::Func, begin, cur_); - if (consume(MOZ_UTF16("32"))) { + if (consume(MOZ_UTF16("f32"))) { if (!consume(MOZ_UTF16("."))) return WasmToken(WasmToken::ValueType, ValType::F32, begin, cur_); switch (*cur_) { case 'a': + if (consume(MOZ_UTF16("abs"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F32Abs, begin, cur_); if (consume(MOZ_UTF16("add"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F32Add, begin, cur_); break; case 'c': + if (consume(MOZ_UTF16("ceil"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F32Ceil, begin, cur_); if (consume(MOZ_UTF16("const"))) return WasmToken(WasmToken::Const, ValType::F32, begin, cur_); + if (consume(MOZ_UTF16("convert_s/i32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::F32ConvertSI32, + begin, cur_); + if (consume(MOZ_UTF16("convert_u/i32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::F32ConvertUI32, + begin, cur_); if (consume(MOZ_UTF16("copysign"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F32CopySign, begin, cur_); break; case 'd': + if (consume(MOZ_UTF16("demote/f64"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::F32DemoteF64, + begin, cur_); if (consume(MOZ_UTF16("div"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F32Div, begin, cur_); break; + case 'e': + if (consume(MOZ_UTF16("eq"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F32Eq, begin, cur_); + break; + case 'f': + if (consume(MOZ_UTF16("floor"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F32Floor, begin, cur_); + break; + case 'g': + if (consume(MOZ_UTF16("ge"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F32Ge, begin, cur_); + if (consume(MOZ_UTF16("gt"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F32Gt, begin, cur_); + break; + case 'l': + if (consume(MOZ_UTF16("le"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F32Le, begin, cur_); + if (consume(MOZ_UTF16("lt"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F32Lt, begin, cur_); + break; case 'm': if (consume(MOZ_UTF16("max"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F32Max, begin, cur_); @@ -599,25 +694,54 @@ class WasmTokenStream if (consume(MOZ_UTF16("mul"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F32Mul, begin, cur_); break; + case 'n': + if (consume(MOZ_UTF16("nearest"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F32Nearest, begin, cur_); + if (consume(MOZ_UTF16("neg"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F32Neg, begin, cur_); + if (consume(MOZ_UTF16("ne"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F32Ne, begin, cur_); + break; + case 'r': + if (consume(MOZ_UTF16("reinterpret/i32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::F32ReinterpretI32, + begin, cur_); + break; case 's': + if (consume(MOZ_UTF16("sqrt"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F32Sqrt, begin, cur_); if (consume(MOZ_UTF16("sub"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F32Sub, begin, cur_); break; + case 't': + if (consume(MOZ_UTF16("trunc"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F32Trunc, begin, cur_); + break; } break; } - if (consume(MOZ_UTF16("64"))) { + if (consume(MOZ_UTF16("f64"))) { if (!consume(MOZ_UTF16("."))) return WasmToken(WasmToken::ValueType, ValType::F64, begin, cur_); switch (*cur_) { case 'a': + if (consume(MOZ_UTF16("abs"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F64Abs, begin, cur_); if (consume(MOZ_UTF16("add"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F64Add, begin, cur_); break; case 'c': + if (consume(MOZ_UTF16("ceil"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F64Ceil, begin, cur_); if (consume(MOZ_UTF16("const"))) return WasmToken(WasmToken::Const, ValType::F64, begin, cur_); + if (consume(MOZ_UTF16("convert_s/i32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::F64ConvertSI32, + begin, cur_); + if (consume(MOZ_UTF16("convert_u/i32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::F64ConvertUI32, + begin, cur_); if (consume(MOZ_UTF16("copysign"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F64CopySign, begin, cur_); break; @@ -625,6 +749,26 @@ class WasmTokenStream if (consume(MOZ_UTF16("div"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F64Div, begin, cur_); break; + case 'e': + if (consume(MOZ_UTF16("eq"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F64Eq, begin, cur_); + break; + case 'f': + if (consume(MOZ_UTF16("floor"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F64Floor, begin, cur_); + break; + case 'g': + if (consume(MOZ_UTF16("ge"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F64Ge, begin, cur_); + if (consume(MOZ_UTF16("gt"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F64Gt, begin, cur_); + break; + case 'l': + if (consume(MOZ_UTF16("le"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F64Le, begin, cur_); + if (consume(MOZ_UTF16("lt"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F64Lt, begin, cur_); + break; case 'm': if (consume(MOZ_UTF16("max"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F64Max, begin, cur_); @@ -633,21 +777,41 @@ class WasmTokenStream if (consume(MOZ_UTF16("mul"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F64Mul, begin, cur_); break; + case 'n': + if (consume(MOZ_UTF16("nearest"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F64Nearest, begin, cur_); + if (consume(MOZ_UTF16("neg"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F64Neg, begin, cur_); + if (consume(MOZ_UTF16("ne"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::F64Ne, begin, cur_); + break; + case 'p': + if (consume(MOZ_UTF16("promote/f32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::F64PromoteF32, + begin, cur_); + break; case 's': + if (consume(MOZ_UTF16("sqrt"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F64Sqrt, begin, cur_); if (consume(MOZ_UTF16("sub"))) return WasmToken(WasmToken::BinaryOpcode, Expr::F64Sub, begin, cur_); break; + case 't': + if (consume(MOZ_UTF16("trunc"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::F64Trunc, begin, cur_); + break; } + break; } break; case 'g': - if (consume(MOZ_UTF16("et_local"))) + if (consume(MOZ_UTF16("get_local"))) return WasmToken(WasmToken::GetLocal, begin, cur_); break; case 'i': - if (consume(MOZ_UTF16("32"))) { + if (consume(MOZ_UTF16("i32"))) { if (!consume(MOZ_UTF16("."))) return WasmToken(WasmToken::ValueType, ValType::I32, begin, cur_); @@ -661,6 +825,10 @@ class WasmTokenStream case 'c': if (consume(MOZ_UTF16("const"))) return WasmToken(WasmToken::Const, ValType::I32, begin, cur_); + if (consume(MOZ_UTF16("clz"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::I32Clz, begin, cur_); + if (consume(MOZ_UTF16("ctz"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::I32Ctz, begin, cur_); break; case 'd': if (consume(MOZ_UTF16("div_s"))) @@ -668,15 +836,50 @@ class WasmTokenStream if (consume(MOZ_UTF16("div_u"))) return WasmToken(WasmToken::BinaryOpcode, Expr::I32DivU, begin, cur_); break; + case 'e': + if (consume(MOZ_UTF16("eq"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I32Eq, begin, cur_); + break; + case 'g': + if (consume(MOZ_UTF16("ge_s"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I32GeS, begin, cur_); + if (consume(MOZ_UTF16("ge_u"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I32GeU, begin, cur_); + if (consume(MOZ_UTF16("gt_s"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I32GtS, begin, cur_); + if (consume(MOZ_UTF16("gt_u"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I32GtU, begin, cur_); + break; + case 'l': + if (consume(MOZ_UTF16("le_s"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I32LeS, begin, cur_); + if (consume(MOZ_UTF16("le_u"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I32LeU, begin, cur_); + if (consume(MOZ_UTF16("lt_s"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I32LtS, begin, cur_); + if (consume(MOZ_UTF16("lt_u"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I32LtU, begin, cur_); + break; case 'm': if (consume(MOZ_UTF16("mul"))) return WasmToken(WasmToken::BinaryOpcode, Expr::I32Mul, begin, cur_); break; + case 'n': + if (consume(MOZ_UTF16("ne"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I32Ne, begin, cur_); + break; case 'o': if (consume(MOZ_UTF16("or"))) return WasmToken(WasmToken::BinaryOpcode, Expr::I32Or, begin, cur_); break; + case 'p': + if (consume(MOZ_UTF16("popcnt"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::I32Popcnt, begin, cur_); + break; case 'r': + if (consume(MOZ_UTF16("reinterpret/f32"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::I32ReinterpretF32, + begin, cur_); if (consume(MOZ_UTF16("rem_s"))) return WasmToken(WasmToken::BinaryOpcode, Expr::I32RemS, begin, cur_); if (consume(MOZ_UTF16("rem_u"))) @@ -692,6 +895,25 @@ class WasmTokenStream if (consume(MOZ_UTF16("shr_u"))) return WasmToken(WasmToken::BinaryOpcode, Expr::I32ShrU, begin, cur_); break; + case 't': + if (consume(MOZ_UTF16("trunc_s/f32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I32TruncSF32, + begin, cur_); + if (consume(MOZ_UTF16("trunc_s/f64"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I32TruncSF64, + begin, cur_); + if (consume(MOZ_UTF16("trunc_u/f32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I32TruncUF32, + begin, cur_); + if (consume(MOZ_UTF16("trunc_u/f64"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I32TruncUF64, + begin, cur_); + break; + case 'w': + if (consume(MOZ_UTF16("wrap/i64"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I32WrapI64, + begin, cur_); + break; case 'x': if (consume(MOZ_UTF16("xor"))) return WasmToken(WasmToken::BinaryOpcode, Expr::I32Xor, begin, cur_); @@ -699,49 +921,148 @@ class WasmTokenStream } break; } - if (consume(MOZ_UTF16("64"))) { + if (consume(MOZ_UTF16("i64"))) { if (!consume(MOZ_UTF16("."))) return WasmToken(WasmToken::ValueType, ValType::I64, begin, cur_); switch (*cur_) { + case 'a': + if (consume(MOZ_UTF16("add"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64Add, begin, cur_); + if (consume(MOZ_UTF16("and"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64And, begin, cur_); + break; case 'c': if (consume(MOZ_UTF16("const"))) return WasmToken(WasmToken::Const, ValType::I64, begin, cur_); + if (consume(MOZ_UTF16("clz"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::I64Clz, begin, cur_); + if (consume(MOZ_UTF16("ctz"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::I64Ctz, begin, cur_); + break; + case 'd': + if (consume(MOZ_UTF16("div_s"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64DivS, begin, cur_); + if (consume(MOZ_UTF16("div_u"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64DivU, begin, cur_); + break; + case 'e': + if (consume(MOZ_UTF16("eq"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I64Eq, begin, cur_); + if (consume(MOZ_UTF16("extend_s/i32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I64ExtendSI32, + begin, cur_); + if (consume(MOZ_UTF16("extend_u/i32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I64ExtendUI32, + begin, cur_); + break; + case 'g': + if (consume(MOZ_UTF16("ge_s"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I64GeS, begin, cur_); + if (consume(MOZ_UTF16("ge_u"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I64GeU, begin, cur_); + if (consume(MOZ_UTF16("gt_s"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I64GtS, begin, cur_); + if (consume(MOZ_UTF16("gt_u"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I64GtU, begin, cur_); + break; + case 'l': + if (consume(MOZ_UTF16("le_s"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I64LeS, begin, cur_); + if (consume(MOZ_UTF16("le_u"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I64LeU, begin, cur_); + if (consume(MOZ_UTF16("lt_s"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I64LtS, begin, cur_); + if (consume(MOZ_UTF16("lt_u"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I64LtU, begin, cur_); + break; + case 'm': + if (consume(MOZ_UTF16("mul"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64Mul, begin, cur_); + break; + case 'n': + if (consume(MOZ_UTF16("ne"))) + return WasmToken(WasmToken::ComparisonOpcode, Expr::I64Ne, begin, cur_); + break; + case 'o': + if (consume(MOZ_UTF16("or"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64Or, begin, cur_); + break; + case 'p': + if (consume(MOZ_UTF16("popcnt"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::I64Popcnt, begin, cur_); + break; + case 'r': + if (consume(MOZ_UTF16("reinterpret/f64"))) + return WasmToken(WasmToken::UnaryOpcode, Expr::I64ReinterpretF64, + begin, cur_); + if (consume(MOZ_UTF16("rem_s"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64RemS, begin, cur_); + if (consume(MOZ_UTF16("rem_u"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64RemU, begin, cur_); + break; + case 's': + if (consume(MOZ_UTF16("sub"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64Sub, begin, cur_); + if (consume(MOZ_UTF16("shl"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64Shl, begin, cur_); + if (consume(MOZ_UTF16("shr_s"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64ShrS, begin, cur_); + if (consume(MOZ_UTF16("shr_u"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64ShrU, begin, cur_); + break; + case 't': + if (consume(MOZ_UTF16("trunc_s/f32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I64TruncSF32, + begin, cur_); + if (consume(MOZ_UTF16("trunc_s/f64"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I64TruncSF64, + begin, cur_); + if (consume(MOZ_UTF16("trunc_u/f32"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I64TruncUF32, + begin, cur_); + if (consume(MOZ_UTF16("trunc_u/f64"))) + return WasmToken(WasmToken::ConversionOpcode, Expr::I64TruncUF64, + begin, cur_); + break; + case 'x': + if (consume(MOZ_UTF16("xor"))) + return WasmToken(WasmToken::BinaryOpcode, Expr::I64Xor, begin, cur_); break; } break; } - if (consume(MOZ_UTF16("mport"))) + if (consume(MOZ_UTF16("import"))) return WasmToken(WasmToken::Import, begin, cur_); break; case 'l': - if (consume(MOZ_UTF16("ocal"))) + if (consume(MOZ_UTF16("local"))) return WasmToken(WasmToken::Local, begin, cur_); break; case 'm': - if (consume(MOZ_UTF16("odule"))) + if (consume(MOZ_UTF16("module"))) return WasmToken(WasmToken::Module, begin, cur_); break; case 'n': - if (consume(MOZ_UTF16("op"))) + if (consume(MOZ_UTF16("nop"))) return WasmToken(WasmToken::Nop, begin, cur_); break; case 'p': - if (consume(MOZ_UTF16("aram"))) + if (consume(MOZ_UTF16("param"))) return WasmToken(WasmToken::Param, begin, cur_); break; case 'r': - if (consume(MOZ_UTF16("esult"))) + if (consume(MOZ_UTF16("result"))) return WasmToken(WasmToken::Result, begin, cur_); break; case 's': - if (consume(MOZ_UTF16("et_local"))) + if (consume(MOZ_UTF16("set_local"))) return WasmToken(WasmToken::SetLocal, begin, cur_); break; @@ -922,6 +1243,16 @@ ParseSetLocal(WasmParseContext& c) return new(c.lifo) WasmAstSetLocal(localIndex.integer(), *value); } +static WasmAstUnaryOperator* +ParseUnaryOperator(WasmParseContext& c, Expr expr) +{ + WasmAstExpr* op = ParseExpr(c); + if (!op) + return nullptr; + + return new(c.lifo) WasmAstUnaryOperator(expr, op); +} + static WasmAstBinaryOperator* ParseBinaryOperator(WasmParseContext& c, Expr expr) { @@ -936,6 +1267,30 @@ ParseBinaryOperator(WasmParseContext& c, Expr expr) return new(c.lifo) WasmAstBinaryOperator(expr, lhs, rhs); } +static WasmAstComparisonOperator* +ParseComparisonOperator(WasmParseContext& c, Expr expr) +{ + WasmAstExpr* lhs = ParseExpr(c); + if (!lhs) + return nullptr; + + WasmAstExpr* rhs = ParseExpr(c); + if (!rhs) + return nullptr; + + return new(c.lifo) WasmAstComparisonOperator(expr, lhs, rhs); +} + +static WasmAstConversionOperator* +ParseConversionOperator(WasmParseContext& c, Expr expr) +{ + WasmAstExpr* op = ParseExpr(c); + if (!op) + return nullptr; + + return new(c.lifo) WasmAstConversionOperator(expr, op); +} + static WasmAstExpr* ParseExprInsideParens(WasmParseContext& c) { @@ -952,12 +1307,18 @@ ParseExprInsideParens(WasmParseContext& c) return ParseCall(c, Expr::Call); case WasmToken::CallImport: return ParseCall(c, Expr::CallImport); + case WasmToken::ComparisonOpcode: + return ParseComparisonOperator(c, token.expr()); case WasmToken::Const: return ParseConst(c, token); + case WasmToken::ConversionOpcode: + return ParseConversionOperator(c, token.expr()); case WasmToken::GetLocal: return ParseGetLocal(c); case WasmToken::SetLocal: return ParseSetLocal(c); + case WasmToken::UnaryOpcode: + return ParseUnaryOperator(c, token.expr()); default: c.ts.generateError(token, c.error); return nullptr; @@ -1205,6 +1566,13 @@ EncodeSetLocal(Encoder& e, WasmAstSetLocal& sl) EncodeExpr(e, sl.value()); } +static bool +EncodeUnaryOperator(Encoder& e, WasmAstUnaryOperator& b) +{ + return e.writeExpr(b.expr()) && + EncodeExpr(e, *b.op()); +} + static bool EncodeBinaryOperator(Encoder& e, WasmAstBinaryOperator& b) { @@ -1213,6 +1581,21 @@ EncodeBinaryOperator(Encoder& e, WasmAstBinaryOperator& b) EncodeExpr(e, *b.rhs()); } +static bool +EncodeComparisonOperator(Encoder& e, WasmAstComparisonOperator& b) +{ + return e.writeExpr(b.expr()) && + EncodeExpr(e, *b.lhs()) && + EncodeExpr(e, *b.rhs()); +} + +static bool +EncodeConversionOperator(Encoder& e, WasmAstConversionOperator& b) +{ + return e.writeExpr(b.expr()) && + EncodeExpr(e, *b.op()); +} + static bool EncodeExpr(Encoder& e, WasmAstExpr& expr) { @@ -1225,12 +1608,18 @@ EncodeExpr(Encoder& e, WasmAstExpr& expr) return EncodeBlock(e, expr.as()); case WasmAstExprKind::Call: return EncodeCall(e, expr.as()); + case WasmAstExprKind::ComparisonOperator: + return EncodeComparisonOperator(e, expr.as()); case WasmAstExprKind::Const: return EncodeConst(e, expr.as()); + case WasmAstExprKind::ConversionOperator: + return EncodeConversionOperator(e, expr.as()); case WasmAstExprKind::GetLocal: return EncodeGetLocal(e, expr.as()); case WasmAstExprKind::SetLocal: return EncodeSetLocal(e, expr.as()); + case WasmAstExprKind::UnaryOperator: + return EncodeUnaryOperator(e, expr.as()); default:; } MOZ_CRASH("Bad expr kind"); diff --git a/js/src/builtin/MapObject.h b/js/src/builtin/MapObject.h index 1118675f873..a3d57f7dd37 100644 --- a/js/src/builtin/MapObject.h +++ b/js/src/builtin/MapObject.h @@ -22,7 +22,7 @@ namespace js { * * All values except ropes are hashable as-is. */ -class HashableValue : public JS::Traceable +class HashableValue { PreBarrieredValue value; @@ -43,8 +43,8 @@ class HashableValue : public JS::Traceable HashableValue mark(JSTracer* trc) const; Value get() const { return value.get(); } - static void trace(HashableValue* value, JSTracer* trc) { - TraceEdge(trc, &value->value, "HashableValue"); + void trace(JSTracer* trc) { + TraceEdge(trc, &value, "HashableValue"); } }; diff --git a/js/src/configure.in b/js/src/configure.in index d19859761bf..8bb39f0276e 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -383,8 +383,6 @@ case "$target" in _CC_SUITE=14 MSVC_C_RUNTIME_DLL=vcruntime140.dll MSVC_CXX_RUNTIME_DLL=msvcp140.dll - MSVC_APPCRT_DLL=appcrt140.dll - MSVC_DESKTOPCRT_DLL=desktopcrt140.dll # -Wv:18 disables all warnings introduced after VS2013 # See http://blogs.msdn.com/b/vcblog/archive/2014/11/12/improvements-to-warnings-in-the-c-compiler.aspx @@ -402,8 +400,6 @@ case "$target" in fi AC_SUBST(MSVC_C_RUNTIME_DLL) AC_SUBST(MSVC_CXX_RUNTIME_DLL) - AC_SUBST(MSVC_APPCRT_DLL) - AC_SUBST(MSVC_DESKTOPCRT_DLL) dnl Ensure that mt.exe is 'Microsoft (R) Manifest Tool', dnl not something else like "magnetic tape manipulation utility". diff --git a/js/src/ctypes/libffi/msvcc.sh b/js/src/ctypes/libffi/msvcc.sh index 65fbfef7e35..1621e5f0e8b 100755 --- a/js/src/ctypes/libffi/msvcc.sh +++ b/js/src/ctypes/libffi/msvcc.sh @@ -70,7 +70,6 @@ do ;; -clang-cl) cl="clang-cl" - safeseh= shift 1 ;; -O0) diff --git a/js/src/ds/TraceableFifo.h b/js/src/ds/TraceableFifo.h index e6b20a593ac..3176e3e3ea7 100644 --- a/js/src/ds/TraceableFifo.h +++ b/js/src/ds/TraceableFifo.h @@ -31,9 +31,7 @@ namespace js { template -class TraceableFifo - : public js::Fifo, - public JS::Traceable +class TraceableFifo : public js::Fifo { using Base = js::Fifo; @@ -46,11 +44,11 @@ class TraceableFifo TraceableFifo(const TraceableFifo&) = delete; TraceableFifo& operator=(const TraceableFifo&) = delete; - static void trace(TraceableFifo* tf, JSTracer* trc) { - for (size_t i = 0; i < tf->front_.length(); ++i) - GCPolicy::trace(trc, &tf->front_[i], "fifo element"); - for (size_t i = 0; i < tf->rear_.length(); ++i) - GCPolicy::trace(trc, &tf->rear_[i], "fifo element"); + void trace(JSTracer* trc) { + for (size_t i = 0; i < this->front_.length(); ++i) + GCPolicy::trace(trc, &this->front_[i], "fifo element"); + for (size_t i = 0; i < this->rear_.length(); ++i) + GCPolicy::trace(trc, &this->rear_[i], "fifo element"); } }; diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index 482edf574a4..30660c59ce6 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -5383,15 +5383,17 @@ BytecodeEmitter::emitHoistedFunctionsInList(ParseNode* list) MOZ_ASSERT(list->pn_xflags & PNX_FUNCDEFS); for (ParseNode* pn = list->pn_head; pn; pn = pn->pn_next) { + ParseNode* maybeFun = pn; + if (!sc->strict()) { - while (pn->isKind(PNK_LABEL)) - pn = pn->as().statement(); + while (maybeFun->isKind(PNK_LABEL)) + maybeFun = maybeFun->as().statement(); } - if (pn->isKind(PNK_ANNEXB_FUNCTION) || - (pn->isKind(PNK_FUNCTION) && pn->functionIsHoisted())) + if (maybeFun->isKind(PNK_ANNEXB_FUNCTION) || + (maybeFun->isKind(PNK_FUNCTION) && maybeFun->functionIsHoisted())) { - if (!emitTree(pn)) + if (!emitTree(maybeFun)) return false; } } diff --git a/js/src/gc/GCInternals.h b/js/src/gc/GCInternals.h index 03124f86fdf..ebfdda69fb1 100644 --- a/js/src/gc/GCInternals.h +++ b/js/src/gc/GCInternals.h @@ -19,9 +19,6 @@ namespace js { namespace gc { -void -MarkPersistentRootedChains(JSTracer* trc); - class MOZ_RAII AutoCopyFreeListToArenas { JSRuntime* runtime; diff --git a/js/src/gc/RootMarking.cpp b/js/src/gc/RootMarking.cpp index a7efbb8c8f5..2bacce9ffa2 100644 --- a/js/src/gc/RootMarking.cpp +++ b/js/src/gc/RootMarking.cpp @@ -42,7 +42,19 @@ typedef RootedValueMap::Enum RootEnum; template using TraceFunction = void (*)(JSTracer* trc, T* ref, const char* name); -template TraceFn = TraceNullableRoot> +// For more detail see JS::Rooted::ptr and js::DispatchWrapper. +// +// The JS::RootKind::Traceable list contains a bunch of totally disparate +// types, but the instantiations of DispatchWrapper below need /something/ in +// the type field. We use the following type as a compatible stand-in. No +// actual methods from ConcreteTraceable type are actually used at runtime -- +// the real trace function has been stored inline in the DispatchWrapper. +struct ConcreteTraceable { + ConcreteTraceable() { MOZ_CRASH("instantiation of ConcreteTraceable"); } + void trace(JSTracer*) {} +}; + +template TraceFn = TraceNullableRoot> static inline void MarkExactStackRootList(JSTracer* trc, JS::Rooted* rooter, const char* name) { @@ -62,7 +74,8 @@ JS_FOR_EACH_TRACEKIND(MARK_ROOTS) #undef MARK_ROOTS MarkExactStackRootList(trc, stackRoots_[JS::RootKind::Id], "exact-id"); MarkExactStackRootList(trc, stackRoots_[JS::RootKind::Value], "exact-value"); - MarkExactStackRootList::TraceWrapped>( + MarkExactStackRootList::TraceWrapped>( trc, stackRoots_[JS::RootKind::Traceable], "Traceable"); } @@ -74,6 +87,58 @@ MarkExactStackRoots(JSRuntime* rt, JSTracer* trc) rt->mainThread.roots.traceStackRoots(trc); } +template TraceFn = TraceNullableRoot> +static inline void +MarkPersistentRootedList(JSTracer* trc, mozilla::LinkedList>& list, + const char* name) +{ + for (PersistentRooted* r : list) + TraceFn(trc, reinterpret_cast*>(r)->address(), name); +} + +void +js::RootLists::tracePersistentRoots(JSTracer* trc) +{ +#define MARK_ROOTS(name, type, _) \ + MarkPersistentRootedList(trc, heapRoots_[JS::RootKind::name], "persistent-" #name); +JS_FOR_EACH_TRACEKIND(MARK_ROOTS) +#undef MARK_ROOTS + MarkPersistentRootedList(trc, heapRoots_[JS::RootKind::Id], "persistent-id"); + MarkPersistentRootedList(trc, heapRoots_[JS::RootKind::Value], "persistent-value"); + MarkPersistentRootedList::TraceWrapped>(trc, + heapRoots_[JS::RootKind::Traceable], "persistent-traceable"); +} + +static void +MarkPersistentRooted(JSRuntime* rt, JSTracer* trc) +{ + for (ContextIter cx(rt); !cx.done(); cx.next()) + cx->roots.tracePersistentRoots(trc); + rt->mainThread.roots.tracePersistentRoots(trc); +} + +template +static void +FinishPersistentRootedChain(mozilla::LinkedList>& listArg) +{ + auto& list = reinterpret_cast>&>(listArg); + while (!list.isEmpty()) + list.getFirst()->reset(); +} + +void +js::RootLists::finishPersistentRoots() +{ +#define FINISH_ROOT_LIST(name, type, _) \ + FinishPersistentRootedChain(heapRoots_[JS::RootKind::name]); +JS_FOR_EACH_TRACEKIND(FINISH_ROOT_LIST) +#undef FINISH_ROOT_LIST + FinishPersistentRootedChain(heapRoots_[JS::RootKind::Id]); + FinishPersistentRootedChain(heapRoots_[JS::RootKind::Value]); + FinishPersistentRootedChain(heapRoots_[JS::RootKind::Traceable]); +} + inline void AutoGCRooter::trace(JSTracer* trc) { @@ -199,58 +264,6 @@ PropertyDescriptor::trace(JSTracer* trc) } } -namespace js { -namespace gc { - -template -struct PersistentRootedMarker -{ - typedef PersistentRooted Element; - typedef mozilla::LinkedList List; - typedef void (*MarkFunc)(JSTracer* trc, T* ref, const char* name); - - template TraceFn = TraceNullableRoot> - static void - markChain(JSTracer* trc, List& list, const char* name) - { - for (Element* r : list) - TraceFn(trc, r->address(), name); - } -}; - -} // namespace gc -} // namespace js - -void -js::gc::MarkPersistentRootedChainsInLists(RootLists& roots, JSTracer* trc) -{ - PersistentRootedMarker::markChain(trc, roots.getPersistentRootedList(), - "PersistentRooted"); - PersistentRootedMarker::markChain(trc, roots.getPersistentRootedList(), - "PersistentRooted"); - PersistentRootedMarker::markChain(trc, roots.getPersistentRootedList(), - "PersistentRooted"); - - PersistentRootedMarker::markChain(trc, roots.getPersistentRootedList(), - "PersistentRooted"); - PersistentRootedMarker::markChain(trc, roots.getPersistentRootedList(), - "PersistentRooted"); - - PersistentRootedMarker::markChain< - js::DispatchWrapper::TraceWrapped>(trc, - reinterpret_cast>&>( - roots.heapRoots_[JS::RootKind::Traceable]), - "PersistentRooted"); -} - -void -js::gc::MarkPersistentRootedChains(JSTracer* trc) -{ - for (ContextIter cx(trc->runtime()); !cx.done(); cx.next()) - MarkPersistentRootedChainsInLists(cx->roots, trc); - MarkPersistentRootedChainsInLists(trc->runtime()->mainThread.roots, trc); -} - void js::gc::GCRuntime::markRuntime(JSTracer* trc, TraceOrMarkRuntime traceOrMark) { @@ -280,7 +293,7 @@ js::gc::GCRuntime::markRuntime(JSTracer* trc, TraceOrMarkRuntime traceOrMark) TraceRoot(trc, entry.key(), entry.value()); } - MarkPersistentRootedChains(trc); + MarkPersistentRooted(rt, trc); } if (!rt->isBeingDestroyed() && !rt->isHeapMinorCollecting()) { diff --git a/js/src/jit-test/tests/debug/bug1242798.js b/js/src/jit-test/tests/debug/bug1242798.js new file mode 100644 index 00000000000..8e4b74b2289 --- /dev/null +++ b/js/src/jit-test/tests/debug/bug1242798.js @@ -0,0 +1,14 @@ + +var g = newGlobal(); +var dbg = new Debugger(g); +g.eval("" + function f(c) { + if (c == 0) + return; + if (c == 2) + debugger; + f(c-1); + for (var i = 0; i < 100; i++) + Debugger += newGlobal('#15: myObj.parseFloat !== parseFloat'); +}); +dbg.onDebuggerStatement = function (frame) {}; +g.eval("f(2)"); diff --git a/js/src/jit-test/tests/wasm/basic-conversion.js b/js/src/jit-test/tests/wasm/basic-conversion.js new file mode 100644 index 00000000000..61bb83ed355 --- /dev/null +++ b/js/src/jit-test/tests/wasm/basic-conversion.js @@ -0,0 +1,56 @@ +load(libdir + "wasm.js"); + +if (!wasmIsSupported()) + quit(); + +function mismatchError(actual, expect) { + var str = "type mismatch: expression has type " + actual + " but expected " + expect; + return RegExp(str); +} + +function testConversion(resultType, opcode, paramType, op, expect) { + assertEq(wasmEvalText('(module (func (param ' + paramType + ') (result ' + resultType + ') (' + resultType + '.' + opcode + '/' + paramType + ' (get_local 0))) (export "" 0))')(op), expect); + + // TODO: i64 NYI + for (var bad of ['i32', 'f32', 'f64']) { + if (bad != resultType) + assertErrorMessage(() => wasmEvalText('(module (func (param ' + paramType + ') (result ' + bad + ') (' + resultType + '.' + opcode + '/' + paramType + ' (get_local 0))))'), + TypeError, + mismatchError(resultType, bad) + ); + if (bad != paramType) + assertErrorMessage(() => wasmEvalText('(module (func (param ' + bad + ') (result ' + resultType + ') (' + resultType + '.' + opcode + '/' + paramType + ' (get_local 0))))'), + TypeError, + mismatchError(bad, paramType) + ); + } +} + +//testConversion('i32', 'wrap', 'i64', 4294967336, 40); // TODO: NYI +testConversion('i32', 'trunc_s', 'f32', 40.1, 40); +testConversion('i32', 'trunc_u', 'f32', 40.1, 40); +testConversion('i32', 'trunc_s', 'f64', 40.1, 40); +testConversion('i32', 'trunc_u', 'f64', 40.1, 40); +//testConversion('i32', 'reinterpret', 'f32', 40.1, 1109419622); // TODO: NYI + +//testConversion('i64', 'extend_s', 'i32', -2, -2); / TODO: NYI +//testConversion('i64', 'extend_u', 'i32', -2, 0xfffffffffffffffc); / TODO: NYI +//testConversion('i64', 'trunc_s', 'f32', 40.1, 40); // TODO: NYI +//testConversion('i64', 'trunc_u', 'f32', 40.1, 40); // TODO: NYI +//testConversion('i64', 'trunc_s', 'f64', 40.1, 40); // TODO: NYI +//testConversion('i64', 'trunc_u', 'f64', 40.1, 40); // TODO: NYI +//testConversion('i64', 'reinterpret', 'f64', 40.1, 1109419622); // TODO: NYI + +testConversion('f32', 'convert_s', 'i32', 40, 40); +testConversion('f32', 'convert_u', 'i32', 40, 40); +//testConversion('f32', 'convert_s', 'i64', 40, 40); // TODO: NYI +//testConversion('f32', 'convert_u', 'i64', 40, 40); // TODO: NYI +testConversion('f32', 'demote', 'f64', 40.1, 40.099998474121094); +//testConversion('f32', 'reinterpret', 'i32', 40, 5.605193857299268e-44); // TODO: NYI + +testConversion('f64', 'convert_s', 'i32', 40, 40); +testConversion('f64', 'convert_u', 'i32', 40, 40); +//testConversion('f64', 'convert_s', 'i64', 40, 40); // TODO: NYI +//testConversion('f64', 'convert_u', 'i64', 40, 40); // TODO: NYI +testConversion('f64', 'promote', 'f32', 40.1, 40.099998474121094); +//testConversion('f64', 'reinterpret', 'i64', 40.1, 4630840390592548045); // TODO: NYI diff --git a/js/src/jit-test/tests/wasm/basic-float.js b/js/src/jit-test/tests/wasm/basic-float.js index 61c90acc02b..3f85dc1fcb5 100644 --- a/js/src/jit-test/tests/wasm/basic-float.js +++ b/js/src/jit-test/tests/wasm/basic-float.js @@ -8,29 +8,83 @@ function mismatchError(actual, expect) { return RegExp(str); } +function testUnary(type, opcode, op, expect) { + assertEq(wasmEvalText('(module (func (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (get_local 0))) (export "" 0))')(op), expect); +} + function testBinary(type, opcode, lhs, rhs, expect) { assertEq(wasmEvalText('(module (func (param ' + type + ') (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (get_local 0) (get_local 1))) (export "" 0))')(lhs, rhs), expect); } +function testComparison(type, opcode, lhs, rhs, expect) { + assertEq(wasmEvalText('(module (func (param ' + type + ') (param ' + type + ') (result i32) (' + type + '.' + opcode + ' (get_local 0) (get_local 1))) (export "" 0))')(lhs, rhs), expect); +} + +testUnary('f32', 'abs', -40, 40); +testUnary('f32', 'neg', 40, -40); +testUnary('f32', 'floor', 40.9, 40); +testUnary('f32', 'ceil', 40.1, 41); +//testUnary('f32', 'nearest', -41.5, -42); // TODO: NYI +//testUnary('f32', 'trunc', -41.5, -41); // TODO: NYI +testUnary('f32', 'sqrt', 40, 6.324555397033691); + testBinary('f32', 'add', 40, 2, 42); testBinary('f32', 'sub', 40, 2, 38); testBinary('f32', 'mul', 40, 2, 80); testBinary('f32', 'div', 40, 3, 13.333333015441895); -//testBinary('f32', 'min', 40, 2, 2); // TODO: NYI -//testBinary('f32', 'max', 40, 2, 40); // TODO: NYI +testBinary('f32', 'min', 40, 2, 2); +testBinary('f32', 'max', 40, 2, 40); //testBinary('f32', 'copysign', 40, -2, -40); // TODO: NYI +testComparison('f32', 'eq', 40, 40, 1); +testComparison('f32', 'ne', 40, 40, 0); +testComparison('f32', 'lt', 40, 40, 0); +testComparison('f32', 'le', 40, 40, 1); +testComparison('f32', 'gt', 40, 40, 0); +testComparison('f32', 'ge', 40, 40, 1); + +testUnary('f64', 'abs', -40, 40); +testUnary('f64', 'neg', 40, -40); +testUnary('f64', 'floor', 40.9, 40); +testUnary('f64', 'ceil', 40.1, 41); +//testUnary('f64', 'nearest', -41.5, -42); // TODO: NYI +//testUnary('f64', 'trunc', -41.5, -41); // TODO: NYI +testUnary('f64', 'sqrt', 40, 6.324555320336759); + testBinary('f64', 'add', 40, 2, 42); testBinary('f64', 'sub', 40, 2, 38); testBinary('f64', 'mul', 40, 2, 80); testBinary('f64', 'div', 40, 3, 13.333333333333334); -//testBinary('f64', 'min', 40, 2, 2); // TODO: NYI -//testBinary('f64', 'max', 40, 2, 40); // TODO: NYI +testBinary('f64', 'min', 40, 2, 2); +testBinary('f64', 'max', 40, 2, 40); //testBinary('f64', 'copysign', 40, -2, -40); // TODO: NYI +testComparison('f64', 'eq', 40, 40, 1); +testComparison('f64', 'ne', 40, 40, 0); +testComparison('f64', 'lt', 40, 40, 0); +testComparison('f64', 'le', 40, 40, 1); +testComparison('f64', 'gt', 40, 40, 0); +testComparison('f64', 'ge', 40, 40, 1); + +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (result f32) (f32.sqrt (get_local 0))))'), TypeError, mismatchError("i32", "f32")); +assertErrorMessage(() => wasmEvalText('(module (func (param f32) (result i32) (f32.sqrt (get_local 0))))'), TypeError, mismatchError("f32", "i32")); +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (result i32) (f32.sqrt (get_local 0))))'), TypeError, mismatchError("f32", "i32")); +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (result f64) (f64.sqrt (get_local 0))))'), TypeError, mismatchError("i32", "f64")); +assertErrorMessage(() => wasmEvalText('(module (func (param f64) (result i32) (f64.sqrt (get_local 0))))'), TypeError, mismatchError("f64", "i32")); +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (result i32) (f64.sqrt (get_local 0))))'), TypeError, mismatchError("f64", "i32")); + assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param f32) (result f32) (f32.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f32")); assertErrorMessage(() => wasmEvalText('(module (func (param f32) (param i32) (result f32) (f32.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f32")); assertErrorMessage(() => wasmEvalText('(module (func (param f32) (param f32) (result i32) (f32.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("f32", "i32")); +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param i32) (result i32) (f32.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("f32", "i32")); assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param f64) (result f64) (f64.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f64")); assertErrorMessage(() => wasmEvalText('(module (func (param f64) (param i32) (result f64) (f64.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f64")); assertErrorMessage(() => wasmEvalText('(module (func (param f64) (param f64) (result i32) (f64.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("f64", "i32")); +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param i32) (result i32) (f64.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("f64", "i32")); + +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param f32) (result f32) (f32.eq (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f32")); +assertErrorMessage(() => wasmEvalText('(module (func (param f32) (param i32) (result f32) (f32.eq (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f32")); +assertErrorMessage(() => wasmEvalText('(module (func (param f32) (param f32) (result f32) (f32.eq (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f32")); +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param f64) (result f64) (f64.eq (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f64")); +assertErrorMessage(() => wasmEvalText('(module (func (param f64) (param i32) (result f64) (f64.eq (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f64")); +assertErrorMessage(() => wasmEvalText('(module (func (param f64) (param f64) (result f64) (f64.eq (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f64")); diff --git a/js/src/jit-test/tests/wasm/basic-integer.js b/js/src/jit-test/tests/wasm/basic-integer.js index 1d5ed96600d..99a1c9e7515 100644 --- a/js/src/jit-test/tests/wasm/basic-integer.js +++ b/js/src/jit-test/tests/wasm/basic-integer.js @@ -8,10 +8,22 @@ function mismatchError(actual, expect) { return RegExp(str); } +function testUnary(type, opcode, op, expect) { + assertEq(wasmEvalText('(module (func (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (get_local 0))) (export "" 0))')(op), expect); +} + function testBinary(type, opcode, lhs, rhs, expect) { assertEq(wasmEvalText('(module (func (param ' + type + ') (param ' + type + ') (result ' + type + ') (' + type + '.' + opcode + ' (get_local 0) (get_local 1))) (export "" 0))')(lhs, rhs), expect); } +function testComparison(type, opcode, lhs, rhs, expect) { + assertEq(wasmEvalText('(module (func (param ' + type + ') (param ' + type + ') (result i32) (' + type + '.' + opcode + ' (get_local 0) (get_local 1))) (export "" 0))')(lhs, rhs), expect); +} + +testUnary('i32', 'clz', 40, 26); +//testUnary('i32', 'ctz', 40, 0); // TODO: NYI +//testUnary('i32', 'popcnt', 40, 0); // TODO: NYI + testBinary('i32', 'add', 40, 2, 42); testBinary('i32', 'sub', 40, 2, 38); testBinary('i32', 'mul', 40, 2, 80); @@ -26,6 +38,55 @@ testBinary('i32', 'shl', 40, 2, 160); testBinary('i32', 'shr_s', -40, 2, -10); testBinary('i32', 'shr_u', -40, 2, 1073741814); +testComparison('i32', 'eq', 40, 40, 1); +testComparison('i32', 'ne', 40, 40, 0); +testComparison('i32', 'lt_s', 40, 40, 0); +testComparison('i32', 'lt_u', 40, 40, 0); +testComparison('i32', 'le_s', 40, 40, 1); +testComparison('i32', 'le_u', 40, 40, 1); +testComparison('i32', 'gt_s', 40, 40, 0); +testComparison('i32', 'gt_u', 40, 40, 0); +testComparison('i32', 'ge_s', 40, 40, 1); +testComparison('i32', 'ge_u', 40, 40, 1); + +//testUnary('i64', 'clz', 40, 58); // TODO: NYI +//testUnary('i64', 'ctz', 40, 0); // TODO: NYI +//testUnary('i64', 'popcnt', 40, 0); // TODO: NYI + +//testBinary('i64', 'add', 40, 2, 42); // TODO: NYI +//testBinary('i64', 'sub', 40, 2, 38); // TODO: NYI +//testBinary('i64', 'mul', 40, 2, 80); // TODO: NYI +//testBinary('i64', 'div_s', -40, 2, -20); // TODO: NYI +//testBinary('i64', 'div_u', -40, 2, 2147483628); // TODO: NYI +//testBinary('i64', 'rem_s', 40, -3, 1); // TODO: NYI +//testBinary('i64', 'rem_u', 40, -3, 40); // TODO: NYI +//testBinary('i64', 'and', 42, 6, 2); // TODO: NYI +//testBinary('i64', 'or', 42, 6, 46); // TODO: NYI +//testBinary('i64', 'xor', 42, 2, 40); // TODO: NYI +//testBinary('i64', 'shl', 40, 2, 160); // TODO: NYI +//testBinary('i64', 'shr_s', -40, 2, -10); // TODO: NYI +//testBinary('i64', 'shr_u', -40, 2, 1073741814); // TODO: NYI + +//testComparison('i64', 'eq', 40, 40, 1); // TODO: NYI +//testComparison('i64', 'ne', 40, 40, 0); // TODO: NYI +//testComparison('i64', 'lt_s', 40, 40, 0); // TODO: NYI +//testComparison('i64', 'lt_u', 40, 40, 0); // TODO: NYI +//testComparison('i64', 'le_s', 40, 40, 1); // TODO: NYI +//testComparison('i64', 'le_u', 40, 40, 1); // TODO: NYI +//testComparison('i64', 'gt_s', 40, 40, 0); // TODO: NYI +//testComparison('i64', 'gt_u', 40, 40, 0); // TODO: NYI +//testComparison('i64', 'ge_s', 40, 40, 1); // TODO: NYI +//testComparison('i64', 'ge_u', 40, 40, 1); // TODO: NYI + +assertErrorMessage(() => wasmEvalText('(module (func (param f32) (result i32) (i32.clz (get_local 0))))'), TypeError, mismatchError("f32", "i32")); +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (result f32) (i32.clz (get_local 0))))'), TypeError, mismatchError("i32", "f32")); +assertErrorMessage(() => wasmEvalText('(module (func (param f32) (result f32) (i32.clz (get_local 0))))'), TypeError, mismatchError("i32", "f32")); + assertErrorMessage(() => wasmEvalText('(module (func (param f32) (param i32) (result i32) (i32.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("f32", "i32")); assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param f32) (result i32) (i32.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("f32", "i32")); assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param i32) (result f32) (i32.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f32")); +assertErrorMessage(() => wasmEvalText('(module (func (param f32) (param f32) (result f32) (i32.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f32")); + +assertErrorMessage(() => wasmEvalText('(module (func (param f32) (param i32) (result i32) (i32.eq (get_local 0) (get_local 1))))'), TypeError, mismatchError("f32", "i32")); +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param f32) (result i32) (i32.eq (get_local 0) (get_local 1))))'), TypeError, mismatchError("f32", "i32")); +assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param i32) (result f32) (i32.eq (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f32")); diff --git a/js/src/jit/BaselineIC.cpp b/js/src/jit/BaselineIC.cpp index a4ccd4ea8fb..667949ae8c6 100644 --- a/js/src/jit/BaselineIC.cpp +++ b/js/src/jit/BaselineIC.cpp @@ -142,7 +142,8 @@ DoWarmUpCounterFallbackOSR(JSContext* cx, BaselineFrame* frame, ICWarmUpCounter_ return false; if (!script->hasIonScript() || script->ionScript()->osrPc() != pc || - script->ionScript()->bailoutExpected()) + script->ionScript()->bailoutExpected() || + frame->isDebuggee()) { return true; } diff --git a/js/src/jsapi-tests/testGCExactRooting.cpp b/js/src/jsapi-tests/testGCExactRooting.cpp index c2569134777..01bb1fdf08a 100644 --- a/js/src/jsapi-tests/testGCExactRooting.cpp +++ b/js/src/jsapi-tests/testGCExactRooting.cpp @@ -44,17 +44,17 @@ BEGIN_TEST(testGCSuppressions) } END_TEST(testGCSuppressions) -struct MyContainer : public JS::Traceable +struct MyContainer { RelocatablePtrObject obj; RelocatablePtrString str; MyContainer() : obj(nullptr), str(nullptr) {} - static void trace(MyContainer* self, JSTracer* trc) { - if (self->obj) - js::TraceEdge(trc, &self->obj, "test container"); - if (self->str) - js::TraceEdge(trc, &self->str, "test container"); + void trace(JSTracer* trc) { + if (obj) + js::TraceEdge(trc, &obj, "test container"); + if (str) + js::TraceEdge(trc, &str, "test container"); } }; diff --git a/js/src/jsapi-tests/testGCWeakRef.cpp b/js/src/jsapi-tests/testGCWeakRef.cpp index fc7bc76c8a2..a072081c01c 100644 --- a/js/src/jsapi-tests/testGCWeakRef.cpp +++ b/js/src/jsapi-tests/testGCWeakRef.cpp @@ -10,13 +10,13 @@ #include "jsapi-tests/tests.h" -struct MyHeap : JS::Traceable +struct MyHeap { explicit MyHeap(JSObject* obj) : weak(obj) {} js::WeakRef weak; - static void trace(MyHeap* self, JSTracer* trc) { - js::TraceWeakEdge(trc, &self->weak, "weak"); + void trace(JSTracer* trc) { + js::TraceWeakEdge(trc, &weak, "weak"); } }; diff --git a/js/src/jsapi.h b/js/src/jsapi.h index c8da316bbaa..693655d0c73 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -2513,7 +2513,7 @@ JS_FreezeObject(JSContext* cx, JS::Handle obj); namespace JS { -struct PropertyDescriptor : public Traceable { +struct PropertyDescriptor { JSObject* obj; unsigned attrs; JSGetterOp getter; diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 66c43943c40..d476509907a 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -1194,6 +1194,7 @@ js::array_join(JSContext* cx, unsigned argc, Value* vp) { JS_CHECK_RECURSION(cx, return false); + AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.join"); CallArgs args = CallArgsFromVp(argc, vp); return ArrayJoin(cx, args); } @@ -1310,6 +1311,7 @@ DefineBoxedOrUnboxedFunctor3(ArrayReverseDenseKernel, static bool array_reverse(JSContext* cx, unsigned argc, Value* vp) { + AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.reverse"); CallArgs args = CallArgsFromVp(argc, vp); RootedObject obj(cx, ToObject(cx, args.thisv())); if (!obj) @@ -2008,6 +2010,7 @@ js::NewbornArrayPush(JSContext* cx, HandleObject obj, const Value& v) bool js::array_push(JSContext* cx, unsigned argc, Value* vp) { + AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.push"); CallArgs args = CallArgsFromVp(argc, vp); /* Step 1. */ @@ -2059,6 +2062,7 @@ js::array_push(JSContext* cx, unsigned argc, Value* vp) bool js::array_pop(JSContext* cx, unsigned argc, Value* vp) { + AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.pop"); CallArgs args = CallArgsFromVp(argc, vp); /* Step 1. */ @@ -2158,6 +2162,7 @@ DefineBoxedOrUnboxedFunctor3(ArrayShiftDenseKernel, bool js::array_shift(JSContext* cx, unsigned argc, Value* vp) { + AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.shift"); CallArgs args = CallArgsFromVp(argc, vp); /* Step 1. */ @@ -2231,6 +2236,7 @@ js::array_shift(JSContext* cx, unsigned argc, Value* vp) bool js::array_unshift(JSContext* cx, unsigned argc, Value* vp) { + AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.unshift"); CallArgs args = CallArgsFromVp(argc, vp); RootedObject obj(cx, ToObject(cx, args.thisv())); if (!obj) @@ -2361,6 +2367,7 @@ array_splice(JSContext* cx, unsigned argc, Value* vp) bool js::array_splice_impl(JSContext* cx, unsigned argc, Value* vp, bool returnValueIsUsed) { + AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.splice"); CallArgs args = CallArgsFromVp(argc, vp); /* Step 1. */ @@ -2621,6 +2628,7 @@ js::array_concat_dense(JSContext* cx, HandleObject obj1, HandleObject obj2, bool js::array_concat(JSContext* cx, unsigned argc, Value* vp) { + AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.concat"); CallArgs args = CallArgsFromVp(argc, vp); /* Treat our |this| object as the first argument; see ECMA 15.4.4.4. */ @@ -2914,6 +2922,7 @@ NormalizeSliceTerm(T value, uint32_t length) bool js::array_slice(JSContext* cx, unsigned argc, Value* vp) { + AutoSPSEntry pseudoFrame(cx->runtime(), "Array.prototype.slice"); CallArgs args = CallArgsFromVp(argc, vp); RootedObject obj(cx, ToObject(cx, args.thisv())); diff --git a/js/src/jscntxt.cpp b/js/src/jscntxt.cpp index 2486688b517..d692b75f47a 100644 --- a/js/src/jscntxt.cpp +++ b/js/src/jscntxt.cpp @@ -152,7 +152,7 @@ js::DestroyContext(JSContext* cx, DestroyContextMode mode) MOZ_CRASH("Attempted to destroy a context while it is in a request."); cx->roots.checkNoGCRooters(); - FinishPersistentRootedChains(cx->roots); + cx->roots.finishPersistentRoots(); if (mode != DCM_NEW_FAILED) { if (JSContextCallback cxCallback = rt->cxCallback) { diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index cf8db835936..25fa074500a 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -1373,32 +1373,13 @@ GCRuntime::finish() FinishTrace(); } -template -static void -FinishPersistentRootedChain(mozilla::LinkedList>& list) -{ - while (!list.isEmpty()) - list.getFirst()->reset(); -} - -void -js::gc::FinishPersistentRootedChains(RootLists& roots) -{ - FinishPersistentRootedChain(roots.getPersistentRootedList()); - FinishPersistentRootedChain(roots.getPersistentRootedList()); - FinishPersistentRootedChain(roots.getPersistentRootedList()); - FinishPersistentRootedChain(roots.getPersistentRootedList()); - FinishPersistentRootedChain(roots.getPersistentRootedList()); - FinishPersistentRootedChain(roots.heapRoots_[JS::RootKind::Traceable]); -} - void GCRuntime::finishRoots() { if (rootsHash.initialized()) rootsHash.clear(); - FinishPersistentRootedChains(rt->mainThread.roots); + rt->mainThread.roots.finishPersistentRoots(); } bool diff --git a/js/src/jspubtd.h b/js/src/jspubtd.h index a76908e1cce..5410252a101 100644 --- a/js/src/jspubtd.h +++ b/js/src/jspubtd.h @@ -131,9 +131,6 @@ void FinishGC(JSRuntime* rt); namespace gc { class AutoTraceSession; class StoreBuffer; -void MarkPersistentRootedChains(JSTracer*); -void MarkPersistentRootedChainsInLists(js::RootLists&, JSTracer*); -void FinishPersistentRootedChains(js::RootLists&); } // namespace gc } // namespace js @@ -245,6 +242,13 @@ class JS_PUBLIC_API(AutoGCRooter) void operator=(AutoGCRooter& ida) = delete; }; +// Our instantiations of Rooted and PersistentRooted require an +// instantiation of MapTypeToRootKind. +template <> +struct MapTypeToRootKind { + static const RootKind kind = RootKind::Traceable; +}; + } /* namespace JS */ namespace js { @@ -268,14 +272,19 @@ enum StackKind // and JSRuntime. class RootLists { - // Stack GC roots for stack-allocated GC heap pointers. + // Stack GC roots for Rooted GC heap pointers. mozilla::EnumeratedArray*> stackRoots_; template friend class JS::Rooted; - // Stack GC roots for stack-allocated AutoFooRooter classes. + // Stack GC roots for AutoFooRooter classes. JS::AutoGCRooter* autoGCRooters_; friend class JS::AutoGCRooter; + // Heap GC roots for PersistentRooted pointers. + mozilla::EnumeratedArray>> heapRoots_; + template friend class JS::PersistentRooted; + public: RootLists() : autoGCRooters_(nullptr) { for (auto& stackRootPtr : stackRoots_) { @@ -284,66 +293,12 @@ class RootLists } void traceStackRoots(JSTracer* trc); - void checkNoGCRooters(); - /* Allow inlining of PersistentRooted constructors and destructors. */ - private: - template friend class JS::PersistentRooted; - friend void js::gc::MarkPersistentRootedChains(JSTracer*); - friend void js::gc::MarkPersistentRootedChainsInLists(RootLists&, JSTracer*); - friend void js::gc::FinishPersistentRootedChains(RootLists&); - - mozilla::EnumeratedArray>> heapRoots_; - - /* Specializations of this return references to the appropriate list. */ - template - inline mozilla::LinkedList>& getPersistentRootedList(); + void tracePersistentRoots(JSTracer* trc); + void finishPersistentRoots(); }; -template<> -inline mozilla::LinkedList& -RootLists::getPersistentRootedList() { - return reinterpret_cast>&>( - heapRoots_[JS::RootKind::Object]); -} - -template<> -inline mozilla::LinkedList& -RootLists::getPersistentRootedList() { - return reinterpret_cast>&>( - heapRoots_[JS::RootKind::Object]); -} - -template<> -inline mozilla::LinkedList& -RootLists::getPersistentRootedList() { - return reinterpret_cast>&>( - heapRoots_[JS::RootKind::Id]); -} - -template<> -inline mozilla::LinkedList& -RootLists::getPersistentRootedList() { - return reinterpret_cast>&>( - heapRoots_[JS::RootKind::Script]); -} - -template<> -inline mozilla::LinkedList& -RootLists::getPersistentRootedList() { - return reinterpret_cast>&>( - heapRoots_[JS::RootKind::String]); -} - -template<> -inline mozilla::LinkedList& -RootLists::getPersistentRootedList() { - return reinterpret_cast>&>( - heapRoots_[JS::RootKind::Value]); -} - struct ContextFriendFields { protected: diff --git a/js/src/jsscript.cpp b/js/src/jsscript.cpp index 0fd388a28ff..e404ea4dc69 100644 --- a/js/src/jsscript.cpp +++ b/js/src/jsscript.cpp @@ -3558,7 +3558,7 @@ js::detail::CopyScript(JSContext* cx, HandleObject scriptStaticScope, HandleScri /* RegExps */ AutoObjectVector regexps(cx); - for (unsigned i = 0; i < nregexps; i++) { + if (nregexps != 0) { HeapPtrObject* vector = src->regexps()->vector; for (unsigned i = 0; i < nregexps; i++) { JSObject* clone = CloneScriptRegExpObject(cx, vector[i]->as()); diff --git a/js/src/jsscript.h b/js/src/jsscript.h index 201177462a3..b13598cbe0a 100644 --- a/js/src/jsscript.h +++ b/js/src/jsscript.h @@ -166,7 +166,7 @@ class YieldOffsetArray { } }; -class Binding : public JS::Traceable +class Binding { // One JSScript stores one Binding per formal/variable so we use a // packed-word representation. @@ -215,7 +215,7 @@ JS_STATIC_ASSERT(sizeof(Binding) == sizeof(uintptr_t)); * both function and top-level scripts (the latter is needed to track names in * strict mode eval code, to give such code its own lexical environment). */ -class Bindings : public JS::Traceable +class Bindings { friend class BindingIter; friend class AliasedFormalIter; diff --git a/js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-deprecated-redecl.js b/js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-deprecated-redecl.js index 6f023b454a9..af32be5d3db 100644 --- a/js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-deprecated-redecl.js +++ b/js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-deprecated-redecl.js @@ -9,6 +9,18 @@ // Annex B still works. assertEq(f(), 4); +// The same thing with labels. +{ + assertEq(f(), 4); + function f() { return 3; } + assertEq(f(), 4); + l: function f() { return 4; } + assertEq(f(), 4); +} + +// Annex B still works. +assertEq(f(), 4); + function test() { { assertEq(f(), 2); diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index 295ec711df0..cd5d41996f0 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -2480,7 +2480,7 @@ Debugger::markCrossCompartmentEdges(JSTracer* trc) // `Debugger::logTenurePromotion`, we can't hold onto CCWs inside the log, // and instead have unwrapped cross-compartment edges. We need to be sure to // mark those here. - TenurePromotionsLog::trace(&tenurePromotionsLog, trc); + tenurePromotionsLog.trace(trc); } /* @@ -2656,8 +2656,8 @@ Debugger::trace(JSTracer* trc) TraceEdge(trc, &frameobj, "live Debugger.Frame"); } - AllocationsLog::trace(&allocationsLog, trc); - TenurePromotionsLog::trace(&tenurePromotionsLog, trc); + allocationsLog.trace(trc); + tenurePromotionsLog.trace(trc); /* Trace the weak map from JSScript instances to Debugger.Script objects. */ scripts.trace(trc); diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h index b35685a444c..1acd3e1ec69 100644 --- a/js/src/vm/Debugger.h +++ b/js/src/vm/Debugger.h @@ -282,7 +282,7 @@ class Debugger : private mozilla::LinkedListElement void logTenurePromotion(JSRuntime* rt, JSObject& obj, double when); static SavedFrame* getObjectAllocationSite(JSObject& obj); - struct TenurePromotionsLogEntry : public JS::Traceable + struct TenurePromotionsLogEntry { TenurePromotionsLogEntry(JSRuntime* rt, JSObject& obj, double when); @@ -291,14 +291,13 @@ class Debugger : private mozilla::LinkedListElement RelocatablePtrObject frame; size_t size; - static void trace(TenurePromotionsLogEntry* e, JSTracer* trc) { e->trace(trc); } void trace(JSTracer* trc) { if (frame) TraceEdge(trc, &frame, "Debugger::TenurePromotionsLogEntry::frame"); } }; - struct AllocationsLogEntry : public JS::Traceable + struct AllocationsLogEntry { AllocationsLogEntry(HandleObject frame, double when, const char* className, HandleAtom ctorName, size_t size, bool inNursery) @@ -319,7 +318,6 @@ class Debugger : private mozilla::LinkedListElement size_t size; bool inNursery; - static void trace(AllocationsLogEntry* e, JSTracer* trc) { e->trace(trc); } void trace(JSTracer* trc) { if (frame) TraceEdge(trc, &frame, "Debugger::AllocationsLogEntry::frame"); diff --git a/js/src/vm/JSONParser.h b/js/src/vm/JSONParser.h index 687972392b0..0b48e06091c 100644 --- a/js/src/vm/JSONParser.h +++ b/js/src/vm/JSONParser.h @@ -190,8 +190,7 @@ class MOZ_STACK_CLASS JSONParserBase }; template -class MOZ_STACK_CLASS JSONParser : public JSONParserBase, - public JS::Traceable +class MOZ_STACK_CLASS JSONParser : public JSONParserBase { private: typedef mozilla::RangedPtr CharPtr; diff --git a/js/src/vm/ObjectGroup.cpp b/js/src/vm/ObjectGroup.cpp index 4cef20beb1f..d1407d416db 100644 --- a/js/src/vm/ObjectGroup.cpp +++ b/js/src/vm/ObjectGroup.cpp @@ -1390,8 +1390,7 @@ ObjectGroup::newPlainObject(ExclusiveContext* cx, IdValuePair* properties, size_ // ObjectGroupCompartment AllocationSiteTable ///////////////////////////////////////////////////////////////////// -struct ObjectGroupCompartment::AllocationSiteKey : public DefaultHasher, - public JS::Traceable { +struct ObjectGroupCompartment::AllocationSiteKey : public DefaultHasher { ReadBarrieredScript script; uint32_t offset : 24; @@ -1433,9 +1432,9 @@ struct ObjectGroupCompartment::AllocationSiteKey : public DefaultHasher::match(a.proto, b.proto); } - static void trace(AllocationSiteKey* key, JSTracer* trc) { - TraceRoot(trc, &key->script, "AllocationSiteKey script"); - TraceNullableRoot(trc, &key->proto, "AllocationSiteKey proto"); + void trace(JSTracer* trc) { + TraceRoot(trc, &script, "AllocationSiteKey script"); + TraceNullableRoot(trc, &proto, "AllocationSiteKey proto"); } bool needsSweep() { diff --git a/js/src/vm/SavedStacks.cpp b/js/src/vm/SavedStacks.cpp index b6daaf8b821..9c1f4d96e30 100644 --- a/js/src/vm/SavedStacks.cpp +++ b/js/src/vm/SavedStacks.cpp @@ -65,13 +65,13 @@ LiveSavedFrameCache::getFramePtr(FrameIter& iter) return Nothing(); } -/* static */ void -LiveSavedFrameCache::trace(LiveSavedFrameCache* cache, JSTracer* trc) +void +LiveSavedFrameCache::trace(JSTracer* trc) { - if (!cache->initialized()) + if (!initialized()) return; - for (auto* entry = cache->frames->begin(); entry < cache->frames->end(); entry++) { + for (auto* entry = frames->begin(); entry < frames->end(); entry++) { TraceEdge(trc, &entry->savedFrame, "LiveSavedFrameCache::frames SavedFrame"); diff --git a/js/src/vm/SavedStacks.h b/js/src/vm/SavedStacks.h index 3e26b3fc58d..2abd9a383fd 100644 --- a/js/src/vm/SavedStacks.h +++ b/js/src/vm/SavedStacks.h @@ -225,7 +225,7 @@ class SavedStacks { }; public: - struct LocationValue : public JS::Traceable { + struct LocationValue { LocationValue() : source(nullptr), line(0), column(0) { } LocationValue(JSAtom* source, size_t line, uint32_t column) : source(source), diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp index 9ac33628b24..4d0acb9d5ae 100644 --- a/js/src/vm/SelfHosting.cpp +++ b/js/src/vm/SelfHosting.cpp @@ -365,7 +365,9 @@ intrinsic_FinishBoundFunctionInit(JSContext* cx, unsigned argc, Value* vp) // 9.4.1.3 BoundFunctionCreate, steps 2-3,8. RootedObject proto(cx); - GetPrototype(cx, targetObj, &proto); + if (!GetPrototype(cx, targetObj, &proto)) + return false; + if (bound->getProto() != proto) { if (!SetPrototype(cx, bound, proto)) return false; diff --git a/js/src/vm/Shape.h b/js/src/vm/Shape.h index 9df058447f0..809211f2b48 100644 --- a/js/src/vm/Shape.h +++ b/js/src/vm/Shape.h @@ -1121,7 +1121,7 @@ struct InitialShapeEntry using InitialShapeSet = js::GCHashSet; -struct StackShape : public JS::Traceable +struct StackShape { /* For performance, StackShape only roots when absolutely necessary. */ UnownedBaseShape* base; diff --git a/js/src/vm/Stack.h b/js/src/vm/Stack.h index bbe9e2216e6..f212289945e 100644 --- a/js/src/vm/Stack.h +++ b/js/src/vm/Stack.h @@ -1049,7 +1049,7 @@ struct DefaultHasher { // entries that must be scanned through, and to avoid the headaches of // maintaining a cache for each compartment and invalidating stale cache entries // in the presence of cross-compartment calls. -class LiveSavedFrameCache : public JS::Traceable +class LiveSavedFrameCache { public: using FramePtr = mozilla::Variant; @@ -1102,7 +1102,7 @@ class LiveSavedFrameCache : public JS::Traceable } static mozilla::Maybe getFramePtr(FrameIter& iter); - static void trace(LiveSavedFrameCache* cache, JSTracer* trc); + void trace(JSTracer* trc); void find(JSContext* cx, FrameIter& frameIter, MutableHandleSavedFrame frame) const; bool insert(JSContext* cx, FramePtr& framePtr, jsbytecode* pc, HandleSavedFrame savedFrame); diff --git a/js/src/vm/TaggedProto.h b/js/src/vm/TaggedProto.h index 412961a08bd..53c5fd575ce 100644 --- a/js/src/vm/TaggedProto.h +++ b/js/src/vm/TaggedProto.h @@ -14,7 +14,7 @@ namespace js { // Information about an object prototype, which can be either a particular // object, null, or a lazily generated object. The latter is only used by // certain kinds of proxies. -class TaggedProto : public JS::Traceable +class TaggedProto { public: static JSObject * const LazyProto; @@ -44,20 +44,15 @@ class TaggedProto : public JS::Traceable bool operator ==(const TaggedProto& other) const { return proto == other.proto; } bool operator !=(const TaggedProto& other) const { return proto != other.proto; } - static void trace(TaggedProto* protop, JSTracer* trc) { - TraceManuallyBarrieredEdge(trc, protop, "TaggedProto"); + void trace(JSTracer* trc) { + if (isObject()) + TraceManuallyBarrieredEdge(trc, &proto, "TaggedProto"); } private: JSObject* proto; }; -template <> -struct GCPolicy -{ - static TaggedProto initial() { return TaggedProto(); } -}; - template <> struct InternalBarrierMethods { diff --git a/js/src/vm/TypeInference.h b/js/src/vm/TypeInference.h index 6090359c315..aa39e754101 100644 --- a/js/src/vm/TypeInference.h +++ b/js/src/vm/TypeInference.h @@ -272,7 +272,7 @@ class TypeSet // Information about a single concrete type. We pack this into one word, // where small values are particular primitive or other singleton types and // larger values are either specific JS objects or object groups. - class Type : public JS::Traceable + class Type { friend class TypeSet; @@ -350,8 +350,8 @@ class TypeSet inline ObjectGroup* group() const; inline ObjectGroup* groupNoBarrier() const; - static void trace(Type* v, JSTracer* trc) { - MarkTypeUnbarriered(trc, v, "TypeSet::Type"); + void trace(JSTracer* trc) { + MarkTypeUnbarriered(trc, this, "TypeSet::Type"); } bool operator == (Type o) const { return data == o.data; } diff --git a/js/src/vm/UbiNodeCensus.cpp b/js/src/vm/UbiNodeCensus.cpp index d48af700841..b6fe2c5cea0 100644 --- a/js/src/vm/UbiNodeCensus.cpp +++ b/js/src/vm/UbiNodeCensus.cpp @@ -773,7 +773,7 @@ class ByFilename : public CountType { CountTypePtr noFilenameType; public: - ByFilename(CountTypePtr& thenType, CountTypePtr& noFilenameType) + ByFilename(CountTypePtr&& thenType, CountTypePtr&& noFilenameType) : CountType(), thenType(Move(thenType)), noFilenameType(Move(noFilenameType)) @@ -1037,7 +1037,7 @@ ParseBreakdown(JSContext* cx, HandleValue breakdownValue) if (!noFilenameType) return nullptr; - return CountTypePtr(js_new(thenType, noFilenameType)); + return CountTypePtr(js_new(Move(thenType), Move(noFilenameType))); } // We didn't recognize the breakdown type; complain. diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index 5f415f9a79c..9a3aae5b7d9 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -1288,7 +1288,7 @@ class MOZ_STACK_CLASS CallMethodHelper const uint16_t mVTableIndex; HandleId mIdxValueId; - nsAutoTArray mDispatchParams; + AutoTArray mDispatchParams; uint8_t mJSContextIndex; // TODO make const uint8_t mOptArgcIndex; // TODO make const diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 9924943b47b..00646467b0b 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -2885,7 +2885,7 @@ private: JSContext* Pop(); bool Push(JSContext* cx); - AutoInfallibleTArray mStack; + AutoTArray mStack; XPCJSRuntime* mRuntime; JSContext* mSafeJSContext; }; diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 43124d96b40..50d40788a32 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -213,13 +213,13 @@ FrameLayerBuilder::DisplayItemData::BeginUpdate(Layer* aLayer, LayerState aState // We avoid adding or removing element unnecessarily // since we have to modify userdata each time - nsAutoTArray copy(mFrameList); + AutoTArray copy(mFrameList); if (!copy.RemoveElement(aItem->Frame())) { AddFrame(aItem->Frame()); mFrameListChanges.AppendElement(aItem->Frame()); } - nsAutoTArray mergedFrames; + AutoTArray mergedFrames; aItem->GetMergedFrames(&mergedFrames); for (uint32_t i = 0; i < mergedFrames.Length(); ++i) { if (!copy.RemoveElement(mergedFrames[i])) { @@ -1382,7 +1382,7 @@ protected: * It's essential that this array is only appended to, since PaintedLayerData * records the index of its PaintedLayer in this array. */ - typedef nsAutoTArray AutoLayersArray; + typedef AutoTArray AutoLayersArray; AutoLayersArray mNewChildLayers; nsTHashtable> mPaintedLayersAvailableForRecycling; nscoord mAppUnitsPerDevPixel; @@ -4667,7 +4667,7 @@ ContainerState::SetupScrollingMetadata(NewLayerEntry* aEntry) return; } - nsAutoTArray metricsArray; + AutoTArray metricsArray; if (aEntry->mBaseFrameMetrics) { metricsArray.AppendElement(*aEntry->mBaseFrameMetrics); @@ -4768,7 +4768,7 @@ GetStationaryClipInContainer(Layer* aLayer) void ContainerState::PostprocessRetainedLayers(nsIntRegion* aOpaqueRegionForContainer) { - nsAutoTArray opaqueRegions; + AutoTArray opaqueRegions; bool hideAll = false; int32_t opaqueRegionForContainer = -1; diff --git a/layout/base/FrameLayerBuilder.h b/layout/base/FrameLayerBuilder.h index 5f018d0fdaa..96049dd0e0a 100644 --- a/layout/base/FrameLayerBuilder.h +++ b/layout/base/FrameLayerBuilder.h @@ -489,7 +489,7 @@ public: RefPtr mLayer; RefPtr mOptLayer; RefPtr mInactiveManager; - nsAutoTArray mFrameList; + AutoTArray mFrameList; nsAutoPtr mGeometry; DisplayItemClip mClip; uint32_t mDisplayItemKey; @@ -501,7 +501,7 @@ public: * BeginUpdate and EndUpdate. */ nsDisplayItem* mItem; - nsAutoTArray mFrameListChanges; + AutoTArray mFrameListChanges; /** * Used to track if data currently stored in mFramesWithLayers (from an existing diff --git a/layout/base/PositionedEventTargeting.cpp b/layout/base/PositionedEventTargeting.cpp index 6b02ad978da..a0170510e28 100644 --- a/layout/base/PositionedEventTargeting.cpp +++ b/layout/base/PositionedEventTargeting.cpp @@ -595,7 +595,7 @@ FindFrameTargetedByInputEvent(WidgetGUIEvent* aEvent, restrictToDescendants, prefs, aFlags); PET_LOG("Expanded point to target rect %s\n", mozilla::layers::Stringify(targetRect).c_str()); - nsAutoTArray candidates; + AutoTArray candidates; nsresult rv = nsLayoutUtils::GetFramesForArea(aRootFrame, targetRect, candidates, flags); if (NS_FAILED(rv)) { return target; diff --git a/layout/base/RestyleManager.h b/layout/base/RestyleManager.h index 2f0b914f074..7bb8cb7ab8c 100644 --- a/layout/base/RestyleManager.h +++ b/layout/base/RestyleManager.h @@ -917,7 +917,7 @@ class MOZ_STACK_CLASS AutoDisplayContentsAncestorPusher final private: TreeMatchContext& mTreeMatchContext; nsPresContext* const mPresContext; - nsAutoTArray mAncestors; + AutoTArray mAncestors; }; } // namespace mozilla diff --git a/layout/base/RestyleTracker.cpp b/layout/base/RestyleTracker.cpp index 0c2237048d4..c0ff65e78eb 100644 --- a/layout/base/RestyleTracker.cpp +++ b/layout/base/RestyleTracker.cpp @@ -165,7 +165,7 @@ RestyleTracker::DoProcessRestyles() while (mPendingRestyles.Count()) { if (mHaveLaterSiblingRestyles) { // Convert them to individual restyles on all the later siblings - nsAutoTArray, RESTYLE_ARRAY_STACKSIZE> laterSiblingArr; + AutoTArray, RESTYLE_ARRAY_STACKSIZE> laterSiblingArr; for (auto iter = mPendingRestyles.Iter(); !iter.Done(); iter.Next()) { auto element = static_cast(iter.Key()); // Only collect the entries that actually need restyling by us (and @@ -280,7 +280,7 @@ RestyleTracker::DoProcessRestyles() // scratch array instead of calling out to ProcessOneRestyle while // enumerating the hashtable. Use the stack if we can, otherwise // fall back on heap-allocation. - nsAutoTArray restyleArr; + AutoTArray restyleArr; RestyleEnumerateData* restylesToProcess = restyleArr.AppendElements(mPendingRestyles.Count()); if (restylesToProcess) { diff --git a/layout/base/RestyleTracker.h b/layout/base/RestyleTracker.h index e2e7d943551..33bf4a6b7be 100644 --- a/layout/base/RestyleTracker.h +++ b/layout/base/RestyleTracker.h @@ -390,7 +390,7 @@ private: const RestyleHintData& aRestyleHintData); typedef nsClassHashtable PendingRestyleTable; - typedef nsAutoTArray< RefPtr, 32> RestyleRootArray; + typedef AutoTArray< RefPtr, 32> RestyleRootArray; // Our restyle bits. These will be a subset of ELEMENT_ALL_RESTYLE_FLAGS, and // will include one flag from ELEMENT_PENDING_RESTYLE_FLAGS, one flag // from ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS, and might also include diff --git a/layout/base/nsBidiPresUtils.cpp b/layout/base/nsBidiPresUtils.cpp index 2d423aecbcb..cce51607b81 100644 --- a/layout/base/nsBidiPresUtils.cpp +++ b/layout/base/nsBidiPresUtils.cpp @@ -105,7 +105,7 @@ static char16_t GetBidiControl(nsStyleContext* aStyleContext, struct BidiParagraphData { nsString mBuffer; - nsAutoTArray mEmbeddingStack; + AutoTArray mEmbeddingStack; nsTArray mLogicalFrames; nsTArray mLinePerFrame; nsDataHashtable mContentToFrameIndex; @@ -394,7 +394,7 @@ struct BidiLineData { nsTArray mLogicalFrames; nsTArray mVisualFrames; nsTArray mIndexMap; - nsAutoTArray mLevels; + AutoTArray mLevels; bool mIsReordered; BidiLineData(nsIFrame* aFirstFrameOnLine, int32_t aNumFramesOnLine) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 16bbba972dd..81b31dc162b 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -1310,7 +1310,7 @@ nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems& aFrameItems, nsIFrame* firstNewFrame = aFrameItems.FirstChild(); // Cache the ancestor chain so that we can reuse it if needed. - nsAutoTArray firstNewFrameAncestors; + AutoTArray firstNewFrameAncestors; nsIFrame* notCommonAncestor = nullptr; if (lastChild) { notCommonAncestor = nsLayoutUtils::FillAncestors(firstNewFrame, @@ -1328,7 +1328,7 @@ nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems& aFrameItems, } else { // Try the other children. First collect them to an array so that a // reasonable fast binary search can be used to find the insertion point. - nsAutoTArray children; + AutoTArray children; for (nsIFrame* f = childList.FirstChild(); f != lastChild; f = f->GetNextSibling()) { children.AppendElement(f); @@ -2840,7 +2840,7 @@ nsCSSFrameConstructor::ConstructAnonymousContentForCanvas(nsFrameConstructorStat { NS_ASSERTION(aFrame->GetType() == nsGkAtoms::canvasFrame, "aFrame should be canvas frame!"); - nsAutoTArray anonymousItems; + AutoTArray anonymousItems; GetAnonymousContent(aDocElement, aFrame, anonymousItems); if (anonymousItems.IsEmpty()) { return; @@ -3968,7 +3968,7 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsFrameConstructorState& aState, PendingBinding* aPendingBinding, nsFrameItems& aChildItems) { - nsAutoTArray newAnonymousItems; + AutoTArray newAnonymousItems; nsresult rv = GetAnonymousContent(aParent, aParentFrame, newAnonymousItems); NS_ENSURE_SUCCESS(rv, rv); @@ -10381,7 +10381,7 @@ nsCSSFrameConstructor::ProcessChildren(nsFrameConstructorState& aState, // Create any anonymous frames we need here. This must happen before the // non-anonymous children are processed to ensure that popups are never // constructed before the popupset. - nsAutoTArray anonymousItems; + AutoTArray anonymousItems; GetAnonymousContent(aContent, aPossiblyLeafFrame, anonymousItems); #ifdef DEBUG for (uint32_t i = 0; i < anonymousItems.Length(); ++i) { diff --git a/layout/base/nsCounterManager.cpp b/layout/base/nsCounterManager.cpp index 6adf34d06ea..0a2424f3bd2 100644 --- a/layout/base/nsCounterManager.cpp +++ b/layout/base/nsCounterManager.cpp @@ -94,7 +94,7 @@ nsCounterUseNode::GetText(nsString& aResult) { aResult.Truncate(); - nsAutoTArray stack; + AutoTArray stack; stack.AppendElement(static_cast(this)); if (mAllCounters && mScopeStart) diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index d6f99f31a06..52d2bd905ed 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -973,7 +973,7 @@ nsDisplayListBuilder::MarkFramesForDisplayList(nsIFrame* aDirtyFrame, void nsDisplayListBuilder::MarkPreserve3DFramesForDisplayList(nsIFrame* aDirtyFrame, const nsRect& aDirtyRect) { - nsAutoTArray childListArray; + AutoTArray childListArray; aDirtyFrame->GetChildLists(&childListArray); nsIFrame::ChildListArrayIterator lists(childListArray); for (; !lists.IsDone(); lists.Next()) { @@ -1492,7 +1492,7 @@ nsDisplayList::ComputeVisibilityForSublist(nsDisplayListBuilder* aBuilder, bool anyVisible = false; - nsAutoTArray elements; + AutoTArray elements; MoveListTo(this, &elements); for (int32_t i = elements.Length() - 1; i >= 0; --i) { @@ -1929,7 +1929,7 @@ void nsDisplayList::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, aState->mItemBuffer.AppendElement(item); } - nsAutoTArray temp; + AutoTArray temp; for (int32_t i = aState->mItemBuffer.Length() - 1; i >= itemBufferStart; --i) { // Pop element off the end of the buffer. We want to shorten the buffer // so that recursive calls to HitTest have more buffer space. @@ -1949,7 +1949,7 @@ void nsDisplayList::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, if (!item->GetClip().MayIntersect(aRect)) { continue; } - nsAutoTArray neverUsed; + AutoTArray neverUsed; // Start gethering leaves of the 3D rendering context, and // append leaves at the end of mItemBuffer. Leaves are // processed at following iterations. @@ -1960,7 +1960,7 @@ void nsDisplayList::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, continue; } if (same3DContext || item->GetClip().MayIntersect(r)) { - nsAutoTArray outFrames; + AutoTArray outFrames; item->HitTest(aBuilder, aRect, aState, &outFrames); // For 3d transforms with preserve-3d we add hit frames into the temp list @@ -3684,7 +3684,7 @@ nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder, nsPoint offset = ToReferenceFrame(); nsRect borderRect = mFrame->VisualBorderRectRelativeToSelf() + offset; nsPresContext* presContext = mFrame->PresContext(); - nsAutoTArray rects; + AutoTArray rects; ComputeDisjointRectangles(mVisibleRegion, &rects); PROFILER_LABEL("nsDisplayBoxShadowOuter", "Paint", @@ -3772,7 +3772,7 @@ nsDisplayBoxShadowInner::Paint(nsDisplayListBuilder* aBuilder, nsPoint offset = ToReferenceFrame(); nsRect borderRect = nsRect(offset, mFrame->GetSize()); nsPresContext* presContext = mFrame->PresContext(); - nsAutoTArray rects; + AutoTArray rects; ComputeDisjointRectangles(mVisibleRegion, &rects); PROFILER_LABEL("nsDisplayBoxShadowInner", "Paint", diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index c730e9db3b7..819b75f13f7 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -1196,9 +1196,9 @@ private: nsDisplayLayerEventRegions* mLayerEventRegions; PLArenaPool mPool; nsCOMPtr mBoundingSelection; - nsAutoTArray mPresShellStates; - nsAutoTArray mFramesMarkedForDisplay; - nsAutoTArray mThemeGeometries; + AutoTArray mPresShellStates; + AutoTArray mFramesMarkedForDisplay; + AutoTArray mThemeGeometries; nsDisplayTableItem* mCurrentTableItem; DisplayListClipState mClipState; // mCurrentFrame is the frame that we're currently calling (or about to call) @@ -1360,7 +1360,7 @@ public: // Handling transform items for preserve 3D frames. bool mInPreserves3D; - nsAutoTArray mItemBuffer; + AutoTArray mItemBuffer; }; /** diff --git a/layout/base/nsIPresShell.h b/layout/base/nsIPresShell.h index 21c15cf3a4e..e8697e86a6e 100644 --- a/layout/base/nsIPresShell.h +++ b/layout/base/nsIPresShell.h @@ -1783,7 +1783,7 @@ protected: // same update block we have already had other changes that require // the whole document to be restyled (i.e., mStylesHaveChanged is already // true), then we don't bother adding the scope root here. - nsAutoTArray,1> mChangedScopeStyleRoots; + AutoTArray,1> mChangedScopeStyleRoots; static nsIContent* gKeyDownTarget; diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 64252a89ba3..2cd96e32136 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -1597,7 +1597,7 @@ nsLayoutUtils::DoCompareTreePosition(nsIContent* aContent1, NS_PRECONDITION(aContent1, "aContent1 must not be null"); NS_PRECONDITION(aContent2, "aContent2 must not be null"); - nsAutoTArray content1Ancestors; + AutoTArray content1Ancestors; nsINode* c1; for (c1 = aContent1; c1 && c1 != aCommonAncestor; c1 = c1->GetParentNode()) { content1Ancestors.AppendElement(c1); @@ -1608,7 +1608,7 @@ nsLayoutUtils::DoCompareTreePosition(nsIContent* aContent1, aCommonAncestor = nullptr; } - nsAutoTArray content2Ancestors; + AutoTArray content2Ancestors; nsINode* c2; for (c2 = aContent2; c2 && c2 != aCommonAncestor; c2 = c2->GetParentNode()) { content2Ancestors.AppendElement(c2); @@ -1702,7 +1702,7 @@ nsLayoutUtils::DoCompareTreePosition(nsIFrame* aFrame1, NS_PRECONDITION(aFrame1, "aFrame1 must not be null"); NS_PRECONDITION(aFrame2, "aFrame2 must not be null"); - nsAutoTArray frame2Ancestors; + AutoTArray frame2Ancestors; nsIFrame* nonCommonAncestor = FillAncestors(aFrame2, aCommonAncestor, &frame2Ancestors); @@ -1729,7 +1729,7 @@ nsLayoutUtils::DoCompareTreePosition(nsIFrame* aFrame1, return 0; } - nsAutoTArray frame1Ancestors; + AutoTArray frame1Ancestors; if (aCommonAncestor && !FillAncestors(aFrame1, aCommonAncestor, &frame1Ancestors)) { // We reached the root of the frame tree ... if aCommonAncestor was set, @@ -2501,8 +2501,8 @@ nsLayoutUtils::GetTransformToAncestorScaleExcludingAnimated(nsIFrame* aFrame) nsIFrame* nsLayoutUtils::FindNearestCommonAncestorFrame(nsIFrame* aFrame1, nsIFrame* aFrame2) { - nsAutoTArray ancestors1; - nsAutoTArray ancestors2; + AutoTArray ancestors1; + AutoTArray ancestors2; nsIFrame* commonAncestor = nullptr; if (aFrame1->PresContext() == aFrame2->PresContext()) { commonAncestor = aFrame1->PresContext()->PresShell()->GetRootFrame(); @@ -2959,7 +2959,7 @@ nsLayoutUtils::GetFrameForPoint(nsIFrame* aFrame, nsPoint aPt, uint32_t aFlags) js::ProfileEntry::Category::GRAPHICS); nsresult rv; - nsAutoTArray outFrames; + AutoTArray outFrames; rv = GetFramesForArea(aFrame, nsRect(aPt, nsSize(1, 1)), outFrames, aFlags); NS_ENSURE_SUCCESS(rv, nullptr); return outFrames.Length() ? outFrames.ElementAt(0) : nullptr; @@ -5038,7 +5038,7 @@ nsLayoutUtils::ComputeBSizeDependentValue( /* static */ void nsLayoutUtils::MarkDescendantsDirty(nsIFrame *aSubtreeRoot) { - nsAutoTArray subtrees; + AutoTArray subtrees; subtrees.AppendElement(aSubtreeRoot); // dirty descendants, iterating over subtrees that may include @@ -5051,7 +5051,7 @@ nsLayoutUtils::MarkDescendantsDirty(nsIFrame *aSubtreeRoot) // recursion). // Note that nsHTMLReflowState::InitResizeFlags has some similar // code; see comments there for how and why it differs. - nsAutoTArray stack; + AutoTArray stack; stack.AppendElement(subtreeRoot); do { @@ -7451,7 +7451,7 @@ nsLayoutUtils::SizeOfTextRunsForFrames(nsIFrame* aFrame, return total; } - nsAutoTArray childListArray; + AutoTArray childListArray; aFrame->GetChildLists(&childListArray); for (nsIFrame::ChildListArrayIterator childLists(childListArray); diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index 71f3b93718f..8bedc64f72f 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -3112,7 +3112,7 @@ SortConfigurations(nsTArray* aConfigurations) continue; LayoutDeviceIntRect bounds; pluginsToMove[j].mChild->GetBounds(bounds); - nsAutoTArray clipRects; + AutoTArray clipRects; pluginsToMove[j].mChild->GetWindowClipRegion(&clipRects); if (HasOverlap(bounds.TopLeft(), clipRects, config->mBounds.TopLeft(), diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index cac064d1a77..ad958a710af 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -2503,7 +2503,7 @@ PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty, } #endif - nsAutoTArray subtrees; + AutoTArray subtrees; subtrees.AppendElement(aFrame); do { @@ -2554,7 +2554,7 @@ PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty, // recursion). // Note that nsHTMLReflowState::InitResizeFlags has some similar // code; see comments there for how and why it differs. - nsAutoTArray stack; + AutoTArray stack; stack.AppendElement(subtreeRoot); do { @@ -4347,7 +4347,7 @@ PresShell::ReconstructFrames(void) void nsIPresShell::ReconstructStyleDataInternal() { - nsAutoTArray,1> scopeRoots; + AutoTArray,1> scopeRoots; mChangedScopeStyleRoots.SwapElements(scopeRoots); if (mStylesHaveChanged) { @@ -5848,7 +5848,7 @@ public: nsDisplayListBuilder::EVENT_DELIVERY, /* aBuildCert= */ false); nsDisplayList list; - nsAutoTArray outFrames; + AutoTArray outFrames; nsDisplayItem::HitTestState hitTestState; builder.EnterPresShell(mFrame); nsRect bounds = mShell->GetPresContext()->GetVisibleArea(); @@ -6738,7 +6738,7 @@ PresShell::DispatchAfterKeyboardEvent(nsINode* aTarget, } // Build up a target chain. Each item in the chain will receive an after event. - nsAutoTArray, 5> chain; + AutoTArray, 5> chain; bool targetIsIframe = false; BuildTargetChainForBeforeAfterKeyboardEvent(aTarget, chain, targetIsIframe); DispatchAfterKeyboardEventInternal(chain, aEvent, aEmbeddedCancelled); @@ -6773,7 +6773,7 @@ PresShell::HandleKeyboardEvent(nsINode* aTarget, MOZ_ASSERT(aEvent.mMessage == eKeyDown || aEvent.mMessage == eKeyUp); // Build up a target chain. Each item in the chain will receive a before event. - nsAutoTArray, 5> chain; + AutoTArray, 5> chain; bool targetIsIframe = false; BuildTargetChainForBeforeAfterKeyboardEvent(aTarget, chain, targetIsIframe); diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp index 23eff4d44f0..2517d3c1f0e 100644 --- a/layout/base/nsRefreshDriver.cpp +++ b/layout/base/nsRefreshDriver.cpp @@ -1703,7 +1703,7 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime) if (mPresContext && mPresContext->GetPresShell()) { bool tracingStyleFlush = false; - nsAutoTArray observers; + AutoTArray observers; observers.AppendElements(mStyleFlushObservers); for (uint32_t j = observers.Length(); j && mPresContext && mPresContext->GetPresShell(); --j) { @@ -1743,7 +1743,7 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime) } else if (i == 1) { // This is the Flush_Layout case. bool tracingLayoutFlush = false; - nsAutoTArray observers; + AutoTArray observers; observers.AppendElements(mLayoutFlushObservers); for (uint32_t j = observers.Length(); j && mPresContext && mPresContext->GetPresShell(); --j) { diff --git a/layout/base/nsRefreshDriver.h b/layout/base/nsRefreshDriver.h index 94dc784675b..cc72bbb2cf0 100644 --- a/layout/base/nsRefreshDriver.h +++ b/layout/base/nsRefreshDriver.h @@ -430,9 +430,9 @@ private: nsCOMPtr mEvent; }; - nsAutoTArray mStyleFlushObservers; - nsAutoTArray mLayoutFlushObservers; - nsAutoTArray mPresShellsToInvalidateIfHidden; + AutoTArray mStyleFlushObservers; + AutoTArray mLayoutFlushObservers; + AutoTArray mPresShellsToInvalidateIfHidden; // nsTArray on purpose, because we want to be able to swap. nsTArray mFrameRequestCallbackDocs; nsTArray mThrottledFrameRequestCallbackDocs; diff --git a/layout/generic/FrameChildList.h b/layout/generic/FrameChildList.h index 34bce1e1f4e..8ccfa2ff816 100644 --- a/layout/generic/FrameChildList.h +++ b/layout/generic/FrameChildList.h @@ -93,7 +93,7 @@ class MOZ_STACK_CLASS FrameChildListIterator explicit FrameChildListIterator(const nsIFrame* aFrame); protected: - nsAutoTArray mLists; + AutoTArray mLists; }; inline mozilla::layout::FrameChildListIDs diff --git a/layout/generic/MathMLTextRunFactory.cpp b/layout/generic/MathMLTextRunFactory.cpp index 557c1bfc375..1fc3cb148a0 100644 --- a/layout/generic/MathMLTextRunFactory.cpp +++ b/layout/generic/MathMLTextRunFactory.cpp @@ -535,10 +535,10 @@ MathMLTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun, gfxFontGroup* fontGroup = aTextRun->GetFontGroup(); nsAutoString convertedString; - nsAutoTArray charsToMergeArray; - nsAutoTArray deletedCharsArray; - nsAutoTArray,50> styleArray; - nsAutoTArray canBreakBeforeArray; + AutoTArray charsToMergeArray; + AutoTArray deletedCharsArray; + AutoTArray,50> styleArray; + AutoTArray canBreakBeforeArray; bool mergeNeeded = false; bool singleCharMI = diff --git a/layout/generic/RubyUtils.h b/layout/generic/RubyUtils.h index 1497c93c406..0b610c49b82 100644 --- a/layout/generic/RubyUtils.h +++ b/layout/generic/RubyUtils.h @@ -97,7 +97,7 @@ public: * of the given ruby base container. */ class MOZ_STACK_CLASS AutoRubyTextContainerArray final - : public nsAutoTArray + : public AutoTArray { public: explicit AutoRubyTextContainerArray(nsRubyBaseContainerFrame* aBaseContainer); @@ -131,7 +131,7 @@ private: struct MOZ_STACK_CLASS RubyColumn { nsRubyBaseFrame* mBaseFrame; - nsAutoTArray mTextFrames; + AutoTArray mTextFrames; bool mIsIntraLevelWhitespace; RubyColumn() : mBaseFrame(nullptr), mIsIntraLevelWhitespace(false) { } @@ -204,7 +204,7 @@ private: // Frames in this array are NOT necessary part of the current column. // When in doubt, use GetFrameAtLevel to access it. // See GetFrameAtLevel() and Next() for more info. - nsAutoTArray mFrames; + AutoTArray mFrames; // Whether we are on a column for intra-level whitespaces bool mAtIntraLevelWhitespace; }; diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 02626e1d963..01c9b7a275d 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -7219,7 +7219,7 @@ nsBlockFrame::CheckFloats(nsBlockReflowState& aState) bool anyLineDirty = false; // Check that the float list is what we would have built - nsAutoTArray lineFloats; + AutoTArray lineFloats; for (line_iterator line = begin_lines(), line_end = end_lines(); line != line_end; ++line) { if (line->HasFloats()) { @@ -7234,7 +7234,7 @@ nsBlockFrame::CheckFloats(nsBlockReflowState& aState) } } - nsAutoTArray storedFloats; + AutoTArray storedFloats; bool equal = true; uint32_t i = 0; for (nsIFrame* f : mFloats) { diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index d60f91e63fa..c6874b3f355 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -1526,7 +1526,7 @@ nsContainerFrame::DeleteNextInFlowChild(nsIFrame* aNextInFlow, // with very many next-in-flows nsIFrame* nextNextInFlow = aNextInFlow->GetNextInFlow(); if (nextNextInFlow) { - nsAutoTArray frames; + AutoTArray frames; for (nsIFrame* f = nextNextInFlow; f; f = f->GetNextInFlow()) { frames.AppendElement(f); } diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index af5d5b9ee1f..aef9f32e4d4 100644 --- a/layout/generic/nsFlexContainerFrame.cpp +++ b/layout/generic/nsFlexContainerFrame.cpp @@ -3671,7 +3671,7 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext, nscoord contentBoxMainSize = GetMainSizeFromReflowState(aReflowState, axisTracker); - nsAutoTArray struts; + AutoTArray struts; DoFlexLayout(aPresContext, aDesiredSize, aReflowState, aStatus, contentBoxMainSize, availableBSizeForContent, struts, axisTracker); diff --git a/layout/generic/nsFontInflationData.cpp b/layout/generic/nsFontInflationData.cpp index 1809bd5e9da..bd2ec5651f5 100644 --- a/layout/generic/nsFontInflationData.cpp +++ b/layout/generic/nsFontInflationData.cpp @@ -100,7 +100,7 @@ NearestCommonAncestorFirstInFlow(nsIFrame *aFrame1, nsIFrame *aFrame2, aFrame2 = aFrame2->FirstInFlow(); aKnownCommonAncestor = aKnownCommonAncestor->FirstInFlow(); - nsAutoTArray ancestors1, ancestors2; + AutoTArray ancestors1, ancestors2; for (nsIFrame *f = aFrame1; f != aKnownCommonAncestor; (f = f->GetParent()) && (f = f->FirstInFlow())) { ancestors1.AppendElement(f); @@ -132,7 +132,7 @@ ComputeDescendantISize(const nsHTMLReflowState& aAncestorReflowState, return aAncestorReflowState.ComputedISize(); } - AutoInfallibleTArray frames; + AutoTArray frames; for (nsIFrame *f = aDescendantFrame; f != ancestorFrame; f = f->GetParent()->FirstInFlow()) { frames.AppendElement(f); @@ -238,7 +238,7 @@ nsFontInflationData::FindEdgeInflatableFrameIn(nsIFrame* aFrame, } // FIXME: aDirection! - nsAutoTArray lists; + AutoTArray lists; aFrame->GetChildLists(&lists); for (uint32_t i = 0, len = lists.Length(); i < len; ++i) { const nsFrameList& list = diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 7f3bed7cf05..89d7c4acf79 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -5245,7 +5245,7 @@ nsIFrame::InvalidateFrameSubtree(uint32_t aDisplayItemKey) AddStateBits(NS_FRAME_ALL_DESCENDANTS_NEED_PAINT); - nsAutoTArray childListArray; + AutoTArray childListArray; GetCrossDocChildLists(&childListArray); nsIFrame::ChildListArrayIterator lists(childListArray); @@ -5261,7 +5261,7 @@ void nsIFrame::ClearInvalidationStateBits() { if (HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT)) { - nsAutoTArray childListArray; + AutoTArray childListArray; GetCrossDocChildLists(&childListArray); nsIFrame::ChildListArrayIterator lists(childListArray); @@ -8956,7 +8956,7 @@ nsIFrame::AddInPopupStateBitToDescendants(nsIFrame* aFrame) { aFrame->AddStateBits(NS_FRAME_IN_POPUP); - nsAutoTArray childListArray; + AutoTArray childListArray; aFrame->GetCrossDocChildLists(&childListArray); nsIFrame::ChildListArrayIterator lists(childListArray); @@ -8978,7 +8978,7 @@ nsIFrame::RemoveInPopupStateBitFromDescendants(nsIFrame* aFrame) aFrame->RemoveStateBits(NS_FRAME_IN_POPUP); - nsAutoTArray childListArray; + AutoTArray childListArray; aFrame->GetCrossDocChildLists(&childListArray); nsIFrame::ChildListArrayIterator lists(childListArray); diff --git a/layout/generic/nsFrameState.cpp b/layout/generic/nsFrameState.cpp index 3bfadca7d06..2eec729db2f 100644 --- a/layout/generic/nsFrameState.cpp +++ b/layout/generic/nsFrameState.cpp @@ -32,7 +32,7 @@ nsCString GetFrameState(nsIFrame* aFrame) { nsCString result; - nsAutoTArray groups; + AutoTArray groups; nsFrameState state = aFrame->GetStateBits(); diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index e8055cfed8c..5f8c2014bcc 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -2721,7 +2721,7 @@ ScrollFrameHelper::AppendScrollPartsTo(nsDisplayListBuilder* aBuilder, bool overlayScrollbars = LookAndFeel::GetInt(LookAndFeel::eIntID_UseOverlayScrollbars) != 0; - nsAutoTArray scrollParts; + AutoTArray scrollParts; for (nsIFrame* kid : mOuter->PrincipalChildList()) { if (kid == mScrolledFrame || (kid->IsAbsPosContaininingBlock() || overlayScrollbars) != aPositioned) diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index 1c9b3819a5e..907343c61a2 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -958,7 +958,7 @@ struct MOZ_STACK_CLASS nsGridContainerFrame::Tracks } #endif - nsAutoTArray mSizes; + AutoTArray mSizes; nscoord mContentBoxSize; nscoord mGridGap; LogicalAxis mAxis; @@ -2563,7 +2563,7 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSize( // http://dev.w3.org/csswg/css-grid/#algo-content // We're also setting mIsFlexing on the item here to speed up // FindUsedFlexFraction later. - nsAutoTArray stateBitsPerSpan; + AutoTArray stateBitsPerSpan; nsTArray step2Items; GridItemCSSOrderIterator& iter = aState.mIter; nsRenderingContext* rc = &aState.mRenderingContext; diff --git a/layout/generic/nsHTMLReflowState.cpp b/layout/generic/nsHTMLReflowState.cpp index d297a41645d..801144b65d4 100644 --- a/layout/generic/nsHTMLReflowState.cpp +++ b/layout/generic/nsHTMLReflowState.cpp @@ -598,7 +598,7 @@ nsHTMLReflowState::InitResizeFlags(nsPresContext* aPresContext, nsIAtom* aFrameT // frame tree geometry (the width on an ancestor) rather than // style. - nsAutoTArray stack; + AutoTArray stack; stack.AppendElement(frame); do { diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index c4b5e5fbc1e..e26436b4676 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -844,7 +844,7 @@ public: nsPoint GetPositionIgnoringScrolling(); - typedef nsAutoTArray ContentArray; + typedef AutoTArray ContentArray; static void DestroyContentArray(ContentArray* aArray); #define NS_DECLARE_FRAME_PROPERTY_WITH_DTOR(prop, type, dtor) \ diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 7256a013b07..20e6f551283 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -681,16 +681,18 @@ nsImageFrame::NotifyNewCurrentRequest(imgIRequest *aRequest, } if (mState & IMAGE_GOTINITIALREFLOW) { // do nothing if we haven't gotten the initial reflow yet - if (!(mState & IMAGE_SIZECONSTRAINED) && intrinsicSizeChanged) { - nsIPresShell *presShell = PresContext()->GetPresShell(); - if (presShell) { - presShell->FrameNeedsReflow(this, nsIPresShell::eStyleChange, - NS_FRAME_IS_DIRTY); + if (intrinsicSizeChanged) { + if (!(mState & IMAGE_SIZECONSTRAINED)) { + nsIPresShell *presShell = PresContext()->GetPresShell(); + if (presShell) { + presShell->FrameNeedsReflow(this, nsIPresShell::eStyleChange, + NS_FRAME_IS_DIRTY); + } + } else { + // We've already gotten the initial reflow, and our size hasn't changed, + // so we're ready to request a decode. + MaybeDecodeForPredictedSize(); } - } else { - // We've already gotten the initial reflow, and our size hasn't changed, - // so we're ready to request a decode. - MaybeDecodeForPredictedSize(); } // Update border+content to account for image change InvalidateFrame(); diff --git a/layout/generic/nsImageMap.h b/layout/generic/nsImageMap.h index 627657b1045..50dd737972c 100644 --- a/layout/generic/nsImageMap.h +++ b/layout/generic/nsImageMap.h @@ -90,7 +90,7 @@ protected: nsImageFrame* mImageFrame; // the frame that owns us nsCOMPtr mMap; - nsAutoTArray mAreas; // almost always has some entries + AutoTArray mAreas; // almost always has some entries bool mContainsBlockContents; }; diff --git a/layout/generic/nsPluginFrame.cpp b/layout/generic/nsPluginFrame.cpp index 7d40c6b68cd..2c04e83a344 100644 --- a/layout/generic/nsPluginFrame.cpp +++ b/layout/generic/nsPluginFrame.cpp @@ -313,7 +313,7 @@ nsPluginFrame::PrepForDrawing(nsIWidget *aWidget) // will be reset when nsRootPresContext computes our true // geometry. The plugin window does need to have a good size here, so // set the size explicitly to a reasonable guess. - nsAutoTArray configurations; + AutoTArray configurations; nsIWidget::Configuration* configuration = configurations.AppendElement(); nscoord appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel(); configuration->mChild = mWidget; diff --git a/layout/generic/nsRubyBaseContainerFrame.cpp b/layout/generic/nsRubyBaseContainerFrame.cpp index 364324babed..72262b25d33 100644 --- a/layout/generic/nsRubyBaseContainerFrame.cpp +++ b/layout/generic/nsRubyBaseContainerFrame.cpp @@ -334,8 +334,8 @@ nsRubyBaseContainerFrame::Reflow(nsPresContext* aPresContext, // Since there are pointers refer to reflow states and line layouts, // it is necessary to guarantee that they won't be moved. For this // reason, they are wrapped in UniquePtr here. - nsAutoTArray, RTC_ARRAY_SIZE> reflowStates; - nsAutoTArray, RTC_ARRAY_SIZE> lineLayouts; + AutoTArray, RTC_ARRAY_SIZE> reflowStates; + AutoTArray, RTC_ARRAY_SIZE> lineLayouts; reflowStates.SetCapacity(rtcCount); lineLayouts.SetCapacity(rtcCount); @@ -451,7 +451,7 @@ nsRubyBaseContainerFrame::Reflow(nsPresContext* aPresContext, struct MOZ_STACK_CLASS nsRubyBaseContainerFrame::PullFrameState { ContinuationTraversingState mBase; - nsAutoTArray mTexts; + AutoTArray mTexts; const AutoRubyTextContainerArray& mTextContainers; PullFrameState(nsRubyBaseContainerFrame* aBaseContainer, diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index fad6ec2cc8b..177b394a1c2 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -3674,7 +3674,7 @@ Selection::AddItem(nsRange* aItem, int32_t* aOutIndex, bool aNoStartSelect) NS_ASSERTION(aOutIndex, "aOutIndex can't be null"); if (mUserInitiated) { - nsAutoTArray, 4> rangesToAdd; + AutoTArray, 4> rangesToAdd; *aOutIndex = -1; if (!aNoStartSelect && mType == nsISelectionController::SELECTION_NORMAL && diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 8ebe07807c2..a49fc5c4b4b 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -1018,10 +1018,10 @@ public: }; private: - nsAutoTArray mMappedFlows; - nsAutoTArray mLineBreakBeforeFrames; - nsAutoTArray,10> mBreakSinks; - nsAutoTArray mTextRunsToDelete; + AutoTArray mMappedFlows; + AutoTArray mLineBreakBeforeFrames; + AutoTArray,10> mBreakSinks; + AutoTArray mTextRunsToDelete; nsLineBreaker mLineBreaker; gfxTextRun* mCurrentFramesAllSameTextRun; DrawTarget* mDrawTarget; @@ -1500,7 +1500,7 @@ void BuildTextRunsScanner::FlushFrames(bool aFlushLineBreaks, bool aSuppressTrai mNextRunContextInfo |= nsTextFrameUtils::INCOMING_ARABICCHAR; } } else { - AutoFallibleTArray buffer; + AutoTArray buffer; uint32_t bufferSize = mMaxTextLength*(mDoubleByteText ? 2 : 1); if (bufferSize < mMaxTextLength || bufferSize == UINT32_MAX || !buffer.AppendElements(bufferSize, fallible)) { @@ -1923,7 +1923,7 @@ BuildTextRunsScanner::BuildTextRunForFrames(void* aTextBuffer) textFlags |= gfxTextRunFactory::TEXT_INCOMING_ARABICCHAR; } - nsAutoTArray textBreakPoints; + AutoTArray textBreakPoints; TextRunUserData dummyData; TextRunMappedFlow dummyMappedFlow; @@ -2093,7 +2093,7 @@ BuildTextRunsScanner::BuildTextRunForFrames(void* aTextBuffer) if (mDoubleByteText) { // Need to expand the text. First transform it into a temporary buffer, // then expand. - AutoFallibleTArray tempBuf; + AutoTArray tempBuf; uint8_t* bufStart = tempBuf.AppendElements(contentLength, fallible); if (!bufStart) { DestroyUserData(userDataToDestroy); @@ -2174,7 +2174,7 @@ BuildTextRunsScanner::BuildTextRunForFrames(void* aTextBuffer) NS_ASSERTION(nextBreakIndex == mLineBreakBeforeFrames.Length(), "Didn't find all the frames to break-before..."); gfxSkipCharsIterator iter(skipChars); - nsAutoTArray textBreakPointsAfterTransform; + AutoTArray textBreakPointsAfterTransform; for (uint32_t i = 0; i < textBreakPoints.Length(); ++i) { nsTextFrameUtils::AppendLineBreakOffset(&textBreakPointsAfterTransform, iter.ConvertOriginalToSkipped(textBreakPoints[i])); @@ -2304,7 +2304,7 @@ BuildTextRunsScanner::BuildTextRunForFrames(void* aTextBuffer) bool BuildTextRunsScanner::SetupLineBreakerContext(gfxTextRun *aTextRun) { - AutoFallibleTArray buffer; + AutoTArray buffer; uint32_t bufferSize = mMaxTextLength*(mDoubleByteText ? 2 : 1); if (bufferSize < mMaxTextLength || bufferSize == UINT32_MAX) { return false; @@ -2316,7 +2316,7 @@ BuildTextRunsScanner::SetupLineBreakerContext(gfxTextRun *aTextRun) gfxSkipChars skipChars; - nsAutoTArray textBreakPoints; + AutoTArray textBreakPoints; TextRunUserData dummyData; TextRunMappedFlow dummyMappedFlow; @@ -2381,7 +2381,7 @@ BuildTextRunsScanner::SetupLineBreakerContext(gfxTextRun *aTextRun) if (mDoubleByteText) { // Need to expand the text. First transform it into a temporary buffer, // then expand. - AutoFallibleTArray tempBuf; + AutoTArray tempBuf; uint8_t* bufStart = tempBuf.AppendElements(contentLength, fallible); if (!bufStart) { DestroyUserData(userDataToDestroy); @@ -5940,7 +5940,7 @@ nsTextFrame::PaintTextWithSelectionColors(gfxContext* aCtx, nsTextFrame::DrawPathCallbacks* aCallbacks) { // Figure out which selections control the colors to use for each character. - AutoFallibleTArray prevailingSelectionsBuffer; + AutoTArray prevailingSelectionsBuffer; SelectionDetails** prevailingSelections = prevailingSelectionsBuffer.AppendElements(aContentLength, fallible); if (!prevailingSelections) { @@ -6080,7 +6080,7 @@ nsTextFrame::PaintTextSelectionDecorations(gfxContext* aCtx, return; // Figure out which characters will be decorated for this selection. - AutoFallibleTArray selectedCharsBuffer; + AutoTArray selectedCharsBuffer; SelectionDetails** selectedChars = selectedCharsBuffer.AppendElements(aContentLength, fallible); if (!selectedChars) { @@ -7844,7 +7844,7 @@ nsTextFrame::AddInlineMinISizeForFlow(nsRenderingContext *aRenderingContext, uint32_t start = FindStartAfterSkippingWhitespace(&provider, aData, textStyle, &iter, flowEndInTextRun); - AutoFallibleTArray hyphBuffer; + AutoTArray hyphBuffer; bool *hyphBreakBefore = nullptr; if (hyphenating) { hyphBreakBefore = hyphBuffer.AppendElements(flowEndInTextRun - start, diff --git a/layout/generic/nsTextFrame.h b/layout/generic/nsTextFrame.h index 931f79c0a87..84a602c6d05 100644 --- a/layout/generic/nsTextFrame.h +++ b/layout/generic/nsTextFrame.h @@ -662,7 +662,7 @@ protected: } }; struct TextDecorations { - nsAutoTArray mOverlines, mUnderlines, mStrikes; + AutoTArray mOverlines, mUnderlines, mStrikes; TextDecorations() { } diff --git a/layout/generic/nsTextRunTransformations.cpp b/layout/generic/nsTextRunTransformations.cpp index 5b210947ad0..07141d5ce11 100644 --- a/layout/generic/nsTextRunTransformations.cpp +++ b/layout/generic/nsTextRunTransformations.cpp @@ -133,7 +133,7 @@ MergeCharactersInTextRun(gfxTextRun* aDest, gfxTextRun* aSrc, gfxTextRun::GlyphRunIterator iter(aSrc, 0, aSrc->GetLength()); uint32_t offset = 0; - nsAutoTArray glyphs; + AutoTArray glyphs; while (iter.NextRun()) { gfxTextRun::GlyphRun* run = iter.GetGlyphRun(); nsresult rv = aDest->AddGlyphRun(run->mFont, run->mMatchType, @@ -605,10 +605,10 @@ nsCaseTransformTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun, gfxMissingFontRecorder* aMFR) { nsAutoString convertedString; - nsAutoTArray charsToMergeArray; - nsAutoTArray deletedCharsArray; - nsAutoTArray canBreakBeforeArray; - nsAutoTArray,50> styleArray; + AutoTArray charsToMergeArray; + AutoTArray deletedCharsArray; + AutoTArray canBreakBeforeArray; + AutoTArray,50> styleArray; bool mergeNeeded = TransformString(aTextRun->mString, convertedString, diff --git a/layout/generic/test/test_bug632379.xul b/layout/generic/test/test_bug632379.xul index 4a5292e1b03..9c153eabd43 100644 --- a/layout/generic/test/test_bug632379.xul +++ b/layout/generic/test/test_bug632379.xul @@ -165,6 +165,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=632379 diff --git a/layout/inspector/inDOMUtils.cpp b/layout/inspector/inDOMUtils.cpp index d7761ed35e1..5c15eb3d219 100644 --- a/layout/inspector/inDOMUtils.cpp +++ b/layout/inspector/inDOMUtils.cpp @@ -91,7 +91,7 @@ inDOMUtils::GetAllStyleSheets(nsIDOMDocument *aDocument, uint32_t *aLength, for (int32_t i = 0; i < styleSet->SheetCount(sheetType); i++) { sheets.AppendElement(styleSet->StyleSheetAt(sheetType, i)); } - nsAutoTArray xblSheetArray; + AutoTArray xblSheetArray; styleSet->AppendAllXBLStyleSheets(xblSheetArray); // The XBL stylesheet array will quite often be full of duplicates. Cope: diff --git a/layout/mathml/nsMathMLChar.cpp b/layout/mathml/nsMathMLChar.cpp index 3582633fb13..b4c9488d84b 100644 --- a/layout/mathml/nsMathMLChar.cpp +++ b/layout/mathml/nsMathMLChar.cpp @@ -1087,7 +1087,7 @@ public: bool mTryParts; private: - nsAutoTArray mTablesTried; + AutoTArray mTablesTried; bool& mGlyphFound; }; @@ -1653,7 +1653,7 @@ nsMathMLChar::StretchInternal(nsPresContext* aPresContext, // really shouldn't be doing things this way but for now // insert fallbacks into the list - nsAutoTArray mathFallbacks; + AutoTArray mathFallbacks; gfxFontUtils::GetPrefsFontList("font.name.serif.x-math", mathFallbacks); gfxFontUtils::AppendPrefsFontList("font.name-list.serif.x-math", mathFallbacks); diff --git a/layout/mathml/nsMathMLmmultiscriptsFrame.cpp b/layout/mathml/nsMathMLmmultiscriptsFrame.cpp index 126f54ca305..01a3599fe38 100644 --- a/layout/mathml/nsMathMLmmultiscriptsFrame.cpp +++ b/layout/mathml/nsMathMLmmultiscriptsFrame.cpp @@ -59,7 +59,7 @@ nsMathMLmmultiscriptsFrame::TransmitAutomaticData() int32_t count = 0; bool isSubScript = !mContent->IsMathMLElement(nsGkAtoms::msup_); - nsAutoTArray subScriptFrames; + AutoTArray subScriptFrames; nsIFrame* childFrame = mFrames.FirstChild(); while (childFrame) { if (childFrame->GetContent()->IsMathMLElement(nsGkAtoms::mprescripts_)) { diff --git a/layout/reftests/css-blending/reftest.list b/layout/reftests/css-blending/reftest.list index ef93b3ffe8d..868d23f5d94 100644 --- a/layout/reftests/css-blending/reftest.list +++ b/layout/reftests/css-blending/reftest.list @@ -6,7 +6,7 @@ pref(layout.css.mix-blend-mode.enabled,true) == blend-difference-stacking.html b pref(layout.css.background-blend-mode.enabled,true) == background-blending-alpha.html background-blending-alpha-ref.html pref(layout.css.background-blend-mode.enabled,true) == background-blending-gradient-color.html background-blending-gradient-color-ref.html -fuzzy-if(azureSkiaGL,3,7597) fuzzy-if(cocoaWidget,3,7597) fuzzy-if(d2d,1,3800) pref(layout.css.background-blend-mode.enabled,true) == background-blending-gradient-gradient.html background-blending-gradient-gradient-ref.html +fuzzy-if(azureSkiaGL,3,7597) fuzzy-if(cocoaWidget,3,7597) fuzzy-if(d2d,1,3800) fuzzy-if(d3d11,1,4200) pref(layout.css.background-blend-mode.enabled,true) == background-blending-gradient-gradient.html background-blending-gradient-gradient-ref.html fuzzy-if(azureSkiaGL,2,7174) fuzzy-if(azureQuartz,2,7174) pref(layout.css.background-blend-mode.enabled,true) == background-blending-gradient-image.html background-blending-gradient-color-ref.html fuzzy-if(azureQuartz,2,10000) fuzzy-if(azureSkia||d2d||gtkWidget,1,10000) pref(layout.css.background-blend-mode.enabled,true) == background-blending-image-color-jpg.html background-blending-image-color-ref.html pref(layout.css.background-blend-mode.enabled,true) == background-blending-image-color-png.html background-blending-image-color-ref.html @@ -38,10 +38,10 @@ fuzzy-if(azureQuartz,1,1600) fuzzy-if(d2d||azureSkia||gtkWidget,10,4800) pref(la fuzzy-if(azureQuartz,2,40000) fuzzy-if(azureSkia||d2d||gtkWidget,1,40000) pref(layout.css.background-blend-mode.enabled,true) == background-blending-image-color-959674.html background-blending-image-color-959674-ref.html #fuzzy due to inconsistencies in rounded rect cliping between parent and child; may be related to antialiasing. Between platforms, the max difference is the same, and the number of different pixels is either 36 or 37. (Win, Mac and Lin) -fuzzy(64,37) pref(layout.css.mix-blend-mode.enabled,true) == mix-blend-mode-952051.html mix-blend-mode-952051-ref.html +fuzzy(64,53) pref(layout.css.mix-blend-mode.enabled,true) == mix-blend-mode-952051.html mix-blend-mode-952051-ref.html -pref(layout.css.mix-blend-mode.enabled,true) pref(layout.css.filters.enabled,true) == mix-blend-mode-and-filter.html mix-blend-mode-and-filter-ref.html -pref(layout.css.mix-blend-mode.enabled,true) pref(layout.css.filters.enabled,true) == mix-blend-mode-and-filter.svg mix-blend-mode-and-filter-ref.svg +fuzzy-if(d3d11,49,200) pref(layout.css.mix-blend-mode.enabled,true) pref(layout.css.filters.enabled,true) == mix-blend-mode-and-filter.html mix-blend-mode-and-filter-ref.html +fuzzy-if(d3d11,1,3) pref(layout.css.mix-blend-mode.enabled,true) pref(layout.css.filters.enabled,true) == mix-blend-mode-and-filter.svg mix-blend-mode-and-filter-ref.svg fuzzy(1,14400) pref(layout.css.mix-blend-mode.enabled,true) == mix-blend-mode-child-of-blended-has-opacity.html mix-blend-mode-child-of-blended-has-opacity-ref.html diff --git a/layout/style/CSSStyleSheet.cpp b/layout/style/CSSStyleSheet.cpp index f8b79a10ae5..0a825c30a59 100644 --- a/layout/style/CSSStyleSheet.cpp +++ b/layout/style/CSSStyleSheet.cpp @@ -1327,7 +1327,7 @@ nsresult CSSStyleSheet::AddRuleProcessor(nsCSSRuleProcessor* aProcessor) { if (! mRuleProcessors) { - mRuleProcessors = new nsAutoTArray(); + mRuleProcessors = new AutoTArray(); if (!mRuleProcessors) return NS_ERROR_OUT_OF_MEMORY; } diff --git a/layout/style/CSSStyleSheet.h b/layout/style/CSSStyleSheet.h index fcf1f0b82bf..f6c0f91987f 100644 --- a/layout/style/CSSStyleSheet.h +++ b/layout/style/CSSStyleSheet.h @@ -110,7 +110,7 @@ private: size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const; - nsAutoTArray mSheets; + AutoTArray mSheets; nsCOMPtr mSheetURI; // for error reports, etc. nsCOMPtr mOriginalSheetURI; // for GetHref. Can be null. nsCOMPtr mBaseURI; // for resolving relative URIs @@ -426,7 +426,7 @@ protected: CSSStyleSheetInner* mInner; - nsAutoTArray* mRuleProcessors; + AutoTArray* mRuleProcessors; nsTArray mStyleSets; friend class ::nsMediaList; diff --git a/layout/style/CounterStyleManager.cpp b/layout/style/CounterStyleManager.cpp index 8846f80daaa..0055ef2c99a 100644 --- a/layout/style/CounterStyleManager.cpp +++ b/layout/style/CounterStyleManager.cpp @@ -121,7 +121,7 @@ GetAlphabeticCounterText(CounterValue aOrdinal, // The precise length of this array should be // ceil(log((double) aOrdinal / n * (n - 1) + 1) / log(n)). // The max length is slightly smaller than which defined below. - nsAutoTArray::digits> indexes; + AutoTArray::digits> indexes; while (aOrdinal > 0) { --aOrdinal; indexes.AppendElement(aOrdinal % n); @@ -150,7 +150,7 @@ GetNumericCounterText(CounterValue aOrdinal, } auto n = aSymbols.Length(); - nsAutoTArray::digits> indexes; + AutoTArray::digits> indexes; while (aOrdinal > 0) { indexes.AppendElement(aOrdinal % n); aOrdinal /= n; diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index b924fd237e1..78db87e95fa 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -1442,7 +1442,7 @@ Declaration::ToString(nsAString& aString) const int32_t count = mOrder.Length(); int32_t index; - nsAutoTArray shorthandsUsed; + AutoTArray shorthandsUsed; for (index = 0; index < count; index++) { nsCSSProperty property = GetPropertyAt(index); diff --git a/layout/style/Declaration.h b/layout/style/Declaration.h index 335dc0388c2..62043397042 100644 --- a/layout/style/Declaration.h +++ b/layout/style/Declaration.h @@ -411,7 +411,7 @@ private: // Subtracting eCSSProperty_COUNT from those values that represent custom // properties results in an index into mVariableOrder, which identifies the // specific variable the custom property declaration is for. - nsAutoTArray mOrder; + AutoTArray mOrder; // variable names of custom properties found in mOrder nsTArray mVariableOrder; diff --git a/layout/style/FontFace.h b/layout/style/FontFace.h index 4893b4c3960..0b65f7d3611 100644 --- a/layout/style/FontFace.h +++ b/layout/style/FontFace.h @@ -55,14 +55,14 @@ public: virtual void SetLoadState(UserFontLoadState aLoadState) override; virtual void GetUserFontSets(nsTArray& aResult) override; - const nsAutoTArray& GetFontFaces() { return mFontFaces; } + const AutoTArray& GetFontFaces() { return mFontFaces; } protected: // The FontFace objects that use this user font entry. We need to store // an array of these, not just a single pointer, since the user font // cache can return the same entry for different FontFaces that have // the same descriptor values and come from the same origin. - nsAutoTArray mFontFaces; + AutoTArray mFontFaces; }; NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/layout/style/FontFaceSet.cpp b/layout/style/FontFaceSet.cpp index 372bfeea41d..6a18c330dd6 100644 --- a/layout/style/FontFaceSet.cpp +++ b/layout/style/FontFaceSet.cpp @@ -282,7 +282,7 @@ FontFaceSet::FindMatchingFontFaces(const nsAString& aFont, continue; } - nsAutoTArray entries; + AutoTArray entries; bool needsBold; family->FindAllFontsForStyle(style, entries, needsBold); diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index e557c4d1fea..b44828f583f 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -48,7 +48,6 @@ #include "nsThreadUtils.h" #include "nsGkAtoms.h" #include "nsIThreadInternal.h" -#include "nsCORSListenerProxy.h" #include "nsINetworkPredictor.h" #include "mozilla/dom/ShadowRoot.h" #include "mozilla/dom/URL.h" @@ -75,16 +74,14 @@ using namespace mozilla::dom; * The CSS Loader gets requests to load various sorts of style sheets: * inline style from