diff --git a/accessible/aom/AccessibleNode.cpp b/accessible/aom/AccessibleNode.cpp index e899a04400e8..2fb7583c8925 100644 --- a/accessible/aom/AccessibleNode.cpp +++ b/accessible/aom/AccessibleNode.cpp @@ -154,6 +154,7 @@ AccessibleNode::Get(JSContext* aCX, const nsAString& aAttribute, { if (!mIntl) { aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR); + return; } nsCOMPtr attrs = mIntl->Attributes(); @@ -163,6 +164,7 @@ AccessibleNode::Get(JSContext* aCX, const nsAString& aAttribute, JS::Rooted jsval(aCX); if (!ToJSValue(aCX, value, &jsval)) { aRv.Throw(NS_ERROR_UNEXPECTED); + return; } aValue.set(jsval); diff --git a/accessible/tests/browser/e10s/browser_caching_name.js b/accessible/tests/browser/e10s/browser_caching_name.js index 08e635014408..9a5fd3e26d5b 100644 --- a/accessible/tests/browser/e10s/browser_caching_name.js +++ b/accessible/tests/browser/e10s/browser_caching_name.js @@ -392,7 +392,7 @@ function* testSubtreeRule(browser, target, rule, expected) { yield ContentTask.spawn(browser, target.id, id => { let elm = content.document.getElementById(id); while (elm.firstChild) { - elm.removeChild(elm.firstChild); + elm.firstChild.remove(); } }); yield updateAccessibleIfNeeded(onEvent, target); diff --git a/accessible/tests/browser/e10s/browser_treeupdate_doc.js b/accessible/tests/browser/e10s/browser_treeupdate_doc.js index ccb1d15668a1..73c6539e52c2 100644 --- a/accessible/tests/browser/e10s/browser_treeupdate_doc.js +++ b/accessible/tests/browser/e10s/browser_treeupdate_doc.js @@ -157,7 +157,7 @@ addAccessibleTask(` yield ContentTask.spawn(browser, {}, () => { // Remove HTML element. let docNode = content.document.getElementById('iframe').contentDocument; - docNode.removeChild(docNode.firstChild); + docNode.firstChild.remove(); }); let event = yield reorderEventPromise; @@ -235,7 +235,7 @@ addAccessibleTask(` let docEl = content.document.getElementById('iframe').contentDocument.documentElement; // Remove aftermath of this test before next test starts. - docEl.removeChild(docEl.firstChild); + docEl.firstChild.remove(); }); // Make sure reorder event was fired and that the input was removed. yield reorderEventPromise; diff --git a/accessible/tests/browser/e10s/browser_treeupdate_optgroup.js b/accessible/tests/browser/e10s/browser_treeupdate_optgroup.js index 45001afaac34..18953380dcc0 100644 --- a/accessible/tests/browser/e10s/browser_treeupdate_optgroup.js +++ b/accessible/tests/browser/e10s/browser_treeupdate_optgroup.js @@ -56,7 +56,7 @@ addAccessibleTask('', function*(browser, accDoc) { // Remove grouping from combobox yield ContentTask.spawn(browser, {}, () => { let contentSelect = content.document.getElementById('select'); - contentSelect.removeChild(contentSelect.firstChild); + contentSelect.firstChild.remove(); }); yield onEvent; diff --git a/accessible/tests/mochitest/events/test_mutation.html b/accessible/tests/mochitest/events/test_mutation.html index 3e7dab6d46ac..4c9b8f33306a 100644 --- a/accessible/tests/mochitest/events/test_mutation.html +++ b/accessible/tests/mochitest/events/test_mutation.html @@ -414,8 +414,8 @@ var l1 = doc.firstChild; this.target = l1.firstChild; var l2 = doc.lastChild; - l1.DOMNode.removeChild(l1.DOMNode.firstChild); - l2.DOMNode.removeChild(l2.DOMNode.firstChild); + l1.DOMNode.firstChild.remove(); + l2.DOMNode.firstChild.remove(); } this.check = function hideHideNDestroyDoc_check() diff --git a/accessible/tests/mochitest/events/test_text.html b/accessible/tests/mochitest/events/test_text.html index d992d6c641df..76dd1ce49af0 100644 --- a/accessible/tests/mochitest/events/test_text.html +++ b/accessible/tests/mochitest/events/test_text.html @@ -51,7 +51,7 @@ this.invoke = function removeChildSpan_invoke() { // remove HTML span, a first child of the node - this.DOMNode.removeChild(this.DOMNode.firstChild); + this.DOMNode.firstChild.remove(); } this.getID = function removeChildSpan_getID() @@ -162,7 +162,7 @@ this.DOMNode.removeChild(this.DOMNode.lastChild); } else { while (this.DOMNode.firstChild) - this.DOMNode.removeChild(this.DOMNode.firstChild); + this.DOMNode.firstChild.remove(); } } diff --git a/accessible/tests/mochitest/name/markup.js b/accessible/tests/mochitest/name/markup.js index d3ecd8982b08..9d1c09562ed0 100644 --- a/accessible/tests/mochitest/name/markup.js +++ b/accessible/tests/mochitest/name/markup.js @@ -316,7 +316,7 @@ function testNameForSubtreeRule(aElm, aRule) waitForEvent(EVENT_REORDER, aElm, gTestIterator.iterateNext, gTestIterator); while (aElm.firstChild) - aElm.removeChild(aElm.firstChild); + aElm.firstChild.remove(); } /** diff --git a/accessible/tests/mochitest/treeupdate/test_doc.html b/accessible/tests/mochitest/treeupdate/test_doc.html index 05896e7b46fa..3d108b0359dc 100644 --- a/accessible/tests/mochitest/treeupdate/test_doc.html +++ b/accessible/tests/mochitest/treeupdate/test_doc.html @@ -266,7 +266,7 @@ // Remove HTML element. var docNode = getDocNode(aID); - docNode.removeChild(docNode.firstChild); + docNode.firstChild.remove(); } this.getID = function removeHTMLFromIFrameDoc_getID() diff --git a/accessible/tests/mochitest/treeupdate/test_general.html b/accessible/tests/mochitest/treeupdate/test_general.html index 9a8862bea167..64ebdb52412f 100644 --- a/accessible/tests/mochitest/treeupdate/test_general.html +++ b/accessible/tests/mochitest/treeupdate/test_general.html @@ -64,7 +64,7 @@ this.invoke = function removeRemove_invoke() { - getNode(aContainer).removeChild(getNode(aContainer).firstChild); + getNode(aContainer).firstChild.remove(); } this.finalCheck = function removeRemove_finalCheck() diff --git a/accessible/tests/mochitest/treeupdate/test_optgroup.html b/accessible/tests/mochitest/treeupdate/test_optgroup.html index 27323bbc38da..22495c8e9273 100644 --- a/accessible/tests/mochitest/treeupdate/test_optgroup.html +++ b/accessible/tests/mochitest/treeupdate/test_optgroup.html @@ -77,7 +77,7 @@ this.invoke = function removeOptGroup_invoke() { this.option1Node = this.selectNode.firstChild.firstChild; - this.selectNode.removeChild(this.selectNode.firstChild); + this.selectNode.firstChild.remove(); } this.eventSeq = [ diff --git a/browser/base/content/browser-ctrlTab.js b/browser/base/content/browser-ctrlTab.js index df51349edb19..3e69c3b442fb 100644 --- a/browser/base/content/browser-ctrlTab.js +++ b/browser/base/content/browser-ctrlTab.js @@ -241,7 +241,7 @@ var ctrlTab = { aPreview._tab = aTab; if (aPreview.firstChild) - aPreview.removeChild(aPreview.firstChild); + aPreview.firstChild.remove(); if (aTab) { let canvasWidth = this.canvasWidth; let canvasHeight = this.canvasHeight; diff --git a/browser/base/content/browser-fxaccounts.js b/browser/base/content/browser-fxaccounts.js index 77f5e898ecda..7c6b16ab5456 100644 --- a/browser/base/content/browser-fxaccounts.js +++ b/browser/base/content/browser-fxaccounts.js @@ -330,7 +330,7 @@ var gFxAccounts = { populateSendTabToDevicesMenu(devicesPopup, url, title) { // remove existing menu items while (devicesPopup.hasChildNodes()) { - devicesPopup.removeChild(devicesPopup.firstChild); + devicesPopup.firstChild.remove(); } const fragment = document.createDocumentFragment(); diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index 372d107c5cf8..16dfd6d0d081 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -746,7 +746,7 @@ HistoryMenu.prototype = { // remove existing menu items while (undoPopup.hasChildNodes()) - undoPopup.removeChild(undoPopup.firstChild); + undoPopup.firstChild.remove(); // no restorable tabs, so make sure menu is disabled, and return if (this._getClosedTabCount() == 0) { @@ -782,7 +782,7 @@ HistoryMenu.prototype = { // remove existing menu items while (undoPopup.hasChildNodes()) - undoPopup.removeChild(undoPopup.firstChild); + undoPopup.firstChild.remove(); // no restorable windows, so make sure menu is disabled, and return if (SessionStore.getClosedWindowCount() == 0) { diff --git a/browser/base/content/pageinfo/pageInfo.js b/browser/base/content/pageinfo/pageInfo.js index 98b12358beab..fca9da232b05 100644 --- a/browser/base/content/pageinfo/pageInfo.js +++ b/browser/base/content/pageinfo/pageInfo.js @@ -418,7 +418,7 @@ function resetPageInfo(args) { /* Reset Feeds Tab */ var feedListbox = document.getElementById("feedListbox"); while (feedListbox.firstChild) - feedListbox.removeChild(feedListbox.firstChild); + feedListbox.firstChild.remove(); /* Call registered overlay reset functions */ onResetRegistry.forEach(function(func) { func(); }); diff --git a/browser/base/content/pageinfo/security.js b/browser/base/content/pageinfo/security.js index 6daf61d14e03..507b477bed75 100644 --- a/browser/base/content/pageinfo/security.js +++ b/browser/base/content/pageinfo/security.js @@ -306,7 +306,7 @@ function setText(id, value) { element.value = value; else { if (element.hasChildNodes()) - element.removeChild(element.firstChild); + element.firstChild.remove(); var textNode = document.createTextNode(value); element.appendChild(textNode); } diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js index 94c1c98b0db8..9d37b9b816bb 100644 --- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -490,7 +490,7 @@ function createUserContextMenu(event, { useAccessKeys = true } = {}) { while (event.target.hasChildNodes()) { - event.target.removeChild(event.target.firstChild); + event.target.firstChild.remove(); } let bundle = document.getElementById("bundle_browser"); diff --git a/browser/components/customizableui/CustomizableWidgets.jsm b/browser/components/customizableui/CustomizableWidgets.jsm index 36f659ae82d3..e2959dbd7fe7 100644 --- a/browser/components/customizableui/CustomizableWidgets.jsm +++ b/browser/components/customizableui/CustomizableWidgets.jsm @@ -244,12 +244,12 @@ const CustomizableWidgets = [ let recentlyClosedTabs = doc.getElementById("PanelUI-recentlyClosedTabs"); while (recentlyClosedTabs.firstChild) { - recentlyClosedTabs.removeChild(recentlyClosedTabs.firstChild); + recentlyClosedTabs.firstChild.remove(); } let recentlyClosedWindows = doc.getElementById("PanelUI-recentlyClosedWindows"); while (recentlyClosedWindows.firstChild) { - recentlyClosedWindows.removeChild(recentlyClosedWindows.firstChild); + recentlyClosedWindows.firstChild.remove(); } let utils = RecentlyClosedTabsAndWindowsMenuUtils; diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js index 6b29f3eee2fc..2ecddcbd7789 100644 --- a/browser/components/customizableui/content/panelUI.js +++ b/browser/components/customizableui/content/panelUI.js @@ -492,7 +492,7 @@ const PanelUI = { // Remove all buttons from the view while (items.firstChild) { - items.removeChild(items.firstChild); + items.firstChild.remove(); } // Add the current set of menuitems of the Help menu to this view diff --git a/browser/components/feeds/FeedWriter.js b/browser/components/feeds/FeedWriter.js index a99bc4178d18..d82901e4aeb3 100644 --- a/browser/components/feeds/FeedWriter.js +++ b/browser/components/feeds/FeedWriter.js @@ -173,7 +173,7 @@ FeedWriter.prototype = { let element = this._document.getElementById(id); let textNode = text.createDocumentFragment(element); while (element.hasChildNodes()) - element.removeChild(element.firstChild); + element.firstChild.remove(); element.appendChild(textNode); if (text.base) { element.setAttributeNS(XML_NS, "base", text.base.spec); diff --git a/browser/components/migration/content/migration.js b/browser/components/migration/content/migration.js index c5d485f12579..87b229a444ca 100644 --- a/browser/components/migration/content/migration.js +++ b/browser/components/migration/content/migration.js @@ -185,7 +185,7 @@ var MigrationWizard = { /* exported MigrationWizard */ var profiles = document.getElementById("profiles"); while (profiles.hasChildNodes()) - profiles.removeChild(profiles.firstChild); + profiles.firstChild.remove(); // Note that this block is still reached even if the user chose 'From File' // and we canceled the dialog. When that happens, _migrator will be null. @@ -225,7 +225,7 @@ var MigrationWizard = { /* exported MigrationWizard */ onImportItemsPageShow() { var dataSources = document.getElementById("dataSources"); while (dataSources.hasChildNodes()) - dataSources.removeChild(dataSources.firstChild); + dataSources.firstChild.remove(); var items = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate); for (var i = 0; i < 16; ++i) { @@ -367,7 +367,7 @@ var MigrationWizard = { /* exported MigrationWizard */ _listItems(aID) { var items = document.getElementById(aID); while (items.hasChildNodes()) - items.removeChild(items.firstChild); + items.firstChild.remove(); var itemID; for (var i = 0; i < 16; ++i) { diff --git a/browser/components/places/content/browserPlacesViews.js b/browser/components/places/content/browserPlacesViews.js index 1a40b334bceb..7dea0891dcd8 100644 --- a/browser/components/places/content/browserPlacesViews.js +++ b/browser/components/places/content/browserPlacesViews.js @@ -1011,7 +1011,7 @@ PlacesToolbar.prototype = { this._openedMenuButton = null; while (this._rootElt.hasChildNodes()) { - this._rootElt.removeChild(this._rootElt.firstChild); + this._rootElt.firstChild.remove(); } let cc = this._resultNode.childCount; @@ -1952,7 +1952,7 @@ PlacesPanelMenuView.prototype = { // Container is the toolbar itself. while (this._rootElt.hasChildNodes()) { - this._rootElt.removeChild(this._rootElt.firstChild); + this._rootElt.firstChild.remove(); } for (let i = 0; i < this._resultNode.childCount; ++i) { diff --git a/browser/components/places/content/places.js b/browser/components/places/content/places.js index 0ec3ef7531dd..bb97ea1c63fd 100644 --- a/browser/components/places/content/places.js +++ b/browser/components/places/content/places.js @@ -419,7 +419,7 @@ var PlacesOrganizer = { // Remove existing menu items. Last item is the restoreFromFile item. while (restorePopup.childNodes.length > 1) - restorePopup.removeChild(restorePopup.firstChild); + restorePopup.firstChild.remove(); Task.spawn(function* () { let backupFiles = yield PlacesBackups.getBackupFiles(); @@ -1007,7 +1007,7 @@ var ViewMenu = { return endElement; } while (popup.hasChildNodes()) { - popup.removeChild(popup.firstChild); + popup.firstChild.remove(); } return null; }, diff --git a/browser/components/preferences/blocklists.js b/browser/components/preferences/blocklists.js index c90d7ae5b773..c924133fd549 100644 --- a/browser/components/preferences/blocklists.js +++ b/browser/components/preferences/blocklists.js @@ -81,7 +81,7 @@ var gBlocklistManager = { let blocklistsText = document.getElementById("blocklistsText"); while (blocklistsText.hasChildNodes()) { - blocklistsText.removeChild(blocklistsText.firstChild); + blocklistsText.firstChild.remove(); } blocklistsText.appendChild(document.createTextNode(params.introText)); diff --git a/browser/components/preferences/in-content/advanced.js b/browser/components/preferences/in-content/advanced.js index fc345f8f60d4..3f23def56226 100644 --- a/browser/components/preferences/in-content/advanced.js +++ b/browser/components/preferences/in-content/advanced.js @@ -557,7 +557,7 @@ var gAdvancedPane = { var list = document.getElementById("offlineAppsList"); while (list.firstChild) { - list.removeChild(list.firstChild); + list.firstChild.remove(); } var groups; diff --git a/browser/components/preferences/languages.js b/browser/components/preferences/languages.js index 6ad9bb13673e..e107a252a139 100644 --- a/browser/components/preferences/languages.js +++ b/browser/components/preferences/languages.js @@ -97,7 +97,7 @@ var gLanguagesDialog = { _buildAvailableLanguageList() { var availableLanguagesPopup = document.getElementById("availableLanguagesPopup"); while (availableLanguagesPopup.hasChildNodes()) - availableLanguagesPopup.removeChild(availableLanguagesPopup.firstChild); + availableLanguagesPopup.firstChild.remove(); // Sort the list of languages by name this._availableLanguagesList.sort(function(a, b) { @@ -119,7 +119,7 @@ var gLanguagesDialog = { readAcceptLanguages() { while (this._activeLanguages.hasChildNodes()) - this._activeLanguages.removeChild(this._activeLanguages.firstChild); + this._activeLanguages.firstChild.remove(); var selectedIndex = 0; var preference = document.getElementById("intl.accept_languages"); diff --git a/browser/components/preferences/permissions.js b/browser/components/preferences/permissions.js index 1e188afcd23d..416d07e0bd57 100644 --- a/browser/components/preferences/permissions.js +++ b/browser/components/preferences/permissions.js @@ -218,7 +218,7 @@ var gPermissionManager = { var permissionsText = document.getElementById("permissionsText"); while (permissionsText.hasChildNodes()) - permissionsText.removeChild(permissionsText.firstChild); + permissionsText.firstChild.remove(); permissionsText.appendChild(document.createTextNode(aParams.introText)); document.title = aParams.windowTitle; diff --git a/browser/components/syncedtabs/SyncedTabsDeckView.js b/browser/components/syncedtabs/SyncedTabsDeckView.js index 4a31080297b5..8962e7b1854b 100644 --- a/browser/components/syncedtabs/SyncedTabsDeckView.js +++ b/browser/components/syncedtabs/SyncedTabsDeckView.js @@ -100,7 +100,7 @@ SyncedTabsDeckView.prototype = { _clearChilden() { while (this.container.firstChild) { - this.container.removeChild(this.container.firstChild); + this.container.firstChild.remove(); } }, diff --git a/browser/components/syncedtabs/TabListView.js b/browser/components/syncedtabs/TabListView.js index a8d1ed9c66f6..fc68cd73dea1 100644 --- a/browser/components/syncedtabs/TabListView.js +++ b/browser/components/syncedtabs/TabListView.js @@ -169,7 +169,7 @@ TabListView.prototype = { _clearChilden(node) { let parent = node || this.container; while (parent.firstChild) { - parent.removeChild(parent.firstChild); + parent.firstChild.remove(); } }, diff --git a/browser/components/uitour/UITour.jsm b/browser/components/uitour/UITour.jsm index 4048ff1c490c..e1890a68c1bb 100644 --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm @@ -1236,7 +1236,7 @@ this.UITour = { // Remove all the children of the notice (rating container // and the flex). while (notice.firstChild) { - notice.removeChild(notice.firstChild); + notice.firstChild.remove(); } // Make sure that we have a valid URL. If we haven't, do not open the engagement page. diff --git a/browser/extensions/mortar/ppapi/generators/idl_gen_rpc.py b/browser/extensions/mortar/ppapi/generators/idl_gen_rpc.py index cd71c6cae926..907ab26ce26d 100755 --- a/browser/extensions/mortar/ppapi/generators/idl_gen_rpc.py +++ b/browser/extensions/mortar/ppapi/generators/idl_gen_rpc.py @@ -43,6 +43,7 @@ customAPIs = { ('PPB_PDF', 'SetAccessibilityPageInfo', 'text_runs'): { 'arraySize': 'page_info->text_run_count' }, ('PPB_PDF', 'SetAccessibilityPageInfo', 'chars'): { 'arraySize': 'page_info->char_count' }, ('PPB_TCPSocket_Private', 'Write', 'buffer'): { 'array': True, 'arrayType': 'uint8_t', 'arraySize': 'bytes_to_write' }, + ('PPP_Printing_Dev', 'PrintPages', 'page_ranges'): { 'array': True, 'arraySize': None }, } def getCustom(interface, member, param): def matches(pattern, value): @@ -335,7 +336,10 @@ class RPCGen(object): for param in callnode.GetListOf('Param'): mode = self.cgen.GetParamMode(param) ptype, pname, parray, pspec = self.cgen.GetComponents(param, release, "store") - out += ' ' + self.cgen.Compose(ptype, pname, parray, pspec, '', func_as_ptr=True, + prefix = '' + if getCustom(iface.GetName(), node.GetName(), param.GetName()).get("array"): + prefix = '*' + out += ' ' + self.cgen.Compose(ptype, pname, parray, pspec, prefix, func_as_ptr=True, include_name=True, unsized_as_ptr=True) + ';\n' if mode == 'out': if len(parray) > 0: @@ -359,7 +363,8 @@ class RPCGen(object): mode = self.cgen.GetParamMode(param) ntype, mode = self.cgen.GetRootTypeMode(param, release, mode) ptype, pname, parray, pspec = self.cgen.GetComponents(param, release, mode) - if mode == 'out' or ntype == 'Struct' or (mode == 'constptr_in' and ntype == 'TypeValue'): + isArray = getCustom(iface.GetName(), node.GetName(), param.GetName()).get("array") + if (mode == 'out' or ntype == 'Struct' or (mode == 'constptr_in' and ntype == 'TypeValue')) and not isArray: pname = '&' + pname pname = '(' + self.cgen.Compose(ptype, pname, parray, pspec, '', func_as_ptr=True, include_name=False, unsized_as_ptr=True) + ')' + pname diff --git a/browser/extensions/mortar/ppapi/out/rpc.cc b/browser/extensions/mortar/ppapi/out/rpc.cc index 62f11010114d..195e0645e8d3 100644 --- a/browser/extensions/mortar/ppapi/out/rpc.cc +++ b/browser/extensions/mortar/ppapi/out/rpc.cc @@ -237,74 +237,6 @@ inline bool PP_ToBool(PP_Bool b) { #endif /* __cplusplus */ -/* pp_point.idl */ -/** - * @addtogroup Structs - * @{ - */ -/** - * The PP_Point structure defines the integer x and y coordinates of a point. - */ -struct PP_Point { - /** - * This value represents the horizontal coordinate of a point, starting with 0 - * as the left-most coordinate. - */ - int32_t x; - /** - * This value represents the vertical coordinate of a point, starting with 0 - * as the top-most coordinate. - */ - int32_t y; -}; -PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Point, 8); - -/** - * The PP_FloatPoint structure defines the floating-point x and y coordinates - * of a point. - */ -struct PP_FloatPoint { - float x; - float y; -}; -PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_FloatPoint, 8); -/** - * @} - */ - -/** - * @addtogroup Functions - * @{ - */ - -/** - * PP_MakePoint() creates a PP_Point given the x and y coordinates - * as int32_t values. - * - * @param[in] x An int32_t value representing a horizontal coordinate of a - * point, starting with 0 as the left-most coordinate. - * @param[in] y An int32_t value representing a vertical coordinate of a point, - * starting with 0 as the top-most coordinate. - * - * @return A PP_Point structure. - */ -PP_INLINE struct PP_Point PP_MakePoint(int32_t x, int32_t y) { - struct PP_Point ret; - ret.x = x; - ret.y = y; - return ret; -} - -PP_INLINE struct PP_FloatPoint PP_MakeFloatPoint(float x, float y) { - struct PP_FloatPoint ret; - ret.x = x; - ret.y = y; - return ret; -} -/** - * @} - */ - /* pp_size.idl */ /** * @addtogroup Structs @@ -373,6 +305,74 @@ PP_INLINE struct PP_FloatSize PP_MakeFloatSize(float w, float h) { /** * @} */ +/* pp_point.idl */ +/** + * @addtogroup Structs + * @{ + */ +/** + * The PP_Point structure defines the integer x and y coordinates of a point. + */ +struct PP_Point { + /** + * This value represents the horizontal coordinate of a point, starting with 0 + * as the left-most coordinate. + */ + int32_t x; + /** + * This value represents the vertical coordinate of a point, starting with 0 + * as the top-most coordinate. + */ + int32_t y; +}; +PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Point, 8); + +/** + * The PP_FloatPoint structure defines the floating-point x and y coordinates + * of a point. + */ +struct PP_FloatPoint { + float x; + float y; +}; +PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_FloatPoint, 8); +/** + * @} + */ + +/** + * @addtogroup Functions + * @{ + */ + +/** + * PP_MakePoint() creates a PP_Point given the x and y coordinates + * as int32_t values. + * + * @param[in] x An int32_t value representing a horizontal coordinate of a + * point, starting with 0 as the left-most coordinate. + * @param[in] y An int32_t value representing a vertical coordinate of a point, + * starting with 0 as the top-most coordinate. + * + * @return A PP_Point structure. + */ +PP_INLINE struct PP_Point PP_MakePoint(int32_t x, int32_t y) { + struct PP_Point ret; + ret.x = x; + ret.y = y; + return ret; +} + +PP_INLINE struct PP_FloatPoint PP_MakeFloatPoint(float x, float y) { + struct PP_FloatPoint ret; + ret.x = x; + ret.y = y; + return ret; +} +/** + * @} + */ + /* pp_rect.idl */ /** * @addtogroup Structs @@ -49238,14 +49238,22 @@ char* Call_PPP_Printing_Dev_PrintPages(const PPP_Printing_Dev* _interface, JSONI PP_Instance instance; iterator.skip(); FromJSON_PP_Instance(iterator, instance); - struct PP_PrintPageNumberRange_Dev page_ranges; + struct PP_PrintPageNumberRange_Dev *page_ranges; iterator.skip(); - FromJSON_PP_PrintPageNumberRange_Dev(iterator, page_ranges); + + { + size_t children = iterator.expectArrayAndGotoFirstItem(); + page_ranges = new struct PP_PrintPageNumberRange_Dev[children]; + for (uint32_t _n = 0; _n < children; ++_n) { + FromJSON_PP_PrintPageNumberRange_Dev(iterator, (page_ranges)[_n]); + } + // FIXME Null out remaining items? + } uint32_t page_range_count; iterator.skip(); FromJSON_uint32_t(iterator, page_range_count); int32_t rval; - rval = _interface->PrintPages((PP_Instance )instance, (const struct PP_PrintPageNumberRange_Dev* )&page_ranges, (uint32_t )page_range_count); + rval = _interface->PrintPages((PP_Instance )instance, (const struct PP_PrintPageNumberRange_Dev* )page_ranges, (uint32_t )page_range_count); return strdup(ToString_PP_Resource(rval).c_str()); } char* Call_PPP_Printing_Dev_End(const PPP_Printing_Dev* _interface, JSONIterator& iterator) { diff --git a/browser/extensions/pdfjs/content/web/viewer.js b/browser/extensions/pdfjs/content/web/viewer.js index 42182992db0b..765f52e6d530 100644 --- a/browser/extensions/pdfjs/content/web/viewer.js +++ b/browser/extensions/pdfjs/content/web/viewer.js @@ -3898,7 +3898,7 @@ var PDFAttachmentViewer = function PDFAttachmentViewerClosure() { this.attachments = null; var container = this.container; while (container.firstChild) { - container.removeChild(container.firstChild); + container.firstChild.remove(); } if (!keepRenderedCapability) { this._renderedCapability = pdfjsLib.createPromiseCapability(); @@ -4598,7 +4598,7 @@ var PDFOutlineViewer = function PDFOutlineViewerClosure() { this.lastToggleIsShow = true; var container = this.container; while (container.firstChild) { - container.removeChild(container.firstChild); + container.firstChild.remove(); } }, _dispatchEvent: function PDFOutlineViewer_dispatchEvent(outlineCount) { diff --git a/build/clang-plugin/Checks.inc b/build/clang-plugin/Checks.inc index ee6010120f68..2d90cbd92dda 100644 --- a/build/clang-plugin/Checks.inc +++ b/build/clang-plugin/Checks.inc @@ -10,6 +10,7 @@ CHECK(ExplicitImplicitChecker, "implicit-constructor") CHECK(ExplicitOperatorBoolChecker, "explicit-operator-bool") CHECK(KungFuDeathGripChecker, "kungfu-death-grip") CHECK(MustOverrideChecker, "must-override") +CHECK(MustReturnFromCallerChecker, "must-return-from-caller") CHECK(MustUseChecker, "must-use") CHECK(NaNExprChecker, "nan-expr") CHECK(NeedsNoVTableTypeChecker, "needs-no-vtable-type") diff --git a/build/clang-plugin/ChecksIncludes.inc b/build/clang-plugin/ChecksIncludes.inc index ec6bf561bd3f..56aa20c95bb6 100644 --- a/build/clang-plugin/ChecksIncludes.inc +++ b/build/clang-plugin/ChecksIncludes.inc @@ -11,6 +11,7 @@ #include "ExplicitOperatorBoolChecker.h" #include "KungFuDeathGripChecker.h" #include "MustOverrideChecker.h" +#include "MustReturnFromCallerChecker.h" #include "MustUseChecker.h" #include "NaNExprChecker.h" #include "NeedsNoVTableTypeChecker.h" diff --git a/build/clang-plugin/CustomMatchers.h b/build/clang-plugin/CustomMatchers.h index 456b06a7b89d..3206da380847 100644 --- a/build/clang-plugin/CustomMatchers.h +++ b/build/clang-plugin/CustomMatchers.h @@ -231,6 +231,11 @@ AST_MATCHER(CXXMethodDecl, isNonVirtual) { const CXXMethodDecl *Decl = Node.getCanonicalDecl(); return Decl && !Decl->isVirtual(); } + +AST_MATCHER(FunctionDecl, isMozMustReturnFromCaller) { + const FunctionDecl *Decl = Node.getCanonicalDecl(); + return Decl && hasCustomAnnotation(Decl, "moz_must_return_from_caller"); +} } } diff --git a/build/clang-plugin/MustReturnFromCallerChecker.cpp b/build/clang-plugin/MustReturnFromCallerChecker.cpp new file mode 100644 index 000000000000..d43204ad7dee --- /dev/null +++ b/build/clang-plugin/MustReturnFromCallerChecker.cpp @@ -0,0 +1,105 @@ +/* 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/. */ + +#include "MustReturnFromCallerChecker.h" +#include "CustomMatchers.h" + +void MustReturnFromCallerChecker::registerMatchers(MatchFinder* AstMatcher) { + // Look for a call to a MOZ_MUST_RETURN_FROM_CALLER function + AstMatcher->addMatcher(callExpr(callee(functionDecl(isMozMustReturnFromCaller())), + anyOf(hasAncestor(lambdaExpr().bind("containing-lambda")), + hasAncestor(functionDecl().bind("containing-func")))).bind("call"), + this); +} + +void MustReturnFromCallerChecker::check( + const MatchFinder::MatchResult& Result) { + const auto *ContainingLambda = + Result.Nodes.getNodeAs("containing-lambda"); + const auto *ContainingFunc = + Result.Nodes.getNodeAs("containing-func"); + const auto *Call = Result.Nodes.getNodeAs("call"); + + Stmt *Body = nullptr; + if (ContainingLambda) { + Body = ContainingLambda->getBody(); + } else if (ContainingFunc) { + Body = ContainingFunc->getBody(); + } else { + return; + } + assert(Body && "Should have a body by this point"); + + // Generate the CFG for the enclosing function or decl. + CFG::BuildOptions Options; + std::unique_ptr TheCFG = + CFG::buildCFG(nullptr, Body, Result.Context, Options); + if (!TheCFG) { + return; + } + + // Determine which block in the CFG we want to look at the successors of. + StmtToBlockMap BlockMap(TheCFG.get(), Result.Context); + size_t CallIndex; + const auto *Block = BlockMap.blockContainingStmt(Call, &CallIndex); + assert(Block && "This statement should be within the CFG!"); + + if (!immediatelyReturns(Block, Result.Context, CallIndex + 1)) { + diag(Call->getLocStart(), + "You must immediately return after calling this function", + DiagnosticIDs::Error); + } +} + +bool +MustReturnFromCallerChecker::immediatelyReturns(RecurseGuard Block, + ASTContext *TheContext, + size_t FromIdx) { + if (Block.isRepeat()) { + return false; + } + + for (size_t I = FromIdx; I < Block->size(); ++I) { + Optional S = (*Block)[I].getAs(); + if (!S) { + continue; + } + + auto AfterTrivials = IgnoreTrivials(S->getStmt()); + + // If we are looking at a ConstructExpr, a DeclRefExpr or a MemberExpr it's + // OK to use them after a call to a MOZ_MUST_RETURN_FROM_CALLER function. + // It is also, of course, OK to look at a ReturnStmt. + if (isa(AfterTrivials) || + isa(AfterTrivials) || + isa(AfterTrivials) || + isa(AfterTrivials)) { + continue; + } + + // It's also OK to call any function or method which is annotated with + // MOZ_MAY_CALL_AFTER_MUST_RETURN. We consider all CXXConversionDecls + // to be MOZ_MAY_CALL_AFTER_MUST_RETURN (like operator T*()). + if (auto CE = dyn_cast(AfterTrivials)) { + auto Callee = CE->getDirectCallee(); + if (Callee && hasCustomAnnotation(Callee, "moz_may_call_after_must_return")) { + continue; + } + + if (Callee && isa(Callee)) { + continue; + } + } + + // Otherwise, this expression is problematic. + return false; + } + + for (auto Succ = Block->succ_begin(); Succ != Block->succ_end(); ++Succ) { + if (!immediatelyReturns(Block.recurse(*Succ), TheContext, 0)) { + return false; + } + } + return true; +} diff --git a/build/clang-plugin/MustReturnFromCallerChecker.h b/build/clang-plugin/MustReturnFromCallerChecker.h new file mode 100644 index 000000000000..11dbdc5a34a5 --- /dev/null +++ b/build/clang-plugin/MustReturnFromCallerChecker.h @@ -0,0 +1,26 @@ +/* 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 MustReturnFromCallerChecker_h__ +#define MustReturnFromCallerChecker_h__ + +#include "plugin.h" +#include "Utils.h" +#include "RecurseGuard.h" +#include "StmtToBlockMap.h" + +class MustReturnFromCallerChecker : public BaseCheck { +public: + MustReturnFromCallerChecker(StringRef CheckName, + ContextType *Context = nullptr) + : BaseCheck(CheckName, Context) {} + void registerMatchers(MatchFinder* AstMatcher) override; + void check(const MatchFinder::MatchResult &Result) override; +private: + bool immediatelyReturns(RecurseGuard Block, + ASTContext *TheContext, + size_t FromIdx); +}; + +#endif diff --git a/build/clang-plugin/RecurseGuard.h b/build/clang-plugin/RecurseGuard.h new file mode 100644 index 000000000000..1f1b359b94f0 --- /dev/null +++ b/build/clang-plugin/RecurseGuard.h @@ -0,0 +1,63 @@ +/* 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 RecurseGuard_h__ +#define RecurseGuard_h__ + +#include "Utils.h" + +// This class acts as a tracker for avoiding infinite recursion when traversing +// chains in CFGs etc. +// +// Constructing a RecurseGuard sets up a shared backing store which tracks the +// currently observed objects. Whenever recursing, use RecurseGuard.recurse(T) +// to construct another RecurseGuard with the same backing store. +// +// The RecurseGuard object will unregister its object when it is destroyed, and +// has a method `isRepeat()` which will return `true` if the item was already +// seen. +template +class RecurseGuard { +public: + RecurseGuard(T Thing) : Thing(Thing), Set(new DenseSet()), Repeat(false) { + Set->insert(Thing); + } + RecurseGuard(T Thing, std::shared_ptr>& Set) + : Thing(Thing), Set(Set), Repeat(false) { + Repeat = !Set->insert(Thing).second; + } + RecurseGuard(const RecurseGuard &) = delete; + RecurseGuard(RecurseGuard && Other) + : Thing(Other.Thing), Set(Other.Set), Repeat(Other.Repeat) { + Other.Repeat = true; + } + ~RecurseGuard() { + if (!Repeat) { + Set->erase(Thing); + } + } + + bool isRepeat() { return Repeat; } + + T get() { return Thing; } + + operator T() { + return Thing; + } + + T operator ->() { + return Thing; + } + + RecurseGuard recurse(T NewThing) { + return RecurseGuard(NewThing, Set); + } + +private: + T Thing; + std::shared_ptr> Set; + bool Repeat; +}; + +#endif // RecurseGuard_h__ diff --git a/build/clang-plugin/StmtToBlockMap.h b/build/clang-plugin/StmtToBlockMap.h new file mode 100644 index 000000000000..7124ef8fbad9 --- /dev/null +++ b/build/clang-plugin/StmtToBlockMap.h @@ -0,0 +1,86 @@ +/* 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 StmtToBlockMap_h__ +#define StmtToBlockMap_h__ + +#include "Utils.h" + +// This method is copied from clang-tidy's ExprSequence.cpp. +// +// Returns the Stmt nodes that are parents of 'S', skipping any potential +// intermediate non-Stmt nodes. +// +// In almost all cases, this function returns a single parent or no parents at +// all. +inline SmallVector getParentStmts(const Stmt *S, + ASTContext *Context) { + SmallVector Result; + + ASTContext::DynTypedNodeList Parents = Context->getParents(*S); + + SmallVector NodesToProcess(Parents.begin(), + Parents.end()); + + while (!NodesToProcess.empty()) { + ast_type_traits::DynTypedNode Node = NodesToProcess.back(); + NodesToProcess.pop_back(); + + if (const auto *S = Node.get()) { + Result.push_back(S); + } else { + Parents = Context->getParents(Node); + NodesToProcess.append(Parents.begin(), Parents.end()); + } + } + + return Result; +} + +// This class is a modified version of the class from clang-tidy's ExprSequence.cpp +// +// Maps `Stmt`s to the `CFGBlock` that contains them. Some `Stmt`s may be +// contained in more than one `CFGBlock`; in this case, they are mapped to the +// innermost block (i.e. the one that is furthest from the root of the tree). +// An optional outparameter provides the index into the block where the `Stmt` +// was found. +class StmtToBlockMap { +public: + // Initializes the map for the given `CFG`. + StmtToBlockMap(const CFG *TheCFG, ASTContext *TheContext) : Context(TheContext) { + for (const auto *B : *TheCFG) { + for (size_t I = 0; I < B->size(); ++I) { + if (Optional S = (*B)[I].getAs()) { + Map[S->getStmt()] = std::make_pair(B, I); + } + } + } + } + + // Returns the block that S is contained in. Some `Stmt`s may be contained + // in more than one `CFGBlock`; in this case, this function returns the + // innermost block (i.e. the one that is furthest from the root of the tree). + // + // The optional outparameter `Index` is set to the index into the block where + // the `Stmt` was found. + const CFGBlock *blockContainingStmt(const Stmt *S, size_t *Index = nullptr) const { + while (!Map.count(S)) { + SmallVector Parents = getParentStmts(S, Context); + if (Parents.empty()) + return nullptr; + S = Parents[0]; + } + + const auto &E = Map.lookup(S); + if (Index) *Index = E.second; + return E.first; + } + +private: + ASTContext *Context; + + llvm::DenseMap> Map; +}; + +#endif // StmtToBlockMap_h__ diff --git a/build/clang-plugin/moz.build b/build/clang-plugin/moz.build index b3548bf1bbda..36ed11a94d7b 100644 --- a/build/clang-plugin/moz.build +++ b/build/clang-plugin/moz.build @@ -16,6 +16,7 @@ UNIFIED_SOURCES += [ 'KungFuDeathGripChecker.cpp', 'MozCheckAction.cpp', 'MustOverrideChecker.cpp', + 'MustReturnFromCallerChecker.cpp', 'MustUseChecker.cpp', 'NaNExprChecker.cpp', 'NeedsNoVTableTypeChecker.cpp', diff --git a/build/clang-plugin/plugin.h b/build/clang-plugin/plugin.h index 9fc547d3487e..83e806dd1c5a 100644 --- a/build/clang-plugin/plugin.h +++ b/build/clang-plugin/plugin.h @@ -5,6 +5,7 @@ #ifndef plugin_h__ #define plugin_h__ +#include "clang/Analysis/CFG.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" #include "clang/AST/RecursiveASTVisitor.h" diff --git a/build/clang-plugin/tests/TestMustReturnFromCaller.cpp b/build/clang-plugin/tests/TestMustReturnFromCaller.cpp new file mode 100644 index 000000000000..5467d4ff95ff --- /dev/null +++ b/build/clang-plugin/tests/TestMustReturnFromCaller.cpp @@ -0,0 +1,183 @@ +#include + +#define MOZ_MUST_RETURN_FROM_CALLER __attribute__((annotate("moz_must_return_from_caller"))) +#define MOZ_MAY_CALL_AFTER_MUST_RETURN __attribute__((annotate("moz_may_call_after_must_return"))) + +void MOZ_MUST_RETURN_FROM_CALLER Throw() {} +void DoAnythingElse(); +int MakeAnInt(); +int MOZ_MAY_CALL_AFTER_MUST_RETURN SafeMakeInt(); +bool Condition(); + +class Foo { +public: + __attribute__((annotate("moz_implicit"))) Foo(std::nullptr_t); + Foo(); +}; + +void a1() { + Throw(); +} + +int a2() { + Throw(); // expected-error {{You must immediately return after calling this function}} + return MakeAnInt(); +} + +int a3() { + Throw(); + return 5; +} + +int a4() { + Throw(); // expected-error {{You must immediately return after calling this function}} + return Condition() ? MakeAnInt() : MakeAnInt(); +} + +void a5() { + Throw(); // expected-error {{You must immediately return after calling this function}} + DoAnythingElse(); +} + +int a6() { + Throw(); // expected-error {{You must immediately return after calling this function}} + DoAnythingElse(); + return MakeAnInt(); +} + +int a7() { + Throw(); // expected-error {{You must immediately return after calling this function}} + DoAnythingElse(); + return Condition() ? MakeAnInt() : MakeAnInt(); +} + +int a8() { + Throw(); + return SafeMakeInt(); +} + +int a9() { + if (Condition()) { + Throw(); + } + return SafeMakeInt(); +} + +void b1() { + if (Condition()) { + Throw(); + } +} + +int b2() { + if (Condition()) { + Throw(); // expected-error {{You must immediately return after calling this function}} + } + return MakeAnInt(); +} + +int b3() { + if (Condition()) { + Throw(); + } + return 5; +} + +int b4() { + if (Condition()) { + Throw(); // expected-error {{You must immediately return after calling this function}} + } + return Condition() ? MakeAnInt() : MakeAnInt(); +} + +void b5() { + if (Condition()) { + Throw(); // expected-error {{You must immediately return after calling this function}} + } + DoAnythingElse(); +} + +void b6() { + if (Condition()) { + Throw(); // expected-error {{You must immediately return after calling this function}} + DoAnythingElse(); + } +} + +void b7() { + if (Condition()) { + Throw(); + return; + } + DoAnythingElse(); +} + +void b8() { + if (Condition()) { + Throw(); // expected-error {{You must immediately return after calling this function}} + DoAnythingElse(); + return; + } + DoAnythingElse(); +} + +void b9() { + while (Condition()) { + Throw(); // expected-error {{You must immediately return after calling this function}} + } +} + +void b10() { + while (Condition()) { + Throw(); + return; + } +} + +void b11() { + Throw(); // expected-error {{You must immediately return after calling this function}} + if (Condition()) { + return; + } else { + return; + } +} + +void b12() { + switch (MakeAnInt()) { + case 1: + break; + default: + Throw(); + return; + } +} + +void b13() { + if (Condition()) { + Throw(); + } + return; +} + +Foo b14() { + if (Condition()) { + Throw(); + return nullptr; + } + return nullptr; +} + +Foo b15() { + if (Condition()) { + Throw(); + } + return nullptr; +} + +Foo b16() { + if (Condition()) { + Throw(); + } + return Foo(); +} diff --git a/build/clang-plugin/tests/moz.build b/build/clang-plugin/tests/moz.build index 1230a2aae1fa..c914d661fd5f 100644 --- a/build/clang-plugin/tests/moz.build +++ b/build/clang-plugin/tests/moz.build @@ -18,6 +18,7 @@ SOURCES += [ 'TestKungFuDeathGrip.cpp', 'TestMultipleAnnotations.cpp', 'TestMustOverride.cpp', + 'TestMustReturnFromCaller.cpp', 'TestMustUse.cpp', 'TestNANTestingExpr.cpp', 'TestNANTestingExprC.c', diff --git a/caps/BasePrincipal.cpp b/caps/BasePrincipal.cpp index 6a0cb732d397..b8e4aea98e76 100644 --- a/caps/BasePrincipal.cpp +++ b/caps/BasePrincipal.cpp @@ -50,19 +50,6 @@ OriginAttributes::InitPrefs() } } -void -OriginAttributes::Inherit(const OriginAttributes& aAttrs) -{ - mAppId = aAttrs.mAppId; - mInIsolatedMozBrowser = aAttrs.mInIsolatedMozBrowser; - - - mUserContextId = aAttrs.mUserContextId; - - mPrivateBrowsingId = aAttrs.mPrivateBrowsingId; - mFirstPartyDomain = aAttrs.mFirstPartyDomain; -} - void OriginAttributes::SetFirstPartyDomain(const bool aIsTopLevelDocument, nsIURI* aURI) diff --git a/caps/BasePrincipal.h b/caps/BasePrincipal.h index f9cf98b083f8..a2d4f1564cb9 100644 --- a/caps/BasePrincipal.h +++ b/caps/BasePrincipal.h @@ -40,10 +40,6 @@ public: : OriginAttributesDictionary(aOther) {} - // This method 'clones' the OriginAttributes ignoring the addonId value becaue - // this is computed from the principal URI and never propagated. - void Inherit(const OriginAttributes& aAttrs); - void SetFirstPartyDomain(const bool aIsTopLevelDocument, nsIURI* aURI); enum { diff --git a/caps/nsNullPrincipal.cpp b/caps/nsNullPrincipal.cpp index 0610e2ebe533..007c4b3bb67e 100644 --- a/caps/nsNullPrincipal.cpp +++ b/caps/nsNullPrincipal.cpp @@ -48,11 +48,9 @@ nsNullPrincipal::CreateWithInheritedAttributes(nsIPrincipal* aInheritFrom) /* static */ already_AddRefed nsNullPrincipal::CreateWithInheritedAttributes(nsIDocShell* aDocShell) { - OriginAttributes attrs; - attrs.Inherit(nsDocShell::Cast(aDocShell)->GetOriginAttributes()); - RefPtr nullPrin = new nsNullPrincipal(); - nsresult rv = nullPrin->Init(attrs); + nsresult rv = + nullPrin->Init(nsDocShell::Cast(aDocShell)->GetOriginAttributes()); MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv)); return nullPrin.forget(); } diff --git a/caps/nsScriptSecurityManager.cpp b/caps/nsScriptSecurityManager.cpp index ba61387a41ae..2135af2da087 100644 --- a/caps/nsScriptSecurityManager.cpp +++ b/caps/nsScriptSecurityManager.cpp @@ -379,9 +379,11 @@ nsScriptSecurityManager::GetChannelURIPrincipal(nsIChannel* aChannel, // For addons loadInfo might be null. if (loadInfo) { - attrs.Inherit(loadInfo->GetOriginAttributes()); + attrs = loadInfo->GetOriginAttributes(); } - nsCOMPtr prin = BasePrincipal::CreateCodebasePrincipal(uri, attrs); + + nsCOMPtr prin = + BasePrincipal::CreateCodebasePrincipal(uri, attrs); prin.forget(aPrincipal); return *aPrincipal ? NS_OK : NS_ERROR_FAILURE; } @@ -1143,13 +1145,11 @@ nsScriptSecurityManager:: { NS_ENSURE_STATE(aLoadContext); OriginAttributes docShellAttrs; - bool result = aLoadContext->GetOriginAttributes(docShellAttrs);; + bool result = aLoadContext->GetOriginAttributes(docShellAttrs); NS_ENSURE_TRUE(result, NS_ERROR_FAILURE); - OriginAttributes attrs; - attrs.Inherit(docShellAttrs); - - nsCOMPtr prin = BasePrincipal::CreateCodebasePrincipal(aURI, attrs); + nsCOMPtr prin = + BasePrincipal::CreateCodebasePrincipal(aURI, docShellAttrs); prin.forget(aPrincipal); return *aPrincipal ? NS_OK : NS_ERROR_FAILURE; } @@ -1159,10 +1159,8 @@ nsScriptSecurityManager::GetDocShellCodebasePrincipal(nsIURI* aURI, nsIDocShell* aDocShell, nsIPrincipal** aPrincipal) { - OriginAttributes attrs; - attrs.Inherit(nsDocShell::Cast(aDocShell)->GetOriginAttributes()); - - nsCOMPtr prin = BasePrincipal::CreateCodebasePrincipal(aURI, attrs); + nsCOMPtr prin = + BasePrincipal::CreateCodebasePrincipal(aURI, nsDocShell::Cast(aDocShell)->GetOriginAttributes()); prin.forget(aPrincipal); return *aPrincipal ? NS_OK : NS_ERROR_FAILURE; } diff --git a/devtools/client/debugger/new/debugger.js b/devtools/client/debugger/new/debugger.js index c6ed2a7bb1f6..dddc5a6af7ba 100644 --- a/devtools/client/debugger/new/debugger.js +++ b/devtools/client/debugger/new/debugger.js @@ -36082,7 +36082,7 @@ return /******/ (function(modules) { // webpackBootstrap function removeChildren(e) { for (var count = e.childNodes.length; count > 0; --count) - { e.removeChild(e.firstChild) } + { e.firstChild.remove() } return e } diff --git a/devtools/client/framework/sidebar.js b/devtools/client/framework/sidebar.js index 7625edf891e8..f611c4dfba3d 100644 --- a/devtools/client/framework/sidebar.js +++ b/devtools/client/framework/sidebar.js @@ -576,7 +576,7 @@ ToolSidebar.prototype = { } while (this._tabbox.tabs && this._tabbox.tabs.hasChildNodes()) { - this._tabbox.tabs.removeChild(this._tabbox.tabs.firstChild); + this._tabbox.tabs.firstChild.remove(); } if (this._currentTool && this._telemetry) { diff --git a/devtools/client/inspector/markup/markup.js b/devtools/client/inspector/markup/markup.js index 9d8201ff6f17..2c511e42fc6c 100644 --- a/devtools/client/inspector/markup/markup.js +++ b/devtools/client/inspector/markup/markup.js @@ -1604,7 +1604,7 @@ MarkupView.prototype = { // this container will do double duty as the container for the single // text child. while (container.children.firstChild) { - container.children.removeChild(container.children.firstChild); + container.children.firstChild.remove(); } container.setInlineTextChild(container.node.inlineTextChild); @@ -1616,7 +1616,7 @@ MarkupView.prototype = { if (!container.hasChildren) { while (container.children.firstChild) { - container.children.removeChild(container.children.firstChild); + container.children.firstChild.remove(); } container.childrenDirty = false; container.setExpanded(false); @@ -1659,7 +1659,7 @@ MarkupView.prototype = { } while (container.children.firstChild) { - container.children.removeChild(container.children.firstChild); + container.children.firstChild.remove(); } if (!(children.hasFirst && children.hasLast)) { diff --git a/devtools/client/inspector/markup/test/browser.ini b/devtools/client/inspector/markup/test/browser.ini index a6154ef1bdfb..0129cf9a7d4e 100644 --- a/devtools/client/inspector/markup/test/browser.ini +++ b/devtools/client/inspector/markup/test/browser.ini @@ -161,6 +161,7 @@ skip-if = e10s # Bug 1036409 - The last selected node isn't reselected [browser_markup_tag_edit_11.js] [browser_markup_tag_edit_12.js] [browser_markup_tag_edit_13-other.js] +[browser_markup_tag_edit_avoid_refocus.js] [browser_markup_tag_edit_long-classname.js] [browser_markup_textcontent_display.js] [browser_markup_textcontent_edit_01.js] diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_avoid_refocus.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_avoid_refocus.js new file mode 100644 index 000000000000..5489e7e1be45 --- /dev/null +++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_avoid_refocus.js @@ -0,0 +1,43 @@ +/* vim: set ts=2 et sw=2 tw=80: */ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Bug 1327683 - Tests that an editable attribute is not refocused +// when the focus has been moved to an other element than the editor. + +const TEST_URL = 'data:text/html,'; + +add_task(function* () { + let {inspector} = yield openInspectorForURL(TEST_URL); + + yield selectNode(".abcd", inspector); + yield clickContainer(".abcd", inspector); + + let container = yield focusNode(".abcd", inspector); + ok(container && container.editor, "The markup-container was found"); + + info("Listening for the markupmutation event"); + let nodeMutated = inspector.once("markupmutation"); + let attr = container.editor.attrElements.get("class").querySelector(".editable"); + + attr.focus(); + EventUtils.sendKey("return", inspector.panelWin); + let input = inplaceEditor(attr).input; + ok(input, "Found editable field for class attribute"); + + input.value = "class=\"wxyz\""; + + let onFocus = once(inspector.searchBox, "focus"); + EventUtils.synthesizeMouseAtCenter(inspector.searchBox, {}, inspector.panelWin); + + info("Wait for the focus event on search box"); + yield onFocus; + + info("Wait for the markup-mutation event"); + yield nodeMutated; + + is(inspector.panelDoc.activeElement, inspector.searchBox, + "The currently focused element is the search box"); +}); diff --git a/devtools/client/inspector/markup/views/element-editor.js b/devtools/client/inspector/markup/views/element-editor.js index 5e281b08da8f..5d1bcd00a9b4 100644 --- a/devtools/client/inspector/markup/views/element-editor.js +++ b/devtools/client/inspector/markup/views/element-editor.js @@ -447,6 +447,13 @@ ElementEditor.prototype = { this._editedAttributeObserver = null; } + let activeElement = this.markup.doc.activeElement; + if (!activeElement || !activeElement.inplaceEditor) { + // The focus was already removed from the current inplace editor, we should not + // refocus the editable attribute. + return; + } + let container = this.markup.getContainer(this.node); let activeAttrs = [...this.attrList.childNodes] diff --git a/devtools/client/scratchpad/scratchpad.js b/devtools/client/scratchpad/scratchpad.js index 57256dd53771..6f2cc9a176d3 100644 --- a/devtools/client/scratchpad/scratchpad.js +++ b/devtools/client/scratchpad/scratchpad.js @@ -1367,7 +1367,7 @@ var Scratchpad = { recentFilesMenu.setAttribute("disabled", true); while (recentFilesPopup.hasChildNodes()) { - recentFilesPopup.removeChild(recentFilesPopup.firstChild); + recentFilesPopup.firstChild.remove(); } if (filePaths.length > 0) { diff --git a/devtools/client/shared/developer-toolbar.js b/devtools/client/shared/developer-toolbar.js index db6fae81db93..d2dc161b34c5 100644 --- a/devtools/client/shared/developer-toolbar.js +++ b/devtools/client/shared/developer-toolbar.js @@ -1019,7 +1019,7 @@ OutputPanel.prototype._update = function () { // Empty this._div while (this._div.hasChildNodes()) { - this._div.removeChild(this._div.firstChild); + this._div.firstChild.remove(); } if (this.displayedOutput.data != null) { @@ -1030,7 +1030,7 @@ OutputPanel.prototype._update = function () { } while (this._div.hasChildNodes()) { - this._div.removeChild(this._div.firstChild); + this._div.firstChild.remove(); } let links = node.querySelectorAll("*[href]"); diff --git a/devtools/client/shared/widgets/TableWidget.js b/devtools/client/shared/widgets/TableWidget.js index e4c8ed7f263c..60784a9caaab 100644 --- a/devtools/client/shared/widgets/TableWidget.js +++ b/devtools/client/shared/widgets/TableWidget.js @@ -1554,7 +1554,7 @@ Cell.prototype = { this.label.removeAttribute("value"); while (this.label.firstChild) { - this.label.removeChild(this.label.firstChild); + this.label.firstChild.remove(); } this.label.appendChild(value); diff --git a/devtools/client/shared/widgets/tooltip/Tooltip.js b/devtools/client/shared/widgets/tooltip/Tooltip.js index 4bb3c52f01ae..5e013cbcae0a 100644 --- a/devtools/client/shared/widgets/tooltip/Tooltip.js +++ b/devtools/client/shared/widgets/tooltip/Tooltip.js @@ -201,7 +201,7 @@ Tooltip.prototype = { */ empty: function () { while (this.panel.hasChildNodes()) { - this.panel.removeChild(this.panel.firstChild); + this.panel.firstChild.remove(); } }, diff --git a/devtools/client/styleeditor/StyleEditorUI.jsm b/devtools/client/styleeditor/StyleEditorUI.jsm index ad3cb992df20..e35c8ffca54f 100644 --- a/devtools/client/styleeditor/StyleEditorUI.jsm +++ b/devtools/client/styleeditor/StyleEditorUI.jsm @@ -865,7 +865,7 @@ StyleEditorUI.prototype = { let list = details.querySelector(".stylesheet-media-list"); while (list.firstChild) { - list.removeChild(list.firstChild); + list.firstChild.remove(); } let rules = editor.mediaRules; diff --git a/devtools/shared/gcli/commands/csscoverage.js b/devtools/shared/gcli/commands/csscoverage.js index 841cf4c7dff9..2c7516a67f2c 100644 --- a/devtools/shared/gcli/commands/csscoverage.js +++ b/devtools/shared/gcli/commands/csscoverage.js @@ -156,7 +156,7 @@ exports.items = [ onback: () => { // The back button clears and hides .csscoverage-report while (host.hasChildNodes()) { - host.removeChild(host.firstChild); + host.firstChild.remove(); } host.hidden = true; } diff --git a/devtools/shared/gcli/source/lib/gcli/util/util.js b/devtools/shared/gcli/source/lib/gcli/util/util.js index 065bf36c07db..650e84b8f1f6 100644 --- a/devtools/shared/gcli/source/lib/gcli/util/util.js +++ b/devtools/shared/gcli/source/lib/gcli/util/util.js @@ -388,7 +388,7 @@ exports.createElement = function(doc, tag) { */ exports.clearElement = function(elem) { while (elem.hasChildNodes()) { - elem.removeChild(elem.firstChild); + elem.firstChild.remove(); } }; diff --git a/docshell/base/LoadContext.cpp b/docshell/base/LoadContext.cpp index c45926960ed9..6c3ba6b52311 100644 --- a/docshell/base/LoadContext.cpp +++ b/docshell/base/LoadContext.cpp @@ -51,7 +51,7 @@ LoadContext::LoadContext(nsIPrincipal* aPrincipal, , mIsNotNull(true) #endif { - mOriginAttributes.Inherit(aPrincipal->OriginAttributesRef()); + mOriginAttributes = aPrincipal->OriginAttributesRef(); if (!aOptionalBase) { return; } diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index a690a9b46691..d4a55222c249 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -5003,8 +5003,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, // 12.1, HPKP draft spec section 2.6). uint32_t flags = UsePrivateBrowsing() ? nsISocketProvider::NO_PERMANENT_STORAGE : 0; - OriginAttributes originAttributes; - originAttributes.Inherit(mOriginAttributes); bool isStsHost = false; bool isPinnedHost = false; if (XRE_IsParentProcess()) { @@ -5012,10 +5010,10 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, do_GetService(NS_SSSERVICE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aURI, - flags, originAttributes, nullptr, &isStsHost); + flags, mOriginAttributes, nullptr, &isStsHost); NS_ENSURE_SUCCESS(rv, rv); rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HPKP, aURI, - flags, originAttributes, nullptr, + flags, mOriginAttributes, nullptr, &isPinnedHost); NS_ENSURE_SUCCESS(rv, rv); } else { @@ -5024,9 +5022,9 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI, mozilla::ipc::URIParams uri; SerializeURI(aURI, uri); cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HSTS, uri, flags, - originAttributes, &isStsHost); + mOriginAttributes, &isStsHost); cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HPKP, uri, flags, - originAttributes, &isPinnedHost); + mOriginAttributes, &isPinnedHost); } if (Preferences::GetBool( @@ -9736,10 +9734,8 @@ nsresult nsDocShell::CreatePrincipalFromReferrer(nsIURI* aReferrer, nsIPrincipal** aResult) { - OriginAttributes attrs; - attrs.Inherit(mOriginAttributes); nsCOMPtr prin = - BasePrincipal::CreateCodebasePrincipal(aReferrer, attrs); + BasePrincipal::CreateCodebasePrincipal(aReferrer, mOriginAttributes); prin.forget(aResult); return *aResult ? NS_OK : NS_ERROR_FAILURE; @@ -10729,11 +10725,11 @@ nsDocShell::InternalLoad(nsIURI* aURI, srcdoc = NullString(); } - OriginAttributes attrs; bool isTopLevelDoc = mItemType == typeContent && (isTargetTopLevelDocShell || GetIsMozBrowser()); - attrs.Inherit(GetOriginAttributes()); + + OriginAttributes attrs = GetOriginAttributes(); attrs.SetFirstPartyDomain(isTopLevelDoc, aURI); net::PredictorLearn(aURI, nullptr, @@ -10985,9 +10981,9 @@ nsDocShell::DoURILoad(nsIURI* aURI, (aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT || GetIsMozBrowser()); - OriginAttributes attrs; - attrs.Inherit(GetOriginAttributes()); + OriginAttributes attrs = GetOriginAttributes(); attrs.SetFirstPartyDomain(isTopLevelDoc, aURI); + rv = loadInfo->SetOriginAttributes(attrs); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; @@ -12602,9 +12598,6 @@ nsDocShell::LoadHistoryEntry(nsISHEntry* aEntry, uint32_t aLoadType) srcdoc = NullString(); } - // If there is no valid triggeringPrincipal, we deny the load - MOZ_ASSERT(triggeringPrincipal, - "need a valid triggeringPrincipal to load from history"); if (!triggeringPrincipal) { triggeringPrincipal = nsContentUtils::GetSystemPrincipal(); } @@ -14231,12 +14224,10 @@ nsDocShell::OnOverLink(nsIContent* aContent, rv = textToSubURI->UnEscapeURIForUI(charset, spec, uStr); NS_ENSURE_SUCCESS(rv, rv); - OriginAttributes attrs; - attrs.Inherit(aContent->NodePrincipal()->OriginAttributesRef()); - mozilla::net::PredictorPredict(aURI, mCurrentURI, nsINetworkPredictor::PREDICT_LINK, - attrs, nullptr); + aContent->NodePrincipal()->OriginAttributesRef(), + nullptr); if (browserChrome2) { nsCOMPtr element = do_QueryInterface(aContent); @@ -14748,10 +14739,8 @@ nsDocShell::ShouldPrepareForIntercept(nsIURI* aURI, bool aIsNonSubresourceReques } if (aIsNonSubresourceRequest) { - OriginAttributes attrs; - attrs.Inherit(mOriginAttributes); nsCOMPtr principal = - BasePrincipal::CreateCodebasePrincipal(aURI, attrs); + BasePrincipal::CreateCodebasePrincipal(aURI, mOriginAttributes); *aShouldIntercept = swm->IsAvailable(principal, aURI); return NS_OK; } @@ -14800,12 +14789,9 @@ nsDocShell::ChannelIntercepted(nsIInterceptedChannel* aChannel) bool isReload = mLoadType & LOAD_CMD_RELOAD; - OriginAttributes attrs; - attrs.Inherit(mOriginAttributes); - ErrorResult error; - swm->DispatchFetchEvent(attrs, doc, mInterceptedDocumentId, aChannel, - isReload, isSubresourceLoad, error); + swm->DispatchFetchEvent(mOriginAttributes, doc, mInterceptedDocumentId, + aChannel, isReload, isSubresourceLoad, error); if (NS_WARN_IF(error.Failed())) { return error.StealNSResult(); } diff --git a/docshell/shistory/nsSHEntry.cpp b/docshell/shistory/nsSHEntry.cpp index 28f7cea2ff98..b50dc61482fd 100644 --- a/docshell/shistory/nsSHEntry.cpp +++ b/docshell/shistory/nsSHEntry.cpp @@ -513,10 +513,6 @@ nsSHEntry::GetTriggeringPrincipal(nsIPrincipal** aTriggeringPrincipal) NS_IMETHODIMP nsSHEntry::SetTriggeringPrincipal(nsIPrincipal* aTriggeringPrincipal) { - MOZ_ASSERT(aTriggeringPrincipal, "need a valid triggeringPrincipal"); - if (!aTriggeringPrincipal) { - return NS_ERROR_FAILURE; - } mShared->mTriggeringPrincipal = aTriggeringPrincipal; return NS_OK; } diff --git a/docshell/test/chrome/bug303267.html b/docshell/test/chrome/bug303267.html index 32b575eee8dc..98042e830b04 100644 --- a/docshell/test/chrome/bug303267.html +++ b/docshell/test/chrome/bug303267.html @@ -13,7 +13,7 @@ function showpageshowcount() var div1 = document.getElementById("div1"); while (div1.firstChild) { - div1.removeChild(div1.firstChild); + div1.firstChild.remove(); } div1.appendChild(document.createTextNode( "pageshowcount: " + pageshowcount)); diff --git a/docshell/test/navigation/file_bug534178.html b/docshell/test/navigation/file_bug534178.html index 8bcedb6fbabe..7e357945d34c 100644 --- a/docshell/test/navigation/file_bug534178.html +++ b/docshell/test/navigation/file_bug534178.html @@ -3,7 +3,7 @@ + + + + + +Mozilla Bug 1339722 +

+ +
+  
+ +
+
+ + diff --git a/dom/base/test/test_bug416383.html b/dom/base/test/test_bug416383.html index 741fbf878057..33bd65c882b6 100644 --- a/dom/base/test/test_bug416383.html +++ b/dom/base/test/test_bug416383.html @@ -26,7 +26,7 @@ function runTest() { ok(attrs != null, "Element should have attributes!"); var attr = testParent.firstChild.getAttributeNode("someattr"); ok(attr.value == "foo", "The value of the attribute should be 'foo'!"); - testParent.removeChild(testParent.firstChild); + testParent.firstChild.remove(); SpecialPowers.gc(); ok(true, "Browser should not crash!") diff --git a/dom/base/test/test_mutationobservers.html b/dom/base/test/test_mutationobservers.html index bde07c79cb7a..f26de3728a63 100644 --- a/dom/base/test/test_mutationobservers.html +++ b/dom/base/test/test_mutationobservers.html @@ -246,7 +246,7 @@ function testChildList() { m = null; }); m.observe(div, { childList: true}); - div.removeChild(div.firstChild); + div.firstChild.remove(); } function testChildList2() { diff --git a/dom/bindings/CallbackObject.cpp b/dom/bindings/CallbackObject.cpp index cfdeb7afbcb3..1d2e43d5ef93 100644 --- a/dom/bindings/CallbackObject.cpp +++ b/dom/bindings/CallbackObject.cpp @@ -334,7 +334,7 @@ CallbackObject::CallSetup::~CallSetup() // IsJSContextException shouldn't be true anymore because we will report // the exception on the JSContext ... so throw something else. - mErrorResult.Throw(NS_ERROR_UNEXPECTED); + mErrorResult.ThrowWithCustomCleanup(NS_ERROR_UNEXPECTED); } } } diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index 1544496bec45..fde25ce82e04 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -5468,7 +5468,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, nsCOMPtr global = do_QueryInterface(promiseGlobal.GetAsSupports()); if (!global) { - promiseRv.Throw(NS_ERROR_UNEXPECTED); + promiseRv.ThrowWithCustomCleanup(NS_ERROR_UNEXPECTED); promiseRv.MaybeSetPendingException(cx); $*{exceptionCode} } diff --git a/dom/bindings/ErrorResult.h b/dom/bindings/ErrorResult.h index dfeb3bc1f49c..a0335166917c 100644 --- a/dom/bindings/ErrorResult.h +++ b/dom/bindings/ErrorResult.h @@ -165,11 +165,48 @@ public: operator ErrorResult&(); operator OOMReporter&(); - void Throw(nsresult rv) { + void MOZ_MUST_RETURN_FROM_CALLER Throw(nsresult rv) { MOZ_ASSERT(NS_FAILED(rv), "Please don't try throwing success"); AssignErrorCode(rv); } + // This method acts identically to the `Throw` method, however, it does not + // have the MOZ_MUST_RETURN_FROM_CALLER static analysis annotation. It is + // intended to be used in situations when additional work needs to be + // performed in the calling function after the Throw method is called. + // + // In general you should prefer using `Throw`, and returning after an error, + // for example: + // + // if (condition) { + // aRv.Throw(NS_ERROR_FAILURE); + // return; + // } + // + // or + // + // if (condition) { + // aRv.Throw(NS_ERROR_FAILURE); + // } + // return; + // + // However, if you need to do some other work after throwing, such as: + // + // if (condition) { + // aRv.ThrowWithCustomCleanup(NS_ERROR_FAILURE); + // } + // // Do some important clean-up work which couldn't happen earlier. + // // We want to do this clean-up work in both the success and failure cases. + // CleanUpImportantState(); + // return; + // + // Then you'll need to use ThrowWithCustomCleanup to get around the static + // analysis, which would complain that you are doing work after the call to + // `Throw()`. + void ThrowWithCustomCleanup(nsresult rv) { + Throw(rv); + } + // Duplicate our current state on the given TErrorResult object. Any // existing errors or messages on the target will be suppressed before // cloning. Our own error state remains unchanged. @@ -307,7 +344,7 @@ public: } // Support for uncatchable exceptions. - void ThrowUncatchableException() { + void MOZ_MUST_RETURN_FROM_CALLER ThrowUncatchableException() { Throw(NS_ERROR_UNCATCHABLE_EXCEPTION); } bool IsUncatchableException() const { diff --git a/dom/canvas/ImageBitmap.cpp b/dom/canvas/ImageBitmap.cpp index 29f074d64447..b37e593feab0 100644 --- a/dom/canvas/ImageBitmap.cpp +++ b/dom/canvas/ImageBitmap.cpp @@ -1482,6 +1482,7 @@ ImageBitmap::Create(nsIGlobalObject* aGlobal, const ImageBitmapSource& aSrc, return promise.forget(); } else { aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); + return nullptr; } if (!aRv.Failed()) { @@ -1691,13 +1692,13 @@ protected: } else if (JS_IsArrayBufferViewObject(mBuffer)) { js::GetArrayBufferViewLengthAndData(mBuffer, &bufferLength, &isSharedMemory, &bufferData); } else { - error.Throw(NS_ERROR_NOT_IMPLEMENTED); + error.ThrowWithCustomCleanup(NS_ERROR_NOT_IMPLEMENTED); mPromise->MaybeReject(error); return; } if (NS_WARN_IF(!bufferData) || NS_WARN_IF(!bufferLength)) { - error.Throw(NS_ERROR_NOT_AVAILABLE); + error.ThrowWithCustomCleanup(NS_ERROR_NOT_AVAILABLE); mPromise->MaybeReject(error); return; } @@ -1707,7 +1708,7 @@ protected: mImageBitmap->MappedDataLength(mFormat, error); if (((int32_t)bufferLength - mOffset) < neededBufferLength) { - error.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR); + error.ThrowWithCustomCleanup(NS_ERROR_DOM_INDEX_SIZE_ERR); mPromise->MaybeReject(error); return; } diff --git a/dom/canvas/WebGLContextVertices.cpp b/dom/canvas/WebGLContextVertices.cpp index bc910fc666c5..cd5d0811c609 100644 --- a/dom/canvas/WebGLContextVertices.cpp +++ b/dom/canvas/WebGLContextVertices.cpp @@ -250,9 +250,11 @@ WebGLContext::GetVertexAttrib(JSContext* cx, GLuint index, GLenum pname, break; } - if (!obj) + if (!obj) { rv.Throw(NS_ERROR_OUT_OF_MEMORY); - return JS::ObjectOrNullValue(obj); + return JS::NullValue(); + } + return JS::ObjectValue(*obj); } case LOCAL_GL_VERTEX_ATTRIB_ARRAY_ENABLED: diff --git a/dom/encoding/TextEncoder.cpp b/dom/encoding/TextEncoder.cpp index ccd298b38910..169a03041091 100644 --- a/dom/encoding/TextEncoder.cpp +++ b/dom/encoding/TextEncoder.cpp @@ -67,6 +67,7 @@ TextEncoder::Encode(JSContext* aCx, if (NS_FAILED(rv)) { aRv.Throw(rv); + return; } aRetval.set(outView); } diff --git a/dom/events/DataTransfer.cpp b/dom/events/DataTransfer.cpp index f8f7aff411e1..3b4f92a7cb50 100644 --- a/dom/events/DataTransfer.cpp +++ b/dom/events/DataTransfer.cpp @@ -332,8 +332,11 @@ DataTransfer::GetTypes(nsTArray& aTypes, CallerType aCallerType) const continue; } + // NOTE: The reason why we get the internal type here is because we want + // kFileMime to appear in the types list for backwards compatibility + // reasons. nsAutoString type; - item->GetType(type); + item->GetInternalType(type); if (item->Kind() == DataTransferItem::KIND_STRING || type.EqualsASCII(kFileMime)) { // If the entry has kind KIND_STRING, we want to add it to the list. aTypes.AppendElement(type); @@ -521,8 +524,11 @@ DataTransfer::MozTypesAt(uint32_t aIndex, CallerType aCallerType, continue; } + // NOTE: The reason why we get the internal type here is because we want + // kFileMime to appear in the types list for backwards compatibility + // reasons. nsAutoString type; - items[i]->GetType(type); + items[i]->GetInternalType(type); if (NS_WARN_IF(!types->Add(type))) { aRv.Throw(NS_ERROR_FAILURE); return nullptr; @@ -981,7 +987,7 @@ DataTransfer::GetTransferable(uint32_t aIndex, nsILoadContext* aLoadContext) } nsAutoString type; - formatitem->GetType(type); + formatitem->GetInternalType(type); // If the data is of one of the well-known formats, use it directly. bool isCustomFormat = true; diff --git a/dom/events/DataTransferItem.cpp b/dom/events/DataTransferItem.cpp index bd8743241ba0..cc4496871acf 100644 --- a/dom/events/DataTransferItem.cpp +++ b/dom/events/DataTransferItem.cpp @@ -230,6 +230,37 @@ DataTransferItem::FillInExternalData() } } +void +DataTransferItem::GetType(nsAString& aType) +{ + // If we don't have a File, we can just put whatever our recorded internal + // type is. + if (Kind() != KIND_FILE) { + aType = mType; + return; + } + + // If we do have a File, then we need to look at our File object to discover + // what its mime type is. We can use the System Principal here, as this + // information should be avaliable even if the data is currently inaccessible + // (for example during a dragover). + // + // XXX: This seems inefficient, as it seems like we should be able to get this + // data without getting the entire File object, which may require talking to + // the OS. + ErrorResult rv; + RefPtr file = GetAsFile(*nsContentUtils::GetSystemPrincipal(), rv); + MOZ_ASSERT(!rv.Failed(), "Failed to get file data with system principal"); + + // If we don't actually have a file, fall back to returning the internal type. + if (NS_WARN_IF(!file)) { + aType = mType; + return; + } + + file->GetType(aType); +} + already_AddRefed DataTransferItem::GetAsFile(nsIPrincipal& aSubjectPrincipal, ErrorResult& aRv) diff --git a/dom/events/DataTransferItem.h b/dom/events/DataTransferItem.h index ab9ceeb5df94..ccd4bafa1d7b 100644 --- a/dom/events/DataTransferItem.h +++ b/dom/events/DataTransferItem.h @@ -69,11 +69,13 @@ public: } } - void GetType(nsAString& aType) const + void GetInternalType(nsAString& aType) const { aType = mType; } + void GetType(nsAString& aType); + eKind Kind() const { return mKind; diff --git a/dom/events/DataTransferItemList.cpp b/dom/events/DataTransferItemList.cpp index e4eb221e3bd7..ecea4968ce7b 100644 --- a/dom/events/DataTransferItemList.cpp +++ b/dom/events/DataTransferItemList.cpp @@ -294,8 +294,9 @@ DataTransferItemList::MozRemoveByTypeAt(const nsAString& aType, } for (uint32_t i = 0; i < count; ++i) { + // NOTE: As this is a moz-prefixed API, it works based on internal types. nsAutoString type; - items[i]->GetType(type); + items[i]->GetInternalType(type); if (type == aType) { ClearDataHelper(items[i], -1, i, aSubjectPrincipal, aRv); return; @@ -313,8 +314,9 @@ DataTransferItemList::MozItemByTypeAt(const nsAString& aType, uint32_t aIndex) uint32_t count = mIndexedItems[aIndex].Length(); for (uint32_t i = 0; i < count; i++) { RefPtr item = mIndexedItems[aIndex][i]; + // NOTE: As this is a moz-prefixed API it works on internal types nsString type; - item->GetType(type); + item->GetInternalType(type); if (type.Equals(aType)) { return item; } @@ -338,7 +340,7 @@ DataTransferItemList::SetDataWithPrincipal(const nsAString& aType, for (uint32_t i = 0; i < count; i++) { RefPtr item = items[i]; nsString type; - item->GetType(type); + item->GetInternalType(type); if (type.Equals(aType)) { if (NS_WARN_IF(aInsertOnly)) { aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR); diff --git a/dom/events/test/test_DataTransferItemList.html b/dom/events/test/test_DataTransferItemList.html index f04799a706ec..a267a183e7f5 100644 --- a/dom/events/test/test_DataTransferItemList.html +++ b/dom/events/test/test_DataTransferItemList.html @@ -98,7 +98,7 @@ is(oldLength + 1, dtList.length, "Replacing the entry with a file should add it to the list!"); is(dtList[oldLength].getAsFile(), file3, "It should be stored in the last index as a file"); - is(dtList[oldLength].type, "random/string", "It should have the correct type"); + is(dtList[oldLength].type, "text/html", "It should have the correct type"); is(dtList[oldLength].kind, "file", "It should have the correct kind"); todo(files.length == 3, "This test has chrome privileges, so the FileList objects aren't updated live"); diff --git a/dom/filesystem/GetFilesTask.cpp b/dom/filesystem/GetFilesTask.cpp index fe7ca87a7e04..8dc972c1cdfa 100644 --- a/dom/filesystem/GetFilesTask.cpp +++ b/dom/filesystem/GetFilesTask.cpp @@ -202,8 +202,8 @@ GetFilesTaskParent::GetSuccessRequestResult(ErrorResult& aRv) const FallibleTArray inputs; if (!inputs.SetLength(mTargetBlobImplArray.Length(), mozilla::fallible_t())) { - aRv.Throw(NS_ERROR_OUT_OF_MEMORY); FileSystemFilesResponse response; + aRv.Throw(NS_ERROR_OUT_OF_MEMORY); return response; } diff --git a/dom/flyweb/FlyWebService.cpp b/dom/flyweb/FlyWebService.cpp index 5f3b0d66f15c..4519809ebf34 100644 --- a/dom/flyweb/FlyWebService.cpp +++ b/dom/flyweb/FlyWebService.cpp @@ -1193,7 +1193,7 @@ FlyWebService::PairWithService(const nsAString& aServiceId, if (NS_FAILED(rv)) { ErrorResult result; - result.Throw(rv); + result.ThrowWithCustomCleanup(rv); const nsAString& reason = NS_LITERAL_STRING("Error pairing."); aCallback.PairingFailed(reason, result); ENSURE_SUCCESS_VOID(result); diff --git a/dom/flyweb/HttpServer.cpp b/dom/flyweb/HttpServer.cpp index 9d0dc2f4d98e..8471a83fd584 100644 --- a/dom/flyweb/HttpServer.cpp +++ b/dom/flyweb/HttpServer.cpp @@ -192,9 +192,8 @@ HttpServer::AcceptWebSocket(InternalRequest* aConnectRequest, return provider.forget(); } - aRv.Throw(NS_ERROR_UNEXPECTED); MOZ_ASSERT(false, "Unknown request"); - + aRv.Throw(NS_ERROR_UNEXPECTED); return nullptr; } diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index 72800f82cf8b..b3e1d32f4f1e 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -2701,6 +2701,7 @@ HTMLMediaElement::Seek(double aTime, nsresult rv = mDecoder->Seek(aTime, aSeekType, promise); if (NS_FAILED(rv)) { aRv.Throw(rv); + return nullptr; } // We changed whether we're seeking so we need to AddRemoveSelfReference. diff --git a/dom/html/crashtests/453406-1.html b/dom/html/crashtests/453406-1.html index 2017f2b1af44..bf756865538c 100644 --- a/dom/html/crashtests/453406-1.html +++ b/dom/html/crashtests/453406-1.html @@ -5,7 +5,7 @@ function boom() { var r = document.documentElement; while (r.firstChild) - r.removeChild(r.firstChild); + r.firstChild.remove(); var b = document.createElement("BODY"); var s = document.createElement("SCRIPT"); diff --git a/dom/html/crashtests/564461.xhtml b/dom/html/crashtests/564461.xhtml index 841058eb6c76..c92555a2e392 100644 --- a/dom/html/crashtests/564461.xhtml +++ b/dom/html/crashtests/564461.xhtml @@ -11,7 +11,7 @@ function boom() { - while (document.documentElement.firstChild) document.documentElement.removeChild(document.documentElement.firstChild); + while (document.documentElement.firstChild) document.documentElement.firstChild.remove(); document.addEventListener("DOMSubtreeModified", function(){}); document.addEventListener("DOMNodeInsertedIntoDocument", function(){}); diff --git a/dom/html/test/forms/test_form_attribute-1.html b/dom/html/test/forms/test_form_attribute-1.html index 34eda40bcbed..9d41d2331a13 100644 --- a/dom/html/test/forms/test_form_attribute-1.html +++ b/dom/html/test/forms/test_form_attribute-1.html @@ -424,7 +424,7 @@ for (var name of elementNames) { for (var func of functions) { // Clean-up. while (content.firstChild) { - content.removeChild(content.firstChild); + content.firstChild.remove(); } for (form of forms) { content.appendChild(form); diff --git a/dom/html/test/test_bug300691-1.html b/dom/html/test/test_bug300691-1.html index 40d12f9bf65f..cce870cece12 100644 --- a/dom/html/test/test_bug300691-1.html +++ b/dom/html/test/test_bug300691-1.html @@ -95,7 +95,7 @@ valueIs("abcdeTesth", "Modifying textnode text shouldn't affect value in edited textarea"); defValueIs("abcdefghlmno", "Modified textnode text 3"); -t.removeChild(t.firstChild); +t.firstChild.remove(); valueIs("abcdeTesth", "Removing child textnode shouldn't affect value in edited textarea"); defValueIs("defghlmno", "Removed textnode 3"); diff --git a/dom/html/test/test_bug311681.html b/dom/html/test/test_bug311681.html index 4f84d62a52f6..3199b22c26b9 100644 --- a/dom/html/test/test_bug311681.html +++ b/dom/html/test/test_bug311681.html @@ -78,7 +78,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=311681 function clear(node) { while (node.hasChildNodes()) { - node.removeChild(node.firstChild); + node.firstChild.remove(); } } diff --git a/dom/html/test/test_bug311681.xhtml b/dom/html/test/test_bug311681.xhtml index 78cada120bc1..6c334f796c72 100644 --- a/dom/html/test/test_bug311681.xhtml +++ b/dom/html/test/test_bug311681.xhtml @@ -78,7 +78,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=311681 function clear(node) { while (node.hasChildNodes()) { - node.removeChild(node.firstChild); + node.firstChild.remove(); } } diff --git a/dom/html/test/test_bug691.html b/dom/html/test/test_bug691.html index cfdb539852e2..0d5a8358cc6a 100644 --- a/dom/html/test/test_bug691.html +++ b/dom/html/test/test_bug691.html @@ -23,7 +23,7 @@ function remove() { var stage = document.getElementById("stage"); var body = document.getElementsByTagName("BODY")[0]; while (stage.firstChild) { - stage.removeChild(stage.firstChild); + stage.firstChild.remove(); } } diff --git a/dom/ipc/URLClassifierParent.cpp b/dom/ipc/URLClassifierParent.cpp index e5e5ae0d5ced..866a22f7101a 100644 --- a/dom/ipc/URLClassifierParent.cpp +++ b/dom/ipc/URLClassifierParent.cpp @@ -25,7 +25,7 @@ URLClassifierParent::StartClassify(nsIPrincipal* aPrincipal, nsCOMPtr uriClassifier = do_GetService(NS_URICLASSIFIERSERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED(rv)) { - rv = uriClassifier->Classify(aPrincipal, aUseTrackingProtection, + rv = uriClassifier->Classify(aPrincipal, nullptr, aUseTrackingProtection, this, aSuccess); } if (NS_FAILED(rv) || !*aSuccess) { diff --git a/dom/media/platforms/wmf/DXVA2Manager.cpp b/dom/media/platforms/wmf/DXVA2Manager.cpp index d0c93ee88a9d..4d9cd8b28e95 100644 --- a/dom/media/platforms/wmf/DXVA2Manager.cpp +++ b/dom/media/platforms/wmf/DXVA2Manager.cpp @@ -20,6 +20,7 @@ #include "mozilla/layers/D3D11ShareHandleImage.h" #include "mozilla/layers/ImageBridgeChild.h" #include "mozilla/layers/TextureForwarder.h" +#include "mozilla/layers/TextureD3D11.h" #include "nsPrintfCString.h" #include "nsThreadUtils.h" @@ -84,6 +85,8 @@ using layers::D3D9SurfaceImage; using layers::D3D9RecycleAllocator; using layers::D3D11ShareHandleImage; using layers::D3D11RecycleAllocator; +using namespace layers; +using namespace gfx; class D3D9DXVA2Manager : public DXVA2Manager { @@ -593,7 +596,11 @@ public: virtual ~D3D11DXVA2Manager(); HRESULT Init(layers::KnowsCompositor* aKnowsCompositor, - nsACString& aFailureReason); + nsACString& aFailureReason, + ID3D11Device* aDevice); + HRESULT InitInternal(layers::KnowsCompositor* aKnowsCompositor, + nsACString& aFailureReason, + ID3D11Device* aDevice); IUnknown* GetDXVADeviceManager() override; @@ -603,6 +610,9 @@ public: const nsIntRect& aRegion, Image** aOutImage) override; + virtual HRESULT CopyToBGRATexture(ID3D11Texture2D *aInTexture, + ID3D11Texture2D** aOutTexture); + HRESULT ConfigureForSize(uint32_t aWidth, uint32_t aHeight) override; bool IsD3D11() override { return true; } @@ -625,10 +635,12 @@ private: CreateDecoder(const D3D11_VIDEO_DECODER_DESC& aDesc) const; RefPtr mDevice; + RefPtr mContext; RefPtr mDXGIDeviceManager; RefPtr mTransform; RefPtr mTextureClientAllocator; RefPtr mDecoder; + RefPtr mSyncObject; GUID mDecoderGUID; uint32_t mWidth = 0; uint32_t mHeight = 0; @@ -655,13 +667,20 @@ D3D11DXVA2Manager::GetDXVADeviceManager() MutexAutoLock lock(mLock); return mDXGIDeviceManager; } - HRESULT D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, - nsACString& aFailureReason) + nsACString& aFailureReason, + ID3D11Device* aDevice) { - HRESULT hr; + if (!NS_IsMainThread()) { + // DXVA Managers used for full video have to be initialized on the main + // thread. Managers initialized off the main thread have to pass a device + // and can only be used for color conversion. + MOZ_ASSERT(aDevice); + return InitInternal(aKnowsCompositor, aFailureReason, aDevice); + } + HRESULT hr; ScopedGfxFeatureReporter reporter("DXVA2D3D11"); gfx::D3D11VideoCrashGuard crashGuard; @@ -671,11 +690,64 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, return E_FAIL; } - mDevice = gfx::DeviceManagerDx::Get()->CreateDecoderDevice(); - if (!mDevice) { - aFailureReason.AssignLiteral("Failed to create D3D11 device for decoder"); - return E_FAIL; + hr = InitInternal(aKnowsCompositor, aFailureReason, aDevice); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + if (layers::ImageBridgeChild::GetSingleton() || !aKnowsCompositor) { + // There's no proper KnowsCompositor for ImageBridge currently (and it + // implements the interface), so just use that if it's available. + mTextureClientAllocator = new D3D11RecycleAllocator( + layers::ImageBridgeChild::GetSingleton().get(), mDevice); + + if (ImageBridgeChild::GetSingleton() && gfxPrefs::PDMWMFUseSyncTexture()) { + // We use a syncobject to avoid the cost of the mutex lock when compositing, + // and because it allows color conversion ocurring directly from this texture + // DXVA does not seem to accept IDXGIKeyedMutex textures as input. + mSyncObject = + layers::SyncObject::CreateSyncObject(layers::ImageBridgeChild::GetSingleton()-> + GetTextureFactoryIdentifier().mSyncHandle, + mDevice); + } + } else { + mTextureClientAllocator = + new D3D11RecycleAllocator(aKnowsCompositor, mDevice); + if (gfxPrefs::PDMWMFUseSyncTexture()) { + // We use a syncobject to avoid the cost of the mutex lock when compositing, + // and because it allows color conversion ocurring directly from this texture + // DXVA does not seem to accept IDXGIKeyedMutex textures as input. + mSyncObject = + layers::SyncObject::CreateSyncObject(aKnowsCompositor->GetTextureFactoryIdentifier().mSyncHandle, + mDevice); + } } + mTextureClientAllocator->SetMaxPoolSize(5); + + Telemetry::Accumulate(Telemetry::MEDIA_DECODER_BACKEND_USED, + uint32_t(media::MediaDecoderBackend::WMFDXVA2D3D11)); + + reporter.SetSuccessful(); + + return S_OK; +} + +HRESULT +D3D11DXVA2Manager::InitInternal(layers::KnowsCompositor* aKnowsCompositor, + nsACString& aFailureReason, + ID3D11Device* aDevice) +{ + HRESULT hr; + + mDevice = aDevice; + + if (!mDevice) { + mDevice = gfx::DeviceManagerDx::Get()->CreateDecoderDevice(); + if (!mDevice) { + aFailureReason.AssignLiteral("Failed to create D3D11 device for decoder"); + return E_FAIL; + } + } + + mDevice->GetImmediateContext(getter_AddRefs(mContext)); hr = wmf::MFCreateDXGIDeviceManager(&mDeviceManagerToken, getter_AddRefs(mDXGIDeviceManager)); @@ -782,22 +854,6 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, } } - if (layers::ImageBridgeChild::GetSingleton()) { - // There's no proper KnowsCompositor for ImageBridge currently (and it - // implements the interface), so just use that if it's available. - mTextureClientAllocator = new D3D11RecycleAllocator( - layers::ImageBridgeChild::GetSingleton().get(), mDevice); - } else { - mTextureClientAllocator = - new D3D11RecycleAllocator(aKnowsCompositor, mDevice); - } - mTextureClientAllocator->SetMaxPoolSize(5); - - Telemetry::Accumulate(Telemetry::MEDIA_DECODER_BACKEND_USED, - uint32_t(media::MediaDecoderBackend::WMFDXVA2D3D11)); - - reporter.SetSuccessful(); - return S_OK; } @@ -827,42 +883,144 @@ D3D11DXVA2Manager::CopyToImage(IMFSample* aVideoSample, { NS_ENSURE_TRUE(aVideoSample, E_POINTER); NS_ENSURE_TRUE(aOutImage, E_POINTER); - - // Our video frame is stored in a non-sharable ID3D11Texture2D. We need - // to create a copy of that frame as a sharable resource, save its share - // handle, and put that handle into the rendering pipeline. + NS_ENSURE_TRUE(mSyncObject, E_FAIL); + MOZ_ASSERT(mTextureClientAllocator); RefPtr image = new D3D11ShareHandleImage(gfx::IntSize(mWidth, mHeight), aRegion); bool ok = image->AllocateTexture(mTextureClientAllocator, mDevice); NS_ENSURE_TRUE(ok, E_FAIL); - HRESULT hr = mTransform->Input(aVideoSample); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + RefPtr client = image->GetTextureClient(ImageBridgeChild::GetSingleton().get()); + NS_ENSURE_TRUE(client, E_FAIL); RefPtr mutex; - RefPtr sample; + HRESULT hr; RefPtr texture = image->GetTexture(); texture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex)); - hr = mutex->AcquireSync(0, 2000); - - if (hr != S_OK) { - NS_WARNING("Acquire sync didn't manage to return within 2 seconds."); + if (mutex) { + hr = mutex->AcquireSync(0, 2000); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); } - hr = CreateOutputSample(sample, texture); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + if (client && client->GetFormat() == SurfaceFormat::NV12) { + // Our video frame is stored in a non-sharable ID3D11Texture2D. We need + // to create a copy of that frame as a sharable resource, save its share + // handle, and put that handle into the rendering pipeline. - hr = mTransform->Output(&sample); - mutex->ReleaseSync(0); + RefPtr buffer; + hr = aVideoSample->GetBufferByIndex(0, getter_AddRefs(buffer)); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + RefPtr dxgiBuf; + hr = buffer->QueryInterface((IMFDXGIBuffer**)getter_AddRefs(dxgiBuf)); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + RefPtr tex; + hr = dxgiBuf->GetResource(__uuidof(ID3D11Texture2D), getter_AddRefs(tex)); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + UINT index; + dxgiBuf->GetSubresourceIndex(&index); + mContext->CopySubresourceRegion(texture, 0, 0, 0, 0, tex, index, nullptr); + } else { + // Our video sample is in NV12 format but our output texture is in BGRA. + // Use MFT to do color conversion. + hr = mTransform->Input(aVideoSample); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + RefPtr sample; + hr = CreateOutputSample(sample, texture); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = mTransform->Output(&sample); + } + + if (!mutex) { + client->SyncWithObject(mSyncObject); + mSyncObject->FinalizeFrame(); + } else { + mutex->ReleaseSync(0); + } image.forget(aOutImage); return S_OK; } +HRESULT +D3D11DXVA2Manager::CopyToBGRATexture(ID3D11Texture2D *aInTexture, + ID3D11Texture2D** aOutTexture) +{ + NS_ENSURE_TRUE(aInTexture, E_POINTER); + NS_ENSURE_TRUE(aOutTexture, E_POINTER); + + HRESULT hr; + RefPtr texture, inTexture; + + inTexture = aInTexture; + + CD3D11_TEXTURE2D_DESC desc; + aInTexture->GetDesc(&desc); + ConfigureForSize(desc.Width, desc.Height); + + RefPtr mutex; + inTexture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex)); + // The rest of this function will not work if inTexture implements + // IDXGIKeyedMutex! In that case case we would have to copy to a + // non-mutex using texture. + + if (mutex) { + RefPtr newTexture; + + desc.MiscFlags = 0; + hr = mDevice->CreateTexture2D(&desc, nullptr, getter_AddRefs(newTexture)); + NS_ENSURE_TRUE(SUCCEEDED(hr) && newTexture, E_FAIL); + + hr = mutex->AcquireSync(0, 2000); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + mContext->CopyResource(newTexture, inTexture); + + mutex->ReleaseSync(0); + inTexture = newTexture; + } + + desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; + + hr = mDevice->CreateTexture2D(&desc, nullptr, getter_AddRefs(texture)); + NS_ENSURE_TRUE(SUCCEEDED(hr) && texture, E_FAIL); + + RefPtr inputSample; + wmf::MFCreateSample(getter_AddRefs(inputSample)); + + // If these aren't set the decoder fails. + inputSample->SetSampleTime(10); + inputSample->SetSampleDuration(10000); + + RefPtr inputBuffer; + hr = wmf::MFCreateDXGISurfaceBuffer( + __uuidof(ID3D11Texture2D), inTexture, 0, FALSE, getter_AddRefs(inputBuffer)); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + inputSample->AddBuffer(inputBuffer); + + hr = mTransform->Input(inputSample); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + RefPtr outputSample; + hr = CreateOutputSample(outputSample, texture); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = mTransform->Output(&outputSample); + + texture.forget(aOutTexture); + + return S_OK; +} + HRESULT ConfigureOutput(IMFMediaType* aOutput, void* aData) { HRESULT hr = @@ -919,7 +1077,7 @@ D3D11DXVA2Manager::ConfigureForSize(uint32_t aWidth, uint32_t aHeight) hr = outputType->SetGUID(MF_MT_MAJOR_TYPE, MFMediaType_Video); NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - hr = outputType->SetGUID(MF_MT_SUBTYPE, MFVideoFormat_ARGB32); + hr = outputType->SetGUID(MF_MT_SUBTYPE, MFVideoFormat_NV12); NS_ENSURE_TRUE(SUCCEEDED(hr), hr); gfx::IntSize size(mWidth, mHeight); @@ -1003,7 +1161,8 @@ D3D11DXVA2Manager::CreateDecoder(const D3D11_VIDEO_DECODER_DESC& aDesc) const /* static */ DXVA2Manager* DXVA2Manager::CreateD3D11DXVA(layers::KnowsCompositor* aKnowsCompositor, - nsACString& aFailureReason) + nsACString& aFailureReason, + ID3D11Device* aDevice) { // DXVA processing takes up a lot of GPU resources, so limit the number of // videos we use DXVA with at any one time. @@ -1015,7 +1174,7 @@ DXVA2Manager::CreateD3D11DXVA(layers::KnowsCompositor* aKnowsCompositor, } nsAutoPtr manager(new D3D11DXVA2Manager()); - HRESULT hr = manager->Init(aKnowsCompositor, aFailureReason); + HRESULT hr = manager->Init(aKnowsCompositor, aFailureReason, aDevice); NS_ENSURE_TRUE(SUCCEEDED(hr), nullptr); return manager.forget(); @@ -1024,14 +1183,16 @@ DXVA2Manager::CreateD3D11DXVA(layers::KnowsCompositor* aKnowsCompositor, DXVA2Manager::DXVA2Manager() : mLock("DXVA2Manager") { - MOZ_ASSERT(NS_IsMainThread()); - ++sDXVAVideosCount; + if (NS_IsMainThread()) { + ++sDXVAVideosCount; + } } DXVA2Manager::~DXVA2Manager() { - MOZ_ASSERT(NS_IsMainThread()); - --sDXVAVideosCount; + if (NS_IsMainThread()) { + --sDXVAVideosCount; + } } bool diff --git a/dom/media/platforms/wmf/DXVA2Manager.h b/dom/media/platforms/wmf/DXVA2Manager.h index b907359d4f64..a74c21da586b 100644 --- a/dom/media/platforms/wmf/DXVA2Manager.h +++ b/dom/media/platforms/wmf/DXVA2Manager.h @@ -31,7 +31,8 @@ public: nsACString& aFailureReason); static DXVA2Manager* CreateD3D11DXVA( layers::KnowsCompositor* aKnowsCompositor, - nsACString& aFailureReason); + nsACString& aFailureReason, + ID3D11Device* aDevice = nullptr); // Returns a pointer to the D3D device manager responsible for managing the // device we're using for hardware accelerated video decoding. If we're using @@ -44,6 +45,14 @@ public: const nsIntRect& aRegion, layers::Image** aOutImage) = 0; + virtual HRESULT CopyToBGRATexture(ID3D11Texture2D *aInTexture, + ID3D11Texture2D** aOutTexture) + { + // Not implemented! + MOZ_CRASH("CopyToBGRATexture not implemented on this manager."); + return E_FAIL; + } + virtual HRESULT ConfigureForSize(uint32_t aWidth, uint32_t aHeight) { return S_OK; diff --git a/dom/media/test/manifest.js b/dom/media/test/manifest.js index bda391bc312b..5c2799648d4d 100644 --- a/dom/media/test/manifest.js +++ b/dom/media/test/manifest.js @@ -1545,7 +1545,7 @@ function removeNodeAndSource(n) { n.srcObject = null; n.src = ""; while (n.firstChild) { - n.removeChild(n.firstChild); + n.firstChild.remove(); } } diff --git a/dom/media/tests/mochitest/test_peerConnection_captureStream_canvas_2d_noSSRC.html b/dom/media/tests/mochitest/test_peerConnection_captureStream_canvas_2d_noSSRC.html index 65c479211d2f..a687e02c046c 100644 --- a/dom/media/tests/mochitest/test_peerConnection_captureStream_canvas_2d_noSSRC.html +++ b/dom/media/tests/mochitest/test_peerConnection_captureStream_canvas_2d_noSSRC.html @@ -6,7 +6,7 @@
-
 
diff --git a/dom/tests/mochitest/general/test_clipboard_events.html b/dom/tests/mochitest/general/test_clipboard_events.html index d73220da87e1..9db40b8315d5 100644 --- a/dom/tests/mochitest/general/test_clipboard_events.html +++ b/dom/tests/mochitest/general/test_clipboard_events.html @@ -10,6 +10,7 @@

CONTENT TEXT
+
diff --git a/dom/tests/mochitest/general/test_interfaces.js b/dom/tests/mochitest/general/test_interfaces.js index aebbd56ffc65..528f461d91bd 100644 --- a/dom/tests/mochitest/general/test_interfaces.js +++ b/dom/tests/mochitest/general/test_interfaces.js @@ -881,7 +881,7 @@ var interfaceNamesInGlobalScope = // IMPORTANT: Do not change this list without review from a DOM peer! "StorageEvent", // IMPORTANT: Do not change this list without review from a DOM peer! - {name: "StorageManager", nightly: true, isSecureContext: true}, + {name: "StorageManager", nightly: true, isSecureContext: true, android: false}, // IMPORTANT: Do not change this list without review from a DOM peer! "StyleSheet", // IMPORTANT: Do not change this list without review from a DOM peer! diff --git a/dom/tests/mochitest/webcomponents/test_shadow_element.html b/dom/tests/mochitest/webcomponents/test_shadow_element.html index 4440650d7d9b..4b91535fc325 100644 --- a/dom/tests/mochitest/webcomponents/test_shadow_element.html +++ b/dom/tests/mochitest/webcomponents/test_shadow_element.html @@ -90,7 +90,7 @@ ok(firstDistNodes[0].id == "one" && firstDistNodes[3].id == "four", "Reprojection through shadow should preserve node order."); // Remove a node from the host and make sure that it is removed from all insertion points. -host.removeChild(host.firstChild); +host.firstChild.remove(); firstDistNodes = firstContent.getDistributedNodes(); secondDistNodes = secondContent.getDistributedNodes(); @@ -115,7 +115,7 @@ firstShadow.appendChild(shadowChild); is(firstContent.getDistributedNodes()[0], shadowChild, "Elements in shadow insertioin point should be projected into content insertion points."); // Remove child of ShadowRoot and check that projected node is removed from insertion point. -firstShadow.removeChild(firstShadow.firstChild); +firstShadow.firstChild.remove(); is(firstContent.getDistributedNodes().length, 0, "Reprojected element was removed from ShadowRoot, thus it should be removed from content insertion point."); @@ -135,7 +135,7 @@ host.innerHTML = ''; is(firstContent.getDistributedNodes()[0], host.firstChild, "Child of host should be projected to insertion point."); // Remove node and make sure that it is removed from distributed nodes. -host.removeChild(host.firstChild); +host.firstChild.remove(); is(firstContent.getDistributedNodes().length, 0, "Node removed from host should be removed from insertion point."); diff --git a/dom/vr/VRDisplay.cpp b/dom/vr/VRDisplay.cpp index 7b31a614e521..aa941429729b 100644 --- a/dom/vr/VRDisplay.cpp +++ b/dom/vr/VRDisplay.cpp @@ -12,7 +12,9 @@ #include "mozilla/dom/VRDisplay.h" #include "mozilla/HoldDropJSObjects.h" #include "mozilla/dom/VRDisplayBinding.h" +#include "mozilla/EventStateManager.h" #include "Navigator.h" +#include "gfxPrefs.h" #include "gfxVR.h" #include "VRDisplayClient.h" #include "VRManagerChild.h" @@ -450,7 +452,9 @@ VRDisplay::ResetPose() } already_AddRefed -VRDisplay::RequestPresent(const nsTArray& aLayers, ErrorResult& aRv) +VRDisplay::RequestPresent(const nsTArray& aLayers, + CallerType aCallerType, + ErrorResult& aRv) { nsCOMPtr global = do_QueryInterface(GetParentObject()); if (!global) { @@ -464,7 +468,15 @@ VRDisplay::RequestPresent(const nsTArray& aLayers, ErrorResult& aRv) nsCOMPtr obs = services::GetObserverService(); NS_ENSURE_TRUE(obs, nullptr); - if (!IsPresenting() && IsAnyPresenting()) { + if (!EventStateManager::IsHandlingUserInput() && + aCallerType != CallerType::System && + gfxPrefs::VRRequireGesture()) { + // The WebVR API states that if called outside of a user gesture, the + // promise must be rejected. We allow VR presentations to start within + // trusted events such as vrdisplayactivate, which triggers in response to + // HMD proximity sensors and when navigating within a VR presentation. + promise->MaybeRejectWithUndefined(); + } else if (!IsPresenting() && IsAnyPresenting()) { // Only one presentation allowed per VRDisplay // on a first-come-first-serve basis. // If this Javascript context is presenting, then we can replace our diff --git a/dom/vr/VRDisplay.h b/dom/vr/VRDisplay.h index 8adc3b9854f6..e3fb88a4b637 100644 --- a/dom/vr/VRDisplay.h +++ b/dom/vr/VRDisplay.h @@ -324,7 +324,9 @@ public: mDepthFar = aDepthFar; } - already_AddRefed RequestPresent(const nsTArray& aLayers, ErrorResult& aRv); + already_AddRefed RequestPresent(const nsTArray& aLayers, + CallerType aCallerType, + ErrorResult& aRv); already_AddRefed ExitPresent(ErrorResult& aRv); void GetLayers(nsTArray& result); void SubmitFrame(); diff --git a/dom/webidl/VRDisplay.webidl b/dom/webidl/VRDisplay.webidl index 63ebd1205b8d..a7e27d61b152 100644 --- a/dom/webidl/VRDisplay.webidl +++ b/dom/webidl/VRDisplay.webidl @@ -264,7 +264,7 @@ interface VRDisplay : EventTarget { * Begin presenting to the VRDisplay. Must be called in response to a user gesture. * Repeat calls while already presenting will update the VRLayers being displayed. */ - [Throws] Promise requestPresent(sequence layers); + [Throws, NeedsCallerType] Promise requestPresent(sequence layers); /** * Stops presenting to the VRDisplay. diff --git a/dom/workers/ScriptLoader.cpp b/dom/workers/ScriptLoader.cpp index d23b1ed4a674..b16ace0a80e6 100644 --- a/dom/workers/ScriptLoader.cpp +++ b/dom/workers/ScriptLoader.cpp @@ -2028,10 +2028,10 @@ ScriptExecutorRunnable::ShutdownScriptLoader(JSContext* aCx, if (mScriptLoader.mRv.Failed()) { if (aMutedError && mScriptLoader.mRv.IsJSException()) { LogExceptionToConsole(aCx, aWorkerPrivate); - mScriptLoader.mRv.Throw(NS_ERROR_DOM_NETWORK_ERR); + mScriptLoader.mRv.ThrowWithCustomCleanup(NS_ERROR_DOM_NETWORK_ERR); } } else { - mScriptLoader.mRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR); + mScriptLoader.mRv.ThrowWithCustomCleanup(NS_ERROR_DOM_INVALID_STATE_ERR); } } diff --git a/dom/workers/WorkerRunnable.cpp b/dom/workers/WorkerRunnable.cpp index 6bbe40f66a6d..2fac0ef9e604 100644 --- a/dom/workers/WorkerRunnable.cpp +++ b/dom/workers/WorkerRunnable.cpp @@ -587,14 +587,17 @@ WorkerMainThreadRunnable::Dispatch(Status aFailStatus, ErrorResult& aRv) MOZ_ASSERT(NS_SUCCEEDED(rv), "Should only fail after xpcom-shutdown-threads and we're gone by then"); - if (!syncLoop.Run()) { - aRv.ThrowUncatchableException(); - } + bool success = syncLoop.Run(); Telemetry::Accumulate(Telemetry::SYNC_WORKER_OPERATION, mTelemetryKey, static_cast((TimeStamp::NowLoRes() - startTime) - .ToMilliseconds())); + .ToMilliseconds())); + Unused << startTime; // Shut the compiler up. + + if (!success) { + aRv.ThrowUncatchableException(); + } } NS_IMETHODIMP diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp index f353ac0294c8..fd90e35e2f2a 100644 --- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -881,6 +881,7 @@ WorkerDebuggerGlobalScope::GetGlobal(JSContext* aCx, WorkerGlobalScope* scope = mWorkerPrivate->GetOrCreateGlobalScope(aCx); if (!scope) { aRv.Throw(NS_ERROR_FAILURE); + return; } aGlobal.set(scope->GetWrapper()); diff --git a/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js b/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js index 4f663e991f5c..7c0e010ef338 100644 --- a/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js +++ b/dom/workers/test/serviceworkers/test_serviceworker_interfaces.js @@ -206,7 +206,7 @@ var interfaceNamesInGlobalScope = // IMPORTANT: Do not change this list without review from a DOM peer! "ServiceWorkerRegistration", // IMPORTANT: Do not change this list without review from a DOM peer! - {name: "StorageManager", nightly: true}, + {name: "StorageManager", nightly: true, android: false}, // IMPORTANT: Do not change this list without review from a DOM peer! "SubtleCrypto", // IMPORTANT: Do not change this list without review from a DOM peer! diff --git a/dom/workers/test/test_worker_interfaces.js b/dom/workers/test/test_worker_interfaces.js index b96d18037b1e..24b639c3a6c1 100644 --- a/dom/workers/test/test_worker_interfaces.js +++ b/dom/workers/test/test_worker_interfaces.js @@ -192,7 +192,7 @@ var interfaceNamesInGlobalScope = // IMPORTANT: Do not change this list without review from a DOM peer! "ServiceWorkerRegistration", // IMPORTANT: Do not change this list without review from a DOM peer! - {name: "StorageManager", nightly: true, isSecureContext: true}, + {name: "StorageManager", nightly: true, isSecureContext: true, android: false}, // IMPORTANT: Do not change this list without review from a DOM peer! "SubtleCrypto", // IMPORTANT: Do not change this list without review from a DOM peer! diff --git a/dom/xhr/XMLHttpRequestWorker.cpp b/dom/xhr/XMLHttpRequestWorker.cpp index 99e210d12195..daf519ddeb8a 100644 --- a/dom/xhr/XMLHttpRequestWorker.cpp +++ b/dom/xhr/XMLHttpRequestWorker.cpp @@ -1828,15 +1828,17 @@ XMLHttpRequestWorker::SendInternal(SendRunnable* aRunnable, autoUnpin.Clear(); + bool succeeded = autoSyncLoop->Run(); + mStateData.mFlagSend = false; + // Don't clobber an existing exception that we may have thrown on aRv // already... though can there really be one? In any case, it seems to me // that this autoSyncLoop->Run() can never fail, since the StopSyncLoop call // for it will come from ProxyCompleteRunnable and that always passes true for // the second arg. - if (!autoSyncLoop->Run() && !aRv.Failed()) { + if (!succeeded && !aRv.Failed()) { aRv.Throw(NS_ERROR_FAILURE); } - mStateData.mFlagSend = false; } bool diff --git a/dom/xslt/tests/mochitest/test_bug319374.xhtml b/dom/xslt/tests/mochitest/test_bug319374.xhtml index 2342b3447419..b752c5e4eed1 100644 --- a/dom/xslt/tests/mochitest/test_bug319374.xhtml +++ b/dom/xslt/tests/mochitest/test_bug319374.xhtml @@ -45,7 +45,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=319374 while (res = result.iterateNext()) { ++counter; var anon = getAnonymousNodes(res); - anon[0].removeChild(anon[0].firstChild); // Removing a child node + anon[0].firstChild.remove(); // Removing a child node anon[0].removeAttribute("attr1"); // Removing an attribute anon[1].firstChild.data = "anon text changed" // Modifying text data } diff --git a/dom/xul/templates/tests/chrome/test_sortservice.xul b/dom/xul/templates/tests/chrome/test_sortservice.xul index af1de3f0ef36..b7d5848a1148 100644 --- a/dom/xul/templates/tests/chrome/test_sortservice.xul +++ b/dom/xul/templates/tests/chrome/test_sortservice.xul @@ -56,7 +56,7 @@ function doTests() is(actual, test[2], "sorted step " + (t + 1)); while(box.hasChildNodes()) - box.removeChild(box.firstChild); + box.firstChild.remove(); box.removeAttribute("sortDirection"); } diff --git a/dom/xul/test/test_bug311681.xul b/dom/xul/test/test_bug311681.xul index 515bd67bf81d..9c22246c6268 100644 --- a/dom/xul/test/test_bug311681.xul +++ b/dom/xul/test/test_bug311681.xul @@ -81,7 +81,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=311681 function clear(node) { while (node.hasChildNodes()) { - node.removeChild(node.firstChild); + node.firstChild.remove(); } } diff --git a/editor/composer/crashtests/407062-1.html b/editor/composer/crashtests/407062-1.html index 81083c235d53..9bd5d02e59e7 100644 --- a/editor/composer/crashtests/407062-1.html +++ b/editor/composer/crashtests/407062-1.html @@ -7,7 +7,7 @@ function boom() { var r = document.documentElement; while(r.firstChild) - r.removeChild(r.firstChild); + r.firstChild.remove(); document.execCommand("contentReadOnly", false, ""); document.documentElement.focus(); diff --git a/editor/libeditor/crashtests/1317718.html b/editor/libeditor/crashtests/1317718.html index ecef30e0d909..892b8aee3127 100644 --- a/editor/libeditor/crashtests/1317718.html +++ b/editor/libeditor/crashtests/1317718.html @@ -4,7 +4,7 @@ addEventListener('DOMContentLoaded', function() { let root = document.documentElement; while(root.firstChild) { - root.removeChild(root.firstChild); + root.firstChild.remove(); } document.designMode = 'on'; document.removeChild(document.documentElement); diff --git a/editor/libeditor/crashtests/1324505.html b/editor/libeditor/crashtests/1324505.html index 2af15becc7c6..4872b9f05d99 100644 --- a/editor/libeditor/crashtests/1324505.html +++ b/editor/libeditor/crashtests/1324505.html @@ -4,7 +4,7 @@ addEventListener("DOMContentLoaded", function(){ let root = document.documentElement; while(root.firstChild) { - root.removeChild(root.firstChild); + root.firstChild.remove(); } let o_0 = document.createElement("body"); root.appendChild(o_0); diff --git a/editor/libeditor/crashtests/612565-1.html b/editor/libeditor/crashtests/612565-1.html index 1b059aa6624c..8df4283f8da9 100644 --- a/editor/libeditor/crashtests/612565-1.html +++ b/editor/libeditor/crashtests/612565-1.html @@ -10,7 +10,7 @@ doc.body.appendChild(doc.createTextNode("foo")); doc.designMode = "on"; while (doc.body.firstChild) { - doc.body.removeChild(doc.body.firstChild); + doc.body.firstChild.remove(); } }; diff --git a/editor/libeditor/crashtests/713427-2.xhtml b/editor/libeditor/crashtests/713427-2.xhtml index 7ebfb7775af7..39ac18ed07e7 100644 --- a/editor/libeditor/crashtests/713427-2.xhtml +++ b/editor/libeditor/crashtests/713427-2.xhtml @@ -6,7 +6,7 @@ function boom() { while (document.documentElement.firstChild) { - document.documentElement.removeChild(document.documentElement.firstChild); + document.documentElement.firstChild.remove(); } var td = document.createElementNS("http://www.w3.org/1999/xhtml", "td"); diff --git a/editor/libeditor/crashtests/761861.html b/editor/libeditor/crashtests/761861.html index 0c1f3f521056..2a7e06a15491 100644 --- a/editor/libeditor/crashtests/761861.html +++ b/editor/libeditor/crashtests/761861.html @@ -3,7 +3,7 @@ function boom() { var r = document.documentElement; while (r.firstChild) { - r.removeChild(r.firstChild); + r.firstChild.remove(); } document.documentElement.contentEditable = "true"; diff --git a/editor/libeditor/crashtests/766413.html b/editor/libeditor/crashtests/766413.html index c5d9835e3ca7..1a7092d92a0a 100644 --- a/editor/libeditor/crashtests/766413.html +++ b/editor/libeditor/crashtests/766413.html @@ -7,7 +7,7 @@ function boom() { var root = document.documentElement; while (root.firstChild) { - root.removeChild(root.firstChild); + root.firstChild.remove(); } var space = document.createTextNode(" "); diff --git a/editor/libeditor/crashtests/767169.html b/editor/libeditor/crashtests/767169.html index 3dfad160c1c6..a7673bce62bf 100644 --- a/editor/libeditor/crashtests/767169.html +++ b/editor/libeditor/crashtests/767169.html @@ -7,7 +7,7 @@ function boom() { var root = document.documentElement; - while (root.firstChild) { root.removeChild(root.firstChild); } + while (root.firstChild) { root.firstChild.remove(); } root.contentEditable = "true"; document.removeChild(root); document.appendChild(root); diff --git a/editor/libeditor/crashtests/768765.html b/editor/libeditor/crashtests/768765.html index 060e5161bd08..551e4ec6c380 100644 --- a/editor/libeditor/crashtests/768765.html +++ b/editor/libeditor/crashtests/768765.html @@ -7,7 +7,7 @@ function boom() { var root = document.documentElement; - while (root.firstChild) { root.removeChild(root.firstChild); } + while (root.firstChild) { root.firstChild.remove(); } var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body"); var div = document.createElementNS("http://www.w3.org/1999/xhtml", "div"); diff --git a/editor/libeditor/crashtests/772282.html b/editor/libeditor/crashtests/772282.html index f6259b344cf7..bba3d6bd6733 100644 --- a/editor/libeditor/crashtests/772282.html +++ b/editor/libeditor/crashtests/772282.html @@ -6,7 +6,7 @@ function boom() { var root = document.documentElement; - while(root.firstChild) { root.removeChild(root.firstChild); } + while(root.firstChild) { root.firstChild.remove(); } var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body"); body.setAttributeNS(null, "contenteditable", "true"); var img = document.createElementNS("http://www.w3.org/1999/xhtml", "img"); diff --git a/editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/range.js b/editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/range.js index 86ba6e1716f0..e6bfa84ba5a1 100644 --- a/editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/range.js +++ b/editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/range.js @@ -2109,7 +2109,7 @@ goog.dom.createTable_ = function(doc, rows, columns, fillWithNbsp) { totalHtml.push(""); var elem = doc.createElement(goog.dom.TagName.DIV); elem.innerHTML = totalHtml.join(""); - return elem.removeChild(elem.firstChild) + return elem.firstChild.remove() }; goog.dom.htmlToDocumentFragment = function(htmlString) { return goog.dom.htmlToDocumentFragment_(document, htmlString) @@ -2118,12 +2118,12 @@ goog.dom.htmlToDocumentFragment_ = function(doc, htmlString) { var tempDiv = doc.createElement("div"); if(goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT) { tempDiv.innerHTML = "
" + htmlString; - tempDiv.removeChild(tempDiv.firstChild) + tempDiv.firstChild.remove() }else { tempDiv.innerHTML = htmlString } if(tempDiv.childNodes.length == 1) { - return tempDiv.removeChild(tempDiv.firstChild) + return tempDiv.firstChild.remove() }else { var fragment = doc.createDocumentFragment(); while(tempDiv.firstChild) { diff --git a/editor/libeditor/tests/file_select_all_without_body.html b/editor/libeditor/tests/file_select_all_without_body.html index 70050a847409..3389538313d3 100644 --- a/editor/libeditor/tests/file_select_all_without_body.html +++ b/editor/libeditor/tests/file_select_all_without_body.html @@ -16,7 +16,7 @@ function boom() { var root = document.documentElement; while(root.firstChild) { - root.removeChild(root.firstChild); + root.firstChild.remove(); } root.appendChild(document.createTextNode("Mozilla")); root.focus(); diff --git a/editor/libeditor/tests/test_bug612447.html b/editor/libeditor/tests/test_bug612447.html index b06739288419..cdb9b22f1e1a 100644 --- a/editor/libeditor/tests/test_bug612447.html +++ b/editor/libeditor/tests/test_bug612447.html @@ -44,7 +44,7 @@ SimpleTest.waitForFocus(function() { var beforeB = snapshotWindow(win, true); is(b.textContent, "X", "Typing should work"); while (b.firstChild) { - b.removeChild(b.firstChild); + b.firstChild.remove(); } ok(editorCommandsEnabled(), "The editor commands should work"); @@ -58,7 +58,7 @@ SimpleTest.waitForFocus(function() { var afterB = snapshotWindow(win, true); is(b.textContent, "X", "Typing should work"); while (b.firstChild) { - b.removeChild(b.firstChild); + b.firstChild.remove(); } ok(editorCommandsEnabled(), "The editor commands should work"); diff --git a/extensions/spellcheck/locales/en-US/hunspell/en-US.dic b/extensions/spellcheck/locales/en-US/hunspell/en-US.dic index ceb5bdc60124..cb117155ba94 100644 --- a/extensions/spellcheck/locales/en-US/hunspell/en-US.dic +++ b/extensions/spellcheck/locales/en-US/hunspell/en-US.dic @@ -1,4 +1,4 @@ -52349 +52352 0/nm 0th/pt 1/n1 @@ -14449,6 +14449,9 @@ analyze/ADSG analyzer/SM anapest/SM anapestic/MS +anaphylactic +anaphylaxes +anaphylaxis anarchic anarchically anarchism/M diff --git a/gfx/config/gfxFeature.h b/gfx/config/gfxFeature.h index 542b64f67af4..5db081fa8ef4 100644 --- a/gfx/config/gfxFeature.h +++ b/gfx/config/gfxFeature.h @@ -19,7 +19,6 @@ namespace gfx { /* Name, Type, Description */ \ _(HW_COMPOSITING, Feature, "Compositing") \ _(D3D11_COMPOSITING, Feature, "Direct3D11 Compositing") \ - _(D3D9_COMPOSITING, Feature, "Direct3D9 Compositing") \ _(OPENGL_COMPOSITING, Feature, "OpenGL Compositing") \ _(DIRECT2D, Feature, "Direct2D") \ _(D3D11_HW_ANGLE, Feature, "Direct3D11 hardware ANGLE") \ diff --git a/gfx/ipc/GPUChild.cpp b/gfx/ipc/GPUChild.cpp index d8512e460f10..90d2a2fe4e24 100644 --- a/gfx/ipc/GPUChild.cpp +++ b/gfx/ipc/GPUChild.cpp @@ -58,7 +58,6 @@ GPUChild::Init() DevicePrefs devicePrefs; devicePrefs.hwCompositing() = gfxConfig::GetValue(Feature::HW_COMPOSITING); devicePrefs.d3d11Compositing() = gfxConfig::GetValue(Feature::D3D11_COMPOSITING); - devicePrefs.d3d9Compositing() = gfxConfig::GetValue(Feature::D3D9_COMPOSITING); devicePrefs.oglCompositing() = gfxConfig::GetValue(Feature::OPENGL_COMPOSITING); devicePrefs.useD2D1() = gfxConfig::GetValue(Feature::DIRECT2D); diff --git a/gfx/ipc/GPUParent.cpp b/gfx/ipc/GPUParent.cpp index fb6cb2ad62da..de4a87ef9d1e 100644 --- a/gfx/ipc/GPUParent.cpp +++ b/gfx/ipc/GPUParent.cpp @@ -38,7 +38,6 @@ #include "VRManagerParent.h" #include "VsyncBridgeParent.h" #if defined(XP_WIN) -# include "DeviceManagerD3D9.h" # include "mozilla/gfx/DeviceManagerDx.h" # include #endif @@ -103,7 +102,6 @@ GPUParent::Init(base::ProcessId aParentPid, gfxPlatform::InitMoz2DLogging(); #if defined(XP_WIN) DeviceManagerDx::Init(); - DeviceManagerD3D9::Init(); #endif if (NS_FAILED(NS_InitMinimalXPCOM())) { @@ -162,7 +160,6 @@ GPUParent::RecvInit(nsTArray&& prefs, // Inherit device preferences. gfxConfig::Inherit(Feature::HW_COMPOSITING, devicePrefs.hwCompositing()); gfxConfig::Inherit(Feature::D3D11_COMPOSITING, devicePrefs.d3d11Compositing()); - gfxConfig::Inherit(Feature::D3D9_COMPOSITING, devicePrefs.d3d9Compositing()); gfxConfig::Inherit(Feature::OPENGL_COMPOSITING, devicePrefs.oglCompositing()); gfxConfig::Inherit(Feature::DIRECT2D, devicePrefs.useD2D1()); @@ -275,7 +272,6 @@ mozilla::ipc::IPCResult GPUParent::RecvGetDeviceStatus(GPUDeviceData* aOut) { CopyFeatureChange(Feature::D3D11_COMPOSITING, &aOut->d3d11Compositing()); - CopyFeatureChange(Feature::D3D9_COMPOSITING, &aOut->d3d9Compositing()); CopyFeatureChange(Feature::OPENGL_COMPOSITING, &aOut->oglCompositing()); #if defined(XP_WIN) @@ -423,7 +419,6 @@ GPUParent::ActorDestroy(ActorDestroyReason aWhy) Factory::ShutDown(); #if defined(XP_WIN) DeviceManagerDx::Shutdown(); - DeviceManagerD3D9::Shutdown(); #endif LayerTreeOwnerTracker::Shutdown(); gfxVars::Shutdown(); diff --git a/gfx/ipc/GraphicsMessages.ipdlh b/gfx/ipc/GraphicsMessages.ipdlh index cc4115d42578..f806f67bd45c 100644 --- a/gfx/ipc/GraphicsMessages.ipdlh +++ b/gfx/ipc/GraphicsMessages.ipdlh @@ -27,7 +27,6 @@ struct DevicePrefs { FeatureStatus hwCompositing; FeatureStatus d3d11Compositing; - FeatureStatus d3d9Compositing; FeatureStatus oglCompositing; FeatureStatus useD2D1; }; @@ -63,7 +62,6 @@ union GPUDeviceStatus struct GPUDeviceData { FeatureChange d3d11Compositing; - FeatureChange d3d9Compositing; FeatureChange oglCompositing; GPUDeviceStatus gpuDevice; }; diff --git a/gfx/layers/Compositor.h b/gfx/layers/Compositor.h index d57484c5967e..fabf70974d49 100644 --- a/gfx/layers/Compositor.h +++ b/gfx/layers/Compositor.h @@ -130,7 +130,6 @@ class CompositingRenderTarget; class CompositorBridgeParent; class LayerManagerComposite; class CompositorOGL; -class CompositorD3D9; class CompositorD3D11; class BasicCompositor; class TextureHost; @@ -470,7 +469,6 @@ public: virtual LayersBackend GetBackendType() const = 0; virtual CompositorOGL* AsCompositorOGL() { return nullptr; } - virtual CompositorD3D9* AsCompositorD3D9() { return nullptr; } virtual CompositorD3D11* AsCompositorD3D11() { return nullptr; } virtual BasicCompositor* AsBasicCompositor() { return nullptr; } diff --git a/gfx/layers/D3D11ShareHandleImage.cpp b/gfx/layers/D3D11ShareHandleImage.cpp index 5ce34f343480..b98a4a78c59f 100644 --- a/gfx/layers/D3D11ShareHandleImage.cpp +++ b/gfx/layers/D3D11ShareHandleImage.cpp @@ -12,6 +12,9 @@ #include "mozilla/layers/CompositableClient.h" #include "mozilla/layers/CompositableForwarder.h" #include "d3d11.h" +#include "gfxPrefs.h" +#include "DXVA2Manager.h" +#include namespace mozilla { namespace layers { @@ -28,7 +31,11 @@ bool D3D11ShareHandleImage::AllocateTexture(D3D11RecycleAllocator* aAllocator, ID3D11Device* aDevice) { if (aAllocator) { - mTextureClient = aAllocator->CreateOrRecycleClient(gfx::SurfaceFormat::B8G8R8A8, mSize); + if (gfxPrefs::PDMWMFUseNV12Format()) { + mTextureClient = aAllocator->CreateOrRecycleClient(gfx::SurfaceFormat::NV12, mSize); + } else { + mTextureClient = aAllocator->CreateOrRecycleClient(gfx::SurfaceFormat::B8G8R8A8, mSize); + } if (mTextureClient) { mTexture = static_cast(mTextureClient->GetInternalData())->GetD3D11Texture(); return true; @@ -73,6 +80,30 @@ D3D11ShareHandleImage::GetAsSourceSurface() D3D11_TEXTURE2D_DESC desc; texture->GetDesc(&desc); + HRESULT hr; + + if (desc.Format == DXGI_FORMAT_NV12) { + nsAutoCString error; + std::unique_ptr manager(DXVA2Manager::CreateD3D11DXVA(nullptr, error, device)); + + if (!manager) { + gfxWarning() << "Failed to create DXVA2 manager!"; + return nullptr; + } + + RefPtr outTexture; + + hr = manager->CopyToBGRATexture(texture, getter_AddRefs(outTexture)); + + if (FAILED(hr)) { + gfxWarning() << "Failed to copy NV12 to BGRA texture."; + return nullptr; + } + + texture = outTexture; + texture->GetDesc(&desc); + } + CD3D11_TEXTURE2D_DESC softDesc(desc.Format, desc.Width, desc.Height); softDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; softDesc.BindFlags = 0; @@ -81,7 +112,7 @@ D3D11ShareHandleImage::GetAsSourceSurface() softDesc.Usage = D3D11_USAGE_STAGING; RefPtr softTexture; - HRESULT hr = device->CreateTexture2D(&softDesc, + hr = device->CreateTexture2D(&softDesc, NULL, static_cast(getter_AddRefs(softTexture))); @@ -161,12 +192,16 @@ already_AddRefed D3D11RecycleAllocator::CreateOrRecycleClient(gfx::SurfaceFormat aFormat, const gfx::IntSize& aSize) { + TextureAllocationFlags allocFlags = TextureAllocationFlags::ALLOC_DEFAULT; + if (gfxPrefs::PDMWMFUseSyncTexture()) { + allocFlags = TextureAllocationFlags::ALLOC_MANUAL_SYNCHRONIZATION; + } RefPtr textureClient = CreateOrRecycle(aFormat, aSize, BackendSelector::Content, layers::TextureFlags::DEFAULT, - TextureAllocationFlags::ALLOC_DEFAULT); + allocFlags); return textureClient.forget(); } diff --git a/gfx/layers/D3D9SurfaceImage.cpp b/gfx/layers/D3D9SurfaceImage.cpp index 91dce6291dcd..c5538105dc5c 100644 --- a/gfx/layers/D3D9SurfaceImage.cpp +++ b/gfx/layers/D3D9SurfaceImage.cpp @@ -5,7 +5,7 @@ #include "D3D9SurfaceImage.h" #include "gfx2DGlue.h" -#include "mozilla/layers/TextureD3D9.h" +#include "gfxWindowsPlatform.h" #include "mozilla/layers/CompositableClient.h" #include "mozilla/layers/CompositableForwarder.h" #include "mozilla/layers/ImageBridgeChild.h" @@ -14,6 +14,87 @@ namespace mozilla { namespace layers { +DXGID3D9TextureData::DXGID3D9TextureData(gfx::SurfaceFormat aFormat, + IDirect3DTexture9* aTexture, HANDLE aHandle, + IDirect3DDevice9* aDevice) +: mDevice(aDevice) +, mTexture(aTexture) +, mFormat(aFormat) +, mHandle(aHandle) +{ + MOZ_COUNT_CTOR(DXGID3D9TextureData); +} + +DXGID3D9TextureData::~DXGID3D9TextureData() +{ + gfxWindowsPlatform::sD3D9SharedTextures -= mDesc.Width * mDesc.Height * 4; + MOZ_COUNT_DTOR(DXGID3D9TextureData); +} + +// static +DXGID3D9TextureData* +DXGID3D9TextureData::Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, + TextureFlags aFlags, + IDirect3DDevice9* aDevice) +{ + PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS); + MOZ_ASSERT(aFormat == gfx::SurfaceFormat::B8G8R8A8); + if (aFormat != gfx::SurfaceFormat::B8G8R8A8) { + return nullptr; + } + + RefPtr texture; + HANDLE shareHandle = nullptr; + HRESULT hr = aDevice->CreateTexture(aSize.width, aSize.height, + 1, + D3DUSAGE_RENDERTARGET, + D3DFMT_A8R8G8B8, + D3DPOOL_DEFAULT, + getter_AddRefs(texture), + &shareHandle); + if (FAILED(hr) || !shareHandle) { + return nullptr; + } + + D3DSURFACE_DESC surfaceDesc; + hr = texture->GetLevelDesc(0, &surfaceDesc); + if (FAILED(hr)) { + return nullptr; + } + DXGID3D9TextureData* data = new DXGID3D9TextureData(aFormat, texture, shareHandle, aDevice); + data->mDesc = surfaceDesc; + + gfxWindowsPlatform::sD3D9SharedTextures += aSize.width * aSize.height * 4; + return data; +} + +void +DXGID3D9TextureData::FillInfo(TextureData::Info& aInfo) const +{ + aInfo.size = GetSize(); + aInfo.format = mFormat; + aInfo.supportsMoz2D = false; + aInfo.canExposeMappedData = false; + aInfo.hasIntermediateBuffer = false; + aInfo.hasSynchronization = false; +} + +already_AddRefed +DXGID3D9TextureData::GetD3D9Surface() const +{ + RefPtr textureSurface; + HRESULT hr = mTexture->GetSurfaceLevel(0, getter_AddRefs(textureSurface)); + NS_ENSURE_TRUE(SUCCEEDED(hr), nullptr); + + return textureSurface.forget(); +} + +bool +DXGID3D9TextureData::Serialize(SurfaceDescriptor& aOutDescriptor) +{ + aOutDescriptor = SurfaceDescriptorD3D10((WindowsHandle)(mHandle), mFormat, GetSize()); + return true; +} D3D9SurfaceImage::D3D9SurfaceImage() : Image(nullptr, ImageFormat::D3D9_RGB32_TEXTURE) diff --git a/gfx/layers/D3D9SurfaceImage.h b/gfx/layers/D3D9SurfaceImage.h index a5326bb996df..81cfa2caddde 100644 --- a/gfx/layers/D3D9SurfaceImage.h +++ b/gfx/layers/D3D9SurfaceImage.h @@ -40,6 +40,54 @@ protected: RefPtr mDevice; }; +/** + * Wraps a D3D9 texture, shared with the compositor though DXGI. + * At the moment it is only used with D3D11 compositing, and the corresponding + * TextureHost is DXGITextureHostD3D11. + */ +class DXGID3D9TextureData : public TextureData +{ +public: + static DXGID3D9TextureData* + Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, TextureFlags aFlags, IDirect3DDevice9* aDevice); + + ~DXGID3D9TextureData(); + + virtual void FillInfo(TextureData::Info& aInfo) const override; + + virtual bool Lock(OpenMode) override { return true; } + + virtual void Unlock() override {} + + virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override; + + virtual void Deallocate(LayersIPCChannel* aAllocator) override {} + + IDirect3DDevice9* GetD3D9Device() { return mDevice; } + IDirect3DTexture9* GetD3D9Texture() { return mTexture; } + HANDLE GetShareHandle() const { return mHandle; } + already_AddRefed GetD3D9Surface() const; + + const D3DSURFACE_DESC& GetDesc() const + { + return mDesc; + } + + gfx::IntSize GetSize() const { return gfx::IntSize(mDesc.Width, mDesc.Height); } + +protected: + DXGID3D9TextureData(gfx::SurfaceFormat aFormat, + IDirect3DTexture9* aTexture, HANDLE aHandle, + IDirect3DDevice9* aDevice); + + RefPtr mDevice; + RefPtr mTexture; + gfx::SurfaceFormat mFormat; + HANDLE mHandle; + D3DSURFACE_DESC mDesc; +}; + + // Image class that wraps a IDirect3DSurface9. This class copies the image // passed into SetData(), so that it can be accessed from other D3D devices. // This class also manages the synchronization of the copy, to ensure the diff --git a/gfx/layers/IMFYCbCrImage.cpp b/gfx/layers/IMFYCbCrImage.cpp index 2e93e9d34a61..e91aa4daa9a2 100644 --- a/gfx/layers/IMFYCbCrImage.cpp +++ b/gfx/layers/IMFYCbCrImage.cpp @@ -4,7 +4,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "IMFYCbCrImage.h" -#include "DeviceManagerD3D9.h" #include "mozilla/layers/TextureD3D11.h" #include "mozilla/layers/CompositableClient.h" #include "mozilla/layers/CompositableForwarder.h" @@ -133,91 +132,6 @@ FinishTextures(IDirect3DDevice9* aDevice, return true; } -static bool UploadData(IDirect3DDevice9* aDevice, - RefPtr& aTexture, - HANDLE& aHandle, - uint8_t* aSrc, - const gfx::IntSize& aSrcSize, - int32_t aSrcStride) -{ - RefPtr surf; - D3DLOCKED_RECT rect; - aTexture = InitTextures(aDevice, aSrcSize, D3DFMT_A8, surf, aHandle, rect); - if (!aTexture) { - return false; - } - - if (aSrcStride == rect.Pitch) { - memcpy(rect.pBits, aSrc, rect.Pitch * aSrcSize.height); - } else { - for (int i = 0; i < aSrcSize.height; i++) { - memcpy((uint8_t*)rect.pBits + i * rect.Pitch, - aSrc + i * aSrcStride, - aSrcSize.width); - } - } - - return FinishTextures(aDevice, aTexture, surf); -} - -DXGIYCbCrTextureData* -IMFYCbCrImage::GetD3D9TextureData(Data aData, gfx::IntSize aSize) -{ - RefPtr device = DeviceManagerD3D9::GetDevice(); - if (!device) { - return nullptr; - } - - RefPtr textureY; - HANDLE shareHandleY = 0; - if (!UploadData(device, textureY, shareHandleY, - aData.mYChannel, aData.mYSize, aData.mYStride)) { - return nullptr; - } - - RefPtr textureCb; - HANDLE shareHandleCb = 0; - if (!UploadData(device, textureCb, shareHandleCb, - aData.mCbChannel, aData.mCbCrSize, aData.mCbCrStride)) { - return nullptr; - } - - RefPtr textureCr; - HANDLE shareHandleCr = 0; - if (!UploadData(device, textureCr, shareHandleCr, - aData.mCrChannel, aData.mCbCrSize, aData.mCbCrStride)) { - return nullptr; - } - - RefPtr query; - HRESULT hr = device->CreateQuery(D3DQUERYTYPE_EVENT, getter_AddRefs(query)); - hr = query->Issue(D3DISSUE_END); - - int iterations = 0; - bool valid = false; - while (iterations < 10) { - HRESULT hr = query->GetData(nullptr, 0, D3DGETDATA_FLUSH); - if (hr == S_FALSE) { - Sleep(1); - iterations++; - continue; - } - if (hr == S_OK) { - valid = true; - } - break; - } - - if (!valid) { - return nullptr; - } - - return DXGIYCbCrTextureData::Create(TextureFlags::DEFAULT, textureY, - textureCb, textureCr, shareHandleY, - shareHandleCb, shareHandleCr, aSize, - aData.mYSize, aData.mCbCrSize); -} - DXGIYCbCrTextureData* IMFYCbCrImage::GetD3D11TextureData(Data aData, gfx::IntSize aSize) { @@ -313,22 +227,6 @@ IMFYCbCrImage::GetD3D11TextureData(Data aData, gfx::IntSize aSize) aData.mCbCrSize); } -TextureClient* -IMFYCbCrImage::GetD3D9TextureClient(KnowsCompositor* aForwarder) -{ - DXGIYCbCrTextureData* textureData = GetD3D9TextureData(mData, GetSize()); - if (textureData == nullptr) { - return nullptr; - } - - mTextureClient = TextureClient::CreateWithData( - textureData, TextureFlags::DEFAULT, - aForwarder->GetTextureForwarder() - ); - - return mTextureClient; -} - TextureClient* IMFYCbCrImage::GetD3D11TextureClient(KnowsCompositor* aForwarder) { @@ -362,10 +260,6 @@ IMFYCbCrImage::GetTextureClient(KnowsCompositor* aForwarder) LayersBackend backend = aForwarder->GetCompositorBackendType(); if (!device || backend != LayersBackend::LAYERS_D3D11) { - if (backend == LayersBackend::LAYERS_D3D9 || - backend == LayersBackend::LAYERS_D3D11) { - return GetD3D9TextureClient(aForwarder); - } return nullptr; } return GetD3D11TextureClient(aForwarder); diff --git a/gfx/layers/IMFYCbCrImage.h b/gfx/layers/IMFYCbCrImage.h index eaca37f5b10a..c4c70e111a86 100644 --- a/gfx/layers/IMFYCbCrImage.h +++ b/gfx/layers/IMFYCbCrImage.h @@ -23,13 +23,9 @@ public: virtual TextureClient* GetTextureClient(KnowsCompositor* aForwarder) override; - static DXGIYCbCrTextureData* GetD3D9TextureData(Data aData, - gfx::IntSize aSize); static DXGIYCbCrTextureData* GetD3D11TextureData(Data aData, gfx::IntSize aSize); protected: - - TextureClient* GetD3D9TextureClient(KnowsCompositor* aForwarder); TextureClient* GetD3D11TextureClient(KnowsCompositor* aForwarder); ~IMFYCbCrImage(); diff --git a/gfx/layers/client/CompositableClient.cpp b/gfx/layers/client/CompositableClient.cpp index 6be6ab738d0f..785cd8d59067 100644 --- a/gfx/layers/client/CompositableClient.cpp +++ b/gfx/layers/client/CompositableClient.cpp @@ -15,7 +15,6 @@ #ifdef XP_WIN #include "gfxWindowsPlatform.h" // for gfxWindowsPlatform #include "mozilla/layers/TextureD3D11.h" -#include "mozilla/layers/TextureD3D9.h" #endif #include "gfxUtils.h" #include "IPDLActor.h" diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index fb9d6ba51882..59ddbf990bba 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -34,9 +34,7 @@ #include "mozilla/ipc/CrossProcessSemaphore.h" #ifdef XP_WIN -#include "DeviceManagerD3D9.h" #include "mozilla/gfx/DeviceManagerDx.h" -#include "mozilla/layers/TextureD3D9.h" #include "mozilla/layers/TextureD3D11.h" #include "mozilla/layers/TextureDIB.h" #include "gfxWindowsPlatform.h" @@ -1051,15 +1049,6 @@ TextureClient::CreateForDrawing(TextureForwarder* aAllocator, { data = DXGITextureData::Create(aSize, aFormat, aAllocFlags); } - if (aLayersBackend == LayersBackend::LAYERS_D3D9 && - moz2DBackend == gfx::BackendType::CAIRO && - aAllocator->IsSameProcess() && - aSize.width <= aMaxTextureSize && - aSize.height <= aMaxTextureSize && - NS_IsMainThread() && - DeviceManagerD3D9::GetDevice()) { - data = D3D9TextureData::Create(aSize, aFormat, aAllocFlags); - } if (aLayersBackend != LayersBackend::LAYERS_WR && !data && aFormat == SurfaceFormat::B8G8R8X8 && @@ -1713,14 +1702,18 @@ UpdateYCbCrTextureClient(TextureClient* aTexture, const PlanarYCbCrData& aData) } already_AddRefed -SyncObject::CreateSyncObject(SyncHandle aHandle) +SyncObject::CreateSyncObject(SyncHandle aHandle +#ifdef XP_WIN + , ID3D11Device* aDevice +#endif + ) { if (!aHandle) { return nullptr; } #ifdef XP_WIN - return MakeAndAddRef(aHandle); + return MakeAndAddRef(aHandle, aDevice); #else MOZ_ASSERT_UNREACHABLE(); return nullptr; diff --git a/gfx/layers/client/TextureClient.h b/gfx/layers/client/TextureClient.h index 5b176e5b0a26..656772e45379 100644 --- a/gfx/layers/client/TextureClient.h +++ b/gfx/layers/client/TextureClient.h @@ -32,6 +32,7 @@ #include "nsThreadUtils.h" class gfxImageSurface; +struct ID3D11Device; namespace mozilla { @@ -103,7 +104,11 @@ public: MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SyncObject) virtual ~SyncObject() { } - static already_AddRefed CreateSyncObject(SyncHandle aHandle); + static already_AddRefed CreateSyncObject(SyncHandle aHandle +#ifdef XP_WIN + , ID3D11Device* aDevice = nullptr +#endif + ); enum class SyncType { D3D11, diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index cc8ae604454a..8be73130aaff 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -173,11 +173,6 @@ already_AddRefed CreateTextureHostD3D11(const SurfaceDescriptor& aD ISurfaceAllocator* aDeallocator, TextureFlags aFlags); -// implemented in TextureD3D9.cpp -already_AddRefed CreateTextureHostD3D9(const SurfaceDescriptor& aDesc, - ISurfaceAllocator* aDeallocator, - TextureFlags aFlags); - already_AddRefed TextureHost::Create(const SurfaceDescriptor& aDesc, ISurfaceAllocator* aDeallocator, @@ -212,16 +207,9 @@ TextureHost::Create(const SurfaceDescriptor& aDesc, #endif #ifdef XP_WIN - case SurfaceDescriptor::TSurfaceDescriptorD3D9: - return CreateTextureHostD3D9(aDesc, aDeallocator, aFlags); - case SurfaceDescriptor::TSurfaceDescriptorD3D10: case SurfaceDescriptor::TSurfaceDescriptorDXGIYCbCr: - if (aBackend == LayersBackend::LAYERS_D3D9) { - return CreateTextureHostD3D9(aDesc, aDeallocator, aFlags); - } else { - return CreateTextureHostD3D11(aDesc, aDeallocator, aFlags); - } + return CreateTextureHostD3D11(aDesc, aDeallocator, aFlags); #endif default: MOZ_CRASH("GFX: Unsupported Surface type host"); diff --git a/gfx/layers/composite/TextureHost.h b/gfx/layers/composite/TextureHost.h index c81383c066dc..afb3882746cb 100644 --- a/gfx/layers/composite/TextureHost.h +++ b/gfx/layers/composite/TextureHost.h @@ -49,7 +49,6 @@ class ISurfaceAllocator; class TextureHostOGL; class TextureReadLock; class TextureSourceOGL; -class TextureSourceD3D9; class TextureSourceD3D11; class TextureSourceBasic; class DataTextureSource; @@ -120,7 +119,6 @@ public: gfxCriticalNote << "Failed to cast " << Name() << " into a TextureSourceOGL"; return nullptr; } - virtual TextureSourceD3D9* AsSourceD3D9() { return nullptr; } virtual TextureSourceD3D11* AsSourceD3D11() { return nullptr; } virtual TextureSourceBasic* AsSourceBasic() { return nullptr; } /** diff --git a/gfx/layers/d3d11/BlendShaderConstants.h b/gfx/layers/d3d11/BlendShaderConstants.h index d89240c18427..5cd1c1953788 100644 --- a/gfx/layers/d3d11/BlendShaderConstants.h +++ b/gfx/layers/d3d11/BlendShaderConstants.h @@ -11,6 +11,7 @@ #define PS_LAYER_RGBA 1 #define PS_LAYER_YCBCR 2 #define PS_LAYER_COLOR 3 +#define PS_LAYER_NV12 4 // These must be in the same order as the Mask enum. #define PS_MASK_NONE 0 diff --git a/gfx/layers/d3d11/CompositorD3D11.cpp b/gfx/layers/d3d11/CompositorD3D11.cpp index 688e673e2dac..99e0a122790a 100644 --- a/gfx/layers/d3d11/CompositorD3D11.cpp +++ b/gfx/layers/d3d11/CompositorD3D11.cpp @@ -30,7 +30,6 @@ #include "BlendShaderConstants.h" #include "D3D11ShareHandleImage.h" -#include "D3D9SurfaceImage.h" #include @@ -107,6 +106,7 @@ struct DeviceAttachmentsD3D11 PixelShaderArray mRGBAShader; PixelShaderArray mRGBShader; PixelShaderArray mYCbCrShader; + PixelShaderArray mNV12Shader; PixelShaderArray mComponentAlphaShader; PixelShaderArray mBlendShader; RefPtr mPSConstantBuffer; @@ -766,6 +766,8 @@ CompositorD3D11::GetPSForEffect(Effect* aEffect, ? mAttachments->mRGBAShader[aMaskType] : mAttachments->mRGBShader[aMaskType]; } + case EffectTypes::NV12: + return mAttachments->mNV12Shader[aMaskType]; case EffectTypes::YCBCR: return mAttachments->mYCbCrShader[aMaskType]; case EffectTypes::COMPONENT_ALPHA: @@ -839,6 +841,8 @@ EffectToBlendLayerType(Effect* aEffect) return PS_LAYER_RGBA; case EffectTypes::YCBCR: return PS_LAYER_YCBCR; + case EffectTypes::NV12: + return PS_LAYER_NV12; default: MOZ_ASSERT_UNREACHABLE("blending not supported for this layer type"); return 0; @@ -1100,6 +1104,47 @@ CompositorD3D11::DrawGeometry(const Geometry& aGeometry, SetSamplerForSamplingFilter(texturedEffect->mSamplingFilter); } break; + case EffectTypes::NV12: + { + TexturedEffect* texturedEffect = + static_cast(aEffectChain.mPrimaryEffect.get()); + + pTexCoordRect = &texturedEffect->mTextureCoords; + + TextureSourceD3D11* source = texturedEffect->mTexture->AsSourceD3D11(); + if (!source) { + NS_WARNING("Missing texture source!"); + return; + } + + RefPtr texture = source->GetD3D11Texture(); + if (!texture) { + NS_WARNING("No texture found in texture source!"); + } + + // Might want to cache these for efficiency. + RefPtr srViewY; + RefPtr srViewCbCr; + D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = + CD3D11_SHADER_RESOURCE_VIEW_DESC(D3D11_SRV_DIMENSION_TEXTURE2D, + DXGI_FORMAT_R8_UNORM); + mDevice->CreateShaderResourceView(texture, + &srvDesc, + getter_AddRefs(srViewY)); + srvDesc.Format = DXGI_FORMAT_R8G8_UNORM; + mDevice->CreateShaderResourceView(texture, + &srvDesc, + getter_AddRefs(srViewCbCr)); + + ID3D11ShaderResourceView* views[] = { srViewY, srViewCbCr }; + mContext->PSSetShaderResources(TexSlot::Y, 2, views); + + const float* yuvToRgb = gfxUtils::YuvToRgbMatrix4x3RowMajor(YUVColorSpace::BT601); + memcpy(&mPSConstants.yuvColorMatrix, yuvToRgb, sizeof(mPSConstants.yuvColorMatrix)); + + SetSamplerForSamplingFilter(texturedEffect->mSamplingFilter); + } + break; case EffectTypes::YCBCR: { EffectYCbCr* ycbcrEffect = static_cast(aEffectChain.mPrimaryEffect.get()); @@ -1636,6 +1681,8 @@ DeviceAttachmentsD3D11::CreateShaders() InitPixelShader(sRGBAShaderMask, mRGBAShader, MaskType::Mask); InitPixelShader(sYCbCrShader, mYCbCrShader, MaskType::MaskNone); InitPixelShader(sYCbCrShaderMask, mYCbCrShader, MaskType::Mask); + InitPixelShader(sNV12Shader, mNV12Shader, MaskType::MaskNone); + InitPixelShader(sNV12ShaderMask, mNV12Shader, MaskType::Mask); if (gfxPrefs::ComponentAlphaEnabled()) { InitPixelShader(sComponentAlphaShader, mComponentAlphaShader, MaskType::MaskNone); InitPixelShader(sComponentAlphaShaderMask, mComponentAlphaShader, MaskType::Mask); diff --git a/gfx/layers/d3d11/CompositorD3D11.hlsl b/gfx/layers/d3d11/CompositorD3D11.hlsl index 8595df5e84ff..637038f6d4b8 100644 --- a/gfx/layers/d3d11/CompositorD3D11.hlsl +++ b/gfx/layers/d3d11/CompositorD3D11.hlsl @@ -255,6 +255,21 @@ float4 CalculateYCbCrColor(const float2 aTexCoords) return color; } +float4 CalculateNV12Color(const float2 aTexCoords) +{ + float3 yuv; + float4 color; + + yuv.x = tY.Sample(sSampler, aTexCoords).r - 0.06275; + yuv.y = tCb.Sample(sSampler, aTexCoords).r - 0.50196; + yuv.z = tCb.Sample(sSampler, aTexCoords).g - 0.50196; + + color.rgb = mul(mYuvColorMatrix, yuv); + color.a = 1.0f; + + return color; +} + float4 YCbCrShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target { float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; @@ -263,6 +278,14 @@ float4 YCbCrShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target return CalculateYCbCrColor(aVertex.vTexCoords) * fLayerOpacity * mask; } +float4 NV12ShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target +{ + float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; + float mask = tMask.Sample(sSampler, maskCoords).r; + + return CalculateNV12Color(aVertex.vTexCoords) * fLayerOpacity * mask; +} + PS_OUTPUT ComponentAlphaShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target { PS_OUTPUT result; @@ -308,6 +331,11 @@ float4 YCbCrShader(const VS_OUTPUT aVertex) : SV_Target return CalculateYCbCrColor(aVertex.vTexCoords) * fLayerOpacity; } +float4 NV12Shader(const VS_OUTPUT aVertex) : SV_Target +{ + return CalculateNV12Color(aVertex.vTexCoords) * fLayerOpacity; +} + PS_OUTPUT ComponentAlphaShader(const VS_OUTPUT aVertex) : SV_Target { PS_OUTPUT result; @@ -390,6 +418,8 @@ float4 ComputeBlendSourceColor(const VS_BLEND_OUTPUT aVertex) return RGBAShader(tmp); } else if (iBlendConfig.x == PS_LAYER_YCBCR) { return YCbCrShader(tmp); + } else if (iBlendConfig.x == PS_LAYER_NV12) { + return NV12Shader(tmp); } return SolidColorShader(tmp); } else if (iBlendConfig.y == PS_MASK) { @@ -404,6 +434,8 @@ float4 ComputeBlendSourceColor(const VS_BLEND_OUTPUT aVertex) return RGBAShaderMask(tmp); } else if (iBlendConfig.x == PS_LAYER_YCBCR) { return YCbCrShaderMask(tmp); + } else if (iBlendConfig.x == PS_LAYER_NV12) { + return NV12ShaderMask(tmp); } return SolidColorShaderMask(tmp); } diff --git a/gfx/layers/d3d11/CompositorD3D11Shaders.h b/gfx/layers/d3d11/CompositorD3D11Shaders.h index e12d9197f9cc..7893611ee5f1 100755 --- a/gfx/layers/d3d11/CompositorD3D11Shaders.h +++ b/gfx/layers/d3d11/CompositorD3D11Shaders.h @@ -1,7 +1,7 @@ struct ShaderBytes { const void* mData; size_t mLength; }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -26,9 +26,9 @@ struct ShaderBytes { const void* mData; size_t mLength; }; // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 // // // @@ -84,7 +84,7 @@ struct ShaderBytes { const void* mData; size_t mLength; }; // approximately 15 instruction slots used vs_4_0 -dcl_constantbuffer CB0[11], immediateIndexed +dcl_constantbuffer cb0[11], immediateIndexed dcl_input v0.xy dcl_output_siv o0.xyzw, position dcl_output o1.xy @@ -107,15 +107,15 @@ ret const BYTE LayerQuadVS[] = { - 68, 88, 66, 67, 250, 65, - 94, 205, 254, 155, 52, 90, - 43, 147, 203, 201, 141, 74, - 80, 143, 1, 0, 0, 0, - 68, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 169, 137, + 186, 74, 85, 148, 0, 249, + 101, 235, 214, 10, 35, 11, + 230, 137, 1, 0, 0, 0, + 80, 7, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 152, 1, 0, 0, 160, 3, 0, 0, 28, 4, 0, 0, - 184, 6, 0, 0, 236, 6, + 196, 6, 0, 0, 248, 6, 0, 0, 65, 111, 110, 57, 88, 1, 0, 0, 88, 1, 0, 0, 0, 2, 254, 255, @@ -283,7 +283,7 @@ const BYTE LayerQuadVS[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, 69, 70, - 148, 2, 0, 0, 1, 0, + 160, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, 254, 255, @@ -392,8 +392,10 @@ const BYTE LayerQuadVS[] = 41, 32, 72, 76, 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, - 105, 108, 101, 114, 32, 49, - 48, 46, 49, 0, 73, 83, + 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, @@ -421,7 +423,7 @@ const BYTE LayerQuadVS[] = ShaderBytes sLayerQuadVS = { LayerQuadVS, sizeof(LayerQuadVS) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -861,9 +863,9 @@ ShaderBytes sLayerDynamicVS = { LayerDynamicVS, sizeof(LayerDynamicVS) }; // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 // // // @@ -896,7 +898,7 @@ ShaderBytes sLayerDynamicVS = { LayerDynamicVS, sizeof(LayerDynamicVS) }; // approximately 1 instruction slot used ps_4_0 -dcl_constantbuffer CB0[1], immediateIndexed +dcl_constantbuffer cb0[1], immediateIndexed dcl_output o0.xyzw mov o0.xyzw, cb0[0].xyzw ret @@ -905,15 +907,15 @@ ret const BYTE SolidColorShader[] = { - 68, 88, 66, 67, 181, 3, - 20, 0, 202, 78, 164, 59, - 210, 171, 118, 253, 118, 104, - 133, 184, 1, 0, 0, 0, - 112, 4, 0, 0, 6, 0, + 68, 88, 66, 67, 156, 36, + 85, 115, 249, 2, 97, 236, + 182, 204, 98, 136, 164, 213, + 133, 234, 1, 0, 0, 0, + 124, 4, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 132, 0, 0, 0, 204, 0, 0, 0, 72, 1, 0, 0, - 228, 3, 0, 0, 60, 4, + 240, 3, 0, 0, 72, 4, 0, 0, 65, 111, 110, 57, 68, 0, 0, 0, 68, 0, 0, 0, 0, 2, 255, 255, @@ -960,7 +962,7 @@ const BYTE SolidColorShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 148, 2, 0, 0, + 69, 70, 160, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, @@ -1070,7 +1072,9 @@ const BYTE SolidColorShader[] = 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, - 32, 49, 48, 46, 49, 0, + 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, @@ -1099,7 +1103,7 @@ const BYTE SolidColorShader[] = ShaderBytes sSolidColorShader = { SolidColorShader, sizeof(SolidColorShader) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -1124,11 +1128,11 @@ ShaderBytes sSolidColorShader = { SolidColorShader, sizeof(SolidColorShader) }; // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// sSampler sampler NA NA s0 1 -// tRGB texture float4 2d t0 1 -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// tRGB texture float4 2d 0 1 +// $Globals cbuffer NA NA 0 1 // // // @@ -1173,7 +1177,7 @@ ShaderBytes sSolidColorShader = { SolidColorShader, sizeof(SolidColorShader) }; // approximately 4 instruction slots used (1 texture, 3 arithmetic) ps_4_0 -dcl_constantbuffer CB0[2], immediateIndexed +dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_input_ps linear v1.xy @@ -1188,15 +1192,15 @@ ret const BYTE RGBShader[] = { - 68, 88, 66, 67, 181, 57, - 113, 191, 104, 206, 206, 65, - 235, 158, 87, 241, 179, 224, - 69, 235, 1, 0, 0, 0, - 120, 5, 0, 0, 6, 0, + 68, 88, 66, 67, 160, 15, + 174, 178, 100, 241, 44, 13, + 161, 155, 205, 21, 72, 246, + 233, 55, 1, 0, 0, 0, + 132, 5, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 204, 0, 0, 0, 136, 1, 0, 0, 4, 2, 0, 0, - 236, 4, 0, 0, 68, 5, + 248, 4, 0, 0, 80, 5, 0, 0, 65, 111, 110, 57, 140, 0, 0, 0, 140, 0, 0, 0, 0, 2, 255, 255, @@ -1274,7 +1278,7 @@ 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, 224, 2, + 82, 68, 69, 70, 236, 2, 0, 0, 1, 0, 0, 0, 148, 0, 0, 0, 3, 0, 0, 0, 28, 0, 0, 0, @@ -1397,7 +1401,9 @@ const BYTE RGBShader[] = 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, - 32, 49, 48, 46, 49, 0, + 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, @@ -1426,7 +1432,7 @@ const BYTE RGBShader[] = ShaderBytes sRGBShader = { RGBShader, sizeof(RGBShader) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -1451,11 +1457,11 @@ ShaderBytes sRGBShader = { RGBShader, sizeof(RGBShader) }; // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// sSampler sampler NA NA s0 1 -// tRGB texture float4 2d t0 1 -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// tRGB texture float4 2d 0 1 +// $Globals cbuffer NA NA 0 1 // // // @@ -1499,7 +1505,7 @@ ShaderBytes sRGBShader = { RGBShader, sizeof(RGBShader) }; // approximately 3 instruction slots used (1 texture, 2 arithmetic) ps_4_0 -dcl_constantbuffer CB0[2], immediateIndexed +dcl_constantbuffer cb0[2], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_input_ps linear v1.xy @@ -1513,15 +1519,15 @@ ret const BYTE RGBAShader[] = { - 68, 88, 66, 67, 0, 64, - 93, 222, 73, 216, 128, 20, - 42, 69, 82, 179, 209, 122, - 136, 190, 1, 0, 0, 0, - 84, 5, 0, 0, 6, 0, + 68, 88, 66, 67, 115, 228, + 124, 193, 199, 195, 231, 151, + 155, 86, 202, 199, 245, 170, + 45, 241, 1, 0, 0, 0, + 96, 5, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 192, 0, 0, 0, 100, 1, 0, 0, 224, 1, 0, 0, - 200, 4, 0, 0, 32, 5, + 212, 4, 0, 0, 44, 5, 0, 0, 65, 111, 110, 57, 128, 0, 0, 0, 128, 0, 0, 0, 0, 2, 255, 255, @@ -1593,7 +1599,7 @@ 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, 224, 2, + 82, 68, 69, 70, 236, 2, 0, 0, 1, 0, 0, 0, 148, 0, 0, 0, 3, 0, 0, 0, 28, 0, 0, 0, @@ -1716,7 +1722,9 @@ const BYTE RGBAShader[] = 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, - 32, 49, 48, 46, 49, 0, + 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, @@ -1745,7 +1753,7 @@ const BYTE RGBAShader[] = ShaderBytes sRGBAShader = { RGBAShader, sizeof(RGBAShader) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -1770,12 +1778,12 @@ ShaderBytes sRGBAShader = { RGBAShader, sizeof(RGBAShader) }; // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// sSampler sampler NA NA s0 1 -// tRGB texture float4 2d t0 1 -// tRGBWhite texture float4 2d t4 1 -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// tRGB texture float4 2d 0 1 +// tRGBWhite texture float4 2d 4 1 +// $Globals cbuffer NA NA 0 1 // // // @@ -1829,7 +1837,7 @@ ShaderBytes sRGBAShader = { RGBAShader, sizeof(RGBAShader) }; // approximately 9 instruction slots used (2 texture, 7 arithmetic) ps_4_0 -dcl_constantbuffer CB0[2], immediateIndexed +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) t4 @@ -1850,15 +1858,15 @@ ret const BYTE ComponentAlphaShader[] = { - 68, 88, 66, 67, 168, 127, - 203, 56, 125, 182, 211, 23, - 166, 215, 189, 218, 181, 48, - 227, 73, 1, 0, 0, 0, - 212, 6, 0, 0, 6, 0, + 68, 88, 66, 67, 21, 227, + 149, 86, 182, 246, 85, 57, + 167, 85, 241, 51, 157, 75, + 49, 112, 1, 0, 0, 0, + 224, 6, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 64, 1, 0, 0, 160, 2, 0, 0, 28, 3, 0, 0, - 48, 6, 0, 0, 136, 6, + 60, 6, 0, 0, 148, 6, 0, 0, 65, 111, 110, 57, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 255, 255, @@ -1983,7 +1991,7 @@ const BYTE ComponentAlphaShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 12, 3, 0, 0, + 69, 70, 24, 3, 0, 0, 1, 0, 0, 0, 192, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 0, 4, @@ -2113,7 +2121,9 @@ const BYTE ComponentAlphaShader[] = 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, - 32, 49, 48, 46, 49, 0, + 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, @@ -2146,7 +2156,7 @@ const BYTE ComponentAlphaShader[] = ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlphaShader) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -2171,13 +2181,13 @@ ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlph // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// sSampler sampler NA NA s0 1 -// tY texture float4 2d t1 1 -// tCb texture float4 2d t2 1 -// tCr texture float4 2d t3 1 -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 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 // // // @@ -2236,7 +2246,7 @@ ShaderBytes sComponentAlphaShader = { ComponentAlphaShader, sizeof(ComponentAlph // approximately 12 instruction slots used (3 texture, 9 arithmetic) ps_4_0 -dcl_constantbuffer CB0[6], immediateIndexed +dcl_constantbuffer cb0[6], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t2 @@ -2261,15 +2271,15 @@ ret const BYTE YCbCrShader[] = { - 68, 88, 66, 67, 56, 199, - 91, 5, 215, 233, 204, 14, - 193, 166, 163, 11, 246, 123, - 165, 88, 1, 0, 0, 0, - 156, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 239, 64, + 176, 25, 191, 201, 146, 39, + 143, 201, 64, 49, 208, 121, + 166, 95, 1, 0, 0, 0, + 168, 7, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 144, 1, 0, 0, 100, 3, 0, 0, 224, 3, 0, 0, - 16, 7, 0, 0, 104, 7, + 28, 7, 0, 0, 116, 7, 0, 0, 65, 111, 110, 57, 80, 1, 0, 0, 80, 1, 0, 0, 0, 2, 255, 255, @@ -2427,7 +2437,7 @@ const BYTE YCbCrShader[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, 69, 70, - 40, 3, 0, 0, 1, 0, + 52, 3, 0, 0, 1, 0, 0, 0, 220, 0, 0, 0, 5, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, @@ -2561,8 +2571,10 @@ const BYTE YCbCrShader[] = 72, 76, 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, - 101, 114, 32, 49, 48, 46, - 49, 0, 73, 83, 71, 78, + 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, @@ -2590,7 +2602,420 @@ const BYTE YCbCrShader[] = ShaderBytes sYCbCrShader = { YCbCrShader, sizeof(YCbCrShader) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// 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] +// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44 +// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused] +// float4x4 mProjection; // Offset: 160 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 240 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 256 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 272 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// tY texture float4 2d 1 1 +// tCb texture float4 2d 2 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) +// c1 cb0 3 3 ( FLT, FLT, FLT, FLT) +// +// +// Sampler/Resource to DX9 shader sampler mappings: +// +// Target Sampler Source Sampler Source Resource +// -------------- --------------- ---------------- +// s0 s0 t1 +// s1 s0 t2 +// +// +// Level9 shader bytecode: +// + ps_2_x + def c4, -0.0627499968, -0.50195998, 1, 0 + dcl t0.xy + dcl_2d s0 + dcl_2d s1 + mov r0.w, c4.z + texld r1, t0, s1 + texld r2, t0, s0 + add r2.x, r2.x, c4.x + add r2.yz, r1.xxyw, c4.y + dp3 r0.x, c1, r2 + dp3 r0.y, c2, r2 + dp3 r0.z, c3, r2 + mul r0, r0, c0.x + mov oC0, r0 + +// approximately 10 instruction slots used (2 texture, 8 arithmetic) +ps_4_0 +dcl_constantbuffer cb0[6], immediateIndexed +dcl_sampler s0, mode_default +dcl_resource_texture2d (float,float,float,float) t1 +dcl_resource_texture2d (float,float,float,float) t2 +dcl_input_ps linear v1.xy +dcl_output o0.xyzw +dcl_temps 3 +mov r0.w, l(1.000000) +sample r1.xyzw, v1.xyxx, t1.xyzw, s0 +add r1.x, r1.x, l(-0.062750) +sample r2.xyzw, v1.xyxx, t2.xyzw, s0 +add r1.yz, r2.xxyx, l(0.000000, -0.501960, -0.501960, 0.000000) +dp3 r0.x, cb0[3].xyzx, r1.xyzx +dp3 r0.y, cb0[4].xyzx, r1.xyzx +dp3 r0.z, cb0[5].xyzx, r1.xyzx +mul o0.xyzw, r0.xyzw, cb0[1].xxxx +ret +// Approximately 10 instruction slots used +#endif + +const BYTE NV12Shader[] = +{ + 68, 88, 66, 67, 218, 231, + 15, 217, 244, 161, 84, 31, + 40, 169, 22, 115, 159, 74, + 1, 232, 1, 0, 0, 0, + 16, 7, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 96, 1, 0, 0, 240, 2, + 0, 0, 108, 3, 0, 0, + 132, 6, 0, 0, 220, 6, + 0, 0, 65, 111, 110, 57, + 32, 1, 0, 0, 32, 1, + 0, 0, 0, 2, 255, 255, + 220, 0, 0, 0, 68, 0, + 0, 0, 2, 0, 44, 0, + 0, 0, 68, 0, 0, 0, + 68, 0, 2, 0, 36, 0, + 0, 0, 68, 0, 1, 0, + 0, 0, 2, 0, 1, 0, + 0, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 3, 0, + 1, 0, 0, 0, 0, 0, + 1, 2, 255, 255, 81, 0, + 0, 5, 4, 0, 15, 160, + 18, 131, 128, 189, 115, 128, + 0, 191, 0, 0, 128, 63, + 0, 0, 0, 0, 31, 0, + 0, 2, 0, 0, 0, 128, + 0, 0, 3, 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, 8, 128, + 4, 0, 170, 160, 66, 0, + 0, 3, 1, 0, 15, 128, + 0, 0, 228, 176, 1, 8, + 228, 160, 66, 0, 0, 3, + 2, 0, 15, 128, 0, 0, + 228, 176, 0, 8, 228, 160, + 2, 0, 0, 3, 2, 0, + 1, 128, 2, 0, 0, 128, + 4, 0, 0, 160, 2, 0, + 0, 3, 2, 0, 6, 128, + 1, 0, 208, 128, 4, 0, + 85, 160, 8, 0, 0, 3, + 0, 0, 1, 128, 1, 0, + 228, 160, 2, 0, 228, 128, + 8, 0, 0, 3, 0, 0, + 2, 128, 2, 0, 228, 160, + 2, 0, 228, 128, 8, 0, + 0, 3, 0, 0, 4, 128, + 3, 0, 228, 160, 2, 0, + 228, 128, 5, 0, 0, 3, + 0, 0, 15, 128, 0, 0, + 228, 128, 0, 0, 0, 160, + 1, 0, 0, 2, 0, 8, + 15, 128, 0, 0, 228, 128, + 255, 255, 0, 0, 83, 72, + 68, 82, 136, 1, 0, 0, + 64, 0, 0, 0, 98, 0, + 0, 0, 89, 0, 0, 4, + 70, 142, 32, 0, 0, 0, + 0, 0, 6, 0, 0, 0, + 90, 0, 0, 3, 0, 96, + 16, 0, 0, 0, 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, 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, + 3, 0, 0, 0, 54, 0, + 0, 5, 130, 0, 16, 0, + 0, 0, 0, 0, 1, 64, + 0, 0, 0, 0, 128, 63, + 69, 0, 0, 9, 242, 0, + 16, 0, 1, 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, 18, 0, + 16, 0, 1, 0, 0, 0, + 10, 0, 16, 0, 1, 0, + 0, 0, 1, 64, 0, 0, + 18, 131, 128, 189, 69, 0, + 0, 9, 242, 0, 16, 0, + 2, 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, 10, 98, 0, 16, 0, + 1, 0, 0, 0, 6, 1, + 16, 0, 2, 0, 0, 0, + 2, 64, 0, 0, 0, 0, + 0, 0, 115, 128, 0, 191, + 115, 128, 0, 191, 0, 0, + 0, 0, 16, 0, 0, 8, + 18, 0, 16, 0, 0, 0, + 0, 0, 70, 130, 32, 0, + 0, 0, 0, 0, 3, 0, + 0, 0, 70, 2, 16, 0, + 1, 0, 0, 0, 16, 0, + 0, 8, 34, 0, 16, 0, + 0, 0, 0, 0, 70, 130, + 32, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 16, 0, 0, 8, 66, 0, + 16, 0, 0, 0, 0, 0, + 70, 130, 32, 0, 0, 0, + 0, 0, 5, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 56, 0, 0, 8, + 242, 32, 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, 62, 0, + 0, 1, 83, 84, 65, 84, + 116, 0, 0, 0, 10, 0, + 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 2, 0, + 0, 0, 6, 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, 16, 3, + 0, 0, 1, 0, 0, 0, + 184, 0, 0, 0, 4, 0, + 0, 0, 28, 0, 0, 0, + 0, 4, 255, 255, 0, 1, + 0, 0, 220, 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, 1, 0, + 0, 0, 1, 0, 0, 0, + 13, 0, 0, 0, 168, 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, 13, 0, 0, 0, + 172, 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, + 89, 0, 116, 67, 98, 0, + 36, 71, 108, 111, 98, 97, + 108, 115, 0, 171, 171, 171, + 172, 0, 0, 0, 11, 0, + 0, 0, 208, 0, 0, 0, + 96, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 216, 1, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 228, 1, + 0, 0, 0, 0, 0, 0, + 244, 1, 0, 0, 16, 0, + 0, 0, 4, 0, 0, 0, + 2, 0, 0, 0, 4, 2, + 0, 0, 0, 0, 0, 0, + 20, 2, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 36, 2, + 0, 0, 0, 0, 0, 0, + 52, 2, 0, 0, 48, 0, + 0, 0, 44, 0, 0, 0, + 2, 0, 0, 0, 68, 2, + 0, 0, 0, 0, 0, 0, + 84, 2, 0, 0, 96, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 100, 2, + 0, 0, 0, 0, 0, 0, + 116, 2, 0, 0, 160, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 100, 2, + 0, 0, 0, 0, 0, 0, + 128, 2, 0, 0, 224, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 228, 1, + 0, 0, 0, 0, 0, 0, + 148, 2, 0, 0, 240, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 164, 2, + 0, 0, 0, 0, 0, 0, + 180, 2, 0, 0, 0, 1, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 164, 2, + 0, 0, 0, 0, 0, 0, + 191, 2, 0, 0, 16, 1, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 164, 2, + 0, 0, 0, 0, 0, 0, + 201, 2, 0, 0, 32, 1, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 100, 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, 89, 117, 118, + 67, 111, 108, 111, 114, 77, + 97, 116, 114, 105, 120, 0, + 2, 0, 3, 0, 3, 0, + 3, 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, 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 sNV12Shader = { NV12Shader, sizeof(NV12Shader) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -2615,9 +3040,9 @@ ShaderBytes sYCbCrShader = { YCbCrShader, sizeof(YCbCrShader) }; // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 // // // @@ -2682,7 +3107,7 @@ ShaderBytes sYCbCrShader = { YCbCrShader, sizeof(YCbCrShader) }; // approximately 22 instruction slots used vs_4_0 -dcl_constantbuffer CB0[12], immediateIndexed +dcl_constantbuffer cb0[12], immediateIndexed dcl_input v0.xy dcl_output_siv o0.xyzw, position dcl_output o1.xy @@ -2711,15 +3136,15 @@ ret const BYTE LayerQuadMaskVS[] = { - 68, 88, 66, 67, 47, 28, - 196, 228, 98, 79, 27, 152, - 192, 25, 215, 128, 59, 234, - 245, 240, 1, 0, 0, 0, - 108, 8, 0, 0, 6, 0, + 68, 88, 66, 67, 49, 180, + 132, 220, 248, 20, 100, 179, + 133, 183, 38, 139, 110, 187, + 8, 59, 1, 0, 0, 0, + 120, 8, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 20, 2, 0, 0, 176, 4, 0, 0, 44, 5, 0, 0, - 200, 7, 0, 0, 252, 7, + 212, 7, 0, 0, 8, 8, 0, 0, 65, 111, 110, 57, 212, 1, 0, 0, 212, 1, 0, 0, 0, 2, 254, 255, @@ -2932,7 +3357,7 @@ const BYTE LayerQuadMaskVS[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 148, 2, 0, 0, + 69, 70, 160, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, @@ -3042,7 +3467,9 @@ const BYTE LayerQuadMaskVS[] = 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, - 32, 49, 48, 46, 49, 0, + 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, @@ -3075,7 +3502,7 @@ const BYTE LayerQuadMaskVS[] = ShaderBytes sLayerQuadMaskVS = { LayerQuadMaskVS, sizeof(LayerQuadMaskVS) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -3582,11 +4009,11 @@ ShaderBytes sLayerDynamicMaskVS = { LayerDynamicMaskVS, sizeof(LayerDynamicMaskV // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// sSampler sampler NA NA s0 1 -// tMask texture float4 2d t5 1 -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// tMask texture float4 2d 5 1 +// $Globals cbuffer NA NA 0 1 // // // @@ -3633,7 +4060,7 @@ ShaderBytes sLayerDynamicMaskVS = { LayerDynamicMaskVS, sizeof(LayerDynamicMaskV // approximately 5 instruction slots used (1 texture, 4 arithmetic) ps_4_0 -dcl_constantbuffer CB0[1], immediateIndexed +dcl_constantbuffer cb0[1], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t5 dcl_input_ps linear v2.xyz @@ -3648,15 +4075,15 @@ ret const BYTE SolidColorShaderMask[] = { - 68, 88, 66, 67, 11, 0, - 43, 127, 123, 42, 253, 228, - 4, 220, 7, 130, 11, 94, - 213, 177, 1, 0, 0, 0, - 164, 5, 0, 0, 6, 0, + 68, 88, 66, 67, 173, 54, + 246, 72, 40, 33, 131, 132, + 203, 91, 150, 154, 22, 238, + 197, 53, 1, 0, 0, 0, + 176, 5, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 220, 0, 0, 0, 156, 1, 0, 0, 24, 2, 0, 0, - 0, 5, 0, 0, 112, 5, + 12, 5, 0, 0, 124, 5, 0, 0, 65, 111, 110, 57, 156, 0, 0, 0, 156, 0, 0, 0, 0, 2, 255, 255, @@ -3738,7 +4165,7 @@ const BYTE SolidColorShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, 69, 70, - 224, 2, 0, 0, 1, 0, + 236, 2, 0, 0, 1, 0, 0, 0, 148, 0, 0, 0, 3, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, @@ -3860,8 +4287,10 @@ const BYTE SolidColorShaderMask[] = 72, 76, 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, - 101, 114, 32, 49, 48, 46, - 49, 0, 73, 83, 71, 78, + 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, @@ -3893,7 +4322,7 @@ const BYTE SolidColorShaderMask[] = ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorShaderMask) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -3918,12 +4347,12 @@ ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorSha // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// sSampler sampler NA NA s0 1 -// tRGB texture float4 2d t0 1 -// tMask texture float4 2d t5 1 -// $Globals cbuffer NA NA cb0 1 +// 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 // // // @@ -3976,7 +4405,7 @@ ShaderBytes sSolidColorShaderMask = { SolidColorShaderMask, sizeof(SolidColorSha // approximately 8 instruction slots used (2 texture, 6 arithmetic) ps_4_0 -dcl_constantbuffer CB0[2], immediateIndexed +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 @@ -3996,15 +4425,15 @@ ret const BYTE RGBShaderMask[] = { - 68, 88, 66, 67, 89, 221, - 15, 22, 232, 140, 114, 122, - 200, 15, 217, 125, 153, 18, - 224, 0, 1, 0, 0, 0, - 136, 6, 0, 0, 6, 0, + 68, 88, 66, 67, 175, 239, + 130, 78, 213, 58, 7, 106, + 239, 127, 178, 225, 51, 170, + 231, 60, 1, 0, 0, 0, + 148, 6, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 36, 1, 0, 0, 88, 2, 0, 0, 212, 2, 0, 0, - 228, 5, 0, 0, 84, 6, + 240, 5, 0, 0, 96, 6, 0, 0, 65, 111, 110, 57, 228, 0, 0, 0, 228, 0, 0, 0, 0, 2, 255, 255, @@ -4117,7 +4546,7 @@ const BYTE RGBShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 8, 3, 0, 0, + 69, 70, 20, 3, 0, 0, 1, 0, 0, 0, 188, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 0, 4, @@ -4246,8 +4675,10 @@ const BYTE RGBShaderMask[] = 72, 76, 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, - 101, 114, 32, 49, 48, 46, - 49, 0, 73, 83, 71, 78, + 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, @@ -4279,7 +4710,7 @@ const BYTE RGBShaderMask[] = ShaderBytes sRGBShaderMask = { RGBShaderMask, sizeof(RGBShaderMask) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -4304,12 +4735,12 @@ ShaderBytes sRGBShaderMask = { RGBShaderMask, sizeof(RGBShaderMask) }; // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// sSampler sampler NA NA s0 1 -// tRGB texture float4 2d t0 1 -// tMask texture float4 2d t5 1 -// $Globals cbuffer NA NA cb0 1 +// 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 // // // @@ -4361,7 +4792,7 @@ ShaderBytes sRGBShaderMask = { RGBShaderMask, sizeof(RGBShaderMask) }; // approximately 7 instruction slots used (2 texture, 5 arithmetic) ps_4_0 -dcl_constantbuffer CB0[2], immediateIndexed +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 @@ -4380,15 +4811,15 @@ ret const BYTE RGBAShaderMask[] = { - 68, 88, 66, 67, 195, 236, - 129, 118, 244, 48, 247, 117, - 155, 208, 5, 31, 9, 224, - 75, 19, 1, 0, 0, 0, - 100, 6, 0, 0, 6, 0, + 68, 88, 66, 67, 36, 253, + 85, 137, 135, 245, 76, 25, + 35, 167, 21, 130, 234, 242, + 11, 83, 1, 0, 0, 0, + 112, 6, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 24, 1, 0, 0, 52, 2, 0, 0, 176, 2, 0, 0, - 192, 5, 0, 0, 48, 6, + 204, 5, 0, 0, 60, 6, 0, 0, 65, 111, 110, 57, 216, 0, 0, 0, 216, 0, 0, 0, 0, 2, 255, 255, @@ -4495,7 +4926,7 @@ const BYTE RGBAShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 8, 3, 0, 0, + 69, 70, 20, 3, 0, 0, 1, 0, 0, 0, 188, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 0, 4, @@ -4624,8 +5055,10 @@ const BYTE RGBAShaderMask[] = 72, 76, 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, - 101, 114, 32, 49, 48, 46, - 49, 0, 73, 83, 71, 78, + 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, @@ -4657,7 +5090,7 @@ const BYTE RGBAShaderMask[] = ShaderBytes sRGBAShaderMask = { RGBAShaderMask, sizeof(RGBAShaderMask) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -4682,14 +5115,14 @@ ShaderBytes sRGBAShaderMask = { RGBAShaderMask, sizeof(RGBAShaderMask) }; // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// sSampler sampler NA NA s0 1 -// tY texture float4 2d t1 1 -// tCb texture float4 2d t2 1 -// tCr texture float4 2d t3 1 -// tMask texture float4 2d t5 1 -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 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 +// $Globals cbuffer NA NA 0 1 // // // @@ -4756,7 +5189,7 @@ ShaderBytes sRGBAShaderMask = { RGBAShaderMask, sizeof(RGBAShaderMask) }; // approximately 16 instruction slots used (4 texture, 12 arithmetic) ps_4_0 -dcl_constantbuffer CB0[6], immediateIndexed +dcl_constantbuffer cb0[6], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t1 dcl_resource_texture2d (float,float,float,float) t2 @@ -4786,15 +5219,15 @@ ret const BYTE YCbCrShaderMask[] = { - 68, 88, 66, 67, 239, 174, - 189, 163, 31, 16, 244, 108, - 86, 227, 23, 8, 28, 147, - 43, 62, 1, 0, 0, 0, - 168, 8, 0, 0, 6, 0, + 68, 88, 66, 67, 154, 143, + 6, 70, 56, 178, 199, 162, + 76, 31, 248, 139, 158, 135, + 163, 170, 1, 0, 0, 0, + 180, 8, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 232, 1, 0, 0, 52, 4, 0, 0, 176, 4, 0, 0, - 4, 8, 0, 0, 116, 8, + 16, 8, 0, 0, 128, 8, 0, 0, 65, 111, 110, 57, 168, 1, 0, 0, 168, 1, 0, 0, 0, 2, 255, 255, @@ -4986,7 +5419,7 @@ 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, 76, 3, + 82, 68, 69, 70, 88, 3, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 6, 0, 0, 0, 28, 0, 0, 0, @@ -5127,7 +5560,9 @@ const BYTE YCbCrShaderMask[] = 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, - 32, 49, 48, 46, 49, 0, + 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, @@ -5160,7 +5595,478 @@ const BYTE YCbCrShaderMask[] = ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// 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] +// row_major float3x3 mYuvColorMatrix;// Offset: 48 Size: 44 +// float4x4 mLayerTransform; // Offset: 96 Size: 64 [unused] +// float4x4 mProjection; // Offset: 160 Size: 64 [unused] +// float4 vRenderTargetOffset; // Offset: 224 Size: 16 [unused] +// float4 vTextureCoords; // Offset: 240 Size: 16 [unused] +// float4 vLayerQuad; // Offset: 256 Size: 16 [unused] +// float4 vMaskQuad; // Offset: 272 Size: 16 [unused] +// float4x4 mBackdropTransform; // Offset: 288 Size: 64 [unused] +// +// } +// +// +// Resource Bindings: +// +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// tY texture float4 2d 1 1 +// tCb texture float4 2d 2 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 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) +// c1 cb0 3 3 ( FLT, FLT, FLT, FLT) +// +// +// Sampler/Resource to DX9 shader sampler mappings: +// +// Target Sampler Source Sampler Source Resource +// -------------- --------------- ---------------- +// s0 s0 t1 +// s1 s0 t2 +// s2 s0 t5 +// +// +// Level9 shader bytecode: +// + ps_2_x + def c4, -0.0627499968, -0.50195998, 1, 0 + dcl t0.xy + dcl t1.xyz + dcl_2d s0 + dcl_2d s1 + dcl_2d s2 + mov r0.w, c4.z + texld r1, t0, s1 + texld r2, t0, s0 + add r2.x, r2.x, c4.x + add r2.yz, r1.xxyw, c4.y + dp3 r0.x, c1, r2 + dp3 r0.y, c2, r2 + dp3 r0.z, c3, r2 + mul r0, r0, c0.x + rcp r1.x, t1.z + mul r1.xy, r1.x, t1 + texld r1, r1, s2 + mul r0, r0, r1.x + mov oC0, r0 + +// approximately 14 instruction slots used (3 texture, 11 arithmetic) +ps_4_0 +dcl_constantbuffer cb0[6], immediateIndexed +dcl_sampler s0, mode_default +dcl_resource_texture2d (float,float,float,float) t1 +dcl_resource_texture2d (float,float,float,float) t2 +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 3 +mov r0.w, l(1.000000) +sample r1.xyzw, v1.xyxx, t1.xyzw, s0 +add r1.x, r1.x, l(-0.062750) +sample r2.xyzw, v1.xyxx, t2.xyzw, s0 +add r1.yz, r2.xxyx, l(0.000000, -0.501960, -0.501960, 0.000000) +dp3 r0.x, cb0[3].xyzx, r1.xyzx +dp3 r0.y, cb0[4].xyzx, r1.xyzx +dp3 r0.z, cb0[5].xyzx, r1.xyzx +mul r0.xyzw, r0.xyzw, cb0[1].xxxx +div r1.xy, v2.xyxx, v2.zzzz +sample r1.xyzw, r1.xyxx, t5.xyzw, s0 +mul o0.xyzw, r0.xyzw, r1.xxxx +ret +// Approximately 13 instruction slots used +#endif + +const BYTE NV12ShaderMask[] = +{ + 68, 88, 66, 67, 33, 240, + 18, 59, 15, 160, 9, 125, + 220, 233, 156, 176, 226, 26, + 112, 172, 1, 0, 0, 0, + 28, 8, 0, 0, 6, 0, + 0, 0, 56, 0, 0, 0, + 184, 1, 0, 0, 192, 3, + 0, 0, 60, 4, 0, 0, + 120, 7, 0, 0, 232, 7, + 0, 0, 65, 111, 110, 57, + 120, 1, 0, 0, 120, 1, + 0, 0, 0, 2, 255, 255, + 48, 1, 0, 0, 72, 0, + 0, 0, 2, 0, 48, 0, + 0, 0, 72, 0, 0, 0, + 72, 0, 3, 0, 36, 0, + 0, 0, 72, 0, 1, 0, + 0, 0, 2, 0, 1, 0, + 5, 0, 2, 0, 0, 0, + 1, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 3, 0, 3, 0, 1, 0, + 0, 0, 0, 0, 1, 2, + 255, 255, 81, 0, 0, 5, + 4, 0, 15, 160, 18, 131, + 128, 189, 115, 128, 0, 191, + 0, 0, 128, 63, 0, 0, + 0, 0, 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, 31, 0, 0, 2, + 0, 0, 0, 144, 2, 8, + 15, 160, 1, 0, 0, 2, + 0, 0, 8, 128, 4, 0, + 170, 160, 66, 0, 0, 3, + 1, 0, 15, 128, 0, 0, + 228, 176, 1, 8, 228, 160, + 66, 0, 0, 3, 2, 0, + 15, 128, 0, 0, 228, 176, + 0, 8, 228, 160, 2, 0, + 0, 3, 2, 0, 1, 128, + 2, 0, 0, 128, 4, 0, + 0, 160, 2, 0, 0, 3, + 2, 0, 6, 128, 1, 0, + 208, 128, 4, 0, 85, 160, + 8, 0, 0, 3, 0, 0, + 1, 128, 1, 0, 228, 160, + 2, 0, 228, 128, 8, 0, + 0, 3, 0, 0, 2, 128, + 2, 0, 228, 160, 2, 0, + 228, 128, 8, 0, 0, 3, + 0, 0, 4, 128, 3, 0, + 228, 160, 2, 0, 228, 128, + 5, 0, 0, 3, 0, 0, + 15, 128, 0, 0, 228, 128, + 0, 0, 0, 160, 6, 0, + 0, 2, 1, 0, 1, 128, + 1, 0, 170, 176, 5, 0, + 0, 3, 1, 0, 3, 128, + 1, 0, 0, 128, 1, 0, + 228, 176, 66, 0, 0, 3, + 1, 0, 15, 128, 1, 0, + 228, 128, 2, 8, 228, 160, + 5, 0, 0, 3, 0, 0, + 15, 128, 0, 0, 228, 128, + 1, 0, 0, 128, 1, 0, + 0, 2, 0, 8, 15, 128, + 0, 0, 228, 128, 255, 255, + 0, 0, 83, 72, 68, 82, + 0, 2, 0, 0, 64, 0, + 0, 0, 128, 0, 0, 0, + 89, 0, 0, 4, 70, 142, + 32, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 90, 0, + 0, 3, 0, 96, 16, 0, + 0, 0, 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, 5, 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, 3, 0, 0, 0, + 54, 0, 0, 5, 130, 0, + 16, 0, 0, 0, 0, 0, + 1, 64, 0, 0, 0, 0, + 128, 63, 69, 0, 0, 9, + 242, 0, 16, 0, 1, 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, + 18, 0, 16, 0, 1, 0, + 0, 0, 10, 0, 16, 0, + 1, 0, 0, 0, 1, 64, + 0, 0, 18, 131, 128, 189, + 69, 0, 0, 9, 242, 0, + 16, 0, 2, 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, 10, 98, 0, + 16, 0, 1, 0, 0, 0, + 6, 1, 16, 0, 2, 0, + 0, 0, 2, 64, 0, 0, + 0, 0, 0, 0, 115, 128, + 0, 191, 115, 128, 0, 191, + 0, 0, 0, 0, 16, 0, + 0, 8, 18, 0, 16, 0, + 0, 0, 0, 0, 70, 130, + 32, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 1, 0, 0, 0, + 16, 0, 0, 8, 34, 0, + 16, 0, 0, 0, 0, 0, + 70, 130, 32, 0, 0, 0, + 0, 0, 4, 0, 0, 0, + 70, 2, 16, 0, 1, 0, + 0, 0, 16, 0, 0, 8, + 66, 0, 16, 0, 0, 0, + 0, 0, 70, 130, 32, 0, + 0, 0, 0, 0, 5, 0, + 0, 0, 70, 2, 16, 0, + 1, 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, + 14, 0, 0, 7, 50, 0, + 16, 0, 1, 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, + 1, 0, 0, 0, 70, 0, + 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, 13, 0, 0, 0, + 3, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 8, 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, 3, 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, 52, 3, 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, + 0, 3, 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, 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, 200, 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, + 13, 0, 0, 0, 204, 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, + 210, 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, + 89, 0, 116, 67, 98, 0, + 116, 77, 97, 115, 107, 0, + 36, 71, 108, 111, 98, 97, + 108, 115, 0, 171, 210, 0, + 0, 0, 11, 0, 0, 0, + 244, 0, 0, 0, 96, 1, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 252, 1, + 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 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, 40, 2, 0, 0, + 0, 0, 0, 0, 56, 2, + 0, 0, 32, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 72, 2, 0, 0, + 0, 0, 0, 0, 88, 2, + 0, 0, 48, 0, 0, 0, + 44, 0, 0, 0, 2, 0, + 0, 0, 104, 2, 0, 0, + 0, 0, 0, 0, 120, 2, + 0, 0, 96, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 136, 2, 0, 0, + 0, 0, 0, 0, 152, 2, + 0, 0, 160, 0, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 136, 2, 0, 0, + 0, 0, 0, 0, 164, 2, + 0, 0, 224, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 8, 2, 0, 0, + 0, 0, 0, 0, 184, 2, + 0, 0, 240, 0, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 200, 2, 0, 0, + 0, 0, 0, 0, 216, 2, + 0, 0, 0, 1, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 200, 2, 0, 0, + 0, 0, 0, 0, 227, 2, + 0, 0, 16, 1, 0, 0, + 16, 0, 0, 0, 0, 0, + 0, 0, 200, 2, 0, 0, + 0, 0, 0, 0, 237, 2, + 0, 0, 32, 1, 0, 0, + 64, 0, 0, 0, 0, 0, + 0, 0, 136, 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, 89, 117, 118, 67, 111, + 108, 111, 114, 77, 97, 116, + 114, 105, 120, 0, 2, 0, + 3, 0, 3, 0, 3, 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, + 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 sNV12ShaderMask = { NV12ShaderMask, sizeof(NV12ShaderMask) }; +#if 0 +// +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -5185,13 +6091,13 @@ ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// sSampler sampler NA NA s0 1 -// tRGB texture float4 2d t0 1 -// tRGBWhite texture float4 2d t4 1 -// tMask texture float4 2d t5 1 -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 1 +// tRGB texture float4 2d 0 1 +// tRGBWhite texture float4 2d 4 1 +// tMask texture float4 2d 5 1 +// $Globals cbuffer NA NA 0 1 // // // @@ -5253,7 +6159,7 @@ ShaderBytes sYCbCrShaderMask = { YCbCrShaderMask, sizeof(YCbCrShaderMask) }; // approximately 13 instruction slots used (3 texture, 10 arithmetic) ps_4_0 -dcl_constantbuffer CB0[2], immediateIndexed +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) t4 @@ -5279,15 +6185,15 @@ ret const BYTE ComponentAlphaShaderMask[] = { - 68, 88, 66, 67, 53, 1, - 100, 182, 2, 181, 247, 136, - 91, 215, 208, 183, 243, 6, - 78, 16, 1, 0, 0, 0, - 220, 7, 0, 0, 6, 0, + 68, 88, 66, 67, 146, 223, + 184, 52, 165, 15, 33, 27, + 188, 224, 169, 72, 82, 118, + 81, 24, 1, 0, 0, 0, + 232, 7, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 152, 1, 0, 0, 108, 3, 0, 0, 232, 3, 0, 0, - 32, 7, 0, 0, 144, 7, + 44, 7, 0, 0, 156, 7, 0, 0, 65, 111, 110, 57, 88, 1, 0, 0, 88, 1, 0, 0, 0, 2, 255, 255, @@ -5446,7 +6352,7 @@ const BYTE ComponentAlphaShaderMask[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 48, 3, 0, 0, + 69, 70, 60, 3, 0, 0, 1, 0, 0, 0, 228, 0, 0, 0, 5, 0, 0, 0, 28, 0, 0, 0, 0, 4, @@ -5582,7 +6488,9 @@ const BYTE ComponentAlphaShaderMask[] = 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, - 32, 49, 48, 46, 49, 0, + 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, @@ -5619,7 +6527,7 @@ const BYTE ComponentAlphaShaderMask[] = ShaderBytes sComponentAlphaShaderMask = { ComponentAlphaShaderMask, sizeof(ComponentAlphaShaderMask) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -5644,9 +6552,9 @@ ShaderBytes sComponentAlphaShaderMask = { ComponentAlphaShaderMask, sizeof(Compo // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 // // // @@ -5714,7 +6622,7 @@ ShaderBytes sComponentAlphaShaderMask = { ComponentAlphaShaderMask, sizeof(Compo // approximately 22 instruction slots used vs_4_0 -dcl_constantbuffer CB0[16], immediateIndexed +dcl_constantbuffer cb0[16], immediateIndexed dcl_input v0.xy dcl_output_siv o0.xyzw, position dcl_output o1.xy @@ -5747,15 +6655,15 @@ ret const BYTE LayerQuadBlendVS[] = { - 68, 88, 66, 67, 36, 1, - 251, 17, 122, 90, 56, 20, - 13, 210, 38, 20, 162, 170, - 120, 203, 1, 0, 0, 0, - 56, 9, 0, 0, 6, 0, + 68, 88, 66, 67, 118, 221, + 235, 142, 96, 69, 211, 182, + 164, 123, 38, 107, 11, 42, + 161, 69, 1, 0, 0, 0, + 68, 9, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 60, 2, 0, 0, 100, 5, 0, 0, 224, 5, 0, 0, - 124, 8, 0, 0, 176, 8, + 136, 8, 0, 0, 188, 8, 0, 0, 65, 111, 110, 57, 252, 1, 0, 0, 252, 1, 0, 0, 0, 2, 254, 255, @@ -5998,7 +6906,7 @@ const BYTE LayerQuadBlendVS[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 148, 2, 0, 0, + 69, 70, 160, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, @@ -6108,7 +7016,9 @@ const BYTE LayerQuadBlendVS[] = 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, - 32, 49, 48, 46, 49, 0, + 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, @@ -6145,7 +7055,7 @@ const BYTE LayerQuadBlendVS[] = ShaderBytes sLayerQuadBlendVS = { LayerQuadBlendVS, sizeof(LayerQuadBlendVS) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -6170,9 +7080,9 @@ ShaderBytes sLayerQuadBlendVS = { LayerQuadBlendVS, sizeof(LayerQuadBlendVS) }; // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// $Globals cbuffer NA NA 0 1 // // // @@ -6245,7 +7155,7 @@ ShaderBytes sLayerQuadBlendVS = { LayerQuadBlendVS, sizeof(LayerQuadBlendVS) }; // approximately 28 instruction slots used vs_4_0 -dcl_constantbuffer CB0[16], immediateIndexed +dcl_constantbuffer cb0[16], immediateIndexed dcl_input v0.xy dcl_output_siv o0.xyzw, position dcl_output o1.xy @@ -6282,15 +7192,15 @@ ret const BYTE LayerQuadBlendMaskVS[] = { - 68, 88, 66, 67, 206, 205, - 172, 45, 15, 157, 207, 85, - 247, 28, 223, 137, 10, 58, - 17, 237, 1, 0, 0, 0, - 236, 9, 0, 0, 6, 0, + 68, 88, 66, 67, 196, 248, + 25, 209, 193, 147, 20, 174, + 68, 77, 116, 97, 162, 166, + 205, 199, 1, 0, 0, 0, + 248, 9, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 136, 2, 0, 0, 24, 6, 0, 0, 148, 6, 0, 0, - 48, 9, 0, 0, 100, 9, + 60, 9, 0, 0, 112, 9, 0, 0, 65, 111, 110, 57, 72, 2, 0, 0, 72, 2, 0, 0, 0, 2, 254, 255, @@ -6563,7 +7473,7 @@ const BYTE LayerQuadBlendMaskVS[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 68, - 69, 70, 148, 2, 0, 0, + 69, 70, 160, 2, 0, 0, 1, 0, 0, 0, 72, 0, 0, 0, 1, 0, 0, 0, 28, 0, 0, 0, 0, 4, @@ -6673,7 +7583,9 @@ const BYTE LayerQuadBlendMaskVS[] = 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, - 32, 49, 48, 46, 49, 0, + 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, @@ -6710,7 +7622,7 @@ const BYTE LayerQuadBlendMaskVS[] = ShaderBytes sLayerQuadBlendMaskVS = { LayerQuadBlendMaskVS, sizeof(LayerQuadBlendMaskVS) }; #if 0 // -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 +// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 // // // Buffer Definitions: @@ -7817,16 +8729,16 @@ ShaderBytes sLayerDynamicBlendMaskVS = { LayerDynamicBlendMaskVS, sizeof(LayerDy // // Resource Bindings: // -// Name Type Format Dim HLSL Bind Count -// ------------------------------ ---------- ------- ----------- -------------- ------ -// sSampler sampler NA NA s0 1 -// tRGB texture float4 2d t0 1 -// tY texture float4 2d t1 1 -// tCb texture float4 2d t2 1 -// tCr texture float4 2d t3 1 -// tMask texture float4 2d t5 1 -// tBackdrop texture float4 2d t6 1 -// $Globals cbuffer NA NA cb0 1 +// Name Type Format Dim Slot Elements +// ------------------------------ ---------- ------- ----------- ---- -------- +// sSampler sampler NA NA 0 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 // // // @@ -7871,14 +8783,14 @@ ShaderBytes sLayerDynamicBlendMaskVS = { LayerDynamicBlendMaskVS, sizeof(LayerDy // Level9 shader bytecode: // ps_2_x - def c6, -1, -2, -0.0627499968, -0.50195998 - def c7, -2, -3, -4, -5 - def c8, -6, -7, -8, -9 - def c9, 0.5, 1, 0.25, -2 - def c10, 16, -12, -14, 0 - def c11, -10, -11, -12, -13 - def c12, 0.300000012, 0.589999974, 0.109999999, 0 - def c13, -1, -0, 0, 1 + def c6, -0.50195998, -1, -0, -0.5 + def c7, -1, -2, -4, -0.0627499968 + def c8, -1, -2, -3, -4 + def c9, -5, -6, -7, -8 + def c10, 1, 0.25, 2, -1 + def c11, 16, -12, -13, -14 + def c12, -9, -10, -11, -12 + def c13, 0.300000012, 0.589999974, 0.109999999, 0 dcl t0 dcl t1.xyz dcl_2d s0 @@ -7887,47 +8799,57 @@ ShaderBytes sLayerDynamicBlendMaskVS = { LayerDynamicBlendMaskVS, sizeof(LayerDy dcl_2d s3 dcl_2d s4 dcl_2d s5 - mov r0.x, c13.z - mov r1.x, c13.z - mov r2.z, c13.z - mov r3.w, -c6.x - texld r4, t0, s2 - texld r5, t0, s1 - add r5.x, r5.x, c6.z - add r5.y, r4.x, c6.w + mov r0.x, -c6.z + mov r1.x, -c6.z + mov r2.z, -c6.z + mov r3.w, -c7.x + texld r4, t0, s1 + texld r5, t0, s3 + add r5.w, r5.x, c6.x + add r5.x, r4.x, c7.w rcp r0.w, t1.z mul r4.xy, r0.w, t1 - texld r6, t0, s3 + texld r6, t0, s2 texld r4, r4, s4 - add r5.z, r6.x, c6.w - dp3 r3.x, c3, r5 - dp3 r3.y, c4, r5 - dp3 r3.z, c5, r5 + add r5.yz, r6.xxyw, c6.x + dp3 r3.x, c3, r5.xyww + dp3 r3.y, c4, r5.xyww + dp3 r3.z, c5, r5.xyww mul r3, r3, c1.x - mul r5, r4.x, r3 - mov r6.xy, t0.wzzw - texld r7, t0, s0 - texld r6, r6, s5 - mul r7, r7, c1.x - mul r8, r4.x, r7 - mov r9.xy, c6 - add r10, r9.xyxx, c2.xxyz - mul r10, r10, r10 - cmp r5, -r10.x, r8, r5 - cmp r3, -r10.x, r7, r3 - mov r7.w, c1.x - mul r8, r4.x, r7 - cmp r3, -c2.x, r7, r3 + mul r6, r4.x, r3 + dp3 r7.x, c3, r5 + dp3 r7.y, c4, r5 + dp3 r7.z, c5, r5 + mov r7.w, -c7.x + mul r5, r7, c1.x + mul r7, r4.x, r5 + mov r8.xyz, c7 + add r9, r8.xyzx, c2.xxxy + mul r9, r9, r9 + cmp r6, -r9.y, r6, r7 + mov r7.xy, t0.wzzw + texld r10, t0, s0 + texld r7, r7, s5 + mul r10, r10, c1.x + mul r11, r4.x, r10 + cmp r6, -r9.x, r11, r6 + mov r11.xyz, r10 + mov r11.w, c1.x + mul r12, r4.x, r11 mul r4, r4.x, c0 - cmp r5, -c2.x, r8, r5 - cmp r7.xy, -r10.yzzw, c13.x, c13.y - cmp r0.w, -r10.x, c6.x, r7.x - cmp r1.w, -c2.y, r9.x, r7.y - cmp r0.w, -c2.x, r9.x, r0.w - cmp r4, r0.w, r4, r5 + cmp r6, -c2.x, r12, r6 + cmp r8.yz, -r9.xzww, c6.y, c6.z + cmp r0.w, -r9.y, c7.x, r8.y + cmp r1.w, -c2.y, r8.x, r8.z + cmp r0.w, -r9.x, c7.x, r0.w + cmp r0.w, -c2.x, r8.x, r0.w + cmp r4, r0.w, r4, r6 + cmp r3, -r9.y, r3, r5 + cmp r3, -r9.x, r10, r3 + cmp r3, -c2.x, r11, r3 cmp r3, r0.w, c0, r3 cmp r3, -c2.y, r3, r4 - cmp r3, r1.w, c13.zzzw, r3 + cmp r3, r1.w, -c6.zzzy, r3 rcp r0.w, r3.w mul r4.xyz, r0.w, r3 cmp r4.xyz, -c2.w, r3, r4 @@ -7935,49 +8857,49 @@ ShaderBytes sLayerDynamicBlendMaskVS = { LayerDynamicBlendMaskVS, sizeof(LayerDy cmp r5.zw, r5.x, r4.xyxy, r4.xyyx max r0.w, r5.z, r4.z min r1.w, r4.z, r5.w - add r7.w, r0.w, -r1.w - rcp r0.w, r6.w - mul r8.xyz, r0.w, r6 - mad r5.zw, r6.xyzy, r0.w, -r8.xyxz - mul r9.xy, r7.w, r5.zwzw - mad r11, r6.yxxz, r0.w, -r8.xzyy - rcp r1.w, r11.x - mul r7.y, r1.w, r9.x - cmp r1.yz, r11.z, c13.z, r7.xwyw - mul r12, r7.w, r11 + add r6.w, r0.w, -r1.w + 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, -c6.z, r6.xwyw + mul r11, r6.w, r10 rcp r1.w, r5.w - mul r7.x, r1.w, r12.y - cmp r2.xy, r11.w, c13.z, r7.xwzw + mul r6.x, r1.w, r11.y + cmp r2.xy, r10.w, -c6.z, r6.xwzw cmp r1.xyz, r5.z, r1, r2 rcp r1.w, r5.z - mul r7.z, r1.w, r12.x - cmp r0.yz, r11.y, c13.z, r7.xzww - cmp r0.xyz, r11.w, r0, r1 - mov r1.y, c13.z - mov r2.y, c13.z - mov r10.z, c13.z - rcp r1.w, r11.z - mul r7.y, r1.w, r12.w - cmp r2.xz, r11.x, c13.z, r7.wyyw - rcp r1.w, r11.y - mul r7.x, r1.w, r9.y - cmp r10.xy, r5.z, c13.z, r7.wxzw - cmp r2.xyz, r11.w, r2, r10 - rcp r1.w, r11.w - mul r7.z, r1.w, r12.z - cmp r1.xz, r5.w, c13.z, r7.zyww + mul r6.z, r1.w, r11.x + cmp r0.yz, r10.y, -c6.z, r6.xzww + cmp r0.xyz, r10.w, r0, r1 + mov r1.y, -c6.z + mov r2.y, -c6.z + mov r12.z, -c6.z + rcp r1.w, r10.z + mul r6.y, r1.w, r11.w + cmp r2.xz, r10.x, -c6.z, r6.wyyw + rcp r1.w, r10.y + mul r6.x, r1.w, r9.y + cmp r12.xy, r5.z, -c6.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, -c6.z, r6.zyww cmp r1.xyz, r5.z, r1, r2 - cmp r0.xyz, r11.x, r0, r1 - cmp r1.xy, r11.z, r8, r8.yxzw - dp3 r4.w, c12, r0 - dp3 r8.w, c12, r8 + cmp r0.xyz, r10.x, r0, r1 + cmp r1.xy, r10.z, r8, r8.yxzw + dp3 r4.w, c13, r0 + dp3 r8.w, c13, 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, c12, r0 + dp3 r1.z, c13, r0 add r1.w, -r4.w, r1.z rcp r1.w, r1.w add r2.yzw, r0.xxyz, -r1.z @@ -7985,235 +8907,235 @@ ShaderBytes sLayerDynamicBlendMaskVS = { LayerDynamicBlendMaskVS, sizeof(LayerDy 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, -c6.x + add r1.w, -r1.z, -c7.x mul r2.yzw, r1.w, r2 add r1.w, -r1.z, r2.x - add r4.w, -r2.x, -c6.x + add r4.w, -r2.x, -c7.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.z, r4.w, c10.z - mul r1.z, r1.z, r1.z - dp3 r1.w, c12, r4 - add r2.x, -r8.w, r1.w - add r1.w, -r1.w, r8.w - add r2.yzw, r1.w, r4.xxyz - mad r7.xyz, r6, r0.w, r2.x - add r1.w, -r7.y, r7.x - cmp r5.zw, r1.w, r7.xyyx, r7.xyxy - min r1.w, r7.z, r5.z - max r2.x, r5.w, r7.z - dp3 r7.w, c12, r7 - add r5.z, -r1.w, r7.w + add r1.zw, r4.w, c11 + mul r1.zw, r1, r1 + dp3 r2.x, c13, 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, c13, r6 + add r5.z, -r2.y, r6.w rcp r5.z, r5.z - add r9.xyz, -r7.w, r7 - mul r9.xyz, r7.w, r9 - mad r9.xyz, r9, r5.z, r7.w - cmp r7.xyz, r1.w, r7, r9 - add r9.xyz, -r7.w, r7 - add r1.w, -r7.w, -c6.x + 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, -c7.x + mul r9.yzw, r2.y, r9 + add r2.y, -r6.w, r9.x + add r5.z, -r9.x, -c7.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, -c6.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, c13, 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, -c7.x mul r9.xyz, r1.w, r9 - add r1.w, r2.x, -r7.w - add r9.w, -r2.x, -c6.x + add r1.w, -r2.y, r6.w + add r6.w, -r6.w, -c7.x rcp r1.w, r1.w - mad r9.xyz, r9, r1.w, r7.w - cmp r7.xyz, r9.w, r7, r9 - cmp r7.xyz, -r1.z, r7, c13.z - add r7.w, -r2.z, r2.y - cmp r1.zw, r7.w, r2.xyzy, r2.xyyz - min r7.w, r2.w, r1.z - max r5.z, r1.w, r2.w - dp3 r5.w, c12, r2.yzww - add r1.z, -r7.w, r5.w - rcp r1.z, r1.z - add r9.xyz, r2.yzww, -r5.w - mul r9.xyz, r5.w, r9 - mad r9.xyz, r9, r1.z, r5.w - cmp r2.xyz, r7.w, r2.yzww, r9 - add r9.xyz, -r5.w, r2 - add r2.w, -r5.w, -c6.x - mul r9.xyz, r2.w, r9 - add r2.w, -r5.w, r5.z - add r7.w, -r5.z, -c6.x - rcp r2.w, r2.w - mad r9.xyz, r9, r2.w, r5.w - cmp r2.xyz, r7.w, r2, r9 - add r9, r4.w, c11 - mul r9, r9, r9 - cmp r2.xyz, -r9.w, r2, r7 - cmp r0.xyz, -r9.z, r0, r2 + 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, c12 + mul r6, r6, r6 + cmp r0.xyz, -r6.w, r0, r2 add r2, -r4.xxzy, r4.yzxz - mov r7.y, c13.z - mov r10.y, c13.z - mov r11.z, c13.z - rcp r7.w, r2.z - max r11.w, r1.x, r8.z - min r5.z, r8.z, r1.y - add r1.w, -r5.z, r11.w + mov r9.y, -c6.z + mov r10.y, -c6.z + mov r11.z, -c6.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, r7.w, r5.w - cmp r11.xy, r2.y, c13.z, r1.wxzw + mul r1.x, r6.w, r5.w + cmp r11.xy, r2.y, -c6.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, c13.z, r1.wyyw + cmp r10.xz, r2.x, -c6.z, r1.wyyw cmp r10.xyz, r2.w, r10, r11 rcp r5.w, r2.w mul r1.z, r5.w, r5.z - cmp r7.xz, r5.y, c13.z, r1.zyww - cmp r7.xyz, r2.y, r7, r10 - mov r10.x, c13.z - mov r11.x, c13.z - mov r13.z, c13.z - rcp r7.w, r2.x - mul r1.y, r7.w, r12.y - cmp r11.yz, r5.x, c13.z, r1.xwyw - rcp r7.w, r5.y - mul r1.x, r7.w, r12.z - cmp r13.xy, r2.w, c13.z, r1.xwzw + cmp r9.xz, r5.y, -c6.z, r1.zyww + cmp r9.xyz, r2.y, r9, r10 + mov r10.x, -c6.z + mov r11.x, -c6.z + mov r13.z, -c6.z + rcp r6.w, r2.x + mul r1.y, r6.w, r12.y + cmp r11.yz, r5.x, -c6.z, r1.xwyw + rcp r6.w, r5.y + mul r1.x, r6.w, r12.z + cmp r13.xy, r2.w, -c6.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, c13.z, r1.xzww + cmp r10.yz, r2.z, -c6.z, r1.xzww cmp r1.xyz, r2.w, r10, r5 - cmp r1.xyz, r2.x, r1, r7 - dp3 r1.w, c12, r1 + cmp r1.xyz, r2.x, r1, r9 + dp3 r1.w, c13, 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 r8.w, r1.z, r2.x - max r5.x, r2.y, r1.z - dp3 r1.w, c12, r1 - add r2.x, -r8.w, r1.w + min r6.w, r1.z, r2.x + max r8.w, r2.y, r1.z + dp3 r1.w, c13, 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, r8.w, r1, r2 + cmp r1.xyz, r6.w, r1, r2 add r2.xyz, -r1.w, r1 - add r2.w, -r1.w, -c6.x + add r2.w, -r1.w, -c7.x mul r2.xyz, r2.w, r2 - add r2.w, -r1.w, r5.x - add r8.w, -r5.x, -c6.x + add r2.w, -r1.w, r8.w + add r6.w, -r8.w, -c7.x rcp r2.w, r2.w mad r2.xyz, r2, r2.w, r1.w - cmp r1.xyz, r8.w, r1, r2 - cmp r0.xyz, -r9.y, r1, r0 - mad r1.xyz, r6, r0.w, r4 + 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, c6.y, r1 + mad r5.xyz, r2, c7.y, r1 mad r1.xyz, r8, -r4, r1 - cmp r0.xyz, -r9.x, r5, r0 - mad r5.xyz, r6, r0.w, -r4 + cmp r0.xyz, -r6.y, r5, r0 + mad r5.xyz, r7, r0.w, -r4 abs r5.xyz, r5 - add r7, r4.w, c8 - mul r7, r7, r7 - cmp r0.xyz, -r7.w, r5, r0 - add r5.xy, -r4.yzzw, c9.x - mad r9.xyz, r4, -c9.w, -c9.y - mad r1.w, r6.z, -r0.w, c9.z - mad r10.xyz, r8, c10.x, c10.y - mad r10.xyz, r10, r8, -c7.z - mul r10.xyz, r8, r10 + cmp r0.xyz, -r6.x, r5, r0 + add r5.xy, -r4.yzzw, -c6.w + mad r6.xyz, r4, c10.z, c10.w + mad r1.w, r7.z, -r0.w, c10.y + mad r9.xyz, r8, c11.x, c11.y + mad r9.xyz, r9, r8, -c7.z + mul r9.xyz, r8, r9 rsq r2.w, r8.z rcp r2.w, r2.w - cmp r1.w, r1.w, r10.z, r2.w - mad r1.w, r6.z, -r0.w, r1.w - mad r1.w, r9.z, r1.w, r8.z - mad r11.xyz, r4, c6.y, -c6.x - mul r11.xyz, r8, r11 - mad r12, r6.yzxy, -r0.w, c9.yyzz - mad r5.zw, r11.xyyz, -r12.xyxy, r8.xyyz - cmp r13.z, r5.y, r5.w, r1.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, c7.y, -c7.x + mul r10.xyz, r8, r10 + mad r11, r7.yzxy, -r0.w, c10.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, r12.w, r10.y, r1.w - mad r1.w, r6.y, -r0.w, r1.w - mad r1.w, r9.y, r1.w, r8.y - cmp r13.y, r5.x, r5.z, r1.w - add r14, -r4.xyzx, c9.yyyx + 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.xyzx, -c6.yyyw rsq r1.w, r8.x rcp r1.w, r1.w - cmp r1.w, r12.z, r10.x, r1.w - mad r1.w, r6.x, -r0.w, r1.w - mad r1.w, r9.x, r1.w, r8.x - mad r9, r6.xyzx, -r0.w, c9.xxxy - mad r6.xyz, r6, r0.w, c6.x - mul r6.xyz, r6, r6 - mad r0.w, r11.x, -r9.w, r8.x - cmp r13.x, r14.w, r0.w, r1.w - cmp r0.xyz, -r7.z, r13, r0 + 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, -c6.wwwy + mad r7.xyz, r7, r0.w, c7.x + mul r7.xyz, r7, r7 + mad r0.w, r10.x, -r6.w, r8.x + cmp r12.x, r13.w, r0.w, r1.w + add r9, r4.w, c9 + mul r9, r9, r9 + cmp r0.xyz, -r9.w, r12, r0 add r10.xyz, r8, r8 - mad r11.xyz, r4, -c6.y, r10 - add r11.xyz, r11, c6.x - mad r13.xyz, r4, -r10, r11 + mad r12.xyz, r4, -c7.y, r10 + add r12.xyz, r12, c7.x + mad r14.xyz, r4, -r10, r12 mul r10.xyz, r4, r10 add r15.xyz, r4, r4 mul r16.xyz, r8, r15 - mad r11.xyz, r15, -r8, r11 - cmp r9.xyz, r9, r10, r11 - cmp r5.yz, r5.xxyw, r16, r13 - cmp r5.x, r14.w, r16.x, r13.x - cmp r0.xyz, -r7.y, r5, r0 + mad r12.xyz, r15, -r8, r12 + cmp r6.xyz, r6, r10, r12 + cmp r5.yz, r5.xxyw, r16, r14 + cmp r5.x, r13.w, r16.x, r14.x + cmp r0.xyz, -r9.z, r5, r0 rcp r0.w, r4.x - mad r0.w, r9.w, -r0.w, -c6.x - max r1.w, r0.w, c13.z + mad r0.w, r6.w, -r0.w, -c7.x + max r1.w, r0.w, -c6.z mul r5.xyz, r4, r4 - cmp r0.w, -r5.x, c13.z, r1.w - cmp r10.x, -r6.x, -c6.x, r0.w + cmp r0.w, -r5.x, -c6.z, r1.w + cmp r10.x, -r7.x, -c7.x, r0.w rcp r0.w, r4.y - mad r0.w, r12.x, -r0.w, -c6.x - max r1.w, r0.w, c13.z - cmp r0.w, -r5.y, c13.z, r1.w - cmp r10.y, -r6.y, -c6.x, r0.w + mad r0.w, r11.x, -r0.w, -c7.x + max r1.w, r0.w, -c6.z + cmp r0.w, -r5.y, -c6.z, r1.w + cmp r10.y, -r7.y, -c7.x, r0.w rcp r0.w, r4.z - mad r0.w, r12.y, -r0.w, -c6.x - max r1.w, r0.w, c13.z - cmp r0.w, -r5.z, c13.z, r1.w - cmp r10.z, -r6.z, -c6.x, r0.w - cmp r0.xyz, -r7.x, r10, r0 - add r5, r4.w, c7 - mul r5, r5, r5 - add r6.xyz, r4, c6.x - mul r6.xyz, r6, r6 - rcp r0.w, r14.x + mad r0.w, r11.y, -r0.w, -c7.x + max r1.w, r0.w, -c6.z + cmp r0.w, -r5.z, -c6.z, r1.w + cmp r10.z, -r7.z, -c7.x, r0.w + cmp r0.xyz, -r9.y, r10, r0 + add r5.xyz, r4, c7.x + mul r5.xyz, r5, r5 + rcp r0.w, r13.x mul r0.w, r0.w, r8.x - min r1.w, r0.w, -c6.x - cmp r0.w, -r6.x, -c6.x, r1.w + min r1.w, r0.w, -c7.x + cmp r0.w, -r5.x, -c7.x, r1.w mul r7.xyz, r8, r8 - cmp r10.x, -r7.x, c13.z, r0.w - rcp r0.w, r14.y - rcp r1.w, r14.z + cmp r10.x, -r7.x, -c6.z, r0.w + rcp r0.w, r13.y + rcp r1.w, r13.z mul r1.w, r1.w, r8.z - min r2.w, r1.w, -c6.x - cmp r1.w, -r6.z, -c6.x, r2.w - cmp r10.z, -r7.z, c13.z, r1.w + min r2.w, r1.w, -c7.x + cmp r1.w, -r5.z, -c7.x, r2.w + cmp r10.z, -r7.z, -c6.z, r1.w mul r0.w, r0.w, r8.y - min r1.w, r0.w, -c6.x - cmp r0.w, -r6.y, -c6.x, r1.w - cmp r10.y, -r7.y, c13.z, r0.w - cmp r0.xyz, -r5.w, r10, r0 - max r6.xyz, r8, r4 - min r7.xyz, r4, r8 - cmp r0.xyz, -r5.z, r6, r0 - cmp r0.xyz, -r5.y, r7, r0 - cmp r0.xyz, -r5.x, r9, r0 - cmp r0.xyz, -r10.w, r1, r0 + min r1.w, r0.w, -c7.x + cmp r0.w, -r5.y, -c7.x, r1.w + cmp r10.y, -r7.y, -c6.z, r0.w + cmp r0.xyz, -r9.x, r10, r0 + add r5, r4.w, c8 + mul r5, r5, r5 + max r7.xyz, r8, r4 + min r9.xyz, r4, r8 + cmp r0.xyz, -r5.w, r7, r0 + cmp r0.xyz, -r5.z, r9, 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, r6.w, r0, r4 - mul r1.w, r6.w, r6.w + lrp r1.xyz, r7.w, r0, r4 + mul r1.w, r7.w, r7.w mul r0.xyz, r3.w, r1 mul r1.x, r3.w, r3.w mov r0.w, r3.w - cmp r0, -r1.x, c13.z, r0 + cmp r0, -r1.x, -c6.z, r0 cmp r0, -r1.w, r3, r0 mov oC0, r0 -// approximately 323 instruction slots used (6 texture, 317 arithmetic) +// approximately 333 instruction slots used (6 texture, 327 arithmetic) ps_4_0 -dcl_constantbuffer CB0[6], immediateIndexed +dcl_constantbuffer cb0[6], immediateIndexed dcl_sampler s0, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture2d (float,float,float,float) t1 @@ -8240,8 +9162,8 @@ if_z cb0[2].y 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 + ieq r2.y, l(2), cb0[2].x + if_nz r2.y sample r3.xyzw, v1.xyxx, t1.xyzw, s0 add r3.x, r3.x, l(-0.062750) sample r4.xyzw, v1.xyxx, t2.xyzw, s0 @@ -8253,6 +9175,20 @@ if_z cb0[2].y dp3 r4.z, cb0[5].xyzx, r3.xyzx mov r4.w, l(1.000000) mul r1.xyzw, r4.xyzw, cb0[1].xxxx + mov r2.x, l(-1) + else + ieq r2.x, l(4), cb0[2].x + if_nz r2.x + sample r3.xyzw, v1.xyxx, t1.xyzw, s0 + add r3.x, r3.x, l(-0.062750) + sample r4.xyzw, v1.xyxx, t2.xyzw, s0 + add r3.yz, r4.xxyx, l(0.000000, -0.501960, -0.501960, 0.000000) + dp3 r4.x, cb0[3].xyzx, r3.xyzx + dp3 r4.y, cb0[4].xyzx, r3.xyzx + dp3 r4.z, cb0[5].xyzx, r3.xyzx + mov r4.w, l(1.000000) + mul r1.xyzw, r4.xyzw, cb0[1].xxxx + endif endif endif endif @@ -8279,8 +9215,8 @@ else 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 + ieq r2.z, l(2), cb0[2].x + if_nz r2.z div r2.zw, v2.xxxy, v2.zzzz sample r3.xyzw, r2.zwzz, t5.xyzw, s0 sample r4.xyzw, v1.xyxx, t1.xyzw, s0 @@ -8295,6 +9231,23 @@ else mov r5.w, l(1.000000) mul r4.xyzw, r5.xyzw, cb0[1].xxxx mul r1.xyzw, r3.xxxx, r4.xyzw + mov r2.y, l(-1) + else + ieq r2.y, l(4), cb0[2].x + if_nz r2.y + div r2.zw, v2.xxxy, v2.zzzz + sample r3.xyzw, r2.zwzz, t5.xyzw, s0 + sample r4.xyzw, v1.xyxx, t1.xyzw, s0 + add r4.x, r4.x, l(-0.062750) + sample r5.xyzw, v1.xyxx, t2.xyzw, s0 + add r4.yz, r5.xxyx, l(0.000000, -0.501960, -0.501960, 0.000000) + dp3 r5.x, cb0[3].xyzx, r4.xyzx + dp3 r5.y, cb0[4].xyzx, r4.xyzx + dp3 r5.z, cb0[5].xyzx, r4.xyzx + mov r5.w, l(1.000000) + mul r4.xyzw, r5.xyzw, cb0[1].xxxx + mul r1.xyzw, r3.xxxx, r4.xyzw + endif endif endif endif @@ -8559,24 +9512,24 @@ mad r0.xyz, r2.xxxx, r1.xyzx, r0.xyzx mul o0.xyz, r1.wwww, r0.xyzx mov o0.w, r1.w ret -// Approximately 333 instruction slots used +// Approximately 364 instruction slots used #endif const BYTE BlendShader[] = { - 68, 88, 66, 67, 28, 114, - 244, 41, 206, 5, 116, 244, - 79, 130, 118, 154, 72, 188, - 36, 32, 1, 0, 0, 0, - 172, 66, 0, 0, 6, 0, + 68, 88, 66, 67, 6, 79, + 168, 227, 221, 67, 5, 116, + 6, 117, 235, 213, 93, 30, + 142, 103, 1, 0, 0, 0, + 136, 70, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, - 16, 23, 0, 0, 208, 61, - 0, 0, 76, 62, 0, 0, - 240, 65, 0, 0, 120, 66, + 180, 23, 0, 0, 160, 65, + 0, 0, 28, 66, 0, 0, + 204, 69, 0, 0, 84, 70, 0, 0, 65, 111, 110, 57, - 208, 22, 0, 0, 208, 22, + 116, 23, 0, 0, 116, 23, 0, 0, 0, 2, 255, 255, - 112, 22, 0, 0, 96, 0, + 20, 23, 0, 0, 96, 0, 0, 0, 3, 0, 60, 0, 0, 0, 96, 0, 0, 0, 96, 0, 6, 0, 36, 0, @@ -8592,38 +9545,38 @@ const BYTE BlendShader[] = 3, 0, 3, 0, 3, 0, 0, 0, 0, 0, 1, 2, 255, 255, 81, 0, 0, 5, - 6, 0, 15, 160, 0, 0, - 128, 191, 0, 0, 0, 192, - 18, 131, 128, 189, 115, 128, + 6, 0, 15, 160, 115, 128, + 0, 191, 0, 0, 128, 191, + 0, 0, 0, 128, 0, 0, 0, 191, 81, 0, 0, 5, 7, 0, 15, 160, 0, 0, - 0, 192, 0, 0, 64, 192, - 0, 0, 128, 192, 0, 0, - 160, 192, 81, 0, 0, 5, + 128, 191, 0, 0, 0, 192, + 0, 0, 128, 192, 18, 131, + 128, 189, 81, 0, 0, 5, 8, 0, 15, 160, 0, 0, - 192, 192, 0, 0, 224, 192, - 0, 0, 0, 193, 0, 0, - 16, 193, 81, 0, 0, 5, + 128, 191, 0, 0, 0, 192, + 0, 0, 64, 192, 0, 0, + 128, 192, 81, 0, 0, 5, 9, 0, 15, 160, 0, 0, - 0, 63, 0, 0, 128, 63, - 0, 0, 128, 62, 0, 0, - 0, 192, 81, 0, 0, 5, + 160, 192, 0, 0, 192, 192, + 0, 0, 224, 192, 0, 0, + 0, 193, 81, 0, 0, 5, 10, 0, 15, 160, 0, 0, - 128, 65, 0, 0, 64, 193, - 0, 0, 96, 193, 0, 0, - 0, 0, 81, 0, 0, 5, + 128, 63, 0, 0, 128, 62, + 0, 0, 0, 64, 0, 0, + 128, 191, 81, 0, 0, 5, 11, 0, 15, 160, 0, 0, - 32, 193, 0, 0, 48, 193, - 0, 0, 64, 193, 0, 0, - 80, 193, 81, 0, 0, 5, - 12, 0, 15, 160, 154, 153, + 128, 65, 0, 0, 64, 193, + 0, 0, 80, 193, 0, 0, + 96, 193, 81, 0, 0, 5, + 12, 0, 15, 160, 0, 0, + 16, 193, 0, 0, 32, 193, + 0, 0, 48, 193, 0, 0, + 64, 193, 81, 0, 0, 5, + 13, 0, 15, 160, 154, 153, 153, 62, 61, 10, 23, 63, 174, 71, 225, 61, 0, 0, - 0, 0, 81, 0, 0, 5, - 13, 0, 15, 160, 0, 0, - 128, 191, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, - 128, 63, 31, 0, 0, 2, + 0, 0, 31, 0, 0, 2, 0, 0, 0, 128, 0, 0, 15, 176, 31, 0, 0, 2, 0, 0, 0, 128, 1, 0, @@ -8640,669 +9593,691 @@ const BYTE BlendShader[] = 15, 160, 31, 0, 0, 2, 0, 0, 0, 144, 5, 8, 15, 160, 1, 0, 0, 2, - 0, 0, 1, 128, 13, 0, - 170, 160, 1, 0, 0, 2, - 1, 0, 1, 128, 13, 0, - 170, 160, 1, 0, 0, 2, - 2, 0, 4, 128, 13, 0, - 170, 160, 1, 0, 0, 2, - 3, 0, 8, 128, 6, 0, + 0, 0, 1, 128, 6, 0, + 170, 161, 1, 0, 0, 2, + 1, 0, 1, 128, 6, 0, + 170, 161, 1, 0, 0, 2, + 2, 0, 4, 128, 6, 0, + 170, 161, 1, 0, 0, 2, + 3, 0, 8, 128, 7, 0, 0, 161, 66, 0, 0, 3, 4, 0, 15, 128, 0, 0, - 228, 176, 2, 8, 228, 160, + 228, 176, 1, 8, 228, 160, 66, 0, 0, 3, 5, 0, 15, 128, 0, 0, 228, 176, - 1, 8, 228, 160, 2, 0, - 0, 3, 5, 0, 1, 128, + 3, 8, 228, 160, 2, 0, + 0, 3, 5, 0, 8, 128, 5, 0, 0, 128, 6, 0, - 170, 160, 2, 0, 0, 3, - 5, 0, 2, 128, 4, 0, - 0, 128, 6, 0, 255, 160, + 0, 160, 2, 0, 0, 3, + 5, 0, 1, 128, 4, 0, + 0, 128, 7, 0, 255, 160, 6, 0, 0, 2, 0, 0, 8, 128, 1, 0, 170, 176, 5, 0, 0, 3, 4, 0, 3, 128, 0, 0, 255, 128, 1, 0, 228, 176, 66, 0, 0, 3, 6, 0, 15, 128, - 0, 0, 228, 176, 3, 8, + 0, 0, 228, 176, 2, 8, 228, 160, 66, 0, 0, 3, 4, 0, 15, 128, 4, 0, 228, 128, 4, 8, 228, 160, 2, 0, 0, 3, 5, 0, - 4, 128, 6, 0, 0, 128, - 6, 0, 255, 160, 8, 0, + 6, 128, 6, 0, 208, 128, + 6, 0, 0, 160, 8, 0, 0, 3, 3, 0, 1, 128, 3, 0, 228, 160, 5, 0, - 228, 128, 8, 0, 0, 3, + 244, 128, 8, 0, 0, 3, 3, 0, 2, 128, 4, 0, - 228, 160, 5, 0, 228, 128, + 228, 160, 5, 0, 244, 128, 8, 0, 0, 3, 3, 0, 4, 128, 5, 0, 228, 160, - 5, 0, 228, 128, 5, 0, + 5, 0, 244, 128, 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, + 6, 0, 15, 128, 4, 0, 0, 128, 3, 0, 228, 128, - 1, 0, 0, 2, 6, 0, - 3, 128, 0, 0, 235, 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, 5, 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, - 6, 0, 228, 160, 2, 0, - 0, 3, 10, 0, 15, 128, - 9, 0, 4, 128, 2, 0, - 144, 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, 88, 0, 0, 4, - 3, 0, 15, 128, 10, 0, - 0, 129, 7, 0, 228, 128, - 3, 0, 228, 128, 1, 0, - 0, 2, 7, 0, 8, 128, - 1, 0, 0, 160, 5, 0, - 0, 3, 8, 0, 15, 128, - 4, 0, 0, 128, 7, 0, - 228, 128, 88, 0, 0, 4, - 3, 0, 15, 128, 2, 0, - 0, 161, 7, 0, 228, 128, - 3, 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, 8, 0, 228, 128, - 5, 0, 228, 128, 88, 0, - 0, 4, 7, 0, 3, 128, - 10, 0, 233, 129, 13, 0, - 0, 160, 13, 0, 85, 160, - 88, 0, 0, 4, 0, 0, - 8, 128, 10, 0, 0, 129, - 6, 0, 0, 160, 7, 0, - 0, 128, 88, 0, 0, 4, - 1, 0, 8, 128, 2, 0, - 85, 161, 9, 0, 0, 128, - 7, 0, 85, 128, 88, 0, - 0, 4, 0, 0, 8, 128, - 2, 0, 0, 161, 9, 0, - 0, 128, 0, 0, 255, 128, - 88, 0, 0, 4, 4, 0, - 15, 128, 0, 0, 255, 128, - 4, 0, 228, 128, 5, 0, - 228, 128, 88, 0, 0, 4, - 3, 0, 15, 128, 0, 0, - 255, 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, 1, 0, 255, 128, - 13, 0, 234, 160, 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, 7, 0, 8, 128, - 0, 0, 255, 128, 1, 0, - 255, 129, 6, 0, 0, 2, - 0, 0, 8, 128, 6, 0, - 255, 128, 5, 0, 0, 3, - 8, 0, 7, 128, 0, 0, - 255, 128, 6, 0, 228, 128, - 4, 0, 0, 4, 5, 0, - 12, 128, 6, 0, 100, 128, - 0, 0, 255, 128, 8, 0, - 132, 129, 5, 0, 0, 3, - 9, 0, 3, 128, 7, 0, - 255, 128, 5, 0, 238, 128, - 4, 0, 0, 4, 11, 0, - 15, 128, 6, 0, 129, 128, - 0, 0, 255, 128, 8, 0, - 88, 129, 6, 0, 0, 2, - 1, 0, 8, 128, 11, 0, - 0, 128, 5, 0, 0, 3, - 7, 0, 2, 128, 1, 0, - 255, 128, 9, 0, 0, 128, - 88, 0, 0, 4, 1, 0, - 6, 128, 11, 0, 170, 128, - 13, 0, 170, 160, 7, 0, - 220, 128, 5, 0, 0, 3, - 12, 0, 15, 128, 7, 0, - 255, 128, 11, 0, 228, 128, - 6, 0, 0, 2, 1, 0, - 8, 128, 5, 0, 255, 128, - 5, 0, 0, 3, 7, 0, - 1, 128, 1, 0, 255, 128, - 12, 0, 85, 128, 88, 0, - 0, 4, 2, 0, 3, 128, - 11, 0, 255, 128, 13, 0, - 170, 160, 7, 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, - 7, 0, 4, 128, 1, 0, - 255, 128, 12, 0, 0, 128, - 88, 0, 0, 4, 0, 0, - 6, 128, 11, 0, 85, 128, - 13, 0, 170, 160, 7, 0, - 248, 128, 88, 0, 0, 4, - 0, 0, 7, 128, 11, 0, - 255, 128, 0, 0, 228, 128, - 1, 0, 228, 128, 1, 0, - 0, 2, 1, 0, 2, 128, - 13, 0, 170, 160, 1, 0, - 0, 2, 2, 0, 2, 128, - 13, 0, 170, 160, 1, 0, - 0, 2, 10, 0, 4, 128, - 13, 0, 170, 160, 6, 0, - 0, 2, 1, 0, 8, 128, - 11, 0, 170, 128, 5, 0, - 0, 3, 7, 0, 2, 128, - 1, 0, 255, 128, 12, 0, - 255, 128, 88, 0, 0, 4, - 2, 0, 5, 128, 11, 0, - 0, 128, 13, 0, 170, 160, - 7, 0, 215, 128, 6, 0, - 0, 2, 1, 0, 8, 128, - 11, 0, 85, 128, 5, 0, - 0, 3, 7, 0, 1, 128, - 1, 0, 255, 128, 9, 0, - 85, 128, 88, 0, 0, 4, - 10, 0, 3, 128, 5, 0, - 170, 128, 13, 0, 170, 160, - 7, 0, 227, 128, 88, 0, - 0, 4, 2, 0, 7, 128, - 11, 0, 255, 128, 2, 0, - 228, 128, 10, 0, 228, 128, - 6, 0, 0, 2, 1, 0, - 8, 128, 11, 0, 255, 128, - 5, 0, 0, 3, 7, 0, - 4, 128, 1, 0, 255, 128, - 12, 0, 170, 128, 88, 0, - 0, 4, 1, 0, 5, 128, - 5, 0, 255, 128, 13, 0, - 170, 160, 7, 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, 11, 0, - 0, 128, 0, 0, 228, 128, - 1, 0, 228, 128, 88, 0, - 0, 4, 1, 0, 3, 128, - 11, 0, 170, 128, 8, 0, - 228, 128, 8, 0, 225, 128, - 8, 0, 0, 3, 4, 0, - 8, 128, 12, 0, 228, 160, - 0, 0, 228, 128, 8, 0, - 0, 3, 8, 0, 8, 128, - 12, 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, 12, 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, - 6, 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, - 6, 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, 4, 128, 4, 0, - 255, 128, 10, 0, 170, 160, - 5, 0, 0, 3, 1, 0, - 4, 128, 1, 0, 170, 128, - 1, 0, 170, 128, 8, 0, - 0, 3, 1, 0, 8, 128, - 12, 0, 228, 160, 4, 0, - 228, 128, 2, 0, 0, 3, - 2, 0, 1, 128, 8, 0, - 255, 129, 1, 0, 255, 128, - 2, 0, 0, 3, 1, 0, - 8, 128, 1, 0, 255, 129, - 8, 0, 255, 128, 2, 0, - 0, 3, 2, 0, 14, 128, - 1, 0, 255, 128, 4, 0, - 144, 128, 4, 0, 0, 4, - 7, 0, 7, 128, 6, 0, - 228, 128, 0, 0, 255, 128, - 2, 0, 0, 128, 2, 0, - 0, 3, 1, 0, 8, 128, - 7, 0, 85, 129, 7, 0, - 0, 128, 88, 0, 0, 4, - 5, 0, 12, 128, 1, 0, - 255, 128, 7, 0, 20, 128, - 7, 0, 68, 128, 10, 0, - 0, 3, 1, 0, 8, 128, - 7, 0, 170, 128, 5, 0, - 170, 128, 11, 0, 0, 3, - 2, 0, 1, 128, 5, 0, - 255, 128, 7, 0, 170, 128, 8, 0, 0, 3, 7, 0, - 8, 128, 12, 0, 228, 160, - 7, 0, 228, 128, 2, 0, - 0, 3, 5, 0, 4, 128, - 1, 0, 255, 129, 7, 0, - 255, 128, 6, 0, 0, 2, - 5, 0, 4, 128, 5, 0, - 170, 128, 2, 0, 0, 3, - 9, 0, 7, 128, 7, 0, - 255, 129, 7, 0, 228, 128, - 5, 0, 0, 3, 9, 0, - 7, 128, 7, 0, 255, 128, - 9, 0, 228, 128, 4, 0, - 0, 4, 9, 0, 7, 128, - 9, 0, 228, 128, 5, 0, - 170, 128, 7, 0, 255, 128, - 88, 0, 0, 4, 7, 0, - 7, 128, 1, 0, 255, 128, - 7, 0, 228, 128, 9, 0, - 228, 128, 2, 0, 0, 3, - 9, 0, 7, 128, 7, 0, - 255, 129, 7, 0, 228, 128, - 2, 0, 0, 3, 1, 0, - 8, 128, 7, 0, 255, 129, - 6, 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, - 0, 128, 7, 0, 255, 129, - 2, 0, 0, 3, 9, 0, - 8, 128, 2, 0, 0, 129, - 6, 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, 7, 0, 255, 128, - 88, 0, 0, 4, 7, 0, - 7, 128, 9, 0, 255, 128, - 7, 0, 228, 128, 9, 0, - 228, 128, 88, 0, 0, 4, - 7, 0, 7, 128, 1, 0, - 170, 129, 7, 0, 228, 128, - 13, 0, 170, 160, 2, 0, - 0, 3, 7, 0, 8, 128, - 2, 0, 170, 129, 2, 0, - 85, 128, 88, 0, 0, 4, - 1, 0, 12, 128, 7, 0, - 255, 128, 2, 0, 100, 128, - 2, 0, 148, 128, 10, 0, - 0, 3, 7, 0, 8, 128, - 2, 0, 255, 128, 1, 0, - 170, 128, 11, 0, 0, 3, - 5, 0, 4, 128, 1, 0, - 255, 128, 2, 0, 255, 128, - 8, 0, 0, 3, 5, 0, - 8, 128, 12, 0, 228, 160, - 2, 0, 249, 128, 2, 0, - 0, 3, 1, 0, 4, 128, - 7, 0, 255, 129, 5, 0, - 255, 128, 6, 0, 0, 2, - 1, 0, 4, 128, 1, 0, - 170, 128, 2, 0, 0, 3, - 9, 0, 7, 128, 2, 0, - 249, 128, 5, 0, 255, 129, - 5, 0, 0, 3, 9, 0, - 7, 128, 5, 0, 255, 128, - 9, 0, 228, 128, 4, 0, - 0, 4, 9, 0, 7, 128, - 9, 0, 228, 128, 1, 0, - 170, 128, 5, 0, 255, 128, - 88, 0, 0, 4, 2, 0, - 7, 128, 7, 0, 255, 128, - 2, 0, 249, 128, 9, 0, - 228, 128, 2, 0, 0, 3, - 9, 0, 7, 128, 5, 0, - 255, 129, 2, 0, 228, 128, - 2, 0, 0, 3, 2, 0, - 8, 128, 5, 0, 255, 129, - 6, 0, 0, 161, 5, 0, - 0, 3, 9, 0, 7, 128, - 2, 0, 255, 128, 9, 0, - 228, 128, 2, 0, 0, 3, - 2, 0, 8, 128, 5, 0, - 255, 129, 5, 0, 170, 128, - 2, 0, 0, 3, 7, 0, - 8, 128, 5, 0, 170, 129, - 6, 0, 0, 161, 6, 0, - 0, 2, 2, 0, 8, 128, - 2, 0, 255, 128, 4, 0, - 0, 4, 9, 0, 7, 128, - 9, 0, 228, 128, 2, 0, - 255, 128, 5, 0, 255, 128, - 88, 0, 0, 4, 2, 0, - 7, 128, 7, 0, 255, 128, - 2, 0, 228, 128, 9, 0, - 228, 128, 2, 0, 0, 3, - 9, 0, 15, 128, 4, 0, - 255, 128, 11, 0, 228, 160, + 1, 128, 3, 0, 228, 160, + 5, 0, 228, 128, 8, 0, + 0, 3, 7, 0, 2, 128, + 4, 0, 228, 160, 5, 0, + 228, 128, 8, 0, 0, 3, + 7, 0, 4, 128, 5, 0, + 228, 160, 5, 0, 228, 128, + 1, 0, 0, 2, 7, 0, + 8, 128, 7, 0, 0, 161, + 5, 0, 0, 3, 5, 0, + 15, 128, 7, 0, 228, 128, + 1, 0, 0, 160, 5, 0, + 0, 3, 7, 0, 15, 128, + 4, 0, 0, 128, 5, 0, + 228, 128, 1, 0, 0, 2, + 8, 0, 7, 128, 7, 0, + 228, 160, 2, 0, 0, 3, + 9, 0, 15, 128, 8, 0, + 36, 128, 2, 0, 64, 160, 5, 0, 0, 3, 9, 0, 15, 128, 9, 0, 228, 128, 9, 0, 228, 128, 88, 0, - 0, 4, 2, 0, 7, 128, - 9, 0, 255, 129, 2, 0, + 0, 4, 6, 0, 15, 128, + 9, 0, 85, 129, 6, 0, 228, 128, 7, 0, 228, 128, - 88, 0, 0, 4, 0, 0, - 7, 128, 9, 0, 170, 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, 7, 0, - 2, 128, 13, 0, 170, 160, - 1, 0, 0, 2, 10, 0, - 2, 128, 13, 0, 170, 160, + 3, 128, 0, 0, 235, 176, + 66, 0, 0, 3, 10, 0, + 15, 128, 0, 0, 228, 176, + 0, 8, 228, 160, 66, 0, + 0, 3, 7, 0, 15, 128, + 7, 0, 228, 128, 5, 8, + 228, 160, 5, 0, 0, 3, + 10, 0, 15, 128, 10, 0, + 228, 128, 1, 0, 0, 160, + 5, 0, 0, 3, 11, 0, + 15, 128, 4, 0, 0, 128, + 10, 0, 228, 128, 88, 0, + 0, 4, 6, 0, 15, 128, + 9, 0, 0, 129, 11, 0, + 228, 128, 6, 0, 228, 128, 1, 0, 0, 2, 11, 0, - 4, 128, 13, 0, 170, 160, - 6, 0, 0, 2, 7, 0, - 8, 128, 2, 0, 170, 128, - 11, 0, 0, 3, 11, 0, - 8, 128, 1, 0, 0, 128, - 8, 0, 170, 128, 10, 0, - 0, 3, 5, 0, 4, 128, - 8, 0, 170, 128, 1, 0, - 85, 128, 2, 0, 0, 3, - 1, 0, 8, 128, 5, 0, - 170, 129, 11, 0, 255, 128, - 5, 0, 0, 3, 5, 0, - 12, 128, 1, 0, 255, 128, - 5, 0, 68, 128, 5, 0, - 0, 3, 1, 0, 1, 128, + 7, 128, 10, 0, 228, 128, + 1, 0, 0, 2, 11, 0, + 8, 128, 1, 0, 0, 160, + 5, 0, 0, 3, 12, 0, + 15, 128, 4, 0, 0, 128, + 11, 0, 228, 128, 5, 0, + 0, 3, 4, 0, 15, 128, + 4, 0, 0, 128, 0, 0, + 228, 160, 88, 0, 0, 4, + 6, 0, 15, 128, 2, 0, + 0, 161, 12, 0, 228, 128, + 6, 0, 228, 128, 88, 0, + 0, 4, 8, 0, 6, 128, + 9, 0, 248, 129, 6, 0, + 85, 160, 6, 0, 170, 160, + 88, 0, 0, 4, 0, 0, + 8, 128, 9, 0, 85, 129, + 7, 0, 0, 160, 8, 0, + 85, 128, 88, 0, 0, 4, + 1, 0, 8, 128, 2, 0, + 85, 161, 8, 0, 0, 128, + 8, 0, 170, 128, 88, 0, + 0, 4, 0, 0, 8, 128, + 9, 0, 0, 129, 7, 0, + 0, 160, 0, 0, 255, 128, + 88, 0, 0, 4, 0, 0, + 8, 128, 2, 0, 0, 161, + 8, 0, 0, 128, 0, 0, + 255, 128, 88, 0, 0, 4, + 4, 0, 15, 128, 0, 0, + 255, 128, 4, 0, 228, 128, + 6, 0, 228, 128, 88, 0, + 0, 4, 3, 0, 15, 128, + 9, 0, 85, 129, 3, 0, + 228, 128, 5, 0, 228, 128, + 88, 0, 0, 4, 3, 0, + 15, 128, 9, 0, 0, 129, + 10, 0, 228, 128, 3, 0, + 228, 128, 88, 0, 0, 4, + 3, 0, 15, 128, 2, 0, + 0, 161, 11, 0, 228, 128, + 3, 0, 228, 128, 88, 0, + 0, 4, 3, 0, 15, 128, + 0, 0, 255, 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, 1, 0, + 255, 128, 6, 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, 6, 0, + 0, 2, 0, 0, 8, 128, 7, 0, 255, 128, 5, 0, - 255, 128, 88, 0, 0, 4, - 11, 0, 3, 128, 2, 0, - 85, 128, 13, 0, 170, 160, - 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, - 13, 0, 170, 160, 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, - 7, 0, 5, 128, 5, 0, - 85, 128, 13, 0, 170, 160, - 1, 0, 246, 128, 88, 0, - 0, 4, 7, 0, 7, 128, - 2, 0, 85, 128, 7, 0, - 228, 128, 10, 0, 228, 128, - 1, 0, 0, 2, 10, 0, - 1, 128, 13, 0, 170, 160, - 1, 0, 0, 2, 11, 0, - 1, 128, 13, 0, 170, 160, - 1, 0, 0, 2, 13, 0, - 4, 128, 13, 0, 170, 160, - 6, 0, 0, 2, 7, 0, - 8, 128, 2, 0, 0, 128, - 5, 0, 0, 3, 1, 0, - 2, 128, 7, 0, 255, 128, - 12, 0, 85, 128, 88, 0, - 0, 4, 11, 0, 6, 128, - 5, 0, 0, 128, 13, 0, - 170, 160, 1, 0, 220, 128, - 6, 0, 0, 2, 7, 0, - 8, 128, 5, 0, 85, 128, - 5, 0, 0, 3, 1, 0, - 1, 128, 7, 0, 255, 128, - 12, 0, 170, 128, 88, 0, - 0, 4, 13, 0, 3, 128, - 2, 0, 255, 128, 13, 0, - 170, 160, 1, 0, 236, 128, - 88, 0, 0, 4, 5, 0, - 7, 128, 2, 0, 85, 128, - 11, 0, 228, 128, 13, 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, 6, 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, - 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, - 13, 0, 170, 160, 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, 7, 0, 228, 128, - 8, 0, 0, 3, 1, 0, - 8, 128, 12, 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, 8, 0, - 8, 128, 1, 0, 170, 128, - 2, 0, 0, 128, 11, 0, - 0, 3, 5, 0, 1, 128, - 2, 0, 85, 128, 1, 0, - 170, 128, 8, 0, 0, 3, - 1, 0, 8, 128, 12, 0, - 228, 160, 1, 0, 228, 128, - 2, 0, 0, 3, 2, 0, - 1, 128, 8, 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, 8, 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, 6, 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, 5, 0, - 0, 128, 2, 0, 0, 3, - 8, 0, 8, 128, 5, 0, - 0, 129, 6, 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, 8, 0, - 255, 128, 1, 0, 228, 128, + 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, + 6, 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, 6, 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, 6, 0, 170, 161, + 1, 0, 0, 2, 2, 0, + 2, 128, 6, 0, 170, 161, + 1, 0, 0, 2, 12, 0, + 4, 128, 6, 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, 6, 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, 6, 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, + 6, 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, - 9, 0, 85, 129, 1, 0, - 228, 128, 0, 0, 228, 128, - 4, 0, 0, 4, 1, 0, - 7, 128, 6, 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, - 6, 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, - 9, 0, 0, 129, 5, 0, - 228, 128, 0, 0, 228, 128, - 4, 0, 0, 4, 5, 0, - 7, 128, 6, 0, 228, 128, - 0, 0, 255, 128, 4, 0, - 228, 129, 35, 0, 0, 2, - 5, 0, 7, 128, 5, 0, + 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, 13, 0, + 228, 160, 0, 0, 228, 128, + 8, 0, 0, 3, 8, 0, + 8, 128, 13, 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, 13, 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, 7, 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, 7, 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, 11, 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, 13, 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, 13, 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, 7, 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, 7, 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, 6, 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, 13, 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, 7, 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, 7, 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, + 12, 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, 6, 0, + 170, 161, 1, 0, 0, 2, + 10, 0, 2, 128, 6, 0, + 170, 161, 1, 0, 0, 2, + 11, 0, 4, 128, 6, 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, 6, 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, 6, 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, 6, 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, 6, 0, + 170, 161, 1, 0, 0, 2, + 11, 0, 1, 128, 6, 0, + 170, 161, 1, 0, 0, 2, + 13, 0, 4, 128, 6, 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, + 6, 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, + 6, 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, 6, 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, 13, 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, - 7, 0, 15, 128, 4, 0, - 255, 128, 8, 0, 228, 160, - 5, 0, 0, 3, 7, 0, - 15, 128, 7, 0, 228, 128, - 7, 0, 228, 128, 88, 0, + 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, + 13, 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, 7, 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, 7, 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, 7, 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, - 7, 0, 255, 129, 5, 0, + 6, 0, 0, 129, 5, 0, 228, 128, 0, 0, 228, 128, 2, 0, 0, 3, 5, 0, 3, 128, 4, 0, 233, 129, - 9, 0, 0, 160, 4, 0, - 0, 4, 9, 0, 7, 128, - 4, 0, 228, 128, 9, 0, - 255, 161, 9, 0, 85, 161, + 6, 0, 255, 161, 4, 0, + 0, 4, 6, 0, 7, 128, + 4, 0, 228, 128, 10, 0, + 170, 160, 10, 0, 255, 160, 4, 0, 0, 4, 1, 0, - 8, 128, 6, 0, 170, 128, - 0, 0, 255, 129, 9, 0, - 170, 160, 4, 0, 0, 4, - 10, 0, 7, 128, 8, 0, - 228, 128, 10, 0, 0, 160, - 10, 0, 85, 160, 4, 0, - 0, 4, 10, 0, 7, 128, - 10, 0, 228, 128, 8, 0, + 8, 128, 7, 0, 170, 128, + 0, 0, 255, 129, 10, 0, + 85, 160, 4, 0, 0, 4, + 9, 0, 7, 128, 8, 0, + 228, 128, 11, 0, 0, 160, + 11, 0, 85, 160, 4, 0, + 0, 4, 9, 0, 7, 128, + 9, 0, 228, 128, 8, 0, 228, 128, 7, 0, 170, 161, - 5, 0, 0, 3, 10, 0, + 5, 0, 0, 3, 9, 0, 7, 128, 8, 0, 228, 128, - 10, 0, 228, 128, 7, 0, + 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, 10, 0, + 1, 0, 255, 128, 9, 0, 170, 128, 2, 0, 255, 128, 4, 0, 0, 4, 1, 0, - 8, 128, 6, 0, 170, 128, + 8, 128, 7, 0, 170, 128, 0, 0, 255, 129, 1, 0, 255, 128, 4, 0, 0, 4, - 1, 0, 8, 128, 9, 0, + 1, 0, 8, 128, 6, 0, 170, 128, 1, 0, 255, 128, 8, 0, 170, 128, 4, 0, - 0, 4, 11, 0, 7, 128, - 4, 0, 228, 128, 6, 0, - 85, 160, 6, 0, 0, 161, - 5, 0, 0, 3, 11, 0, + 0, 4, 10, 0, 7, 128, + 4, 0, 228, 128, 7, 0, + 85, 160, 7, 0, 0, 161, + 5, 0, 0, 3, 10, 0, 7, 128, 8, 0, 228, 128, - 11, 0, 228, 128, 4, 0, - 0, 4, 12, 0, 15, 128, - 6, 0, 73, 128, 0, 0, - 255, 129, 9, 0, 165, 160, + 10, 0, 228, 128, 4, 0, + 0, 4, 11, 0, 15, 128, + 7, 0, 73, 128, 0, 0, + 255, 129, 10, 0, 80, 160, 4, 0, 0, 4, 5, 0, - 12, 128, 11, 0, 148, 128, - 12, 0, 68, 129, 8, 0, + 12, 128, 10, 0, 148, 128, + 11, 0, 68, 129, 8, 0, 148, 128, 88, 0, 0, 4, - 13, 0, 4, 128, 5, 0, + 12, 0, 4, 128, 5, 0, 85, 128, 5, 0, 255, 128, 1, 0, 255, 128, 7, 0, 0, 2, 1, 0, 8, 128, @@ -9310,487 +10285,333 @@ const BYTE BlendShader[] = 0, 2, 1, 0, 8, 128, 1, 0, 255, 128, 88, 0, 0, 4, 1, 0, 8, 128, - 12, 0, 255, 128, 10, 0, + 11, 0, 255, 128, 9, 0, 85, 128, 1, 0, 255, 128, 4, 0, 0, 4, 1, 0, - 8, 128, 6, 0, 85, 128, + 8, 128, 7, 0, 85, 128, 0, 0, 255, 129, 1, 0, 255, 128, 4, 0, 0, 4, - 1, 0, 8, 128, 9, 0, + 1, 0, 8, 128, 6, 0, 85, 128, 1, 0, 255, 128, 8, 0, 85, 128, 88, 0, - 0, 4, 13, 0, 2, 128, + 0, 4, 12, 0, 2, 128, 5, 0, 0, 128, 5, 0, 170, 128, 1, 0, 255, 128, - 2, 0, 0, 3, 14, 0, + 2, 0, 0, 3, 13, 0, 15, 128, 4, 0, 36, 129, - 9, 0, 21, 160, 7, 0, + 6, 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, - 12, 0, 170, 128, 10, 0, + 11, 0, 170, 128, 9, 0, 0, 128, 1, 0, 255, 128, 4, 0, 0, 4, 1, 0, - 8, 128, 6, 0, 0, 128, + 8, 128, 7, 0, 0, 128, 0, 0, 255, 129, 1, 0, 255, 128, 4, 0, 0, 4, - 1, 0, 8, 128, 9, 0, + 1, 0, 8, 128, 6, 0, 0, 128, 1, 0, 255, 128, 8, 0, 0, 128, 4, 0, - 0, 4, 9, 0, 15, 128, - 6, 0, 36, 128, 0, 0, - 255, 129, 9, 0, 64, 160, - 4, 0, 0, 4, 6, 0, - 7, 128, 6, 0, 228, 128, - 0, 0, 255, 128, 6, 0, + 0, 4, 6, 0, 15, 128, + 7, 0, 36, 128, 0, 0, + 255, 129, 6, 0, 127, 161, + 4, 0, 0, 4, 7, 0, + 7, 128, 7, 0, 228, 128, + 0, 0, 255, 128, 7, 0, 0, 160, 5, 0, 0, 3, - 6, 0, 7, 128, 6, 0, - 228, 128, 6, 0, 228, 128, + 7, 0, 7, 128, 7, 0, + 228, 128, 7, 0, 228, 128, 4, 0, 0, 4, 0, 0, - 8, 128, 11, 0, 0, 128, - 9, 0, 255, 129, 8, 0, + 8, 128, 10, 0, 0, 128, + 6, 0, 255, 129, 8, 0, 0, 128, 88, 0, 0, 4, - 13, 0, 1, 128, 14, 0, + 12, 0, 1, 128, 13, 0, 255, 128, 0, 0, 255, 128, - 1, 0, 255, 128, 88, 0, - 0, 4, 0, 0, 7, 128, - 7, 0, 170, 129, 13, 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, 11, 0, 7, 128, - 4, 0, 228, 128, 6, 0, - 85, 161, 10, 0, 228, 128, - 2, 0, 0, 3, 11, 0, - 7, 128, 11, 0, 228, 128, - 6, 0, 0, 160, 4, 0, - 0, 4, 13, 0, 7, 128, - 4, 0, 228, 128, 10, 0, - 228, 129, 11, 0, 228, 128, - 5, 0, 0, 3, 10, 0, + 1, 0, 255, 128, 2, 0, + 0, 3, 9, 0, 15, 128, + 4, 0, 255, 128, 9, 0, + 228, 160, 5, 0, 0, 3, + 9, 0, 15, 128, 9, 0, + 228, 128, 9, 0, 228, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 9, 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, - 10, 0, 228, 128, 2, 0, - 0, 3, 15, 0, 7, 128, - 4, 0, 228, 128, 4, 0, + 7, 0, 85, 161, 10, 0, + 228, 128, 2, 0, 0, 3, + 12, 0, 7, 128, 12, 0, + 228, 128, 7, 0, 0, 160, + 4, 0, 0, 4, 14, 0, + 7, 128, 4, 0, 228, 128, + 10, 0, 228, 129, 12, 0, 228, 128, 5, 0, 0, 3, - 16, 0, 7, 128, 8, 0, - 228, 128, 15, 0, 228, 128, - 4, 0, 0, 4, 11, 0, - 7, 128, 15, 0, 228, 128, - 8, 0, 228, 129, 11, 0, - 228, 128, 88, 0, 0, 4, - 9, 0, 7, 128, 9, 0, + 10, 0, 7, 128, 4, 0, 228, 128, 10, 0, 228, 128, - 11, 0, 228, 128, 88, 0, - 0, 4, 5, 0, 6, 128, - 5, 0, 208, 128, 16, 0, - 228, 128, 13, 0, 228, 128, + 2, 0, 0, 3, 15, 0, + 7, 128, 4, 0, 228, 128, + 4, 0, 228, 128, 5, 0, + 0, 3, 16, 0, 7, 128, + 8, 0, 228, 128, 15, 0, + 228, 128, 4, 0, 0, 4, + 12, 0, 7, 128, 15, 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, - 1, 128, 14, 0, 255, 128, - 16, 0, 0, 128, 13, 0, - 0, 128, 88, 0, 0, 4, - 0, 0, 7, 128, 7, 0, - 85, 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, - 9, 0, 255, 128, 0, 0, - 255, 129, 6, 0, 0, 161, - 11, 0, 0, 3, 1, 0, - 8, 128, 0, 0, 255, 128, - 13, 0, 170, 160, 5, 0, - 0, 3, 5, 0, 7, 128, - 4, 0, 228, 128, 4, 0, + 6, 128, 5, 0, 208, 128, + 16, 0, 228, 128, 14, 0, 228, 128, 88, 0, 0, 4, - 0, 0, 8, 128, 5, 0, - 0, 129, 13, 0, 170, 160, - 1, 0, 255, 128, 88, 0, - 0, 4, 10, 0, 1, 128, - 6, 0, 0, 129, 6, 0, - 0, 161, 0, 0, 255, 128, + 5, 0, 1, 128, 13, 0, + 255, 128, 16, 0, 0, 128, + 14, 0, 0, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 9, 0, 170, 129, 5, 0, + 228, 128, 0, 0, 228, 128, 6, 0, 0, 2, 0, 0, - 8, 128, 4, 0, 85, 128, + 8, 128, 4, 0, 0, 128, 4, 0, 0, 4, 0, 0, - 8, 128, 12, 0, 0, 128, - 0, 0, 255, 129, 6, 0, + 8, 128, 6, 0, 255, 128, + 0, 0, 255, 129, 7, 0, 0, 161, 11, 0, 0, 3, 1, 0, 8, 128, 0, 0, - 255, 128, 13, 0, 170, 160, - 88, 0, 0, 4, 0, 0, - 8, 128, 5, 0, 85, 129, - 13, 0, 170, 160, 1, 0, - 255, 128, 88, 0, 0, 4, - 10, 0, 2, 128, 6, 0, - 85, 129, 6, 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, - 12, 0, 85, 128, 0, 0, - 255, 129, 6, 0, 0, 161, - 11, 0, 0, 3, 1, 0, - 8, 128, 0, 0, 255, 128, - 13, 0, 170, 160, 88, 0, - 0, 4, 0, 0, 8, 128, - 5, 0, 170, 129, 13, 0, - 170, 160, 1, 0, 255, 128, - 88, 0, 0, 4, 10, 0, - 4, 128, 6, 0, 170, 129, - 6, 0, 0, 161, 0, 0, - 255, 128, 88, 0, 0, 4, - 0, 0, 7, 128, 7, 0, - 0, 129, 10, 0, 228, 128, - 0, 0, 228, 128, 2, 0, - 0, 3, 5, 0, 15, 128, - 4, 0, 255, 128, 7, 0, - 228, 160, 5, 0, 0, 3, - 5, 0, 15, 128, 5, 0, - 228, 128, 5, 0, 228, 128, - 2, 0, 0, 3, 6, 0, + 255, 128, 6, 0, 170, 161, + 5, 0, 0, 3, 5, 0, 7, 128, 4, 0, 228, 128, - 6, 0, 0, 160, 5, 0, - 0, 3, 6, 0, 7, 128, - 6, 0, 228, 128, 6, 0, + 4, 0, 228, 128, 88, 0, + 0, 4, 0, 0, 8, 128, + 5, 0, 0, 129, 6, 0, + 170, 161, 1, 0, 255, 128, + 88, 0, 0, 4, 10, 0, + 1, 128, 7, 0, 0, 129, + 7, 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, + 7, 0, 0, 161, 11, 0, + 0, 3, 1, 0, 8, 128, + 0, 0, 255, 128, 6, 0, + 170, 161, 88, 0, 0, 4, + 0, 0, 8, 128, 5, 0, + 85, 129, 6, 0, 170, 161, + 1, 0, 255, 128, 88, 0, + 0, 4, 10, 0, 2, 128, + 7, 0, 85, 129, 7, 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, 7, 0, + 0, 161, 11, 0, 0, 3, + 1, 0, 8, 128, 0, 0, + 255, 128, 6, 0, 170, 161, + 88, 0, 0, 4, 0, 0, + 8, 128, 5, 0, 170, 129, + 6, 0, 170, 161, 1, 0, + 255, 128, 88, 0, 0, 4, + 10, 0, 4, 128, 7, 0, + 170, 129, 7, 0, 0, 161, + 0, 0, 255, 128, 88, 0, + 0, 4, 0, 0, 7, 128, + 9, 0, 85, 129, 10, 0, + 228, 128, 0, 0, 228, 128, + 2, 0, 0, 3, 5, 0, + 7, 128, 4, 0, 228, 128, + 7, 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, 0, 8, 128, 13, 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, - 6, 0, 0, 161, 88, 0, + 7, 0, 0, 161, 88, 0, 0, 4, 0, 0, 8, 128, - 6, 0, 0, 129, 6, 0, + 5, 0, 0, 129, 7, 0, 0, 161, 1, 0, 255, 128, 5, 0, 0, 3, 7, 0, 7, 128, 8, 0, 228, 128, 8, 0, 228, 128, 88, 0, 0, 4, 10, 0, 1, 128, - 7, 0, 0, 129, 13, 0, - 170, 160, 0, 0, 255, 128, + 7, 0, 0, 129, 6, 0, + 170, 161, 0, 0, 255, 128, 6, 0, 0, 2, 0, 0, - 8, 128, 14, 0, 85, 128, + 8, 128, 13, 0, 85, 128, 6, 0, 0, 2, 1, 0, - 8, 128, 14, 0, 170, 128, + 8, 128, 13, 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, 6, 0, + 1, 0, 255, 128, 7, 0, 0, 161, 88, 0, 0, 4, - 1, 0, 8, 128, 6, 0, - 170, 129, 6, 0, 0, 161, + 1, 0, 8, 128, 5, 0, + 170, 129, 7, 0, 0, 161, 2, 0, 255, 128, 88, 0, 0, 4, 10, 0, 4, 128, - 7, 0, 170, 129, 13, 0, - 170, 160, 1, 0, 255, 128, + 7, 0, 170, 129, 6, 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, 6, 0, + 0, 0, 255, 128, 7, 0, 0, 161, 88, 0, 0, 4, - 0, 0, 8, 128, 6, 0, - 85, 129, 6, 0, 0, 161, + 0, 0, 8, 128, 5, 0, + 85, 129, 7, 0, 0, 161, 1, 0, 255, 128, 88, 0, 0, 4, 10, 0, 2, 128, - 7, 0, 85, 129, 13, 0, - 170, 160, 0, 0, 255, 128, + 7, 0, 85, 129, 6, 0, + 170, 161, 0, 0, 255, 128, + 88, 0, 0, 4, 0, 0, + 7, 128, 9, 0, 0, 129, + 10, 0, 228, 128, 0, 0, + 228, 128, 2, 0, 0, 3, + 5, 0, 15, 128, 4, 0, + 255, 128, 8, 0, 228, 160, + 5, 0, 0, 3, 5, 0, + 15, 128, 5, 0, 228, 128, + 5, 0, 228, 128, 11, 0, + 0, 3, 7, 0, 7, 128, + 8, 0, 228, 128, 4, 0, + 228, 128, 10, 0, 0, 3, + 9, 0, 7, 128, 4, 0, + 228, 128, 8, 0, 228, 128, 88, 0, 0, 4, 0, 0, 7, 128, 5, 0, 255, 129, - 10, 0, 228, 128, 0, 0, - 228, 128, 11, 0, 0, 3, - 6, 0, 7, 128, 8, 0, - 228, 128, 4, 0, 228, 128, - 10, 0, 0, 3, 7, 0, - 7, 128, 4, 0, 228, 128, - 8, 0, 228, 128, 88, 0, - 0, 4, 0, 0, 7, 128, - 5, 0, 170, 129, 6, 0, - 228, 128, 0, 0, 228, 128, - 88, 0, 0, 4, 0, 0, - 7, 128, 5, 0, 85, 129, 7, 0, 228, 128, 0, 0, 228, 128, 88, 0, 0, 4, 0, 0, 7, 128, 5, 0, - 0, 129, 9, 0, 228, 128, + 170, 129, 9, 0, 228, 128, 0, 0, 228, 128, 88, 0, 0, 4, 0, 0, 7, 128, - 10, 0, 255, 129, 1, 0, + 5, 0, 85, 129, 6, 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, 6, 0, - 255, 128, 0, 0, 228, 128, - 4, 0, 228, 128, 5, 0, - 0, 3, 1, 0, 8, 128, - 6, 0, 255, 128, 6, 0, - 255, 128, 5, 0, 0, 3, - 0, 0, 7, 128, 3, 0, - 255, 128, 1, 0, 228, 128, + 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, 1, 0, - 1, 128, 3, 0, 255, 128, + 8, 128, 7, 0, 255, 128, + 7, 0, 255, 128, 5, 0, + 0, 3, 0, 0, 7, 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, 13, 0, - 170, 160, 0, 0, 228, 128, + 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, 255, 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, 184, 38, - 0, 0, 64, 0, 0, 0, - 174, 9, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 6, 0, - 0, 0, 90, 0, 0, 3, - 0, 96, 16, 0, 0, 0, + 15, 128, 1, 0, 0, 129, + 6, 0, 170, 161, 0, 0, + 228, 128, 88, 0, 0, 4, + 0, 0, 15, 128, 1, 0, + 255, 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, + 228, 41, 0, 0, 64, 0, + 0, 0, 121, 10, 0, 0, + 89, 0, 0, 4, 70, 142, + 32, 0, 0, 0, 0, 0, + 6, 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, 0, 0, + 0, 112, 16, 0, 1, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, - 16, 0, 1, 0, 0, 0, + 16, 0, 2, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, - 2, 0, 0, 0, 85, 85, + 3, 0, 0, 0, 85, 85, 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 3, 0, + 0, 112, 16, 0, 5, 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, + 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, 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, + 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, - 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, 4, 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, 1, 0, 0, 0, - 0, 96, 16, 0, 0, 0, - 0, 0, 0, 0, 0, 7, - 18, 0, 16, 0, 3, 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, 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, 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, - 3, 0, 0, 0, 10, 0, - 16, 0, 4, 0, 0, 0, - 1, 64, 0, 0, 115, 128, - 0, 191, 16, 0, 0, 8, - 18, 0, 16, 0, 4, 0, - 0, 0, 70, 130, 32, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 70, 2, 16, 0, - 3, 0, 0, 0, 16, 0, - 0, 8, 34, 0, 16, 0, - 4, 0, 0, 0, 70, 130, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 70, 2, - 16, 0, 3, 0, 0, 0, - 16, 0, 0, 8, 66, 0, - 16, 0, 4, 0, 0, 0, - 70, 130, 32, 0, 0, 0, - 0, 0, 5, 0, 0, 0, - 70, 2, 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, 18, 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, 10, 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, - 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, - 4, 0, 0, 0, 150, 5, - 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, 14, 0, - 0, 7, 194, 0, 16, 0, - 2, 0, 0, 0, 6, 20, - 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, 230, 10, 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, + 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, 4, 0, - 0, 0, 70, 14, 16, 0, - 4, 0, 0, 0, 6, 128, + 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, 56, 0, - 0, 7, 242, 0, 16, 0, - 1, 0, 0, 0, 6, 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, 14, 16, 0, 4, 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, - 34, 0, 16, 0, 2, 0, + 18, 0, 16, 0, 2, 0, 0, 0, 1, 64, 0, 0, 255, 255, 255, 255, 18, 0, 0, 1, 32, 0, 0, 8, @@ -9800,50 +10621,344 @@ const BYTE BlendShader[] = 32, 0, 0, 0, 0, 0, 2, 0, 0, 0, 31, 0, 4, 3, 26, 0, 16, 0, - 2, 0, 0, 0, 14, 0, - 0, 7, 194, 0, 16, 0, - 2, 0, 0, 0, 6, 20, - 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, 230, 10, 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, + 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, 1, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 0, 0, + 0, 7, 18, 0, 16, 0, + 3, 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, 4, 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, 4, 0, + 34, 0, 16, 0, 3, 0, 0, 0, 10, 0, 16, 0, 4, 0, 0, 0, 1, 64, - 0, 0, 18, 131, 128, 189, + 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, + 3, 0, 0, 0, 0, 96, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 66, 0, + 16, 0, 3, 0, 0, 0, + 10, 0, 16, 0, 4, 0, + 0, 0, 1, 64, 0, 0, + 115, 128, 0, 191, 16, 0, + 0, 8, 18, 0, 16, 0, + 4, 0, 0, 0, 70, 130, + 32, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 3, 0, 0, 0, + 16, 0, 0, 8, 34, 0, + 16, 0, 4, 0, 0, 0, + 70, 130, 32, 0, 0, 0, + 0, 0, 4, 0, 0, 0, + 70, 2, 16, 0, 3, 0, + 0, 0, 16, 0, 0, 8, + 66, 0, 16, 0, 4, 0, + 0, 0, 70, 130, 32, 0, + 0, 0, 0, 0, 5, 0, + 0, 0, 70, 2, 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, 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, + 4, 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, 1, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 0, 0, + 0, 7, 18, 0, 16, 0, + 3, 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, 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, 10, + 98, 0, 16, 0, 3, 0, + 0, 0, 6, 1, 16, 0, + 4, 0, 0, 0, 2, 64, + 0, 0, 0, 0, 0, 0, + 115, 128, 0, 191, 115, 128, + 0, 191, 0, 0, 0, 0, + 16, 0, 0, 8, 18, 0, + 16, 0, 4, 0, 0, 0, + 70, 130, 32, 0, 0, 0, + 0, 0, 3, 0, 0, 0, + 70, 2, 16, 0, 3, 0, + 0, 0, 16, 0, 0, 8, + 34, 0, 16, 0, 4, 0, + 0, 0, 70, 130, 32, 0, + 0, 0, 0, 0, 4, 0, + 0, 0, 70, 2, 16, 0, + 3, 0, 0, 0, 16, 0, + 0, 8, 66, 0, 16, 0, + 4, 0, 0, 0, 70, 130, + 32, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 70, 2, + 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, 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, 18, 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, + 10, 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, 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, 4, 0, 0, 0, + 150, 5, 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, + 14, 0, 0, 7, 194, 0, + 16, 0, 2, 0, 0, 0, + 6, 20, 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, 230, 10, + 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, 66, 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, 42, 0, + 16, 0, 2, 0, 0, 0, + 14, 0, 0, 7, 194, 0, + 16, 0, 2, 0, 0, 0, + 6, 20, 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, 230, 10, + 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, 1, 0, + 0, 0, 0, 96, 16, 0, + 0, 0, 0, 0, 0, 0, + 0, 7, 18, 0, 16, 0, + 4, 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, 5, 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, 4, 0, + 0, 0, 10, 0, 16, 0, + 5, 0, 0, 0, 1, 64, + 0, 0, 115, 128, 0, 191, 69, 0, 0, 9, 242, 0, 16, 0, 5, 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, 34, 0, + 0, 0, 0, 7, 66, 0, 16, 0, 4, 0, 0, 0, 10, 0, 16, 0, 5, 0, 0, 0, 1, 64, 0, 0, - 115, 128, 0, 191, 69, 0, + 115, 128, 0, 191, 16, 0, + 0, 8, 18, 0, 16, 0, + 5, 0, 0, 0, 70, 130, + 32, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 4, 0, 0, 0, + 16, 0, 0, 8, 34, 0, + 16, 0, 5, 0, 0, 0, + 70, 130, 32, 0, 0, 0, + 0, 0, 4, 0, 0, 0, + 70, 2, 16, 0, 4, 0, + 0, 0, 16, 0, 0, 8, + 66, 0, 16, 0, 5, 0, + 0, 0, 70, 130, 32, 0, + 0, 0, 0, 0, 5, 0, + 0, 0, 70, 2, 16, 0, + 4, 0, 0, 0, 54, 0, + 0, 5, 130, 0, 16, 0, + 5, 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, 5, 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, 4, 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, 14, 0, 0, 7, + 194, 0, 16, 0, 2, 0, + 0, 0, 6, 20, 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, + 230, 10, 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, + 1, 0, 0, 0, 0, 96, + 16, 0, 0, 0, 0, 0, + 0, 0, 0, 7, 18, 0, + 16, 0, 4, 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, 5, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 3, 0, + 70, 126, 16, 0, 2, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 0, 0, - 0, 7, 66, 0, 16, 0, - 4, 0, 0, 0, 10, 0, + 0, 10, 98, 0, 16, 0, + 4, 0, 0, 0, 6, 1, 16, 0, 5, 0, 0, 0, - 1, 64, 0, 0, 115, 128, - 0, 191, 16, 0, 0, 8, + 2, 64, 0, 0, 0, 0, + 0, 0, 115, 128, 0, 191, + 115, 128, 0, 191, 0, 0, + 0, 0, 16, 0, 0, 8, 18, 0, 16, 0, 5, 0, 0, 0, 70, 130, 32, 0, 0, 0, 0, 0, 3, 0, @@ -9874,1124 +10989,438 @@ const BYTE BlendShader[] = 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, 14, 0, - 0, 7, 98, 0, 16, 0, - 2, 0, 0, 0, 6, 17, + 21, 0, 0, 1, 21, 0, + 0, 1, 31, 0, 0, 3, + 26, 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, - 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, 0, 0, - 0, 0, 56, 0, 0, 8, + 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, 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, + 21, 0, 0, 1, 21, 0, + 0, 1, 55, 0, 0, 12, 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, 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, 8, 242, 32, 16, 0, - 0, 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, 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, + 2, 0, 0, 0, 70, 14, 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, + 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, 8, + 242, 32, 16, 0, 0, 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, 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, 1, 0, 0, 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, 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, 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, 128, 63, 0, 0, - 128, 63, 0, 0, 128, 63, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 12, 114, 0, 16, 0, - 13, 0, 0, 0, 70, 2, - 16, 0, 13, 0, 0, 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, - 128, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 0, 0, - 0, 0, 70, 2, 16, 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, 114, 0, 16, 0, - 12, 0, 0, 0, 70, 2, - 16, 0, 12, 0, 0, 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, 0, 0, - 0, 0, 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, - 13, 0, 0, 0, 0, 0, - 0, 11, 114, 0, 16, 0, - 13, 0, 0, 0, 70, 2, - 16, 128, 65, 0, 0, 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, - 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, + 56, 0, 0, 7, 114, 0, 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, + 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, 63, 0, 0, 128, 63, - 0, 0, 128, 63, 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, 10, 0, + 114, 0, 16, 0, 16, 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, + 75, 0, 0, 5, 114, 0, + 16, 0, 17, 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, 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, 0, 0, 0, 0, - 55, 0, 0, 9, 18, 0, - 16, 0, 18, 0, 0, 0, - 10, 0, 16, 0, 14, 0, + 16, 0, 13, 0, 0, 0, + 58, 0, 16, 0, 2, 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, 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, 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, + 86, 9, 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, - 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, + 146, 0, 16, 0, 10, 0, + 0, 0, 86, 9, 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, 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, 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, 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, - 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, + 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, - 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, + 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, - 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, + 3, 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, + 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, 6, 0, + 130, 0, 16, 0, 2, 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, + 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, @@ -11001,81 +11430,727 @@ const BYTE BlendShader[] = 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, + 130, 0, 16, 0, 13, 0, + 0, 0, 58, 0, 16, 0, + 2, 0, 0, 0, 58, 0, 16, 128, 65, 0, 0, 0, - 2, 0, 0, 0, 56, 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, - 20, 0, 0, 0, 246, 15, - 16, 0, 2, 0, 0, 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, 14, 0, + 3, 0, 0, 0, 0, 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, 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, - 4, 0, 0, 0, 0, 0, + 5, 0, 0, 0, 0, 0, 0, 8, 114, 0, 16, 0, - 20, 0, 0, 0, 246, 15, + 17, 0, 0, 0, 246, 15, 16, 128, 65, 0, 0, 0, - 2, 0, 0, 0, 70, 2, - 16, 0, 0, 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, 2, 0, 0, 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, 20, 0, + 114, 0, 16, 0, 19, 0, 0, 0, 246, 15, 16, 0, - 5, 0, 0, 0, 70, 2, - 16, 0, 20, 0, 0, 0, + 7, 0, 0, 0, 70, 2, + 16, 0, 19, 0, 0, 0, 0, 0, 0, 8, 130, 0, - 16, 0, 4, 0, 0, 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, 4, 0, 0, 0, + 16, 0, 3, 0, 0, 0, 0, 0, 0, 7, 114, 0, 16, 0, 20, 0, 0, 0, 246, 15, 16, 0, 2, 0, @@ -11083,331 +12158,374 @@ const BYTE BlendShader[] = 20, 0, 0, 0, 55, 0, 0, 9, 114, 0, 16, 0, 0, 0, 0, 0, 246, 15, - 16, 0, 3, 0, 0, 0, + 16, 0, 5, 0, 0, 0, 70, 2, 16, 0, 20, 0, 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 1, 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, - 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, + 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, - 14, 0, 0, 0, 70, 2, - 16, 0, 16, 0, 0, 0, + 3, 0, 0, 0, 70, 2, + 16, 0, 20, 0, 0, 0, 70, 2, 16, 0, 0, 0, - 0, 0, 55, 0, 0, 9, + 0, 0, 1, 0, 0, 7, 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, + 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, 9, 0, + 246, 15, 16, 0, 14, 0, 0, 0, 70, 2, 16, 0, - 18, 0, 0, 0, 70, 2, + 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, 9, 0, + 166, 10, 16, 0, 14, 0, 0, 0, 70, 2, 16, 0, - 6, 0, 0, 0, 70, 2, + 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, 9, 0, + 86, 5, 16, 0, 14, 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, + 3, 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, + 6, 0, 16, 0, 14, 0, + 0, 0, 70, 2, 16, 128, + 129, 0, 0, 0, 10, 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, 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, 2, 0, 0, 0, - 70, 2, 16, 0, 1, 0, + 16, 0, 9, 0, 0, 0, + 70, 2, 16, 0, 12, 0, 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 7, 114, 32, 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, 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, 77, 1, - 0, 0, 22, 0, 0, 0, - 0, 0, 0, 0, 4, 0, - 0, 0, 191, 0, 0, 0, - 9, 0, 0, 0, 13, 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, 108, 1, 0, 0, + 22, 0, 0, 0, 0, 0, + 0, 0, 4, 0, 0, 0, + 205, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, - 10, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 24, 0, 0, 0, - 45, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 28, 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, - 82, 68, 69, 70, 156, 3, + 0, 0, 0, 0, 82, 68, + 69, 70, 168, 3, 0, 0, + 1, 0, 0, 0, 80, 1, + 0, 0, 8, 0, 0, 0, + 28, 0, 0, 0, 0, 4, + 255, 255, 0, 1, 0, 0, + 116, 3, 0, 0, 28, 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, - 80, 1, 0, 0, 8, 0, - 0, 0, 28, 0, 0, 0, - 0, 4, 255, 255, 0, 1, - 0, 0, 116, 3, 0, 0, - 28, 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, 37, 1, 0, 0, + 37, 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, 42, 1, 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, - 13, 0, 0, 0, 42, 1, + 13, 0, 0, 0, 45, 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, + 2, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, - 45, 1, 0, 0, 2, 0, + 49, 1, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, - 255, 255, 2, 0, 0, 0, + 255, 255, 3, 0, 0, 0, 1, 0, 0, 0, 13, 0, - 0, 0, 49, 1, 0, 0, + 0, 0, 53, 1, 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, 53, 1, + 13, 0, 0, 0, 59, 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, + 6, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0, - 59, 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, 69, 1, 0, 0, + 69, 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, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 83, - 97, 109, 112, 108, 101, 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, - 171, 171, 69, 1, 0, 0, - 11, 0, 0, 0, 104, 1, - 0, 0, 96, 1, 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, 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, 171, 171, + 69, 1, 0, 0, 11, 0, + 0, 0, 104, 1, 0, 0, + 96, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 112, 2, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 124, 2, 0, 0, 0, 0, - 0, 0, 140, 2, 0, 0, - 16, 0, 0, 0, 4, 0, - 0, 0, 2, 0, 0, 0, - 156, 2, 0, 0, 0, 0, - 0, 0, 172, 2, 0, 0, - 32, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 188, 2, 0, 0, 0, 0, - 0, 0, 204, 2, 0, 0, - 48, 0, 0, 0, 44, 0, - 0, 0, 2, 0, 0, 0, - 220, 2, 0, 0, 0, 0, - 0, 0, 236, 2, 0, 0, - 96, 0, 0, 0, 64, 0, + 112, 2, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 124, 2, 0, 0, 0, 0, 0, 0, - 252, 2, 0, 0, 0, 0, - 0, 0, 12, 3, 0, 0, - 160, 0, 0, 0, 64, 0, + 140, 2, 0, 0, 16, 0, + 0, 0, 4, 0, 0, 0, + 2, 0, 0, 0, 156, 2, 0, 0, 0, 0, 0, 0, - 252, 2, 0, 0, 0, 0, - 0, 0, 24, 3, 0, 0, - 224, 0, 0, 0, 16, 0, + 172, 2, 0, 0, 32, 0, + 0, 0, 16, 0, 0, 0, + 2, 0, 0, 0, 188, 2, 0, 0, 0, 0, 0, 0, - 124, 2, 0, 0, 0, 0, - 0, 0, 44, 3, 0, 0, - 240, 0, 0, 0, 16, 0, + 204, 2, 0, 0, 48, 0, + 0, 0, 44, 0, 0, 0, + 2, 0, 0, 0, 220, 2, 0, 0, 0, 0, 0, 0, - 60, 3, 0, 0, 0, 0, - 0, 0, 76, 3, 0, 0, - 0, 1, 0, 0, 16, 0, + 236, 2, 0, 0, 96, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 252, 2, 0, 0, 0, 0, 0, 0, - 60, 3, 0, 0, 0, 0, - 0, 0, 87, 3, 0, 0, - 16, 1, 0, 0, 16, 0, + 12, 3, 0, 0, 160, 0, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 252, 2, 0, 0, 0, 0, 0, 0, - 60, 3, 0, 0, 0, 0, - 0, 0, 97, 3, 0, 0, - 32, 1, 0, 0, 64, 0, + 24, 3, 0, 0, 224, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 124, 2, 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, + 44, 3, 0, 0, 240, 0, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 60, 3, + 0, 0, 0, 0, 0, 0, + 76, 3, 0, 0, 0, 1, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 60, 3, + 0, 0, 0, 0, 0, 0, + 87, 3, 0, 0, 16, 1, + 0, 0, 16, 0, 0, 0, + 0, 0, 0, 0, 60, 3, + 0, 0, 0, 0, 0, 0, + 97, 3, 0, 0, 32, 1, + 0, 0, 64, 0, 0, 0, + 0, 0, 0, 0, 252, 2, 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, + 67, 111, 108, 111, 114, 0, + 1, 0, 3, 0, 1, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 109, 89, - 117, 118, 67, 111, 108, 111, - 114, 77, 97, 116, 114, 105, - 120, 0, 2, 0, 3, 0, - 3, 0, 3, 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, + 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, 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, 49, 48, 46, - 49, 0, 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, + 0, 0, 109, 89, 117, 118, + 67, 111, 108, 111, 114, 77, + 97, 116, 114, 105, 120, 0, + 2, 0, 3, 0, 3, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 116, 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, - 3, 0, 0, 0, 1, 0, - 0, 0, 3, 3, 0, 0, - 116, 0, 0, 0, 2, 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, - 3, 0, 0, 0, 1, 0, - 0, 0, 12, 12, 0, 0, - 116, 0, 0, 0, 1, 0, + 1, 0, 0, 0, 3, 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, + 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, 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, - 15, 0, 0, 0, 83, 86, - 95, 84, 97, 114, 103, 101, - 116, 0, 171, 171 + 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 sBlendShader = { BlendShader, sizeof(BlendShader) }; diff --git a/gfx/layers/d3d11/TextureD3D11.cpp b/gfx/layers/d3d11/TextureD3D11.cpp index dd3d2e9624cc..c70cf41703a2 100644 --- a/gfx/layers/d3d11/TextureD3D11.cpp +++ b/gfx/layers/d3d11/TextureD3D11.cpp @@ -337,8 +337,8 @@ DXGITextureData::FillInfo(TextureData::Info& aInfo) const void D3D11TextureData::SyncWithObject(SyncObject* aSyncObject) { - if (!aSyncObject || !NS_IsMainThread() || mIsForOutOfBandContent) { - // When off the main thread we sync using a keyed mutex per texture. + if (!aSyncObject || mHasSynchronization) { + // When we have per texture synchronization we sync using the keyed mutex. return; } @@ -395,6 +395,10 @@ D3D11TextureData::Create(IntSize aSize, SurfaceFormat aFormat, SourceSurface* aS aSize.width, aSize.height, 1, 1, D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE); + if (aFormat == SurfaceFormat::NV12) { + newDesc.Format = DXGI_FORMAT_NV12; + } + newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED; if (!NS_IsMainThread() || !!(aFlags & ALLOC_FOR_OUT_OF_BAND_CONTENT)) { // On the main thread we use the syncobject to handle synchronization. @@ -1195,10 +1199,15 @@ CompositingRenderTargetD3D11::GetSize() const return TextureSourceD3D11::GetSize(); } -SyncObjectD3D11::SyncObjectD3D11(SyncHandle aSyncHandle) +SyncObjectD3D11::SyncObjectD3D11(SyncHandle aSyncHandle, ID3D11Device* aDevice) : mSyncHandle(aSyncHandle) { - mD3D11Device = DeviceManagerDx::Get()->GetContentDevice(); + if (!aDevice) { + mD3D11Device = DeviceManagerDx::Get()->GetContentDevice(); + return; + } + + mD3D11Device = aDevice; } bool @@ -1208,9 +1217,7 @@ SyncObjectD3D11::Init() return true; } - RefPtr device = DeviceManagerDx::Get()->GetContentDevice(); - - HRESULT hr = device->OpenSharedResource( + HRESULT hr = mD3D11Device->OpenSharedResource( mSyncHandle, __uuidof(ID3D11Texture2D), (void**)(ID3D11Texture2D**)getter_AddRefs(mD3D11Texture)); @@ -1246,7 +1253,7 @@ bool SyncObjectD3D11::IsSyncObjectValid() { RefPtr dev = DeviceManagerDx::Get()->GetContentDevice(); - if (!dev || (dev != mD3D11Device)) { + if (!dev || (NS_IsMainThread() && dev != mD3D11Device)) { return false; } return true; @@ -1277,12 +1284,18 @@ SyncObjectD3D11::FinalizeFrame() box.front = box.top = box.left = 0; box.back = box.bottom = box.right = 1; - RefPtr dev = DeviceManagerDx::Get()->GetContentDevice(); - if (!dev) { + RefPtr dev; + mD3D11Texture->GetDevice(getter_AddRefs(dev)); + + if (dev == DeviceManagerDx::Get()->GetContentDevice()) { if (DeviceManagerDx::Get()->HasDeviceReset()) { return; } - MOZ_CRASH("GFX: Invalid D3D11 content device"); + } + + if (dev != mD3D11Device) { + gfxWarning() << "Attempt to sync texture from invalid device."; + return; } RefPtr ctx; diff --git a/gfx/layers/d3d11/TextureD3D11.h b/gfx/layers/d3d11/TextureD3D11.h index 6efff8e8a687..6cf021b3a9fb 100644 --- a/gfx/layers/d3d11/TextureD3D11.h +++ b/gfx/layers/d3d11/TextureD3D11.h @@ -413,7 +413,7 @@ private: class SyncObjectD3D11 : public SyncObject { public: - explicit SyncObjectD3D11(SyncHandle aSyncHandle); + explicit SyncObjectD3D11(SyncHandle aSyncHandle, ID3D11Device* aDevice); virtual void FinalizeFrame(); virtual bool IsSyncObjectValid(); diff --git a/gfx/layers/d3d11/genshaders.sh b/gfx/layers/d3d11/genshaders.sh index b50e001dbaac..ad477eee4b59 100644 --- a/gfx/layers/d3d11/genshaders.sh +++ b/gfx/layers/d3d11/genshaders.sh @@ -36,12 +36,14 @@ makeShaderPS RGBShader makeShaderPS RGBAShader makeShaderPS ComponentAlphaShader makeShaderPS YCbCrShader +makeShaderPS NV12Shader makeShaderVS LayerQuadMaskVS makeShaderVS LayerDynamicMaskVS makeShaderPS SolidColorShaderMask makeShaderPS RGBShaderMask makeShaderPS RGBAShaderMask makeShaderPS YCbCrShaderMask +makeShaderPS NV12ShaderMask makeShaderPS ComponentAlphaShaderMask # Mix-blend shaders diff --git a/gfx/layers/d3d9/CompositorD3D9.cpp b/gfx/layers/d3d9/CompositorD3D9.cpp deleted file mode 100644 index 39ddd65978ec..000000000000 --- a/gfx/layers/d3d9/CompositorD3D9.cpp +++ /dev/null @@ -1,1046 +0,0 @@ -/* -*- 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/. */ - -#include "CompositorD3D9.h" -#include "LayerManagerD3D9Shaders.h" -#include "gfxWindowsPlatform.h" -#include "nsIWidget.h" -#include "mozilla/layers/ImageHost.h" -#include "mozilla/layers/ContentHost.h" -#include "mozilla/layers/Effects.h" -#include "nsWindowsHelpers.h" -#include "Nv3DVUtils.h" -#include "gfxFailure.h" -#include "mozilla/layers/LayerManagerComposite.h" -#include "gfxPrefs.h" -#include "gfxCrashReporterUtils.h" -#include "gfxUtils.h" -#include "mozilla/gfx/DeviceManagerDx.h" -#include "mozilla/layers/CompositorBridgeParent.h" -#include "mozilla/widget/WinCompositorWidget.h" -#include "D3D9SurfaceImage.h" - -namespace mozilla { -namespace layers { - -using namespace mozilla::gfx; - -CompositorD3D9::CompositorD3D9(CompositorBridgeParent* aParent, widget::CompositorWidget* aWidget) - : Compositor(aWidget, aParent) - , mDeviceResetCount(0) - , mFailedResetAttempts(0) -{ -} - -CompositorD3D9::~CompositorD3D9() -{ - mSwapChain = nullptr; - mDeviceManager = nullptr; -} - -bool -CompositorD3D9::Initialize(nsCString* const out_failureReason) -{ - ScopedGfxFeatureReporter reporter("D3D9 Layers"); - - mDeviceManager = DeviceManagerD3D9::Get(); - if (!mDeviceManager) { - *out_failureReason = "FEATURE_FAILURE_D3D9_DEVICE_MANAGER"; - return false; - } - - mSwapChain = mDeviceManager->CreateSwapChain(mWidget->AsWindows()->GetHwnd()); - if (!mSwapChain) { - *out_failureReason = "FEATURE_FAILURE_D3D9_SWAP_CHAIN"; - return false; - } - - if (!mWidget->InitCompositor(this)) { - *out_failureReason = "FEATURE_FAILURE_D3D9_INIT_COMPOSITOR"; - return false; - } - - reporter.SetSuccessful(); - - return true; -} - -TextureFactoryIdentifier -CompositorD3D9::GetTextureFactoryIdentifier() -{ - TextureFactoryIdentifier ident; - ident.mMaxTextureSize = GetMaxTextureSize(); - ident.mParentBackend = LayersBackend::LAYERS_D3D9; - ident.mParentProcessType = XRE_GetProcessType(); - ident.mSupportsComponentAlpha = SupportsEffect(EffectTypes::COMPONENT_ALPHA); - return ident; -} - -bool -CompositorD3D9::CanUseCanvasLayerForSize(const IntSize &aSize) -{ - int32_t maxTextureSize = GetMaxTextureSize(); - - if (aSize.width > maxTextureSize || aSize.height > maxTextureSize) { - return false; - } - - return true; -} - -int32_t -CompositorD3D9::GetMaxTextureSize() const -{ - return mDeviceManager ? mDeviceManager->GetMaxTextureSize() : INT32_MAX; -} - -already_AddRefed -CompositorD3D9::CreateDataTextureSource(TextureFlags aFlags) -{ - return MakeAndAddRef(SurfaceFormat::UNKNOWN, this, aFlags); -} - -already_AddRefed -CompositorD3D9::CreateRenderTarget(const gfx::IntRect &aRect, - SurfaceInitMode aInit) -{ - MOZ_ASSERT(aRect.width != 0 && aRect.height != 0, "Trying to create a render target of invalid size"); - - if (aRect.width * aRect.height == 0) { - return nullptr; - } - - if (!mDeviceManager) { - return nullptr; - } - - RefPtr texture; - HRESULT hr = device()->CreateTexture(aRect.width, aRect.height, 1, - D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, - D3DPOOL_DEFAULT, getter_AddRefs(texture), - nullptr); - if (FAILED(hr)) { - ReportFailure(NS_LITERAL_CSTRING("CompositorD3D9::CreateRenderTarget: Failed to create texture"), - hr); - return nullptr; - } - - return MakeAndAddRef(texture, aInit, aRect); -} - -already_AddRefed -CompositorD3D9::CreateTexture(const gfx::IntRect& aRect, - const CompositingRenderTarget* aSource, - const gfx::IntPoint& aSourcePoint) -{ - MOZ_ASSERT(aRect.width != 0 && aRect.height != 0, "Trying to create a render target of invalid size"); - - if (aRect.width * aRect.height == 0) { - return nullptr; - } - - if (!mDeviceManager) { - return nullptr; - } - - RefPtr texture; - HRESULT hr = device()->CreateTexture(aRect.width, aRect.height, 1, - D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, - D3DPOOL_DEFAULT, getter_AddRefs(texture), - nullptr); - if (FAILED(hr)) { - ReportFailure(NS_LITERAL_CSTRING("CompositorD3D9::CreateRenderTargetFromSource: Failed to create texture"), - hr); - return nullptr; - } - - if (aSource) { - RefPtr sourceSurface = - static_cast(aSource)->GetD3D9Surface(); - - RefPtr destSurface; - hr = texture->GetSurfaceLevel(0, getter_AddRefs(destSurface)); - if (FAILED(hr)) { - NS_WARNING("Failed to get texture surface level for dest."); - } - - if (sourceSurface && destSurface) { - RECT sourceRect; - sourceRect.left = aSourcePoint.x; - sourceRect.right = aSourcePoint.x + aRect.width; - sourceRect.top = aSourcePoint.y; - sourceRect.bottom = aSourcePoint.y + aRect.height; - RECT destRect; - destRect.left = 0; - destRect.right = aRect.width; - destRect.top = 0; - destRect.bottom = aRect.height; - - // copy the source to the dest - hr = device()->StretchRect(sourceSurface, - &sourceRect, - destSurface, - &destRect, - D3DTEXF_NONE); - if (FAILED(hr)) { - ReportFailure(NS_LITERAL_CSTRING("CompositorD3D9::CreateRenderTargetFromSource: Failed to update texture"), - hr); - } - } - } - - return texture.forget(); -} - -already_AddRefed -CompositorD3D9::CreateRenderTargetFromSource(const gfx::IntRect &aRect, - const CompositingRenderTarget *aSource, - const gfx::IntPoint &aSourcePoint) -{ - RefPtr texture = CreateTexture(aRect, aSource, aSourcePoint); - - if (!texture) { - return nullptr; - } - - return MakeAndAddRef(texture, - INIT_MODE_NONE, - aRect); -} - -void -CompositorD3D9::SetRenderTarget(CompositingRenderTarget *aRenderTarget) -{ - MOZ_ASSERT(aRenderTarget && mDeviceManager); - RefPtr oldRT = mCurrentRT; - Unused << oldRT; - mCurrentRT = static_cast(aRenderTarget); - mCurrentRT->BindRenderTarget(device()); - PrepareViewport(mCurrentRT->GetSize()); -} - -static DeviceManagerD3D9::ShaderMode -ShaderModeForEffectType(EffectTypes aEffectType, gfx::SurfaceFormat aFormat) -{ - switch (aEffectType) { - case EffectTypes::SOLID_COLOR: - return DeviceManagerD3D9::SOLIDCOLORLAYER; - case EffectTypes::RENDER_TARGET: - return DeviceManagerD3D9::RGBALAYER; - case EffectTypes::RGB: - if (aFormat == SurfaceFormat::B8G8R8A8 || aFormat == SurfaceFormat::R8G8B8A8) - return DeviceManagerD3D9::RGBALAYER; - return DeviceManagerD3D9::RGBLAYER; - case EffectTypes::YCBCR: - return DeviceManagerD3D9::YCBCRLAYER; - } - - MOZ_CRASH("GFX: Bad effect type"); -} - -void -CompositorD3D9::ClearRect(const gfx::Rect& aRect) -{ - D3DRECT rect; - rect.x1 = aRect.X(); - rect.y1 = aRect.Y(); - rect.x2 = aRect.XMost(); - rect.y2 = aRect.YMost(); - - device()->Clear(1, &rect, D3DCLEAR_TARGET, - 0x00000000, 0, 0); -} - -void -CompositorD3D9::DrawQuad(const gfx::Rect &aRect, - const gfx::IntRect &aClipRect, - const EffectChain &aEffectChain, - gfx::Float aOpacity, - const gfx::Matrix4x4& aTransform, - const gfx::Rect& aVisibleRect) -{ - if (!mDeviceManager) { - return; - } - - IDirect3DDevice9* d3d9Device = device(); - MOZ_ASSERT(d3d9Device, "We should be able to get a device now"); - - MOZ_ASSERT(mCurrentRT, "No render target"); - d3d9Device->SetVertexShaderConstantF(CBmLayerTransform, &aTransform._11, 4); - - IntPoint origin = mCurrentRT->GetOrigin(); - float renderTargetOffset[] = { float(origin.x), float(origin.y), 0, 0 }; - d3d9Device->SetVertexShaderConstantF(CBvRenderTargetOffset, - renderTargetOffset, - 1); - d3d9Device->SetVertexShaderConstantF(CBvLayerQuad, - ShaderConstantRect(aRect.x, - aRect.y, - aRect.width, - aRect.height), - 1); - - if (aEffectChain.mPrimaryEffect->mType != EffectTypes::SOLID_COLOR) { - float opacity[4]; - /* - * We always upload a 4 component float, but the shader will use only the - * first component since it's declared as a 'float'. - */ - opacity[0] = aOpacity; - d3d9Device->SetPixelShaderConstantF(CBfLayerOpacity, opacity, 1); - } - - bool isPremultiplied = true; - - MaskType maskType = MaskType::MaskNone; - - if (aEffectChain.mSecondaryEffects[EffectTypes::MASK]) { - maskType = MaskType::Mask; - } - - gfx::Rect backdropDest; - gfx::IntRect backdropRect; - gfx::Matrix4x4 backdropTransform; - RefPtr backdropTexture; - 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; - - // Pixel Shader Model 2.0 is too limited to perform blending in the same way - // as Direct3D 11 - there are too many instructions, and we don't have - // configurable shaders (as we do with OGL) that would avoid a huge shader - // matrix. - // - // Instead, we use a multi-step process for blending on D3D9: - // (1) Capture the backdrop into a temporary surface. - // (2) Render the effect chain onto the backdrop, with OP_SOURCE. - // (3) Capture the backdrop again into another surface - these are our source pixels. - // (4) Perform a final blend step using software. - // (5) Blit the blended result back to the render target. - if (BlendOpIsMixBlendMode(blendMode)) { - backdropRect = ComputeBackdropCopyRect( - aRect, aClipRect, aTransform, &backdropTransform, &backdropDest); - - // If this fails, don't set a blend op. - backdropTexture = CreateTexture(backdropRect, mCurrentRT, backdropRect.TopLeft()); - if (!backdropTexture) { - blendMode = gfx::CompositionOp::OP_OVER; - } - } - } - - RECT scissor; - scissor.left = aClipRect.x; - scissor.right = aClipRect.XMost(); - scissor.top = aClipRect.y; - scissor.bottom = aClipRect.YMost(); - d3d9Device->SetScissorRect(&scissor); - - uint32_t maskTexture = 0; - switch (aEffectChain.mPrimaryEffect->mType) { - case EffectTypes::SOLID_COLOR: - { - // output color is premultiplied, so we need to adjust all channels. - Color layerColor = - static_cast(aEffectChain.mPrimaryEffect.get())->mColor; - float color[4]; - color[0] = layerColor.r * layerColor.a * aOpacity; - color[1] = layerColor.g * layerColor.a * aOpacity; - color[2] = layerColor.b * layerColor.a * aOpacity; - color[3] = layerColor.a * aOpacity; - - d3d9Device->SetPixelShaderConstantF(CBvColor, color, 1); - - maskTexture = mDeviceManager - ->SetShaderMode(DeviceManagerD3D9::SOLIDCOLORLAYER, maskType); - } - break; - case EffectTypes::RENDER_TARGET: - case EffectTypes::RGB: - { - TexturedEffect* texturedEffect = - static_cast(aEffectChain.mPrimaryEffect.get()); - - Rect textureCoords = texturedEffect->mTextureCoords; - d3d9Device->SetVertexShaderConstantF(CBvTextureCoords, - ShaderConstantRect( - textureCoords.x, - textureCoords.y, - textureCoords.width, - textureCoords.height), - 1); - - SetSamplerForSamplingFilter(texturedEffect->mSamplingFilter); - - TextureSourceD3D9* source = texturedEffect->mTexture->AsSourceD3D9(); - d3d9Device->SetTexture(0, source->GetD3D9Texture()); - - maskTexture = mDeviceManager - ->SetShaderMode(ShaderModeForEffectType(aEffectChain.mPrimaryEffect->mType, - texturedEffect->mTexture->GetFormat()), - maskType); - - isPremultiplied = texturedEffect->mPremultiplied; - } - break; - case EffectTypes::YCBCR: - { - EffectYCbCr* ycbcrEffect = - static_cast(aEffectChain.mPrimaryEffect.get()); - - SetSamplerForSamplingFilter(SamplingFilter::LINEAR); - - Rect textureCoords = ycbcrEffect->mTextureCoords; - d3d9Device->SetVertexShaderConstantF(CBvTextureCoords, - ShaderConstantRect( - textureCoords.x, - textureCoords.y, - textureCoords.width, - textureCoords.height), - 1); - - const int Y = 0, Cb = 1, Cr = 2; - TextureSource* source = ycbcrEffect->mTexture; - - if (!source) { - NS_WARNING("No texture to composite"); - return; - } - - 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). - return; - } - - - const float* yuvToRgb = gfxUtils::YuvToRgbMatrix4x3RowMajor(ycbcrEffect->mYUVColorSpace); - d3d9Device->SetPixelShaderConstantF(CBmYuvColorMatrix, yuvToRgb, 3); - - TextureSourceD3D9* sourceY = source->GetSubSource(Y)->AsSourceD3D9(); - TextureSourceD3D9* sourceCb = source->GetSubSource(Cb)->AsSourceD3D9(); - TextureSourceD3D9* sourceCr = source->GetSubSource(Cr)->AsSourceD3D9(); - - - MOZ_ASSERT(sourceY->GetD3D9Texture()); - MOZ_ASSERT(sourceCb->GetD3D9Texture()); - MOZ_ASSERT(sourceCr->GetD3D9Texture()); - - /* - * Send 3d control data and metadata - */ - if (mDeviceManager->GetNv3DVUtils()) { - Nv_Stereo_Mode mode; - switch (source->AsSourceD3D9()->GetStereoMode()) { - case StereoMode::LEFT_RIGHT: - mode = NV_STEREO_MODE_LEFT_RIGHT; - break; - case StereoMode::RIGHT_LEFT: - mode = NV_STEREO_MODE_RIGHT_LEFT; - break; - case StereoMode::BOTTOM_TOP: - mode = NV_STEREO_MODE_BOTTOM_TOP; - break; - case StereoMode::TOP_BOTTOM: - mode = NV_STEREO_MODE_TOP_BOTTOM; - break; - case StereoMode::MONO: - mode = NV_STEREO_MODE_MONO; - break; - } - - // Send control data even in mono case so driver knows to leave stereo mode. - mDeviceManager->GetNv3DVUtils()->SendNv3DVControl(mode, true, FIREFOX_3DV_APP_HANDLE); - - if (source->AsSourceD3D9()->GetStereoMode() != StereoMode::MONO) { - mDeviceManager->GetNv3DVUtils()->SendNv3DVControl(mode, true, FIREFOX_3DV_APP_HANDLE); - - RefPtr renderTarget; - d3d9Device->GetRenderTarget(0, getter_AddRefs(renderTarget)); - mDeviceManager->GetNv3DVUtils()->SendNv3DVMetaData((unsigned int)aRect.width, - (unsigned int)aRect.height, - (HANDLE)(sourceY->GetD3D9Texture()), - (HANDLE)(renderTarget)); - } - } - - // Linear scaling is default here, adhering to mFilter is difficult since - // presumably even with point filtering we'll still want chroma upsampling - // to be linear. In the current approach we can't. - device()->SetTexture(Y, sourceY->GetD3D9Texture()); - device()->SetTexture(Cb, sourceCb->GetD3D9Texture()); - device()->SetTexture(Cr, sourceCr->GetD3D9Texture()); - maskTexture = mDeviceManager->SetShaderMode(DeviceManagerD3D9::YCBCRLAYER, maskType); - } - break; - case EffectTypes::COMPONENT_ALPHA: - { - MOZ_ASSERT(gfxPrefs::ComponentAlphaEnabled()); - EffectComponentAlpha* effectComponentAlpha = - static_cast(aEffectChain.mPrimaryEffect.get()); - TextureSourceD3D9* sourceOnWhite = effectComponentAlpha->mOnWhite->AsSourceD3D9(); - TextureSourceD3D9* sourceOnBlack = effectComponentAlpha->mOnBlack->AsSourceD3D9(); - - Rect textureCoords = effectComponentAlpha->mTextureCoords; - d3d9Device->SetVertexShaderConstantF(CBvTextureCoords, - ShaderConstantRect( - textureCoords.x, - textureCoords.y, - textureCoords.width, - textureCoords.height), - 1); - - SetSamplerForSamplingFilter(effectComponentAlpha->mSamplingFilter); - - maskTexture = mDeviceManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS1, maskType); - SetMask(aEffectChain, maskTexture); - d3d9Device->SetTexture(0, sourceOnBlack->GetD3D9Texture()); - d3d9Device->SetTexture(1, sourceOnWhite->GetD3D9Texture()); - d3d9Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO); - d3d9Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR); - d3d9Device->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); - - maskTexture = mDeviceManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS2, maskType); - SetMask(aEffectChain, maskTexture); - d3d9Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); - d3d9Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE); - d3d9Device->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); - - // Restore defaults - d3d9Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); - d3d9Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); - d3d9Device->SetTexture(1, nullptr); - } - return; - default: - NS_WARNING("Unknown shader type"); - return; - } - - SetMask(aEffectChain, maskTexture); - - if (BlendOpIsMixBlendMode(blendMode)) { - // Use SOURCE instead of OVER to get the original source pixels without - // having to render to another intermediate target. - d3d9Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ZERO); - } - if (!isPremultiplied) { - d3d9Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); - } - - d3d9Device->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); - - // Restore defaults. - if (BlendOpIsMixBlendMode(blendMode)) { - d3d9Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); - } - if (!isPremultiplied) { - d3d9Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); - } - - // Final pass - if mix-blending, do it now that we have the backdrop and - // source textures. - if (BlendOpIsMixBlendMode(blendMode)) { - FinishMixBlend( - backdropRect, - backdropDest, - backdropTransform, - backdropTexture, - blendMode); - } -} - -void -CompositorD3D9::SetMask(const EffectChain &aEffectChain, uint32_t aMaskTexture) -{ - EffectMask *maskEffect = - static_cast(aEffectChain.mSecondaryEffects[EffectTypes::MASK].get()); - if (!maskEffect) { - return; - } - - TextureSourceD3D9 *source = maskEffect->mMaskTexture->AsSourceD3D9(); - - device()->SetTexture(aMaskTexture, source->GetD3D9Texture()); - - const gfx::Matrix4x4& maskTransform = maskEffect->mMaskTransform; - NS_ASSERTION(maskTransform.Is2D(), "How did we end up with a 3D transform here?!"); - Rect bounds = Rect(Point(), Size(maskEffect->mSize)); - bounds = maskTransform.As2D().TransformBounds(bounds); - - device()->SetVertexShaderConstantF(DeviceManagerD3D9::sMaskQuadRegister, - ShaderConstantRect(bounds.x, - bounds.y, - bounds.width, - bounds.height), - 1); -} - -/** - * In the next few methods we call |mParent->InvalidateRemoteLayers()| - that has - * a few uses - if our device or swap chain is not ready, it causes us to try - * to render again, that means we keep trying to get a good device and swap - * chain and don't block the main thread (which we would if we kept trying in - * a busy loop because this is likely to happen in a sync transaction). - * If we had to recreate our device, then we have new textures and we - * need to reupload everything (not just what is currently invalid) from the - * client side. That means we need to invalidate everything on the client. - * If we just reset and didn't need to recreate, then we don't need to reupload - * our textures, but we do need to redraw the whole window, which means we still - * need to invalidate everything. - * Currently we probably do this complete invalidation too much. But it is better - * to do that than to miss an invalidation which would result in a black layer - * (or multiple layers) until the user moves the mouse. The unnecessary invalidtion - * only happens when the device is reset, so that should be pretty rare and when - * other things are happening so the user does not expect super performance. - */ - -bool -CompositorD3D9::EnsureSwapChain() -{ - MOZ_ASSERT(mDeviceManager, "Don't call EnsureSwapChain without a device manager"); - - if (!mSwapChain) { - mSwapChain = mDeviceManager->CreateSwapChain(mWidget->AsWindows()->GetHwnd()); - // We could not create a swap chain, return false - if (!mSwapChain) { - // Check the state of the device too - DeviceManagerState state = mDeviceManager->VerifyReadyForRendering(); - if (state == DeviceMustRecreate) { - mDeviceManager = nullptr; - } - mParent->InvalidateRemoteLayers(); - return false; - } - } - - // We have a swap chain, lets initialise it - DeviceManagerState state = mSwapChain->PrepareForRendering(); - if (state == DeviceOK) { - mFailedResetAttempts = 0; - return true; - } - // Swap chain could not be initialised, handle the failure - if (state == DeviceMustRecreate) { - mDeviceManager = nullptr; - mSwapChain = nullptr; - } - mParent->InvalidateRemoteLayers(); - return false; -} - -void -CompositorD3D9::CheckResetCount() -{ - if (mDeviceResetCount != mDeviceManager->GetDeviceResetCount()) { - mParent->InvalidateRemoteLayers(); - } - mDeviceResetCount = mDeviceManager->GetDeviceResetCount(); -} - -bool -CompositorD3D9::Ready() -{ - if (mDeviceManager) { - if (EnsureSwapChain()) { - // We don't need to call VerifyReadyForRendering because that is - // called by mSwapChain->PrepareForRendering() via EnsureSwapChain(). - CheckResetCount(); - return true; - } - return false; - } - - NS_ASSERTION(!mCurrentRT && !mDefaultRT, - "Shouldn't have any render targets around, they must be released before our device"); - mSwapChain = nullptr; - - mDeviceManager = DeviceManagerD3D9::Get(); - if (!mDeviceManager) { - FailedToResetDevice(); - mParent->InvalidateRemoteLayers(); - return false; - } - if (EnsureSwapChain()) { - CheckResetCount(); - return true; - } - return false; -} - -void -CompositorD3D9::FailedToResetDevice() { - mFailedResetAttempts += 1; - // 10 is a totally arbitrary number that we may want to increase or decrease - // depending on how things behave in the wild. - if (mFailedResetAttempts > 10) { - mFailedResetAttempts = 0; - DeviceManagerDx::Get()->NotifyD3D9DeviceReset(); - gfxCriticalNote << "[D3D9] Unable to get a working D3D9 Compositor"; - } -} - -void -CompositorD3D9::BeginFrame(const nsIntRegion& aInvalidRegion, - const IntRect *aClipRectIn, - const IntRect& aRenderBounds, - const nsIntRegion& aOpaqueRegion, - IntRect *aClipRectOut, - IntRect *aRenderBoundsOut) -{ - MOZ_ASSERT(mDeviceManager && mSwapChain); - - mDeviceManager->SetupRenderState(); - - EnsureSize(); - - device()->Clear(0, nullptr, D3DCLEAR_TARGET, 0x00000000, 0, 0); - device()->BeginScene(); - - if (aClipRectOut) { - *aClipRectOut = IntRect(0, 0, mSize.width, mSize.height); - } - if (aRenderBoundsOut) { - *aRenderBoundsOut = IntRect(0, 0, mSize.width, mSize.height); - } - - RECT r; - if (aClipRectIn) { - r.left = (LONG)aClipRectIn->x; - r.top = (LONG)aClipRectIn->y; - r.right = (LONG)(aClipRectIn->x + aClipRectIn->width); - r.bottom = (LONG)(aClipRectIn->y + aClipRectIn->height); - } else { - r.left = r.top = 0; - r.right = mSize.width; - r.bottom = mSize.height; - } - device()->SetScissorRect(&r); - - RefPtr backBuffer = mSwapChain->GetBackBuffer(); - mDefaultRT = new CompositingRenderTargetD3D9(backBuffer, - INIT_MODE_CLEAR, - IntRect(0, 0, mSize.width, mSize.height)); - SetRenderTarget(mDefaultRT); -} - -void -CompositorD3D9::EndFrame() -{ - if (mDeviceManager) { - device()->EndScene(); - - LayoutDeviceIntSize oldSize = mSize; - EnsureSize(); - if (oldSize == mSize) { - if (mTarget) { - PaintToTarget(); - } else { - mSwapChain->Present(); - } - } - } - - Compositor::EndFrame(); - - mCurrentRT = nullptr; - mDefaultRT = nullptr; -} - -void -CompositorD3D9::PrepareViewport(const gfx::IntSize& aSize) -{ - Matrix4x4 viewMatrix; - /* - * Matrix to transform to viewport space ( <-1.0, 1.0> topleft, - * <1.0, -1.0> bottomright) - */ - viewMatrix._11 = 2.0f / aSize.width; - viewMatrix._22 = -2.0f / aSize.height; - viewMatrix._41 = -1.0f; - viewMatrix._42 = 1.0f; - viewMatrix._33 = 0.0f; - - HRESULT hr = device()->SetVertexShaderConstantF(CBmProjection, &viewMatrix._11, 4); - - if (FAILED(hr)) { - NS_WARNING("Failed to set projection matrix"); - } -} - -bool -CompositorD3D9::SupportsEffect(EffectTypes aEffect) -{ - if (aEffect == EffectTypes::COMPONENT_ALPHA && - !mDeviceManager->HasComponentAlpha()) { - return false; - } - - return Compositor::SupportsEffect(aEffect); -} - -void -CompositorD3D9::EnsureSize() -{ - mSize = mWidget->GetClientSize(); -} - -void -CompositorD3D9::SetSamplerForSamplingFilter(SamplingFilter aSamplingFilter) -{ - switch (aSamplingFilter) { - case SamplingFilter::LINEAR: - device()->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); - device()->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); - return; - case SamplingFilter::POINT: - device()->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT); - device()->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT); - return; - default: - device()->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); - device()->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); - } -} - -void -CompositorD3D9::PaintToTarget() -{ - if (!mDeviceManager) { - return; - } - - RefPtr backBuff; - RefPtr destSurf; - device()->GetRenderTarget(0, getter_AddRefs(backBuff)); - - D3DSURFACE_DESC desc; - backBuff->GetDesc(&desc); - - device()->CreateOffscreenPlainSurface(desc.Width, desc.Height, - D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, - getter_AddRefs(destSurf), nullptr); - - device()->GetRenderTargetData(backBuff, destSurf); - - D3DLOCKED_RECT rect; - HRESULT hr = destSurf->LockRect(&rect, nullptr, D3DLOCK_READONLY); - if (FAILED(hr) || !rect.pBits) { - gfxCriticalError() << "Failed to lock rect in paint to target D3D9 " << hexa(hr); - return; - } - RefPtr sourceSurface = - Factory::CreateWrappingDataSourceSurface((uint8_t*)rect.pBits, - rect.Pitch, - IntSize(desc.Width, desc.Height), - SurfaceFormat::B8G8R8A8); - mTarget->CopySurface(sourceSurface, - IntRect(0, 0, desc.Width, desc.Height), - IntPoint(-mTargetBounds.x, -mTargetBounds.y)); - mTarget->Flush(); - destSurf->UnlockRect(); -} - -void -CompositorD3D9::ReportFailure(const nsACString &aMsg, HRESULT aCode) -{ - // We could choose to abort here when hr == E_OUTOFMEMORY. - nsCString msg; - msg.Append(aMsg); - msg.AppendLiteral(" Error code: "); - msg.AppendInt(uint32_t(aCode)); - NS_WARNING(msg.BeginReading()); - - gfx::LogFailure(msg); -} - -static inline already_AddRefed -GetSurfaceOfTexture(IDirect3DTexture9* aTexture) -{ - RefPtr surface; - HRESULT hr = aTexture->GetSurfaceLevel(0, getter_AddRefs(surface)); - if (FAILED(hr)) { - gfxCriticalNote << "Failed to grab texture surface " << hexa(hr); - return nullptr; - } - return surface.forget(); -} - -static inline already_AddRefed -CreateDataSurfaceForTexture(IDirect3DDevice9* aDevice, - IDirect3DSurface9* aSource, - const D3DSURFACE_DESC& aDesc) -{ - RefPtr dest; - HRESULT hr = aDevice->CreateOffscreenPlainSurface( - aDesc.Width, aDesc.Height, - aDesc.Format, D3DPOOL_SYSTEMMEM, - getter_AddRefs(dest), nullptr); - if (FAILED(hr) || !dest) { - gfxCriticalNote << "Failed to create offscreen plain surface " << hexa(hr); - return nullptr; - } - - hr = aDevice->GetRenderTargetData(aSource, dest); - if (FAILED(hr)) { - gfxCriticalNote << "Failed to get render target data " << hexa(hr); - return nullptr; - } - - return dest.forget(); -} - -class AutoSurfaceLock -{ - public: - explicit AutoSurfaceLock(IDirect3DSurface9* aSurface, DWORD aFlags = 0) { - PodZero(&mRect); - - HRESULT hr = aSurface->LockRect(&mRect, nullptr, aFlags); - if (FAILED(hr)) { - gfxCriticalNote << "Failed to lock surface rect " << hexa(hr); - return; - } - mSurface = aSurface; - } - ~AutoSurfaceLock() { - if (mSurface) { - mSurface->UnlockRect(); - } - } - - bool Okay() const { - return !!mSurface; - } - int Pitch() const { - MOZ_ASSERT(Okay()); - return mRect.Pitch; - } - uint8_t* Bits() const { - MOZ_ASSERT(Okay()); - return reinterpret_cast(mRect.pBits); - } - - private: - RefPtr mSurface; - D3DLOCKED_RECT mRect; -}; - -void -CompositorD3D9::FinishMixBlend(const gfx::IntRect& aBackdropRect, - const gfx::Rect& aBackdropDest, - const gfx::Matrix4x4& aBackdropTransform, - RefPtr aBackdrop, - gfx::CompositionOp aBlendMode) -{ - HRESULT hr; - - RefPtr source = - CreateTexture(aBackdropRect, mCurrentRT, aBackdropRect.TopLeft()); - if (!source) { - return; - } - - // Slow path - do everything in software. Unfortunately this requires - // a lot of copying, since we have to readback the source and backdrop, - // then upload the blended result, then blit it back. - - IDirect3DDevice9* d3d9Device = device(); - - // Query geometry/format of the two surfaces. - D3DSURFACE_DESC backdropDesc, sourceDesc; - if (FAILED(aBackdrop->GetLevelDesc(0, &backdropDesc)) || - FAILED(source->GetLevelDesc(0, &sourceDesc))) - { - gfxCriticalNote << "Failed to query mix-blend texture descriptor"; - return; - } - - MOZ_ASSERT(backdropDesc.Format == D3DFMT_A8R8G8B8); - MOZ_ASSERT(sourceDesc.Format == D3DFMT_A8R8G8B8); - - // Acquire a temporary data surface for the backdrop texture. - RefPtr backdropSurface = GetSurfaceOfTexture(aBackdrop); - if (!backdropSurface) { - return; - } - RefPtr tmpBackdrop = - CreateDataSurfaceForTexture(d3d9Device, backdropSurface, backdropDesc); - if (!tmpBackdrop) { - return; - } - - // New scope for locks and temporary surfaces. - { - // Acquire a temporary data surface for the source texture. - RefPtr sourceSurface = GetSurfaceOfTexture(source); - if (!sourceSurface) { - return; - } - RefPtr tmpSource = - CreateDataSurfaceForTexture(d3d9Device, sourceSurface, sourceDesc); - if (!tmpSource) { - return; - } - - // Perform the readback and blend in software. - AutoSurfaceLock backdropLock(tmpBackdrop); - AutoSurfaceLock sourceLock(tmpSource, D3DLOCK_READONLY); - if (!backdropLock.Okay() || !sourceLock.Okay()) { - return; - } - - RefPtr source = Factory::CreateWrappingDataSourceSurface( - sourceLock.Bits(), sourceLock.Pitch(), - gfx::IntSize(sourceDesc.Width, sourceDesc.Height), - SurfaceFormat::B8G8R8A8); - - RefPtr dest = Factory::CreateDrawTargetForData( - BackendType::CAIRO, - backdropLock.Bits(), - gfx::IntSize(backdropDesc.Width, backdropDesc.Height), - backdropLock.Pitch(), - SurfaceFormat::B8G8R8A8); - - // The backdrop rect is rounded out - account for any difference between - // it and the actual destination. - gfx::Rect destRect( - aBackdropDest.x - aBackdropRect.x, - aBackdropDest.y - aBackdropRect.y, - aBackdropDest.width, - aBackdropDest.height); - - dest->DrawSurface( - source, destRect, destRect, - gfx::DrawSurfaceOptions(), - gfx::DrawOptions(1.0f, aBlendMode)); - } - - // Upload the new blended surface to the backdrop texture. - d3d9Device->UpdateSurface(tmpBackdrop, nullptr, backdropSurface, nullptr); - - // Finally, drop in the new backdrop. We don't need to do another - // DrawPrimitive() since the software blend will have included the - // final OP_OVER step for us. - RECT destRect = { - aBackdropRect.x, aBackdropRect.y, - aBackdropRect.XMost(), aBackdropRect.YMost() - }; - hr = d3d9Device->StretchRect(backdropSurface, - nullptr, - mCurrentRT->GetD3D9Surface(), - &destRect, - D3DTEXF_NONE); - if (FAILED(hr)) { - gfxCriticalNote << "StretcRect with mix-blend failed " << hexa(hr); - } -} - -} -} diff --git a/gfx/layers/d3d9/CompositorD3D9.h b/gfx/layers/d3d9/CompositorD3D9.h deleted file mode 100644 index 5562b85ecb99..000000000000 --- a/gfx/layers/d3d9/CompositorD3D9.h +++ /dev/null @@ -1,187 +0,0 @@ -/* -*- 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_COMPOSITORD3D9_H -#define MOZILLA_GFX_COMPOSITORD3D9_H - -#include "mozilla/gfx/2D.h" -#include "mozilla/gfx/Point.h" -#include "gfx2DGlue.h" -#include "mozilla/layers/Compositor.h" -#include "mozilla/layers/TextureD3D9.h" -#include "DeviceManagerD3D9.h" - -class nsWidget; - -namespace mozilla { -namespace layers { - -class CompositorD3D9 : public Compositor -{ -public: - CompositorD3D9(CompositorBridgeParent* aParent, widget::CompositorWidget* aWidget); - ~CompositorD3D9(); - - virtual CompositorD3D9* AsCompositorD3D9() override { return this; } - - virtual bool Initialize(nsCString* const out_failureReason) override; - - virtual TextureFactoryIdentifier - GetTextureFactoryIdentifier() override; - - virtual bool CanUseCanvasLayerForSize(const gfx::IntSize &aSize) override; - virtual int32_t GetMaxTextureSize() const final; - - virtual void MakeCurrent(MakeCurrentFlags aFlags = 0) override {} - - virtual already_AddRefed - CreateRenderTarget(const gfx::IntRect &aRect, - SurfaceInitMode aInit) override; - - virtual already_AddRefed - CreateRenderTargetFromSource(const gfx::IntRect &aRect, - const CompositingRenderTarget *aSource, - const gfx::IntPoint &aSourcePoint) override; - - virtual void SetRenderTarget(CompositingRenderTarget *aSurface) override; - virtual CompositingRenderTarget* GetCurrentRenderTarget() const override - { - return mCurrentRT; - } - - virtual void SetDestinationSurfaceSize(const gfx::IntSize& aSize) override {} - - virtual void ClearRect(const gfx::Rect& aRect) override; - - virtual void DrawQuad(const gfx::Rect &aRect, - const gfx::IntRect &aClipRect, - const EffectChain &aEffectChain, - gfx::Float aOpacity, - const gfx::Matrix4x4& aTransform, - const gfx::Rect& aVisibleRect) override; - - virtual void BeginFrame(const nsIntRegion& aInvalidRegion, - const gfx::IntRect *aClipRectIn, - const gfx::IntRect& aRenderBounds, - const nsIntRegion& aOpaqueRegion, - gfx::IntRect *aClipRectOut = nullptr, - gfx::IntRect *aRenderBoundsOut = nullptr) override; - - virtual void EndFrame() override; - - virtual void PrepareViewport(const gfx::IntSize& aSize); - - virtual bool SupportsPartialTextureUpdate() override{ return true; } - - virtual bool SupportsEffect(EffectTypes aEffect) override; - -#ifdef MOZ_DUMP_PAINTING - virtual const char* Name() const override { return "Direct3D9"; } -#endif - - virtual LayersBackend GetBackendType() const override { - return LayersBackend::LAYERS_D3D9; - } - - IDirect3DDevice9* device() const - { - // If the reset counts don't match it means the device was lost and we are - // in the process of recreating a new one or will be soon. - // cf. comment in EnsureSwapChain. - return mDeviceManager && mDeviceResetCount == mDeviceManager->GetDeviceResetCount() - ? mDeviceManager->device() - : nullptr; - } - - /** - * Returns true if the Compositor is ready to go. - * D3D9 devices can be awkward and there is a bunch of logic around - * resetting/recreating devices and swap chains. That is handled by this method. - * If we don't have a device and swap chain ready for rendering, we will return - * false and if necessary destroy the device and/or swap chain. We will also - * schedule another composite so we get another go at rendering, thus we shouldn't - * miss a composite due to re-creating a device. - */ - virtual bool Ready() override; - - /** - * Declare an offset to use when rendering layers. This will be ignored when - * rendering to a target instead of the screen. - */ - virtual void SetScreenRenderOffset(const ScreenPoint& aOffset) override - { - if (aOffset.x || aOffset.y) { - MOZ_CRASH("SetScreenRenderOffset not supported by CompositorD3D9."); - } - // If the offset is 0, 0 that's okay. - } - - virtual already_AddRefed - CreateDataTextureSource(TextureFlags aFlags = TextureFlags::NO_FLAGS) override; -private: - // ensure mSize is up to date with respect to mWidget - void EnsureSize(); - void SetSamplerForSamplingFilter(gfx::SamplingFilter aSamplingFilter); - void PaintToTarget(); - void SetMask(const EffectChain &aEffectChain, uint32_t aMaskTexture); - /** - * Ensure we have a swap chain and it is ready for rendering. - * Requires mDeviceManger to be non-null. - * Returns true if we have a working swap chain; false otherwise. - * If we cannot create or validate the swap chain due to a bad device manager, - * then the device will be destroyed and set mDeviceManager to null. We will - * schedule another composite if it is a good idea to try again or we need to - * recreate the device. - */ - bool EnsureSwapChain(); - - already_AddRefed - CreateTexture(const gfx::IntRect& aRect, - const CompositingRenderTarget* aSource, - const gfx::IntPoint& aSourcePoint); - - /** - * Complete a mix-blend step at the end of DrawQuad(). - */ - void FinishMixBlend(const gfx::IntRect& aBackdropRect, - const gfx::Rect& aBackdropDest, - const gfx::Matrix4x4& aBackdropTransform, - RefPtr aBackdrop, - gfx::CompositionOp aBlendMode); - - /** - * DeviceManagerD3D9 keeps a count of the number of times its device is - * reset or recreated. We keep a parallel count (mDeviceResetCount). It - * is possible that we miss a reset if it is 'caused' by another - * compositor (for another window). In which case we need to invalidate - * everything and render it all. This method checks the reset counts - * match and if not invalidates everything (a long comment on that in - * the cpp file). - */ - void CheckResetCount(); - - void FailedToResetDevice(); - - void ReportFailure(const nsACString &aMsg, HRESULT aCode); - - /* Device manager instance for this compositor */ - RefPtr mDeviceManager; - - /* Swap chain associated with this compositor */ - RefPtr mSwapChain; - - RefPtr mDefaultRT; - RefPtr mCurrentRT; - - LayoutDeviceIntSize mSize; - - uint32_t mDeviceResetCount; - uint32_t mFailedResetAttempts; -}; - -} -} - -#endif diff --git a/gfx/layers/d3d9/DeviceManagerD3D9.cpp b/gfx/layers/d3d9/DeviceManagerD3D9.cpp deleted file mode 100644 index 09778bc9c182..000000000000 --- a/gfx/layers/d3d9/DeviceManagerD3D9.cpp +++ /dev/null @@ -1,966 +0,0 @@ -/* -*- 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/. */ - -#include "DeviceManagerD3D9.h" -#include "LayerManagerD3D9Shaders.h" -#include "nsIServiceManager.h" -#include "nsIConsoleService.h" -#include "nsPrintfCString.h" -#include "Nv3DVUtils.h" -#include "plstr.h" -#include -#include "gfx2DGlue.h" -#include "gfxPlatform.h" -#include "gfxWindowsPlatform.h" -#include "TextureD3D9.h" -#include "mozilla/Mutex.h" -#include "mozilla/gfx/Point.h" -#include "mozilla/layers/CompositorThread.h" -#include "gfxPrefs.h" - -namespace mozilla { -namespace layers { - -using namespace mozilla::gfx; - -const LPCWSTR kClassName = L"D3D9WindowClass"; - -#define USE_D3D9EX - -struct vertex { - float x, y; -}; - -static StaticAutoPtr sDeviceManagerLock; -static StaticRefPtr sDeviceManager; - -/* static */ void -DeviceManagerD3D9::Init() -{ - MOZ_ASSERT(!sDeviceManagerLock); - sDeviceManagerLock = new Mutex("DeviceManagerD3D9.sDeviceManagerLock"); -} - -/* static */ void -DeviceManagerD3D9::Shutdown() -{ - sDeviceManagerLock = nullptr; - sDeviceManager = nullptr; -} - -SwapChainD3D9::SwapChainD3D9(DeviceManagerD3D9 *aDeviceManager) - : mDeviceManager(aDeviceManager) - , mWnd(0) -{ - mDeviceManager->mSwapChains.AppendElement(this); -} - -SwapChainD3D9::~SwapChainD3D9() -{ - mDeviceManager->mSwapChains.RemoveElement(this); -} - -bool -SwapChainD3D9::Init(HWND hWnd) -{ - RECT r; - ::GetClientRect(hWnd, &r); - - mWnd = hWnd; - - D3DPRESENT_PARAMETERS pp; - memset(&pp, 0, sizeof(D3DPRESENT_PARAMETERS)); - - pp.BackBufferFormat = D3DFMT_A8R8G8B8; - pp.SwapEffect = D3DSWAPEFFECT_COPY; - pp.Windowed = TRUE; - pp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; - pp.hDeviceWindow = mWnd; - if (r.left == r.right || r.top == r.bottom) { - pp.BackBufferHeight = 1; - pp.BackBufferWidth = 1; - } - - HRESULT hr = mDeviceManager->device()-> - CreateAdditionalSwapChain(&pp, - getter_AddRefs(mSwapChain)); - - if (FAILED(hr)) { - NS_WARNING("Failed to create swap chain for window."); - return false; - } - - return true; -} - -already_AddRefed -SwapChainD3D9::GetBackBuffer() -{ - RefPtr backBuffer; - mSwapChain->GetBackBuffer(0, - D3DBACKBUFFER_TYPE_MONO, - getter_AddRefs(backBuffer)); - return backBuffer.forget(); -} - -DeviceManagerState -SwapChainD3D9::PrepareForRendering() -{ - RECT r; - if (!::GetClientRect(mWnd, &r)) { - return DeviceFail; - } - - DeviceManagerState deviceState = mDeviceManager->VerifyReadyForRendering(); - if (deviceState != DeviceOK) { - return deviceState; - } - - if (!mSwapChain) { - Init(mWnd); - } - - if (mSwapChain) { - RefPtr backBuffer = GetBackBuffer(); - - D3DSURFACE_DESC desc; - backBuffer->GetDesc(&desc); - - if (desc.Width == r.right - r.left && desc.Height == r.bottom - r.top) { - mDeviceManager->device()->SetRenderTarget(0, backBuffer); - return DeviceOK; - } - - mSwapChain = nullptr; - - Init(mWnd); - - if (!mSwapChain) { - return DeviceFail; - } - - backBuffer = GetBackBuffer(); - mDeviceManager->device()->SetRenderTarget(0, backBuffer); - - return DeviceOK; - } - - return DeviceFail; -} - -void -SwapChainD3D9::Present(const gfx::IntRect &aRect) -{ - RECT r; - r.left = aRect.x; - r.top = aRect.y; - r.right = aRect.XMost(); - r.bottom = aRect.YMost(); - - mSwapChain->Present(&r, &r, 0, 0, 0); -} - -void -SwapChainD3D9::Present() -{ - mSwapChain->Present(nullptr, nullptr, 0, 0, 0); -} - -void -SwapChainD3D9::Reset() -{ - mSwapChain = nullptr; -} - -#define HAS_CAP(a, b) (((a) & (b)) == (b)) -#define LACKS_CAP(a, b) !(((a) & (b)) == (b)) - -uint32_t DeviceManagerD3D9::sMaskQuadRegister = 11; - -DeviceManagerD3D9::DeviceManagerD3D9() - : mTextureHostList(nullptr) - , mDeviceResetCount(0) - , mMaxTextureSize(0) - , mTextureAddressingMode(D3DTADDRESS_CLAMP) - , mHasComponentAlpha(true) - , mHasDynamicTextures(false) - , mDeviceWasRemoved(false) -{ -} - -DeviceManagerD3D9::~DeviceManagerD3D9() -{ - DestroyDevice(); -} - -/* static */ RefPtr -DeviceManagerD3D9::Get() -{ - MutexAutoLock lock(*sDeviceManagerLock); - - bool canCreate = - !gfxPlatform::UsesOffMainThreadCompositing() || - CompositorThreadHolder::IsInCompositorThread(); - if (!sDeviceManager && canCreate) { - sDeviceManager = new DeviceManagerD3D9(); - if (!sDeviceManager->Initialize()) { - gfxCriticalError() << "[D3D9] Could not Initialize the DeviceManagerD3D9"; - sDeviceManager = nullptr; - } - } - - return sDeviceManager; -} - -/* static */ RefPtr -DeviceManagerD3D9::GetDevice() -{ - MutexAutoLock lock(*sDeviceManagerLock); - return sDeviceManager ? sDeviceManager->device() : nullptr; -} - -/* static */ void -DeviceManagerD3D9::OnDeviceManagerDestroy(DeviceManagerD3D9* aDeviceManager) -{ - if (!sDeviceManagerLock) { - // If the device manager has shutdown, we don't care anymore. We can get - // here when the compositor shuts down asynchronously. - MOZ_ASSERT(!sDeviceManager); - return; - } - - MutexAutoLock lock(*sDeviceManagerLock); - if (aDeviceManager == sDeviceManager) { - sDeviceManager = nullptr; - } -} - -bool -DeviceManagerD3D9::Initialize() -{ - WNDCLASSW wc; - HRESULT hr; - - if (!GetClassInfoW(GetModuleHandle(nullptr), kClassName, &wc)) { - ZeroMemory(&wc, sizeof(WNDCLASSW)); - wc.hInstance = GetModuleHandle(nullptr); - wc.lpfnWndProc = ::DefWindowProc; - wc.lpszClassName = kClassName; - if (!RegisterClassW(&wc)) { - gfxCriticalError() << "[D3D9] Failed to register class for DeviceManager"; - return false; - } - } - - mFocusWnd = ::CreateWindowW(kClassName, L"D3D9Window", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, - nullptr, GetModuleHandle(nullptr), nullptr); - - if (!mFocusWnd) { - gfxCriticalError() << "[D3D9] Failed to create a window"; - return false; - } - - if (gfxPrefs::StereoVideoEnabled()) { - /* Create an Nv3DVUtils instance */ - if (!mNv3DVUtils) { - mNv3DVUtils = new Nv3DVUtils(); - if (!mNv3DVUtils) { - NS_WARNING("Could not create a new instance of Nv3DVUtils."); - } - } - - /* Initialize the Nv3DVUtils object */ - if (mNv3DVUtils) { - mNv3DVUtils->Initialize(); - } - } - - HMODULE d3d9 = LoadLibraryW(L"d3d9.dll"); - decltype(Direct3DCreate9)* d3d9Create = (decltype(Direct3DCreate9)*) - GetProcAddress(d3d9, "Direct3DCreate9"); - decltype(Direct3DCreate9Ex)* d3d9CreateEx = (decltype(Direct3DCreate9Ex)*) - GetProcAddress(d3d9, "Direct3DCreate9Ex"); - -#ifdef USE_D3D9EX - if (d3d9CreateEx) { - hr = d3d9CreateEx(D3D_SDK_VERSION, getter_AddRefs(mD3D9Ex)); - if (SUCCEEDED(hr)) { - mD3D9 = mD3D9Ex; - } - } -#endif - - if (!mD3D9) { - if (!d3d9Create) { - gfxCriticalError() << "[D3D9] Failed to load symbols"; - return false; - } - - mD3D9 = dont_AddRef(d3d9Create(D3D_SDK_VERSION)); - - if (!mD3D9) { - gfxCriticalError() << "[D3D9] Failed to create the IDirect3D9 object"; - return false; - } - } - - D3DADAPTER_IDENTIFIER9 ident; - hr = mD3D9->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &ident); - - if (FAILED(hr)) { - gfxCriticalError() << "[D3D9] Failed to create the environment code: " << gfx::hexa(hr); - return false; - } - - D3DPRESENT_PARAMETERS pp; - memset(&pp, 0, sizeof(D3DPRESENT_PARAMETERS)); - - pp.BackBufferWidth = 1; - pp.BackBufferHeight = 1; - pp.BackBufferFormat = D3DFMT_A8R8G8B8; - pp.SwapEffect = D3DSWAPEFFECT_DISCARD; - pp.Windowed = TRUE; - pp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT; - pp.hDeviceWindow = mFocusWnd; - - if (mD3D9Ex) { - hr = mD3D9Ex->CreateDeviceEx(D3DADAPTER_DEFAULT, - D3DDEVTYPE_HAL, - mFocusWnd, - D3DCREATE_FPU_PRESERVE | - D3DCREATE_MULTITHREADED | - D3DCREATE_MIXED_VERTEXPROCESSING, - &pp, - nullptr, - getter_AddRefs(mDeviceEx)); - if (SUCCEEDED(hr)) { - mDevice = mDeviceEx; - } - - D3DCAPS9 caps; - if (mDeviceEx && mDeviceEx->GetDeviceCaps(&caps)) { - if (LACKS_CAP(caps.Caps2, D3DCAPS2_DYNAMICTEXTURES)) { - // XXX - Should we actually hit this we'll need a CanvasLayer that - // supports static D3DPOOL_DEFAULT textures. - NS_WARNING("D3D9Ex device not used because of lack of support for \ - dynamic textures. This is unexpected."); - mDevice = nullptr; - mDeviceEx = nullptr; - } - } - } - - if (!mDevice) { - hr = mD3D9->CreateDevice(D3DADAPTER_DEFAULT, - D3DDEVTYPE_HAL, - mFocusWnd, - D3DCREATE_FPU_PRESERVE | - D3DCREATE_MULTITHREADED | - D3DCREATE_MIXED_VERTEXPROCESSING, - &pp, - getter_AddRefs(mDevice)); - - if (FAILED(hr) || !mDevice) { - gfxCriticalError() << "[D3D9] Failed to create the device, code: " << hexa(hr); - return false; - } - } - - if (!VerifyCaps()) { - gfxCriticalError() << "[D3D9] insufficient capabilities"; - return false; - } - - /* Grab the associated HMONITOR so that we can find out - * if it changed later */ - D3DDEVICE_CREATION_PARAMETERS parameters; - if (FAILED(mDevice->GetCreationParameters(¶meters))) - return false; - mDeviceMonitor = mD3D9->GetAdapterMonitor(parameters.AdapterOrdinal); - - - /* - * Do some post device creation setup - */ - if (mNv3DVUtils) { - IUnknown* devUnknown = nullptr; - if (mDevice) { - mDevice->QueryInterface(IID_IUnknown, (void **)&devUnknown); - } - mNv3DVUtils->SetDeviceInfo(devUnknown); - } - - auto failCreateShaderMsg = "[D3D9] failed to create a critical resource (shader) code"; - - hr = mDevice->CreateVertexShader((DWORD*)LayerQuadVS, - getter_AddRefs(mLayerVS)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "LayerQuadVS: " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)RGBShaderPS, - getter_AddRefs(mRGBPS)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "RGBShaderPS: " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)RGBAShaderPS, - getter_AddRefs(mRGBAPS)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "RGBAShaderPS: " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)ComponentPass1ShaderPS, - getter_AddRefs(mComponentPass1PS)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "ComponentPass1ShaderPS: " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)ComponentPass2ShaderPS, - getter_AddRefs(mComponentPass2PS)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "ComponentPass2ShaderPS: " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)YCbCrShaderPS, - getter_AddRefs(mYCbCrPS)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "YCbCrShaderPS: " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)SolidColorShaderPS, - getter_AddRefs(mSolidColorPS)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "SolidColorShaderPS" << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreateVertexShader((DWORD*)LayerQuadVSMask, - getter_AddRefs(mLayerVSMask)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "LayerQuadVSMask: " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)RGBShaderPSMask, - getter_AddRefs(mRGBPSMask)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "RGBShaderPSMask " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)RGBAShaderPSMask, - getter_AddRefs(mRGBAPSMask)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "RGBAShaderPSMask: " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)ComponentPass1ShaderPSMask, - getter_AddRefs(mComponentPass1PSMask)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "ComponentPass1ShaderPSMask: " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)ComponentPass2ShaderPSMask, - getter_AddRefs(mComponentPass2PSMask)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "ComponentPass2ShaderPSMask: "; - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)YCbCrShaderPSMask, - getter_AddRefs(mYCbCrPSMask)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "YCbCrShaderPSMask: " << gfx::hexa(hr); - return false; - } - - hr = mDevice->CreatePixelShader((DWORD*)SolidColorShaderPSMask, - getter_AddRefs(mSolidColorPSMask)); - - if (FAILED(hr)) { - gfxCriticalError() << failCreateShaderMsg << "SolidColorShaderPSMask: " << gfx::hexa(hr); - return false; - } - - if (!CreateVertexBuffer()) { - gfxCriticalError() << "[D3D9] Failed to create a critical resource (vbo)"; - return false; - } - - hr = mDevice->SetStreamSource(0, mVB, 0, sizeof(vertex)); - if (FAILED(hr)) { - gfxCriticalError() << "[D3D9] Failed to set the stream source code: " << gfx::hexa(hr); - return false; - } - - D3DVERTEXELEMENT9 elements[] = { - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, - D3DDECLUSAGE_POSITION, 0 }, - D3DDECL_END() - }; - - mDevice->CreateVertexDeclaration(elements, getter_AddRefs(mVD)); - - nsCOMPtr - console(do_GetService(NS_CONSOLESERVICE_CONTRACTID)); - - D3DADAPTER_IDENTIFIER9 identifier; - mD3D9->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &identifier); - - if (console) { - nsString msg; - msg += - NS_LITERAL_STRING("Direct3D 9 DeviceManager Initialized Successfully.\nDriver: "); - msg += NS_ConvertUTF8toUTF16( - nsDependentCString((const char*)identifier.Driver)); - msg += NS_LITERAL_STRING("\nDescription: "); - msg += NS_ConvertUTF8toUTF16( - nsDependentCString((const char*)identifier.Description)); - msg += NS_LITERAL_STRING("\nVersion: "); - msg += NS_ConvertUTF8toUTF16( - nsPrintfCString("%d.%d.%d.%d", - HIWORD(identifier.DriverVersion.HighPart), - LOWORD(identifier.DriverVersion.HighPart), - HIWORD(identifier.DriverVersion.LowPart), - LOWORD(identifier.DriverVersion.LowPart))); - console->LogStringMessage(msg.get()); - } - - return true; -} - -void -DeviceManagerD3D9::SetupRenderState() -{ - mDevice->SetStreamSource(0, mVB, 0, sizeof(vertex)); - mDevice->SetVertexDeclaration(mVD); - mDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); - mDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); - mDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD); - mDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); - mDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); - mDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE); - mDevice->SetRenderState(D3DRS_SRCBLENDALPHA, D3DBLEND_ONE); - mDevice->SetRenderState(D3DRS_DESTBLENDALPHA, D3DBLEND_INVSRCALPHA); - mDevice->SetRenderState(D3DRS_BLENDOPALPHA, D3DBLENDOP_ADD); - mDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); - mDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); - mDevice->SetSamplerState(1, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); - mDevice->SetSamplerState(1, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); - mDevice->SetSamplerState(2, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); - mDevice->SetSamplerState(2, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); - mDevice->SetSamplerState(0, D3DSAMP_ADDRESSU, mTextureAddressingMode); - mDevice->SetSamplerState(0, D3DSAMP_ADDRESSV, mTextureAddressingMode); - mDevice->SetSamplerState(1, D3DSAMP_ADDRESSU, mTextureAddressingMode); - mDevice->SetSamplerState(1, D3DSAMP_ADDRESSV, mTextureAddressingMode); - mDevice->SetSamplerState(2, D3DSAMP_ADDRESSU, mTextureAddressingMode); - mDevice->SetSamplerState(2, D3DSAMP_ADDRESSV, mTextureAddressingMode); -} - -already_AddRefed -DeviceManagerD3D9::CreateSwapChain(HWND hWnd) -{ - RefPtr swapChain = new SwapChainD3D9(this); - - // See bug 604647. This line means that if we create a window while the - // device is lost LayerManager initialization will fail, this window - // will be permanently unaccelerated. This should be a rare situation - // though and the need for a low-risk fix for this bug outweighs the - // downside. - if (VerifyReadyForRendering() != DeviceOK) { - return nullptr; - } - - if (!swapChain->Init(hWnd)) { - return nullptr; - } - - return swapChain.forget(); -} - -uint32_t -DeviceManagerD3D9::SetShaderMode(ShaderMode aMode, MaskType aMaskType) -{ - if (aMaskType == MaskType::MaskNone) { - switch (aMode) { - case RGBLAYER: - mDevice->SetVertexShader(mLayerVS); - mDevice->SetPixelShader(mRGBPS); - break; - case RGBALAYER: - mDevice->SetVertexShader(mLayerVS); - mDevice->SetPixelShader(mRGBAPS); - break; - case COMPONENTLAYERPASS1: - mDevice->SetVertexShader(mLayerVS); - mDevice->SetPixelShader(mComponentPass1PS); - break; - case COMPONENTLAYERPASS2: - mDevice->SetVertexShader(mLayerVS); - mDevice->SetPixelShader(mComponentPass2PS); - break; - case YCBCRLAYER: - mDevice->SetVertexShader(mLayerVS); - mDevice->SetPixelShader(mYCbCrPS); - break; - case SOLIDCOLORLAYER: - mDevice->SetVertexShader(mLayerVS); - mDevice->SetPixelShader(mSolidColorPS); - break; - } - return 0; - } - - uint32_t maskTexRegister; - switch (aMode) { - case RGBLAYER: - mDevice->SetVertexShader(mLayerVSMask); - mDevice->SetPixelShader(mRGBPSMask); - maskTexRegister = 1; - break; - case RGBALAYER: - mDevice->SetVertexShader(mLayerVSMask); - mDevice->SetPixelShader(mRGBAPSMask); - maskTexRegister = 1; - break; - case COMPONENTLAYERPASS1: - mDevice->SetVertexShader(mLayerVSMask); - mDevice->SetPixelShader(mComponentPass1PSMask); - maskTexRegister = 2; - break; - case COMPONENTLAYERPASS2: - mDevice->SetVertexShader(mLayerVSMask); - mDevice->SetPixelShader(mComponentPass2PSMask); - maskTexRegister = 2; - break; - case YCBCRLAYER: - mDevice->SetVertexShader(mLayerVSMask); - mDevice->SetPixelShader(mYCbCrPSMask); - maskTexRegister = 3; - break; - case SOLIDCOLORLAYER: - mDevice->SetVertexShader(mLayerVSMask); - mDevice->SetPixelShader(mSolidColorPSMask); - maskTexRegister = 0; - break; - } - return maskTexRegister; -} - -void -DeviceManagerD3D9::DestroyDevice() -{ - ++mDeviceResetCount; - mDeviceWasRemoved = true; - if (!IsD3D9Ex()) { - ReleaseTextureResources(); - } - DeviceManagerD3D9::OnDeviceManagerDestroy(this); -} - -DeviceManagerState -DeviceManagerD3D9::VerifyReadyForRendering() -{ - if (mDeviceWasRemoved) { - return DeviceMustRecreate; - } - - HRESULT hr = mDevice->TestCooperativeLevel(); - - if (SUCCEEDED(hr)) { - if (IsD3D9Ex()) { - hr = mDeviceEx->CheckDeviceState(mFocusWnd); - - if (FAILED(hr)) { - DestroyDevice(); - return DeviceMustRecreate; - } - } - return DeviceOK; - } - - ReleaseTextureResources(); - for (unsigned int i = 0; i < mSwapChains.Length(); i++) { - mSwapChains[i]->Reset(); - } - - mVB = nullptr; - - D3DPRESENT_PARAMETERS pp; - memset(&pp, 0, sizeof(D3DPRESENT_PARAMETERS)); - - pp.BackBufferWidth = 1; - pp.BackBufferHeight = 1; - pp.BackBufferFormat = D3DFMT_A8R8G8B8; - pp.SwapEffect = D3DSWAPEFFECT_DISCARD; - pp.Windowed = TRUE; - pp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT; - pp.hDeviceWindow = mFocusWnd; - - // Whatever happens from now on, either we reset the device, or we should - // pretend we reset the device so that the layer manager or compositor - // doesn't ignore it. - ++mDeviceResetCount; - - // if we got this far, we know !SUCCEEDEED(hr), that means hr is one of - // D3DERR_DEVICELOST, D3DERR_DEVICENOTRESET, D3DERR_DRIVERINTERNALERROR. - // It is only worth resetting if we get D3DERR_DEVICENOTRESET. If we get - // D3DERR_DEVICELOST we can wait and see if we get D3DERR_DEVICENOTRESET - // later, then reset. - if (hr == D3DERR_DEVICELOST) { - HMONITOR hMonitorWindow; - hMonitorWindow = MonitorFromWindow(mFocusWnd, MONITOR_DEFAULTTOPRIMARY); - if (hMonitorWindow != mDeviceMonitor) { - /* jrmuizel: I'm not sure how to trigger this case. Usually, we get - * DEVICENOTRESET right away and Reset() succeeds without going through a - * set of DEVICELOSTs. This is presumeably because we don't call - * VerifyReadyForRendering when we don't have any reason to paint. - * Hopefully comparing HMONITORs is not overly aggressive. - * See bug 626678. - */ - /* The monitor has changed. We have to assume that the - * DEVICENOTRESET will not be coming. */ - DestroyDevice(); - return DeviceMustRecreate; - } - return DeviceFail; - } - if (hr == D3DERR_DEVICENOTRESET) { - hr = mDevice->Reset(&pp); - } - - if (FAILED(hr) || !CreateVertexBuffer()) { - DestroyDevice(); - return DeviceMustRecreate; - } - - return DeviceOK; -} - -bool -DeviceManagerD3D9::VerifyCaps() -{ - D3DCAPS9 caps; - HRESULT hr = mDevice->GetDeviceCaps(&caps); - - if (FAILED(hr)) { - return false; - } - - if (LACKS_CAP(caps.DevCaps, D3DDEVCAPS_TEXTUREVIDEOMEMORY)) { - return false; - } - - if (LACKS_CAP(caps.PrimitiveMiscCaps, D3DPMISCCAPS_CULLNONE)) { - return false; - } - - if (LACKS_CAP(caps.SrcBlendCaps, D3DPBLENDCAPS_ONE) || - LACKS_CAP(caps.SrcBlendCaps, D3DBLEND_SRCALPHA) || - LACKS_CAP(caps.DestBlendCaps, D3DPBLENDCAPS_INVSRCALPHA)) { - return false; - } - - if (LACKS_CAP(caps.RasterCaps, D3DPRASTERCAPS_SCISSORTEST)) { - return false; - } - - if (LACKS_CAP(caps.TextureCaps, D3DPTEXTURECAPS_ALPHA) || - HAS_CAP(caps.TextureCaps, D3DPTEXTURECAPS_SQUAREONLY) || - (HAS_CAP(caps.TextureCaps, D3DPTEXTURECAPS_POW2) && - LACKS_CAP(caps.TextureCaps, D3DPTEXTURECAPS_NONPOW2CONDITIONAL))) { - return false; - } - - if (LACKS_CAP(caps.TextureFilterCaps, D3DPTFILTERCAPS_MAGFLINEAR) || - LACKS_CAP(caps.TextureFilterCaps, D3DPTFILTERCAPS_MINFLINEAR)) { - return false; - } - - if (LACKS_CAP(caps.TextureAddressCaps, D3DPTADDRESSCAPS_CLAMP)) { - return false; - } - - if (caps.MaxTextureHeight < 4096 || - caps.MaxTextureWidth < 4096) { - return false; - } - mMaxTextureSize = std::min(caps.MaxTextureHeight, caps.MaxTextureWidth); - - if ((caps.PixelShaderVersion & 0xffff) < 0x200 || - (caps.VertexShaderVersion & 0xffff) < 0x200) { - return false; - } - - if (HAS_CAP(caps.Caps2, D3DCAPS2_DYNAMICTEXTURES)) { - mHasDynamicTextures = true; - } - - if (HAS_CAP(caps.TextureAddressCaps, D3DPTADDRESSCAPS_WRAP) && - LACKS_CAP(caps.TextureCaps, D3DPTEXTURECAPS_NONPOW2CONDITIONAL)) { - mTextureAddressingMode = D3DTADDRESS_WRAP; - } else { - gfxPlatform::DisableBufferRotation(); - } - - if (LACKS_CAP(caps.DestBlendCaps, D3DPBLENDCAPS_INVSRCCOLOR)) { - mHasComponentAlpha = false; - } - - return true; -} - -bool -DeviceManagerD3D9::CreateVertexBuffer() -{ - HRESULT hr; - - hr = mDevice->CreateVertexBuffer(sizeof(vertex) * 4, - D3DUSAGE_WRITEONLY, - 0, - D3DPOOL_DEFAULT, - getter_AddRefs(mVB), - nullptr); - - if (FAILED(hr)) { - return false; - } - - vertex *vertices; - hr = mVB->Lock(0, 0, (void**)&vertices, 0); - if (FAILED(hr)) { - return false; - } - - vertices[0].x = vertices[0].y = 0; - vertices[1].x = 1; vertices[1].y = 0; - vertices[2].x = 0; vertices[2].y = 1; - vertices[3].x = 1; vertices[3].y = 1; - - mVB->Unlock(); - - return true; -} - -already_AddRefed -DeviceManagerD3D9::CreateTexture(const IntSize &aSize, - _D3DFORMAT aFormat, - D3DPOOL aPool, - TextureSourceD3D9* aTextureHost) -{ - if (mDeviceWasRemoved) { - return nullptr; - } - RefPtr result; - if (FAILED(device()->CreateTexture(aSize.width, aSize.height, - 1, 0, aFormat, aPool, - getter_AddRefs(result), nullptr))) { - return nullptr; - } - - NS_ASSERTION(aPool != D3DPOOL_MANAGED, - "Should not be using MANAGED texture pool. We will get an error when we have to recreate the device"); - if (aPool == D3DPOOL_DEFAULT) { - MOZ_ASSERT(aTextureHost, "We need a texture host to track so we can release the texture."); - RegisterTextureHost(aTextureHost); - } - - return result.forget(); -} - -#ifdef DEBUG -bool -DeviceManagerD3D9::IsInTextureHostList(TextureSourceD3D9* aFind) -{ - TextureSourceD3D9* cur = mTextureHostList; - while(cur) { - if (cur == aFind) { - return true; - } - cur = cur->mNextHost; - } - - return false; -} -#endif - -void -DeviceManagerD3D9::RegisterTextureHost(TextureSourceD3D9* aHost) -{ - if (!aHost) { - return; - } - - // Don't add aHost to the list twice. - if (aHost->mPreviousHost || - mTextureHostList == aHost) { - MOZ_ASSERT(IsInTextureHostList(aHost)); - return; - } - - MOZ_ASSERT(!aHost->mNextHost); - MOZ_ASSERT(!IsInTextureHostList(aHost)); - - if (mTextureHostList) { - MOZ_ASSERT(!mTextureHostList->mPreviousHost); - mTextureHostList->mPreviousHost = aHost; - aHost->mNextHost = mTextureHostList; - } - mTextureHostList = aHost; - MOZ_ASSERT(!aHost->mCreatingDeviceManager, "Already created texture?"); - MOZ_ASSERT(IsInTextureHostList(aHost)); - aHost->mCreatingDeviceManager = this; -} - -void -DeviceManagerD3D9::ReleaseTextureResources() -{ - TextureSourceD3D9* host = mTextureHostList; - while (host) { - host->ReleaseTextureResources(); - TextureSourceD3D9* oldHost = host; - host = oldHost->mNextHost; - oldHost->mPreviousHost = nullptr; - oldHost->mNextHost = nullptr; - oldHost->mCreatingDeviceManager = nullptr; - } - mTextureHostList = nullptr; -} - -void -DeviceManagerD3D9::RemoveTextureListHead(TextureSourceD3D9* aHost) -{ - MOZ_ASSERT(!aHost->mCreatingDeviceManager || aHost->mCreatingDeviceManager == this, - "Wrong device manager"); - MOZ_ASSERT(aHost && mTextureHostList == aHost, - "aHost is not the head of the texture host list"); - mTextureHostList = aHost->mNextHost; -} - -} /* namespace layers */ -} /* namespace mozilla */ diff --git a/gfx/layers/d3d9/DeviceManagerD3D9.h b/gfx/layers/d3d9/DeviceManagerD3D9.h deleted file mode 100644 index 3a4f91d5d850..000000000000 --- a/gfx/layers/d3d9/DeviceManagerD3D9.h +++ /dev/null @@ -1,353 +0,0 @@ -/* -*- 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/. */ - -#ifndef GFX_DEVICEMANAGERD3D9_H -#define GFX_DEVICEMANAGERD3D9_H - -#include "gfxTypes.h" -#include "nsAutoPtr.h" -#include "d3d9.h" -#include "nsTArray.h" -#include "mozilla/layers/CompositorTypes.h" -#include "mozilla/RefPtr.h" -#include "mozilla/gfx/Rect.h" - -namespace mozilla { -namespace layers { - -class DeviceManagerD3D9; -class Nv3DVUtils; -class Layer; -class TextureSourceD3D9; - -// Shader Constant locations -const int CBmLayerTransform = 0; -const int CBmProjection = 4; -const int CBvRenderTargetOffset = 8; -const int CBvTextureCoords = 9; -const int CBvLayerQuad = 10; -// we don't use opacity with solid color shaders -const int CBfLayerOpacity = 0; -const int CBvColor = 0; -const int CBmYuvColorMatrix = 1; - -enum DeviceManagerState { - // The device and swap chain are OK. - DeviceOK, - // The device or swap chain are in a bad state, and we should not render. - DeviceFail, - // The device is lost and cannot be reset, the user should forget the - // current device manager and create a new one. - DeviceMustRecreate, -}; - - -/** - * This structure is used to pass rectangles to our shader constant. We can use - * this for passing rectangular areas to SetVertexShaderConstant. In the format - * of a 4 component float(x,y,width,height). Our vertex shader can then use - * this to construct rectangular positions from the 0,0-1,1 quad that we source - * it with. - */ -struct ShaderConstantRect -{ - float mX, mY, mWidth, mHeight; - - // Provide all the commonly used argument types to prevent all the local - // casts in the code. - ShaderConstantRect(float aX, float aY, float aWidth, float aHeight) - : mX(aX), mY(aY), mWidth(aWidth), mHeight(aHeight) - { } - - ShaderConstantRect(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight) - : mX((float)aX), mY((float)aY) - , mWidth((float)aWidth), mHeight((float)aHeight) - { } - - ShaderConstantRect(int32_t aX, int32_t aY, float aWidth, float aHeight) - : mX((float)aX), mY((float)aY), mWidth(aWidth), mHeight(aHeight) - { } - - // For easy passing to SetVertexShaderConstantF. - operator float* () { return &mX; } -}; - -/** - * SwapChain class, this class manages the swap chain belonging to a - * LayerManagerD3D9. - */ -class SwapChainD3D9 final -{ - NS_INLINE_DECL_REFCOUNTING(SwapChainD3D9) -public: - - /** - * This function will prepare the device this swap chain belongs to for - * rendering to this swap chain. Only after calling this function can the - * swap chain be drawn to, and only until this function is called on another - * swap chain belonging to this device will the device draw to it. Passed in - * is the size of the swap chain. If the window size differs from the size - * during the last call to this function the swap chain will resize. Note that - * in no case does this function guarantee the backbuffer to still have its - * old content. - */ - DeviceManagerState PrepareForRendering(); - - already_AddRefed GetBackBuffer(); - - /** - * This function will present the selected rectangle of the swap chain to - * its associated window. - */ - void Present(const gfx::IntRect &aRect); - void Present(); - -private: - friend class DeviceManagerD3D9; - - explicit SwapChainD3D9(DeviceManagerD3D9 *aDeviceManager); - - // Private destructor, to discourage deletion outside of Release(): - ~SwapChainD3D9(); - - bool Init(HWND hWnd); - - /** - * This causes us to release our swap chain, clearing out our resource usage - * so the master device may reset. - */ - void Reset(); - - RefPtr mSwapChain; - RefPtr mDeviceManager; - HWND mWnd; -}; - -/** - * Device manager, this class is used by the layer managers to share the D3D9 - * device and create swap chains for the individual windows the layer managers - * belong to. - */ -class DeviceManagerD3D9 final -{ -public: - NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DeviceManagerD3D9) - - /** - * Setup or tear down static resources needed for D3D9. - */ - static void Init(); - static void Shutdown(); - - /** - * Static accessors and helpers for accessing the global DeviceManagerD3D9 - * instance. - */ - static RefPtr Get(); - static RefPtr GetDevice(); - static void OnDeviceManagerDestroy(DeviceManagerD3D9* aDeviceManager); - - /** - * Sets up the render state for the device for layer rendering. - */ - void SetupRenderState(); - - /** - * Create a swap chain setup to work with the specified window. - */ - already_AddRefed CreateSwapChain(HWND hWnd); - - IDirect3DDevice9 *device() { return mDevice; } - - bool IsD3D9Ex() { return mDeviceEx; } - - bool HasComponentAlpha() { return mHasComponentAlpha; } - - bool HasDynamicTextures() { return mHasDynamicTextures; } - - enum ShaderMode { - RGBLAYER, - RGBALAYER, - COMPONENTLAYERPASS1, - COMPONENTLAYERPASS2, - YCBCRLAYER, - SOLIDCOLORLAYER - }; - - // returns the register to be used for the mask texture, if appropriate - uint32_t SetShaderMode(ShaderMode aMode, MaskType aMaskType); - - /** - * Return pointer to the Nv3DVUtils instance - */ - Nv3DVUtils *GetNv3DVUtils() { return mNv3DVUtils; } - - /** - * Returns true if this device was removed. - */ - bool DeviceWasRemoved() { return mDeviceWasRemoved; } - - uint32_t GetDeviceResetCount() { return mDeviceResetCount; } - - int32_t GetMaxTextureSize() { return mMaxTextureSize; } - - // Removes aHost from our list of texture hosts if it is the head. - void RemoveTextureListHead(TextureSourceD3D9* aHost); - - /** - * Creates a texture using our device. - * If needed, we keep a record of the new texture, so the texture can be - * released. In this case, aTextureHostIDirect3DTexture9 must be non-null. - */ - already_AddRefed CreateTexture(const gfx::IntSize &aSize, - _D3DFORMAT aFormat, - D3DPOOL aPool, - TextureSourceD3D9* aTextureHostIDirect3DTexture9); -#ifdef DEBUG - // Looks for aFind in the list of texture hosts. - // O(n) so only use for assertions. - bool IsInTextureHostList(TextureSourceD3D9* aFind); -#endif - - /** - * This function verifies the device is ready for rendering, internally this - * will test the cooperative level of the device and reset the device if - * needed. If this returns false subsequent rendering calls may return errors. - */ - DeviceManagerState VerifyReadyForRendering(); - - static uint32_t sMaskQuadRegister; - -private: - friend class SwapChainD3D9; - - DeviceManagerD3D9(); - ~DeviceManagerD3D9(); - - /** - * Initialises the device manager, the underlying device, and everything else - * the manager needs. - * Returns true if initialisation succeeds, false otherwise. - * Note that if initisalisation fails, you cannot try again - you must throw - * away the DeviceManagerD3D9 and create a new one. - */ - bool Initialize(); - - void DestroyDevice(); - - /** - * This will fill our vertex buffer with the data of our quad, it may be - * called when the vertex buffer is recreated. - */ - bool CreateVertexBuffer(); - - /** - * Release all textures created by this device manager. - */ - void ReleaseTextureResources(); - /** - * Add aHost to our list of texture hosts. - */ - void RegisterTextureHost(TextureSourceD3D9* aHost); - - /* Array used to store all swap chains for device resets */ - nsTArray mSwapChains; - - /* The D3D device we use */ - RefPtr mDevice; - - /* The D3D9Ex device - only valid on Vista+ with WDDM */ - RefPtr mDeviceEx; - - /* An instance of the D3D9 object */ - RefPtr mD3D9; - - /* An instance of the D3D9Ex object - only valid on Vista+ with WDDM */ - RefPtr mD3D9Ex; - - /* Vertex shader used for layer quads */ - RefPtr mLayerVS; - - /* Pixel shader used for RGB textures */ - RefPtr mRGBPS; - - /* Pixel shader used for RGBA textures */ - RefPtr mRGBAPS; - - /* Pixel shader used for component alpha textures (pass 1) */ - RefPtr mComponentPass1PS; - - /* Pixel shader used for component alpha textures (pass 2) */ - RefPtr mComponentPass2PS; - - /* Pixel shader used for RGB textures */ - RefPtr mYCbCrPS; - - /* Pixel shader used for solid colors */ - RefPtr mSolidColorPS; - - /* As above, but using a mask layer */ - RefPtr mLayerVSMask; - RefPtr mRGBPSMask; - RefPtr mRGBAPSMask; - RefPtr mComponentPass1PSMask; - RefPtr mComponentPass2PSMask; - RefPtr mYCbCrPSMask; - RefPtr mSolidColorPSMask; - - /* Vertex buffer containing our basic vertex structure */ - RefPtr mVB; - - /* Our vertex declaration */ - RefPtr mVD; - - /* We maintain a doubly linked list of all d3d9 texture hosts which host - * d3d9 textures created by this device manager. - * Texture hosts must remove themselves when they disappear (i.e., we - * expect all hosts in the list to be valid). - * The list is cleared when we release the textures. - */ - TextureSourceD3D9* mTextureHostList; - - /* Our focus window - this is really a dummy window we can associate our - * device with. - */ - HWND mFocusWnd; - - /* we use this to help track if our device temporarily or permanently lost */ - HMONITOR mDeviceMonitor; - - uint32_t mDeviceResetCount; - - uint32_t mMaxTextureSize; - - /** - * Wrap (repeat) or clamp textures. We prefer the former so we can do buffer - * rotation, but some older hardware doesn't support it. - */ - D3DTEXTUREADDRESS mTextureAddressingMode; - - /* If this device supports component alpha */ - bool mHasComponentAlpha; - - /* If this device supports dynamic textures */ - bool mHasDynamicTextures; - - /* If this device was removed */ - bool mDeviceWasRemoved; - - /* Nv3DVUtils instance */ - nsAutoPtr mNv3DVUtils; - - /** - * Verifies all required device capabilities are present. - */ - bool VerifyCaps(); -}; - -} /* namespace layers */ -} /* namespace mozilla */ - -#endif /* GFX_DEVICEMANAGERD3D9_H */ diff --git a/gfx/layers/d3d9/LayerManagerD3D9Shaders.h b/gfx/layers/d3d9/LayerManagerD3D9Shaders.h deleted file mode 100755 index 537405071e88..000000000000 --- a/gfx/layers/d3d9/LayerManagerD3D9Shaders.h +++ /dev/null @@ -1,1631 +0,0 @@ -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float4x4 mLayerTransform; -// float4x4 mProjection; -// float4 vLayerQuad; -// float4 vRenderTargetOffset; -// float4 vTextureCoords; -// -// -// Registers: -// -// Name Reg Size -// ------------------- ----- ---- -// mLayerTransform c0 4 -// mProjection c4 4 -// vRenderTargetOffset c8 1 -// vTextureCoords c9 1 -// vLayerQuad c10 1 -// - - vs_2_0 - def c11, -0.5, 0, 0, 0 - dcl_position v0 - mad r0.xy, v0, c10.zwzw, c10 - mul r1, r0.y, c1 - mad r0, c0, r0.x, r1 - mad r0, c2, v0.z, r0 - mad r0, c3, v0.w, r0 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c8 - mad r0.xy, r0, r0.w, c11.x - mul r1, r0.y, c5 - mad r1, c4, r0.x, r1 - mul r0.x, r0.w, r0.z - mad r1, c6, r0.x, r1 - mad oPos, c7, r0.w, r1 - mad oT0.xy, v0, c9.zwzw, c9 - -// approximately 15 instruction slots used -#endif - -const BYTE LayerQuadVS[] = -{ - 0, 2, 254, 255, 254, 255, - 76, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 2, 1, - 0, 0, 0, 2, 254, 255, - 5, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 251, 0, 0, 0, 128, 0, - 0, 0, 2, 0, 0, 0, - 4, 0, 0, 0, 144, 0, - 0, 0, 0, 0, 0, 0, - 160, 0, 0, 0, 2, 0, - 4, 0, 4, 0, 0, 0, - 144, 0, 0, 0, 0, 0, - 0, 0, 172, 0, 0, 0, - 2, 0, 10, 0, 1, 0, - 0, 0, 184, 0, 0, 0, - 0, 0, 0, 0, 200, 0, - 0, 0, 2, 0, 8, 0, - 1, 0, 0, 0, 220, 0, - 0, 0, 0, 0, 0, 0, - 236, 0, 0, 0, 2, 0, - 9, 0, 1, 0, 0, 0, - 184, 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, 1, 0, 0, 0, - 0, 0, 0, 0, 109, 80, - 114, 111, 106, 101, 99, 116, - 105, 111, 110, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, - 1, 0, 0, 0, 0, 0, - 0, 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, - 1, 0, 0, 0, 0, 0, - 0, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 118, - 115, 95, 50, 95, 48, 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, 49, - 48, 46, 49, 0, 171, 171, - 81, 0, 0, 5, 11, 0, - 15, 160, 0, 0, 0, 191, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 15, 144, - 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, 1, 0, 228, 160, - 4, 0, 0, 4, 0, 0, - 15, 128, 0, 0, 228, 160, - 0, 0, 0, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 15, 128, 2, 0, - 228, 160, 0, 0, 170, 144, - 0, 0, 228, 128, 4, 0, - 0, 4, 0, 0, 15, 128, - 3, 0, 228, 160, 0, 0, - 255, 144, 0, 0, 228, 128, - 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, 4, 0, 0, 4, - 0, 0, 3, 128, 0, 0, - 228, 128, 0, 0, 255, 128, - 11, 0, 0, 160, 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, 5, 0, - 0, 3, 0, 0, 1, 128, - 0, 0, 255, 128, 0, 0, - 170, 128, 4, 0, 0, 4, - 1, 0, 15, 128, 6, 0, - 228, 160, 0, 0, 0, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 0, 0, 15, 192, - 7, 0, 228, 160, 0, 0, - 255, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 3, 224, 0, 0, 228, 144, - 9, 0, 238, 160, 9, 0, - 228, 160, 255, 255, 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float fLayerOpacity; -// sampler2D s2D; -// -// -// Registers: -// -// Name Reg Size -// ------------- ----- ---- -// fLayerOpacity c0 1 -// s2D s0 1 -// - - ps_2_0 - dcl t0.xy - dcl_2d s0 - texld r0, t0, s0 - mul r0, r0, c0.x - mov oC0, r0 - -// approximately 3 instruction slots used (1 texture, 2 arithmetic) -#endif - -const BYTE RGBAShaderPS[] = -{ - 0, 2, 255, 255, 254, 255, - 43, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 127, 0, - 0, 0, 0, 2, 255, 255, - 2, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 120, 0, 0, 0, 68, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 84, 0, - 0, 0, 0, 0, 0, 0, - 100, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 104, 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, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 50, - 68, 0, 4, 0, 12, 0, - 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 112, 115, 95, 50, 95, 48, - 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, - 49, 48, 46, 49, 0, 171, - 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, 1, 0, 0, 2, - 0, 8, 15, 128, 0, 0, - 228, 128, 255, 255, 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float fLayerOpacity; -// sampler2D s2D; -// sampler2D s2DWhite; -// -// -// Registers: -// -// Name Reg Size -// ------------- ----- ---- -// fLayerOpacity c0 1 -// s2D s0 1 -// s2DWhite s1 1 -// - - ps_2_0 - def c1, 1, 0, 0, 0 - dcl t0.xy - dcl_2d s0 - dcl_2d s1 - texld r0, t0, s0 - texld r1, t0, s1 - add r0.xyz, r0, -r1 - add r0.xyz, r0, c1.x - mul r0.xyz, r0, c0.x - mov r0.w, r0.y - mov oC0, r0 - -// approximately 7 instruction slots used (2 texture, 5 arithmetic) -#endif - -const BYTE ComponentPass1ShaderPS[] = -{ - 0, 2, 255, 255, 254, 255, - 55, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 175, 0, - 0, 0, 0, 2, 255, 255, - 3, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 168, 0, 0, 0, 88, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 104, 0, - 0, 0, 0, 0, 0, 0, - 120, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 124, 0, 0, 0, 0, 0, - 0, 0, 140, 0, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 152, 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, 1, 0, - 0, 0, 0, 0, 0, 0, - 115, 50, 68, 0, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 50, 68, 87, - 104, 105, 116, 101, 0, 171, - 171, 171, 4, 0, 12, 0, - 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 112, 115, 95, 50, 95, 48, - 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, - 49, 48, 46, 49, 0, 171, - 81, 0, 0, 5, 1, 0, - 15, 160, 0, 0, 128, 63, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 3, 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, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 176, - 0, 8, 228, 160, 66, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 1, 8, - 228, 160, 2, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 228, 128, 1, 0, 228, 129, - 2, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 228, 128, - 1, 0, 0, 160, 5, 0, - 0, 3, 0, 0, 7, 128, - 0, 0, 228, 128, 0, 0, - 0, 160, 1, 0, 0, 2, - 0, 0, 8, 128, 0, 0, - 85, 128, 1, 0, 0, 2, - 0, 8, 15, 128, 0, 0, - 228, 128, 255, 255, 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float fLayerOpacity; -// sampler2D s2D; -// sampler2D s2DWhite; -// -// -// Registers: -// -// Name Reg Size -// ------------- ----- ---- -// fLayerOpacity c0 1 -// s2D s0 1 -// s2DWhite s1 1 -// - - ps_2_0 - def c1, 1, 0, 0, 0 - dcl t0.xy - dcl_2d s0 - dcl_2d s1 - texld r0, t0, s1 - texld r1, t0, s0 - add r0.x, -r0.y, r1.y - add r1.w, r0.x, c1.x - mul r0, r1, c0.x - mov oC0, r0 - -// approximately 6 instruction slots used (2 texture, 4 arithmetic) -#endif - -const BYTE ComponentPass2ShaderPS[] = -{ - 0, 2, 255, 255, 254, 255, - 55, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 175, 0, - 0, 0, 0, 2, 255, 255, - 3, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 168, 0, 0, 0, 88, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 104, 0, - 0, 0, 0, 0, 0, 0, - 120, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 124, 0, 0, 0, 0, 0, - 0, 0, 140, 0, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 152, 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, 1, 0, - 0, 0, 0, 0, 0, 0, - 115, 50, 68, 0, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 50, 68, 87, - 104, 105, 116, 101, 0, 171, - 171, 171, 4, 0, 12, 0, - 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 112, 115, 95, 50, 95, 48, - 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, - 49, 48, 46, 49, 0, 171, - 81, 0, 0, 5, 1, 0, - 15, 160, 0, 0, 128, 63, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 3, 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, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 176, - 1, 8, 228, 160, 66, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 0, 8, - 228, 160, 2, 0, 0, 3, - 0, 0, 1, 128, 0, 0, - 85, 129, 1, 0, 85, 128, - 2, 0, 0, 3, 1, 0, - 8, 128, 0, 0, 0, 128, - 1, 0, 0, 160, 5, 0, - 0, 3, 0, 0, 15, 128, - 1, 0, 228, 128, 0, 0, - 0, 160, 1, 0, 0, 2, - 0, 8, 15, 128, 0, 0, - 228, 128, 255, 255, 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float fLayerOpacity; -// sampler2D s2D; -// -// -// Registers: -// -// Name Reg Size -// ------------- ----- ---- -// fLayerOpacity c0 1 -// s2D s0 1 -// - - ps_2_0 - def c1, 1, 0, 0, 0 - dcl t0.xy - dcl_2d s0 - texld r0, t0, s0 - mov r0.w, c1.x - mul r0, r0, c0.x - mov oC0, r0 - -// approximately 4 instruction slots used (1 texture, 3 arithmetic) -#endif - -const BYTE RGBShaderPS[] = -{ - 0, 2, 255, 255, 254, 255, - 43, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 127, 0, - 0, 0, 0, 2, 255, 255, - 2, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 120, 0, 0, 0, 68, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 84, 0, - 0, 0, 0, 0, 0, 0, - 100, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 104, 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, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 50, - 68, 0, 4, 0, 12, 0, - 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 112, 115, 95, 50, 95, 48, - 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, - 49, 48, 46, 49, 0, 171, - 81, 0, 0, 5, 1, 0, - 15, 160, 0, 0, 128, 63, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 1, 0, - 0, 2, 0, 0, 8, 128, - 1, 0, 0, 160, 5, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 0, 0, - 0, 160, 1, 0, 0, 2, - 0, 8, 15, 128, 0, 0, - 228, 128, 255, 255, 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float fLayerOpacity; -// row_major float3x3 mYuvColorMatrix; -// sampler2D s2DCb; -// sampler2D s2DCr; -// sampler2D s2DY; -// -// -// Registers: -// -// Name Reg Size -// --------------- ----- ---- -// fLayerOpacity c0 1 -// mYuvColorMatrix c1 3 -// s2DY s0 1 -// s2DCb s1 1 -// s2DCr s2 1 -// - - ps_2_0 - def c4, -0.0627499968, -0.50195998, 1, 0 - dcl t0.xy - dcl_2d s0 - dcl_2d s1 - dcl_2d s2 - texld r0, t0, s0 - texld r1, t0, s1 - texld r2, t0, s2 - mov r3.w, c4.z - add r0.x, r0.w, c4.x - add r0.y, r1.w, c4.y - add r0.z, r2.w, c4.y - dp3 r3.x, c1, r0 - dp3 r3.y, c2, r0 - dp3 r3.z, c3, r0 - mul r0, r3, c0.x - mov oC0, r0 - -// approximately 12 instruction slots used (3 texture, 9 arithmetic) -#endif - -const BYTE YCbCrShaderPS[] = -{ - 0, 2, 255, 255, 254, 255, - 79, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 15, 1, - 0, 0, 0, 2, 255, 255, - 5, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 8, 1, 0, 0, 128, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 144, 0, - 0, 0, 0, 0, 0, 0, - 160, 0, 0, 0, 2, 0, - 1, 0, 3, 0, 6, 0, - 176, 0, 0, 0, 0, 0, - 0, 0, 192, 0, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 200, 0, 0, 0, - 0, 0, 0, 0, 216, 0, - 0, 0, 3, 0, 2, 0, - 1, 0, 0, 0, 224, 0, - 0, 0, 0, 0, 0, 0, - 240, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 248, 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, 1, 0, 0, 0, - 0, 0, 0, 0, 109, 89, - 117, 118, 67, 111, 108, 111, - 114, 77, 97, 116, 114, 105, - 120, 0, 2, 0, 3, 0, - 3, 0, 3, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 115, 50, 68, 67, 98, 0, - 171, 171, 4, 0, 12, 0, - 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 115, 50, 68, 67, 114, 0, - 171, 171, 4, 0, 12, 0, - 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 115, 50, 68, 89, 0, 171, - 171, 171, 4, 0, 12, 0, - 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 112, 115, 95, 50, 95, 48, - 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, - 49, 48, 46, 49, 0, 171, - 81, 0, 0, 5, 4, 0, - 15, 160, 18, 131, 128, 189, - 115, 128, 0, 191, 0, 0, - 128, 63, 0, 0, 0, 0, - 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 3, 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, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 176, - 0, 8, 228, 160, 66, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 1, 8, - 228, 160, 66, 0, 0, 3, - 2, 0, 15, 128, 0, 0, - 228, 176, 2, 8, 228, 160, - 1, 0, 0, 2, 3, 0, - 8, 128, 4, 0, 170, 160, - 2, 0, 0, 3, 0, 0, - 1, 128, 0, 0, 255, 128, - 4, 0, 0, 160, 2, 0, - 0, 3, 0, 0, 2, 128, - 1, 0, 255, 128, 4, 0, - 85, 160, 2, 0, 0, 3, - 0, 0, 4, 128, 2, 0, - 255, 128, 4, 0, 85, 160, - 8, 0, 0, 3, 3, 0, - 1, 128, 1, 0, 228, 160, - 0, 0, 228, 128, 8, 0, - 0, 3, 3, 0, 2, 128, - 2, 0, 228, 160, 0, 0, - 228, 128, 8, 0, 0, 3, - 3, 0, 4, 128, 3, 0, - 228, 160, 0, 0, 228, 128, - 5, 0, 0, 3, 0, 0, - 15, 128, 3, 0, 228, 128, - 0, 0, 0, 160, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float4 fLayerColor; -// -// -// Registers: -// -// Name Reg Size -// ------------ ----- ---- -// fLayerColor c0 1 -// - - ps_2_0 - mov oC0, c0 - -// approximately 1 instruction slot used -#endif - -const BYTE SolidColorShaderPS[] = -{ - 0, 2, 255, 255, 254, 255, - 32, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 83, 0, - 0, 0, 0, 2, 255, 255, - 1, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 76, 0, 0, 0, 48, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 60, 0, - 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, 1, 0, 0, 0, - 0, 0, 0, 0, 112, 115, - 95, 50, 95, 48, 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, 49, 48, - 46, 49, 0, 171, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 160, 255, 255, - 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float4x4 mLayerTransform; -// float4x4 mProjection; -// float4 vLayerQuad; -// float4 vMaskQuad; -// float4 vRenderTargetOffset; -// float4 vTextureCoords; -// -// -// Registers: -// -// Name Reg Size -// ------------------- ----- ---- -// mLayerTransform c0 4 -// mProjection c4 4 -// vRenderTargetOffset c8 1 -// vTextureCoords c9 1 -// vLayerQuad c10 1 -// vMaskQuad c11 1 -// - - vs_2_0 - def c12, -0.5, 1, 0, 0 - dcl_position v0 - mad r0.xy, v0, c10.zwzw, c10 - mul r1, r0.y, c1 - mad r0, c0, r0.x, r1 - add r0, r0, c3 - rcp r1.x, r0.w - mul r1.xyz, r0, r1.x - mov r1.w, r0.w - add r2, r1, -c8 - mad r0.zw, r2.xyxy, r2.w, c12.x - mul r3, r0.w, c5 - mad r3, c4, r0.z, r3 - mul r0.z, r2.w, r2.z - mad r3, c6, r0.z, r3 - mad oPos, c7, r2.w, r3 - add r0.xy, r0, -c11 - rcp r0.z, c11.z - mul r1.x, r0.z, r0.x - rcp r0.x, c11.w - mul r1.y, r0.x, r0.y - mov r1.z, c12.y - mul oT1.xyz, r1.w, r1 - mad oT0.xy, v0, c9.zwzw, c9 - -// approximately 22 instruction slots used -#endif - -const BYTE LayerQuadVSMask[] = -{ - 0, 2, 254, 255, 254, 255, - 84, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 34, 1, - 0, 0, 0, 2, 254, 255, - 6, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 27, 1, 0, 0, 148, 0, - 0, 0, 2, 0, 0, 0, - 4, 0, 0, 0, 164, 0, - 0, 0, 0, 0, 0, 0, - 180, 0, 0, 0, 2, 0, - 4, 0, 4, 0, 0, 0, - 164, 0, 0, 0, 0, 0, - 0, 0, 192, 0, 0, 0, - 2, 0, 10, 0, 1, 0, - 0, 0, 204, 0, 0, 0, - 0, 0, 0, 0, 220, 0, - 0, 0, 2, 0, 11, 0, - 1, 0, 0, 0, 204, 0, - 0, 0, 0, 0, 0, 0, - 230, 0, 0, 0, 2, 0, - 8, 0, 1, 0, 0, 0, - 252, 0, 0, 0, 0, 0, - 0, 0, 12, 1, 0, 0, - 2, 0, 9, 0, 1, 0, - 0, 0, 204, 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, 1, 0, - 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 118, 77, - 97, 115, 107, 81, 117, 97, - 100, 0, 118, 82, 101, 110, - 100, 101, 114, 84, 97, 114, - 103, 101, 116, 79, 102, 102, - 115, 101, 116, 0, 171, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 118, 115, 95, 50, 95, - 48, 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, 49, 48, 46, 49, 0, - 171, 171, 81, 0, 0, 5, - 12, 0, 15, 160, 0, 0, - 0, 191, 0, 0, 128, 63, - 0, 0, 0, 0, 0, 0, - 0, 0, 31, 0, 0, 2, - 0, 0, 0, 128, 0, 0, - 15, 144, 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, 1, 0, - 228, 160, 4, 0, 0, 4, - 0, 0, 15, 128, 0, 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, - 1, 0, 7, 128, 0, 0, - 228, 128, 1, 0, 0, 128, - 1, 0, 0, 2, 1, 0, - 8, 128, 0, 0, 255, 128, - 2, 0, 0, 3, 2, 0, - 15, 128, 1, 0, 228, 128, - 8, 0, 228, 161, 4, 0, - 0, 4, 0, 0, 12, 128, - 2, 0, 68, 128, 2, 0, - 255, 128, 12, 0, 0, 160, - 5, 0, 0, 3, 3, 0, - 15, 128, 0, 0, 255, 128, - 5, 0, 228, 160, 4, 0, - 0, 4, 3, 0, 15, 128, - 4, 0, 228, 160, 0, 0, - 170, 128, 3, 0, 228, 128, - 5, 0, 0, 3, 0, 0, - 4, 128, 2, 0, 255, 128, - 2, 0, 170, 128, 4, 0, - 0, 4, 3, 0, 15, 128, - 6, 0, 228, 160, 0, 0, - 170, 128, 3, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 15, 192, 7, 0, 228, 160, - 2, 0, 255, 128, 3, 0, - 228, 128, 2, 0, 0, 3, - 0, 0, 3, 128, 0, 0, - 228, 128, 11, 0, 228, 161, - 6, 0, 0, 2, 0, 0, - 4, 128, 11, 0, 170, 160, - 5, 0, 0, 3, 1, 0, - 1, 128, 0, 0, 170, 128, - 0, 0, 0, 128, 6, 0, - 0, 2, 0, 0, 1, 128, - 11, 0, 255, 160, 5, 0, - 0, 3, 1, 0, 2, 128, - 0, 0, 0, 128, 0, 0, - 85, 128, 1, 0, 0, 2, - 1, 0, 4, 128, 12, 0, - 85, 160, 5, 0, 0, 3, - 1, 0, 7, 224, 1, 0, - 255, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 3, 224, 0, 0, 228, 144, - 9, 0, 238, 160, 9, 0, - 228, 160, 255, 255, 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float fLayerOpacity; -// sampler2D s2D; -// sampler2D s2DMask; -// -// -// Registers: -// -// Name Reg Size -// ------------- ----- ---- -// fLayerOpacity c0 1 -// s2D s0 1 -// s2DMask s1 1 -// - - ps_2_0 - dcl t0.xy - dcl t1.xyz - dcl_2d s0 - dcl_2d s1 - rcp r0.w, t1.z - mul r0.xy, r0.w, t1 - texld r0, r0, s1 - texld r1, t0, s0 - mul r1, r1, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - -// approximately 7 instruction slots used (2 texture, 5 arithmetic) -#endif - -const BYTE RGBAShaderPSMask[] = -{ - 0, 2, 255, 255, 254, 255, - 54, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 171, 0, - 0, 0, 0, 2, 255, 255, - 3, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 164, 0, 0, 0, 88, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 104, 0, - 0, 0, 0, 0, 0, 0, - 120, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 124, 0, 0, 0, 0, 0, - 0, 0, 140, 0, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 148, 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, 1, 0, - 0, 0, 0, 0, 0, 0, - 115, 50, 68, 0, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 50, 68, 77, - 97, 115, 107, 0, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 112, 115, 95, 50, - 95, 48, 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, 49, 48, 46, 49, - 0, 171, 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, 0, 0, - 15, 128, 0, 0, 228, 128, - 1, 8, 228, 160, 66, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 228, 176, 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, 255, 128, - 1, 0, 228, 128, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float fLayerOpacity; -// sampler2D s2D; -// sampler2D s2DMask; -// sampler2D s2DWhite; -// -// -// Registers: -// -// Name Reg Size -// ------------- ----- ---- -// fLayerOpacity c0 1 -// s2D s0 1 -// s2DWhite s1 1 -// s2DMask s2 1 -// - - ps_2_0 - def c1, 1, 0, 0, 0 - dcl t0.xy - dcl t1.xyz - dcl_2d s0 - dcl_2d s1 - dcl_2d s2 - rcp r0.w, t1.z - mul r0.xy, r0.w, t1 - texld r1, t0, s0 - texld r2, t0, s1 - texld r0, r0, s2 - add r0.xyz, r1, -r2 - add r0.xyz, r0, c1.x - mul r0.xyz, r0, c0.x - mul r0.xyz, r0.w, r0 - mov r0.w, r0.y - mov oC0, r0 - -// approximately 11 instruction slots used (3 texture, 8 arithmetic) -#endif - -const BYTE ComponentPass1ShaderPSMask[] = -{ - 0, 2, 255, 255, 254, 255, - 66, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 219, 0, - 0, 0, 0, 2, 255, 255, - 4, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 212, 0, 0, 0, 108, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 124, 0, - 0, 0, 0, 0, 0, 0, - 140, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 144, 0, 0, 0, 0, 0, - 0, 0, 160, 0, 0, 0, - 3, 0, 2, 0, 1, 0, - 0, 0, 168, 0, 0, 0, - 0, 0, 0, 0, 184, 0, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 196, 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, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 50, 68, 0, - 4, 0, 12, 0, 1, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 50, - 68, 77, 97, 115, 107, 0, - 4, 0, 12, 0, 1, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 50, - 68, 87, 104, 105, 116, 101, - 0, 171, 171, 171, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 112, 115, 95, 50, - 95, 48, 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, 49, 48, 46, 49, - 0, 171, 81, 0, 0, 5, - 1, 0, 15, 160, 0, 0, - 128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 31, 0, 0, 2, - 0, 0, 0, 144, 2, 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, 2, 0, 15, 128, - 0, 0, 228, 176, 1, 8, - 228, 160, 66, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 2, 8, 228, 160, - 2, 0, 0, 3, 0, 0, - 7, 128, 1, 0, 228, 128, - 2, 0, 228, 129, 2, 0, - 0, 3, 0, 0, 7, 128, - 0, 0, 228, 128, 1, 0, - 0, 160, 5, 0, 0, 3, - 0, 0, 7, 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, 0, 8, 128, - 0, 0, 85, 128, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float fLayerOpacity; -// sampler2D s2D; -// sampler2D s2DMask; -// sampler2D s2DWhite; -// -// -// Registers: -// -// Name Reg Size -// ------------- ----- ---- -// fLayerOpacity c0 1 -// s2D s0 1 -// s2DWhite s1 1 -// s2DMask s2 1 -// - - ps_2_0 - def c1, 1, 0, 0, 0 - dcl t0.xy - dcl t1.xyz - dcl_2d s0 - dcl_2d s1 - dcl_2d s2 - rcp r0.w, t1.z - mul r0.xy, r0.w, t1 - texld r1, t0, s1 - texld r2, t0, s0 - texld r0, r0, s2 - add r0.x, -r1.y, r2.y - add r2.w, r0.x, c1.x - mul r1, r2, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - -// approximately 10 instruction slots used (3 texture, 7 arithmetic) -#endif - -const BYTE ComponentPass2ShaderPSMask[] = -{ - 0, 2, 255, 255, 254, 255, - 66, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 219, 0, - 0, 0, 0, 2, 255, 255, - 4, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 212, 0, 0, 0, 108, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 124, 0, - 0, 0, 0, 0, 0, 0, - 140, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 144, 0, 0, 0, 0, 0, - 0, 0, 160, 0, 0, 0, - 3, 0, 2, 0, 1, 0, - 0, 0, 168, 0, 0, 0, - 0, 0, 0, 0, 184, 0, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 196, 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, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 50, 68, 0, - 4, 0, 12, 0, 1, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 50, - 68, 77, 97, 115, 107, 0, - 4, 0, 12, 0, 1, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 115, 50, - 68, 87, 104, 105, 116, 101, - 0, 171, 171, 171, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 112, 115, 95, 50, - 95, 48, 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, 49, 48, 46, 49, - 0, 171, 81, 0, 0, 5, - 1, 0, 15, 160, 0, 0, - 128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 31, 0, 0, 2, - 0, 0, 0, 144, 2, 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, - 1, 8, 228, 160, 66, 0, - 0, 3, 2, 0, 15, 128, - 0, 0, 228, 176, 0, 8, - 228, 160, 66, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 2, 8, 228, 160, - 2, 0, 0, 3, 0, 0, - 1, 128, 1, 0, 85, 129, - 2, 0, 85, 128, 2, 0, - 0, 3, 2, 0, 8, 128, - 0, 0, 0, 128, 1, 0, - 0, 160, 5, 0, 0, 3, - 1, 0, 15, 128, 2, 0, - 228, 128, 0, 0, 0, 160, - 5, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 255, 128, - 1, 0, 228, 128, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float fLayerOpacity; -// sampler2D s2D; -// sampler2D s2DMask; -// -// -// Registers: -// -// Name Reg Size -// ------------- ----- ---- -// fLayerOpacity c0 1 -// s2D s0 1 -// s2DMask s1 1 -// - - ps_2_0 - def c1, 1, 0, 0, 0 - 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 - mov r1.w, c1.x - mul r1, r1, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - -// approximately 8 instruction slots used (2 texture, 6 arithmetic) -#endif - -const BYTE RGBShaderPSMask[] = -{ - 0, 2, 255, 255, 254, 255, - 54, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 171, 0, - 0, 0, 0, 2, 255, 255, - 3, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 164, 0, 0, 0, 88, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 104, 0, - 0, 0, 0, 0, 0, 0, - 120, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 124, 0, 0, 0, 0, 0, - 0, 0, 140, 0, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 148, 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, 1, 0, - 0, 0, 0, 0, 0, 0, - 115, 50, 68, 0, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 50, 68, 77, - 97, 115, 107, 0, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 112, 115, 95, 50, - 95, 48, 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, 49, 48, 46, 49, - 0, 171, 81, 0, 0, 5, - 1, 0, 15, 160, 0, 0, - 128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 1, 0, 0, 2, - 1, 0, 8, 128, 1, 0, - 0, 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, 255, 128, - 1, 0, 228, 128, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float fLayerOpacity; -// row_major float3x3 mYuvColorMatrix; -// sampler2D s2DCb; -// sampler2D s2DCr; -// sampler2D s2DMask; -// sampler2D s2DY; -// -// -// Registers: -// -// Name Reg Size -// --------------- ----- ---- -// fLayerOpacity c0 1 -// mYuvColorMatrix c1 3 -// s2DY s0 1 -// s2DCb s1 1 -// s2DCr s2 1 -// s2DMask s3 1 -// - - ps_2_0 - def c4, -0.0627499968, -0.50195998, 1, 0 - dcl t0.xy - dcl t1.xyz - dcl_2d s0 - dcl_2d s1 - dcl_2d s2 - dcl_2d s3 - rcp r0.w, t1.z - mul r0.xy, r0.w, t1 - texld r1, t0, s0 - texld r2, t0, s1 - texld r3, t0, s2 - texld r0, r0, s3 - mov r4.w, c4.z - add r0.x, r1.w, c4.x - add r0.y, r2.w, c4.y - add r0.z, r3.w, c4.y - dp3 r4.x, c1, r0 - dp3 r4.y, c2, r0 - dp3 r4.z, c3, r0 - mul r1, r4, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - -// approximately 16 instruction slots used (4 texture, 12 arithmetic) -#endif - -const BYTE YCbCrShaderPSMask[] = -{ - 0, 2, 255, 255, 254, 255, - 90, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 59, 1, - 0, 0, 0, 2, 255, 255, - 6, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 52, 1, 0, 0, 148, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 164, 0, - 0, 0, 0, 0, 0, 0, - 180, 0, 0, 0, 2, 0, - 1, 0, 3, 0, 6, 0, - 196, 0, 0, 0, 0, 0, - 0, 0, 212, 0, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 220, 0, 0, 0, - 0, 0, 0, 0, 236, 0, - 0, 0, 3, 0, 2, 0, - 1, 0, 0, 0, 244, 0, - 0, 0, 0, 0, 0, 0, - 4, 1, 0, 0, 3, 0, - 3, 0, 1, 0, 0, 0, - 12, 1, 0, 0, 0, 0, - 0, 0, 28, 1, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 36, 1, 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, 1, 0, - 0, 0, 0, 0, 0, 0, - 109, 89, 117, 118, 67, 111, - 108, 111, 114, 77, 97, 116, - 114, 105, 120, 0, 2, 0, - 3, 0, 3, 0, 3, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 50, 68, 67, - 98, 0, 171, 171, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 50, 68, 67, - 114, 0, 171, 171, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 50, 68, 77, - 97, 115, 107, 0, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 115, 50, 68, 89, - 0, 171, 171, 171, 4, 0, - 12, 0, 1, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 112, 115, 95, 50, - 95, 48, 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, 49, 48, 46, 49, - 0, 171, 81, 0, 0, 5, - 4, 0, 15, 160, 18, 131, - 128, 189, 115, 128, 0, 191, - 0, 0, 128, 63, 0, 0, - 0, 0, 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, 31, 0, 0, 2, - 0, 0, 0, 144, 2, 8, - 15, 160, 31, 0, 0, 2, - 0, 0, 0, 144, 3, 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, 2, 0, 15, 128, - 0, 0, 228, 176, 1, 8, - 228, 160, 66, 0, 0, 3, - 3, 0, 15, 128, 0, 0, - 228, 176, 2, 8, 228, 160, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 3, 8, 228, 160, 1, 0, - 0, 2, 4, 0, 8, 128, - 4, 0, 170, 160, 2, 0, - 0, 3, 0, 0, 1, 128, - 1, 0, 255, 128, 4, 0, - 0, 160, 2, 0, 0, 3, - 0, 0, 2, 128, 2, 0, - 255, 128, 4, 0, 85, 160, - 2, 0, 0, 3, 0, 0, - 4, 128, 3, 0, 255, 128, - 4, 0, 85, 160, 8, 0, - 0, 3, 4, 0, 1, 128, - 1, 0, 228, 160, 0, 0, - 228, 128, 8, 0, 0, 3, - 4, 0, 2, 128, 2, 0, - 228, 160, 0, 0, 228, 128, - 8, 0, 0, 3, 4, 0, - 4, 128, 3, 0, 228, 160, - 0, 0, 228, 128, 5, 0, - 0, 3, 1, 0, 15, 128, - 4, 0, 228, 128, 0, 0, - 0, 160, 5, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 255, 128, 1, 0, 228, 128, - 1, 0, 0, 2, 0, 8, - 15, 128, 0, 0, 228, 128, - 255, 255, 0, 0 -}; -#if 0 -// -// Generated by Microsoft (R) HLSL Shader Compiler 10.1 -// -// Parameters: -// -// float4 fLayerColor; -// sampler2D s2DMask; -// -// -// Registers: -// -// Name Reg Size -// ------------ ----- ---- -// fLayerColor c0 1 -// s2DMask s0 1 -// - - ps_2_0 - dcl t1.xyz - dcl_2d s0 - rcp r0.w, t1.z - mul r0.xy, r0.w, t1 - texld r0, r0, s0 - mul r0, r0.w, c0 - mov oC0, r0 - -// approximately 5 instruction slots used (1 texture, 4 arithmetic) -#endif - -const BYTE SolidColorShaderPSMask[] = -{ - 0, 2, 255, 255, 254, 255, - 43, 0, 67, 84, 65, 66, - 28, 0, 0, 0, 127, 0, - 0, 0, 0, 2, 255, 255, - 2, 0, 0, 0, 28, 0, - 0, 0, 0, 1, 0, 0, - 120, 0, 0, 0, 68, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 96, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 104, 0, 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, 1, 0, - 0, 0, 0, 0, 0, 0, - 115, 50, 68, 77, 97, 115, - 107, 0, 4, 0, 12, 0, - 1, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 112, 115, 95, 50, 95, 48, - 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, - 49, 48, 46, 49, 0, 171, - 31, 0, 0, 2, 0, 0, - 0, 128, 1, 0, 7, 176, - 31, 0, 0, 2, 0, 0, - 0, 144, 0, 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, 0, 0, 15, 128, - 0, 0, 228, 128, 0, 8, - 228, 160, 5, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 255, 128, 0, 0, 228, 160, - 1, 0, 0, 2, 0, 8, - 15, 128, 0, 0, 228, 128, - 255, 255, 0, 0 -}; diff --git a/gfx/layers/d3d9/LayerManagerD3D9Shaders.hlsl b/gfx/layers/d3d9/LayerManagerD3D9Shaders.hlsl deleted file mode 100644 index 1f3a812f314c..000000000000 --- a/gfx/layers/d3d9/LayerManagerD3D9Shaders.hlsl +++ /dev/null @@ -1,242 +0,0 @@ -float4x4 mLayerTransform; -float4 vRenderTargetOffset; -float4x4 mProjection; - -typedef float4 rect; -rect vTextureCoords; -rect vLayerQuad; -rect vMaskQuad; - -texture tex0; -sampler s2D; -sampler s2DWhite; -sampler s2DY; -sampler s2DCb; -sampler s2DCr; -sampler s2DMask; - - -float fLayerOpacity; -float4 fLayerColor; -row_major float3x3 mYuvColorMatrix : register(ps, c1); - -struct VS_INPUT { - float4 vPosition : POSITION; -}; - -struct VS_OUTPUT { - float4 vPosition : POSITION; - float2 vTexCoords : TEXCOORD0; -}; - -struct VS_OUTPUT_MASK { - float4 vPosition : POSITION; - float2 vTexCoords : TEXCOORD0; - float3 vMaskCoords : TEXCOORD1; -}; - -VS_OUTPUT LayerQuadVS(const VS_INPUT aVertex) -{ - VS_OUTPUT outp; - outp.vPosition = aVertex.vPosition; - - // We use 4 component floats to uniquely describe a rectangle, by the structure - // of x, y, width, height. This allows us to easily generate the 4 corners - // of any rectangle from the 4 corners of the 0,0-1,1 quad that we use as the - // stream source for our LayerQuad vertex shader. We do this by doing: - // Xout = x + Xin * width - // Yout = y + Yin * height - float2 position = vLayerQuad.xy; - float2 size = vLayerQuad.zw; - outp.vPosition.x = position.x + outp.vPosition.x * size.x; - outp.vPosition.y = position.y + outp.vPosition.y * size.y; - - outp.vPosition = mul(mLayerTransform, outp.vPosition); - outp.vPosition.xyz /= outp.vPosition.w; - outp.vPosition = outp.vPosition - vRenderTargetOffset; - outp.vPosition.xyz *= outp.vPosition.w; - - // adjust our vertices to match d3d9's pixel coordinate system - // which has pixel centers at integer locations - outp.vPosition.xy -= 0.5; - - outp.vPosition = mul(mProjection, outp.vPosition); - - position = vTextureCoords.xy; - size = vTextureCoords.zw; - outp.vTexCoords.x = position.x + aVertex.vPosition.x * size.x; - outp.vTexCoords.y = position.y + aVertex.vPosition.y * size.y; - - return outp; -} - -VS_OUTPUT_MASK LayerQuadVSMask(const VS_INPUT aVertex) -{ - VS_OUTPUT_MASK outp; - float4 position = float4(0, 0, 0, 1); - - // We use 4 component floats to uniquely describe a rectangle, by the structure - // of x, y, width, height. This allows us to easily generate the 4 corners - // of any rectangle from the 4 corners of the 0,0-1,1 quad that we use as the - // stream source for our LayerQuad vertex shader. We do this by doing: - // Xout = x + Xin * width - // Yout = y + Yin * height - float2 size = vLayerQuad.zw; - position.x = vLayerQuad.x + aVertex.vPosition.x * size.x; - position.y = vLayerQuad.y + aVertex.vPosition.y * size.y; - - position = mul(mLayerTransform, position); - outp.vPosition.w = position.w; - outp.vPosition.xyz = position.xyz / position.w; - outp.vPosition = outp.vPosition - vRenderTargetOffset; - outp.vPosition.xyz *= outp.vPosition.w; - - // adjust our vertices to match d3d9's pixel coordinate system - // which has pixel centers at integer locations - outp.vPosition.xy -= 0.5; - - outp.vPosition = mul(mProjection, outp.vPosition); - - // calculate the position on the mask texture - outp.vMaskCoords.x = (position.x - vMaskQuad.x) / vMaskQuad.z; - outp.vMaskCoords.y = (position.y - vMaskQuad.y) / vMaskQuad.w; - // correct for perspective correct interpolation, see comment in D3D11 shader - outp.vMaskCoords.z = 1; - outp.vMaskCoords *= position.w; - - size = vTextureCoords.zw; - outp.vTexCoords.x = vTextureCoords.x + aVertex.vPosition.x * size.x; - outp.vTexCoords.y = vTextureCoords.y + aVertex.vPosition.y * size.y; - - return outp; -} - -float4 ComponentPass1Shader(const VS_OUTPUT aVertex) : COLOR -{ - float4 src = tex2D(s2D, aVertex.vTexCoords); - float4 alphas = 1.0 - tex2D(s2DWhite, aVertex.vTexCoords) + src; - alphas.a = alphas.g; - return alphas * fLayerOpacity; -} - -float4 ComponentPass2Shader(const VS_OUTPUT aVertex) : COLOR -{ - float4 src = tex2D(s2D, aVertex.vTexCoords); - float4 alphas = 1.0 - tex2D(s2DWhite, aVertex.vTexCoords) + src; - src.a = alphas.g; - return src * fLayerOpacity; -} - -float4 RGBAShader(const VS_OUTPUT aVertex) : COLOR -{ - return tex2D(s2D, aVertex.vTexCoords) * fLayerOpacity; -} - -float4 RGBShader(const VS_OUTPUT aVertex) : COLOR -{ - float4 result; - result = tex2D(s2D, aVertex.vTexCoords); - result.a = 1.0; - return result * fLayerOpacity; -} - -/* From Rec601: -[R] [1.1643835616438356, 0.0, 1.5960267857142858] [ Y - 16] -[G] = [1.1643835616438358, -0.3917622900949137, -0.8129676472377708] x [Cb - 128] -[B] [1.1643835616438356, 2.017232142857143, 8.862867620416422e-17] [Cr - 128] - -For [0,1] instead of [0,255], and to 5 places: -[R] [1.16438, 0.00000, 1.59603] [ Y - 0.06275] -[G] = [1.16438, -0.39176, -0.81297] x [Cb - 0.50196] -[B] [1.16438, 2.01723, 0.00000] [Cr - 0.50196] - -From Rec709: -[R] [1.1643835616438356, 4.2781193979771426e-17, 1.7927410714285714] [ Y - 16] -[G] = [1.1643835616438358, -0.21324861427372963, -0.532909328559444] x [Cb - 128] -[B] [1.1643835616438356, 2.1124017857142854, 0.0] [Cr - 128] - -For [0,1] instead of [0,255], and to 5 places: -[R] [1.16438, 0.00000, 1.79274] [ Y - 0.06275] -[G] = [1.16438, -0.21325, -0.53291] x [Cb - 0.50196] -[B] [1.16438, 2.11240, 0.00000] [Cr - 0.50196] -*/ -float4 YCbCrShader(const VS_OUTPUT aVertex) : COLOR -{ - float3 yuv; - float4 color; - - yuv.x = tex2D(s2DY, aVertex.vTexCoords).a - 0.06275; - yuv.y = tex2D(s2DCb, aVertex.vTexCoords).a - 0.50196; - yuv.z = tex2D(s2DCr, aVertex.vTexCoords).a - 0.50196; - - color.rgb = mul(mYuvColorMatrix, yuv); - color.a = 1.0f; - - return color * fLayerOpacity; -} - -float4 SolidColorShader(const VS_OUTPUT aVertex) : COLOR -{ - return fLayerColor; -} - -float4 ComponentPass1ShaderMask(const VS_OUTPUT_MASK aVertex) : COLOR -{ - float4 src = tex2D(s2D, aVertex.vTexCoords); - float4 alphas = 1.0 - tex2D(s2DWhite, aVertex.vTexCoords) + src; - alphas.a = alphas.g; - float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; - float mask = tex2D(s2DMask, maskCoords).a; - return alphas * fLayerOpacity * mask; -} - -float4 ComponentPass2ShaderMask(const VS_OUTPUT_MASK aVertex) : COLOR -{ - float4 src = tex2D(s2D, aVertex.vTexCoords); - float4 alphas = 1.0 - tex2D(s2DWhite, aVertex.vTexCoords) + src; - src.a = alphas.g; - float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; - float mask = tex2D(s2DMask, maskCoords).a; - return src * fLayerOpacity * mask; -} - -float4 RGBAShaderMask(const VS_OUTPUT_MASK aVertex) : COLOR -{ - float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; - float mask = tex2D(s2DMask, maskCoords).a; - return tex2D(s2D, aVertex.vTexCoords) * fLayerOpacity * mask; -} - -float4 RGBShaderMask(const VS_OUTPUT_MASK aVertex) : COLOR -{ - float4 result; - result = tex2D(s2D, aVertex.vTexCoords); - result.a = 1.0; - float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; - float mask = tex2D(s2DMask, maskCoords).a; - return result * fLayerOpacity * mask; -} - -float4 YCbCrShaderMask(const VS_OUTPUT_MASK aVertex) : COLOR -{ - float3 yuv; - float4 color; - - yuv.x = tex2D(s2DY, aVertex.vTexCoords).a - 0.06275; - yuv.y = tex2D(s2DCb, aVertex.vTexCoords).a - 0.50196; - yuv.z = tex2D(s2DCr, aVertex.vTexCoords).a - 0.50196; - - color.rgb = mul((float3x3)mYuvColorMatrix, yuv); - color.a = 1.0f; - - float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; - float mask = tex2D(s2DMask, maskCoords).a; - return color * fLayerOpacity * mask; -} - -float4 SolidColorShaderMask(const VS_OUTPUT_MASK aVertex) : COLOR -{ - float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; - float mask = tex2D(s2DMask, maskCoords).a; - return fLayerColor * mask; -} diff --git a/gfx/layers/d3d9/Nv3DVUtils.cpp b/gfx/layers/d3d9/Nv3DVUtils.cpp deleted file mode 100644 index 72638228f279..000000000000 --- a/gfx/layers/d3d9/Nv3DVUtils.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* -*- 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/. */ - -#include "mozilla/DebugOnly.h" - -#include "nsIServiceManager.h" -#include "nsIConsoleService.h" -#include -#include "Nv3DVUtils.h" - -DEFINE_GUID(CLSID_NV3DVStreaming, -0xf7747266, 0x777d, 0x4f61, 0xa1, 0x75, 0xdd, 0x5a, 0xdf, 0x1e, 0x37, 0xdf); - -DEFINE_GUID(IID_INV3DVStreaming, -0xf98f9bb2, 0xb914, 0x4d44, 0x98, 0xfa, 0x6e, 0x37, 0x85, 0x16, 0x98, 0x55); - -namespace mozilla { -namespace layers { - -/** - * Constructor and Destructor - */ -Nv3DVUtils::Nv3DVUtils() - : m3DVStreaming (nullptr) -{ -} - -Nv3DVUtils::~Nv3DVUtils() -{ - UnInitialize(); -} - - -// Silence spurious warnings! -#if defined(WARNING) || defined WARN_IF_FALSE -#error We shouldn't be redefining these! -#endif -// Uncomment these to enable spurious warnings. -//#define WARNING(str) NS_WARNING(str) -//#define WARN_IF_FALSE(b, str) NS_WARNING_ASSERTION(b, str) -#define WARNING(str) -#define WARN_IF_FALSE(b, str) - -/** - * Initializes the Nv3DVUtils object. - */ -void -Nv3DVUtils::Initialize() -{ - /* - * Detect if 3D Streaming object is already loaded. Do nothing in that case. - */ - if (m3DVStreaming) { - WARNING("Nv3DVStreaming COM object already instantiated.\n"); - return; - } - - /* - * Create the COM object. If we fail at any stage, just return - */ - HRESULT hr = CoCreateInstance(CLSID_NV3DVStreaming, nullptr, CLSCTX_INPROC_SERVER, IID_INV3DVStreaming, (void**)(getter_AddRefs(m3DVStreaming))); - if (FAILED(hr) || !m3DVStreaming) { - WARNING("Nv3DVStreaming CoCreateInstance failed (disabled)."); - return; - } - - /* - * Initialize the object. Note that m3DVStreaming cannot be nullptr at this point. - */ - bool bRetVal = m3DVStreaming->Nv3DVInitialize(); - - if (!bRetVal) { - WARNING("Nv3DVStreaming Nv3DVInitialize failed!"); - return; - } -} - -/** - * Release resources used by the COM Object, and then release - * the COM Object (nsRefPtr gets released by setting to nullptr) - * - */ -void -Nv3DVUtils::UnInitialize() -{ - if (m3DVStreaming) { - m3DVStreaming->Nv3DVRelease(); - } -} - -/** - * Sets the device info, along with any other initialization that is needed after device creation - * Pass the D3D9 device pointer is an IUnknown input argument. - */ -void -Nv3DVUtils::SetDeviceInfo(IUnknown *devUnknown) -{ - if (!devUnknown) { - WARNING("D3D Device Pointer (IUnknown) is nullptr.\n"); - return; - } - - if (!m3DVStreaming) { - return; - } - - bool rv = m3DVStreaming->Nv3DVSetDevice(devUnknown); - if (!rv) { - WARNING("Nv3DVStreaming Nv3DVControl failed!"); - return; - } - - rv = m3DVStreaming->Nv3DVControl(NV_STEREO_MODE_RIGHT_LEFT, true, FIREFOX_3DV_APP_HANDLE); - WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVControl failed!"); -} - -/* - * Send Stereo Control Information. Used mainly to re-route - * calls from ImageLayerD3D9 to the 3DV COM object - */ -void -Nv3DVUtils::SendNv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle) -{ - if (!m3DVStreaming) - return; - - DebugOnly rv = m3DVStreaming->Nv3DVControl(eStereoMode, bEnableStereo, dw3DVAppHandle); - WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVControl failed!"); -} - -/* - * Send Stereo Metadata. Used mainly to re-route calls - * from ImageLayerD3D9 to the 3DV COM object - */ -void -Nv3DVUtils::SendNv3DVMetaData(unsigned int dwWidth, unsigned int dwHeight, HANDLE hSrcLuma, HANDLE hDst) -{ - if (!m3DVStreaming) - return; - - DebugOnly rv = m3DVStreaming->Nv3DVMetaData((DWORD)dwWidth, (DWORD)dwHeight, hSrcLuma, hDst); - WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVMetaData failed!"); -} - -} /* namespace layers */ -} /* namespace mozilla */ diff --git a/gfx/layers/d3d9/Nv3DVUtils.h b/gfx/layers/d3d9/Nv3DVUtils.h deleted file mode 100644 index 0712dd888219..000000000000 --- a/gfx/layers/d3d9/Nv3DVUtils.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- 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/. */ - -#ifndef GFX_NV3DVUTILS_H -#define GFX_NV3DVUTILS_H - -#include "Layers.h" -#include -#include - -namespace mozilla { -namespace layers { - -#define FIREFOX_3DV_APP_HANDLE 0xECB992B6 - -enum Nv_Stereo_Mode { - NV_STEREO_MODE_LEFT_RIGHT = 0, - NV_STEREO_MODE_RIGHT_LEFT = 1, - NV_STEREO_MODE_TOP_BOTTOM = 2, - NV_STEREO_MODE_BOTTOM_TOP = 3, - NV_STEREO_MODE_MONO = 4, - NV_STEREO_MODE_LAST = 5 -}; - -class INv3DVStreaming : public IUnknown { - -public: - virtual bool Nv3DVInitialize() = 0; - virtual bool Nv3DVRelease() = 0; - virtual bool Nv3DVSetDevice(IUnknown* pDevice) = 0; - virtual bool Nv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle) = 0; - virtual bool Nv3DVMetaData(DWORD dwWidth, DWORD dwHeight, HANDLE hSrcLuma, HANDLE hDst) = 0; -}; - -/* - * Nv3DVUtils class - */ -class Nv3DVUtils { - -public: - Nv3DVUtils(); - ~Nv3DVUtils(); - - /* - * Initializes the Nv3DVUtils object. - */ - void Initialize(); - - /* - * Release any resources if needed - * - */ - void UnInitialize(); - - /* - * Sets the device info, along with any other initialization that is needed after device creation - * Pass the D3D9 device pointer is an IUnknown input argument - */ - void SetDeviceInfo(IUnknown *devUnknown); - - /* - * Send Stereo Control Information. Used mainly to re-route - * calls from ImageLayerD3D9 to the 3DV COM object - */ - void SendNv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle); - - /* - * Send Stereo Metadata. Used mainly to re-route calls - * from ImageLayerD3D9 to the 3DV COM object - */ - void SendNv3DVMetaData(unsigned int dwWidth, unsigned int dwHeight, HANDLE hSrcLuma, HANDLE hDst); - -private: - - /* Nv3DVStreaming interface pointer */ - RefPtr m3DVStreaming; - -}; - - -} // namespace layers -} // namespace mozilla - -#endif /* GFX_NV3DVUTILS_H */ diff --git a/gfx/layers/d3d9/ReadbackLayerD3D9.h b/gfx/layers/d3d9/ReadbackLayerD3D9.h deleted file mode 100644 index 5d3a7fd1e594..000000000000 --- a/gfx/layers/d3d9/ReadbackLayerD3D9.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- 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 GFX_READBACKLAYERD3D9_H -#define GFX_READBACKLAYERD3D9_H - -#include "LayerManagerD3D9.h" -#include "ReadbackLayer.h" - -namespace mozilla { -namespace layers { - -class ReadbackLayerD3D9 : - public ReadbackLayer, - public LayerD3D9 -{ -public: - ReadbackLayerD3D9(LayerManagerD3D9 *aManager) - : ReadbackLayer(aManager, nullptr), - LayerD3D9(aManager) - { - mImplData = static_cast(this); - } - - virtual Layer* GetLayer() { return this; } - virtual void RenderLayer() {} -}; - -} // namespace layers -} // namespace mozilla - -#endif /* GFX_READBACKLAYERD3D9_H */ diff --git a/gfx/layers/d3d9/TextureD3D9.cpp b/gfx/layers/d3d9/TextureD3D9.cpp deleted file mode 100644 index 9c35ab9dc08b..000000000000 --- a/gfx/layers/d3d9/TextureD3D9.cpp +++ /dev/null @@ -1,1218 +0,0 @@ -/* -*- 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/. */ - -#include "TextureD3D9.h" -#include "CompositorD3D9.h" -#include "gfxContext.h" -#include "gfxImageSurface.h" -#include "Effects.h" -#include "gfxWindowsPlatform.h" -#include "gfx2DGlue.h" -#include "gfxUtils.h" -#include "mozilla/gfx/2D.h" -#include "GeckoProfiler.h" - -using namespace mozilla::gfx; - -namespace mozilla { -namespace layers { - -static uint32_t GetRequiredTilesD3D9(uint32_t aSize, uint32_t aMaxSize) -{ - uint32_t requiredTiles = aSize / aMaxSize; - if (aSize % aMaxSize) { - requiredTiles++; - } - return requiredTiles; -} - -TextureSourceD3D9::~TextureSourceD3D9() -{ - MOZ_ASSERT(!mCreatingDeviceManager || - mCreatingDeviceManager->IsInTextureHostList(this), - "Inconsistency in list of texture hosts."); - // Remove ourselves from the list of d3d9 texture hosts. - if (mPreviousHost) { - MOZ_ASSERT(mPreviousHost->mNextHost == this); - mPreviousHost->mNextHost = mNextHost; - } else if (mCreatingDeviceManager) { - mCreatingDeviceManager->RemoveTextureListHead(this); - } - if (mNextHost) { - MOZ_ASSERT(mNextHost->mPreviousHost == this); - mNextHost->mPreviousHost = mPreviousHost; - } -} - -already_AddRefed -CreateTextureHostD3D9(const SurfaceDescriptor& aDesc, - ISurfaceAllocator* aDeallocator, - TextureFlags aFlags) -{ - RefPtr result; - switch (aDesc.type()) { - case SurfaceDescriptor::TSurfaceDescriptorBuffer: { - result = CreateBackendIndependentTextureHost(aDesc, aDeallocator, aFlags); - break; - } - case SurfaceDescriptor::TSurfaceDescriptorD3D9: { - result = new TextureHostD3D9(aFlags, aDesc); - break; - } - case SurfaceDescriptor::TSurfaceDescriptorD3D10: { - result = new DXGITextureHostD3D9(aFlags, aDesc); - break; - } - case SurfaceDescriptor::TSurfaceDescriptorDXGIYCbCr: { - result = new DXGIYCbCrTextureHostD3D9(aFlags, aDesc.get_SurfaceDescriptorDXGIYCbCr()); - break; - } - default: { - NS_WARNING("Unsupported SurfaceDescriptor type"); - } - } - return result.forget(); -} - -static SurfaceFormat -D3D9FormatToSurfaceFormat(_D3DFORMAT format) -{ - switch (format) { - case D3DFMT_X8R8G8B8: - return SurfaceFormat::B8G8R8X8; - case D3DFMT_A8R8G8B8: - return SurfaceFormat::B8G8R8A8; - case D3DFMT_A8: - return SurfaceFormat::A8; - default: - NS_ERROR("Bad texture format"); - } - return SurfaceFormat::UNKNOWN; -} - -static _D3DFORMAT -SurfaceFormatToD3D9Format(SurfaceFormat format) -{ - switch (format) { - case SurfaceFormat::B8G8R8X8: - return D3DFMT_X8R8G8B8; - case SurfaceFormat::B8G8R8A8: - return D3DFMT_A8R8G8B8; - case SurfaceFormat::A8: - return D3DFMT_A8; - default: - NS_ERROR("Bad texture format"); - } - return D3DFMT_A8R8G8B8; -} - -CompositingRenderTargetD3D9::CompositingRenderTargetD3D9(IDirect3DTexture9* aTexture, - SurfaceInitMode aInit, - const gfx::IntRect& aRect) - : CompositingRenderTarget(aRect.TopLeft()) - , mInitMode(aInit) -{ - MOZ_COUNT_CTOR(CompositingRenderTargetD3D9); - MOZ_ASSERT(aTexture); - - mTexture = aTexture; - mTexture->GetSurfaceLevel(0, getter_AddRefs(mSurface)); - NS_ASSERTION(mSurface, "Couldn't create surface for texture"); - TextureSourceD3D9::SetSize(aRect.Size()); - - if (aInit == INIT_MODE_CLEAR) { - ClearOnBind(); - } -} - -CompositingRenderTargetD3D9::CompositingRenderTargetD3D9(IDirect3DSurface9* aSurface, - SurfaceInitMode aInit, - const gfx::IntRect& aRect) - : CompositingRenderTarget(aRect.TopLeft()) - , mSurface(aSurface) - , mInitMode(aInit) -{ - MOZ_COUNT_CTOR(CompositingRenderTargetD3D9); - MOZ_ASSERT(mSurface); - TextureSourceD3D9::SetSize(aRect.Size()); - - if (aInit == INIT_MODE_CLEAR) { - ClearOnBind(); - } -} - -CompositingRenderTargetD3D9::~CompositingRenderTargetD3D9() -{ - MOZ_COUNT_DTOR(CompositingRenderTargetD3D9); -} - -void -CompositingRenderTargetD3D9::BindRenderTarget(IDirect3DDevice9* aDevice) -{ - aDevice->SetRenderTarget(0, mSurface); - if (mClearOnBind) { - aDevice->Clear(0, 0, D3DCLEAR_TARGET, D3DCOLOR_RGBA(0, 0, 0, 0), 0, 0); - mClearOnBind = false; - } -} - -IntSize -CompositingRenderTargetD3D9::GetSize() const -{ - return TextureSourceD3D9::GetSize(); -} - -/** - * Helper method for DataToTexture. - * The last three params are out params. - * Returns the created texture, or null if we fail. - */ -already_AddRefed -TextureSourceD3D9::InitTextures(DeviceManagerD3D9* aDeviceManager, - const IntSize &aSize, - _D3DFORMAT aFormat, - RefPtr& aSurface, - D3DLOCKED_RECT& aLockedRect) -{ - if (!aDeviceManager) { - return nullptr; - } - RefPtr result; - // D3D9Ex doesn't support managed textures and we don't want the hassle even - // if we don't have Ex. We could use dynamic textures - // here but since Images are immutable that probably isn't such a great - // idea. - result = aDeviceManager->CreateTexture(aSize, aFormat, D3DPOOL_DEFAULT, this); - if (!result) { - return nullptr; - } - - RefPtr tmpTexture = - aDeviceManager->CreateTexture(aSize, aFormat, D3DPOOL_SYSTEMMEM, this); - if (!tmpTexture) { - return nullptr; - } - - tmpTexture->GetSurfaceLevel(0, getter_AddRefs(aSurface)); - - HRESULT hr = aSurface->LockRect(&aLockedRect, nullptr, 0); - if (FAILED(hr) || !aLockedRect.pBits) { - gfxCriticalError() << "Failed to lock rect initialize texture in D3D9 " << hexa(hr); - return nullptr; - } - - return result.forget(); -} - -/** - * Helper method for DataToTexture. - */ -static void -FinishTextures(DeviceManagerD3D9* aDeviceManager, - IDirect3DTexture9* aTexture, - IDirect3DSurface9* aSurface) -{ - if (!aDeviceManager) { - return; - } - - aSurface->UnlockRect(); - RefPtr dstSurface; - aTexture->GetSurfaceLevel(0, getter_AddRefs(dstSurface)); - aDeviceManager->device()->UpdateSurface(aSurface, nullptr, dstSurface, - nullptr); -} - -already_AddRefed -TextureSourceD3D9::DataToTexture(DeviceManagerD3D9* aDeviceManager, - unsigned char *aData, - int aStride, - const IntSize &aSize, - _D3DFORMAT aFormat, - uint32_t aBPP) -{ - PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS); - RefPtr surface; - D3DLOCKED_RECT lockedRect; - RefPtr texture = InitTextures(aDeviceManager, aSize, aFormat, - surface, lockedRect); - if (!texture) { - return nullptr; - } - - uint32_t width = aSize.width * aBPP; - - for (int y = 0; y < aSize.height; y++) { - memcpy((char*)lockedRect.pBits + lockedRect.Pitch * y, - aData + aStride * y, - width); - } - - FinishTextures(aDeviceManager, texture, surface); - - return texture.forget(); -} - -already_AddRefed -TextureSourceD3D9::TextureToTexture(DeviceManagerD3D9* aDeviceManager, - IDirect3DTexture9* aTexture, - const IntSize& aSize, - _D3DFORMAT aFormat) -{ - if (!aDeviceManager) { - return nullptr; - } - - RefPtr texture = - aDeviceManager->CreateTexture(aSize, aFormat, D3DPOOL_DEFAULT, this); - if (!texture) { - return nullptr; - } - - HRESULT hr = aDeviceManager->device()->UpdateTexture(aTexture, texture); - if (FAILED(hr)) { - return nullptr; - } - - return texture.forget(); -} - -DataTextureSourceD3D9::DataTextureSourceD3D9(gfx::SurfaceFormat aFormat, - CompositorD3D9* aCompositor, - TextureFlags aFlags, - StereoMode aStereoMode) - : mCompositor(aCompositor) - , mFormat(aFormat) - , mCurrentTile(0) - , mFlags(aFlags) - , mIsTiled(false) - , mIterating(false) - , mAllowTextureUploads(true) -{ - mStereoMode = aStereoMode; - MOZ_COUNT_CTOR(DataTextureSourceD3D9); -} - -DataTextureSourceD3D9::DataTextureSourceD3D9(gfx::SurfaceFormat aFormat, - gfx::IntSize aSize, - CompositorD3D9* aCompositor, - IDirect3DTexture9* aTexture, - TextureFlags aFlags) - : mCompositor(aCompositor) - , mFormat(aFormat) - , mCurrentTile(0) - , mFlags(aFlags) - , mIsTiled(false) - , mIterating(false) - , mAllowTextureUploads(false) -{ - mSize = aSize; - mTexture = aTexture; - mStereoMode = StereoMode::MONO; - MOZ_COUNT_CTOR(DataTextureSourceD3D9); -} - -DataTextureSourceD3D9::~DataTextureSourceD3D9() -{ - MOZ_COUNT_DTOR(DataTextureSourceD3D9); -} - -IDirect3DTexture9* -DataTextureSourceD3D9::GetD3D9Texture() -{ - return mIterating ? mTileTextures[mCurrentTile] - : mTexture; -} - -bool -DataTextureSourceD3D9::Update(gfx::DataSourceSurface* aSurface, - nsIntRegion* aDestRegion, - gfx::IntPoint* aSrcOffset) -{ - PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS); - // Right now we only support full surface update. If aDestRegion is provided, - // It will be ignored. Incremental update with a source offset is only used - // on Mac so it is not clear that we ever will need to support it for D3D. - MOZ_ASSERT(!aSrcOffset); - - MOZ_ASSERT(mAllowTextureUploads); - if (!mAllowTextureUploads) { - return false; - } - - if (!mCompositor || !mCompositor->device()) { - NS_WARNING("No D3D device to update the texture."); - return false; - } - - uint32_t bpp = BytesPerPixel(aSurface->GetFormat()); - RefPtr deviceManager = DeviceManagerD3D9::Get(); - - mSize = aSurface->GetSize(); - mFormat = aSurface->GetFormat(); - - _D3DFORMAT format = D3DFMT_A8R8G8B8; - switch (mFormat) { - case SurfaceFormat::B8G8R8X8: - format = D3DFMT_X8R8G8B8; - bpp = 4; - break; - case SurfaceFormat::B8G8R8A8: - format = D3DFMT_A8R8G8B8; - bpp = 4; - break; - case SurfaceFormat::A8: - format = D3DFMT_A8; - bpp = 1; - break; - default: - NS_WARNING("Bad image format"); - return false; - } - - int32_t maxSize = mCompositor->GetMaxTextureSize(); - if ((mSize.width <= maxSize && mSize.height <= maxSize) || - (mFlags & TextureFlags::DISALLOW_BIGIMAGE)) { - mIsTiled = false; - - if (mTexture) { - D3DSURFACE_DESC currentDesc; - mTexture->GetLevelDesc(0, ¤tDesc); - - // Make sure there's no size mismatch, if there is, recreate. - if (currentDesc.Width != mSize.width || currentDesc.Height != mSize.height || - currentDesc.Format != format) { - mTexture = nullptr; - // Make sure we upload the whole surface. - aDestRegion = nullptr; - } - } - - if (!mTexture) { - // TODO Improve: Reallocating this texture is costly enough - // that it causes us to skip frames on scrolling - // important pages like Facebook. - mTexture = deviceManager->CreateTexture(mSize, format, D3DPOOL_DEFAULT, this); - mIsTiled = false; - if (!mTexture) { - Reset(); - return false; - } - - if (mFlags & TextureFlags::COMPONENT_ALPHA) { - aDestRegion = nullptr; - } - } - - DataSourceSurface::MappedSurface map; - if (!aSurface->Map(DataSourceSurface::MapType::READ, &map)) { - gfxCriticalError() << "Failed to map surface."; - Reset(); - return false; - } - - nsIntRegion regionToUpdate = aDestRegion ? *aDestRegion : nsIntRegion(nsIntRect(0, 0, mSize.width, mSize.height)); - - RefPtr srcTexture; - RefPtr srcSurface; - - if (mFormat == SurfaceFormat::A8) { - // A8 doesn't appear to work with CreateOffscreenPlainSurface - srcTexture = deviceManager->CreateTexture(mSize, format, D3DPOOL_SYSTEMMEM, this); - if (!srcTexture) { - aSurface->Unmap(); - return false; - } - srcTexture->GetSurfaceLevel(0, getter_AddRefs(srcSurface)); - } else { - HRESULT hr = mCompositor->device()->CreateOffscreenPlainSurface(mSize.width, mSize.height, format, D3DPOOL_SYSTEMMEM, getter_AddRefs(srcSurface), nullptr); - if (FAILED(hr)) { - aSurface->Unmap(); - return false; - } - } - - RefPtr destSurface; - mTexture->GetSurfaceLevel(0, getter_AddRefs(destSurface)); - - D3DLOCKED_RECT rect; - HRESULT hr = srcSurface->LockRect(&rect, nullptr, 0); - if (FAILED(hr) || !rect.pBits) { - gfxCriticalError() << "Failed to lock rect initialize texture in D3D9 " << hexa(hr); - return false; - } - - for (auto iter = regionToUpdate.RectIter(); !iter.Done(); iter.Next()) { - const nsIntRect& iterRect = iter.Get(); - uint8_t* src = map.mData + map.mStride * iterRect.y + BytesPerPixel(aSurface->GetFormat()) * iterRect.x; - uint8_t* dest = reinterpret_cast(rect.pBits) + rect.Pitch * iterRect.y + BytesPerPixel(aSurface->GetFormat()) * iterRect.x; - - for (int y = 0; y < iterRect.height; y++) { - memcpy(dest + rect.Pitch * y, - src + map.mStride * y, - iterRect.width * bpp); - } - } - - srcSurface->UnlockRect(); - aSurface->Unmap(); - - for (auto iter = regionToUpdate.RectIter(); !iter.Done(); iter.Next()) { - const nsIntRect& iterRect = iter.Get(); - - RECT updateRect; - updateRect.left = iterRect.x; - updateRect.top = iterRect.y; - updateRect.right = iterRect.XMost(); - updateRect.bottom = iterRect.YMost(); - POINT point = { updateRect.left, updateRect.top }; - - mCompositor->device()->UpdateSurface(srcSurface, &updateRect, destSurface, &point); - } - } else { - mIsTiled = true; - uint32_t tileCount = GetRequiredTilesD3D9(mSize.width, maxSize) * - GetRequiredTilesD3D9(mSize.height, maxSize); - mTileTextures.resize(tileCount); - mTexture = nullptr; - - for (uint32_t i = 0; i < tileCount; i++) { - IntRect tileRect = GetTileRect(i); - unsigned char* data = aSurface->GetData() + - tileRect.y * aSurface->Stride() + - tileRect.x * bpp; - mTileTextures[i] = DataToTexture(deviceManager, - data, - aSurface->Stride(), - IntSize(tileRect.width, tileRect.height), - format, - bpp); - if (!mTileTextures[i]) { - NS_WARNING("Could not upload texture"); - Reset(); - return false; - } - } - } - - return true; -} - -static CompositorD3D9* AssertD3D9Compositor(Compositor* aCompositor) -{ - CompositorD3D9* compositor = aCompositor ? aCompositor->AsCompositorD3D9() - : nullptr; - if (!compositor) { - // We probably had a device reset and this D3D9 texture was already sent but - // we are now falling back to a basic compositor. That can happen if a video - // is playing while the device reset occurs and it's not too bad if we miss a - // few frames. - gfxCriticalNote << "[D3D9] Attempt to set an incompatible compositor"; - } - return compositor; -} - -void -DataTextureSourceD3D9::SetCompositor(Compositor* aCompositor) -{ - CompositorD3D9* d3dCompositor = AssertD3D9Compositor(aCompositor); - if (!d3dCompositor) { - Reset(); - return; - } - if (mCompositor && mCompositor != d3dCompositor) { - Reset(); - } - mCompositor = d3dCompositor; -} - -void -DataTextureSourceD3D9::Reset() -{ - mSize.width = 0; - mSize.height = 0; - mIsTiled = false; - mTexture = nullptr; - mTileTextures.clear(); -} - -IntRect -DataTextureSourceD3D9::GetTileRect(uint32_t aTileIndex) const -{ - uint32_t maxSize = mCompositor->GetMaxTextureSize(); - uint32_t horizontalTiles = GetRequiredTilesD3D9(mSize.width, maxSize); - uint32_t verticalTiles = GetRequiredTilesD3D9(mSize.height, maxSize); - - uint32_t verticalTile = aTileIndex / horizontalTiles; - uint32_t horizontalTile = aTileIndex % horizontalTiles; - - return IntRect(horizontalTile * maxSize, - verticalTile * maxSize, - horizontalTile < (horizontalTiles - 1) ? maxSize : mSize.width % maxSize, - verticalTile < (verticalTiles - 1) ? maxSize : mSize.height % maxSize); -} - -IntRect -DataTextureSourceD3D9::GetTileRect() -{ - return GetTileRect(mCurrentTile); -} - - -D3D9TextureData::D3D9TextureData(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, - IDirect3DTexture9* aTexture) -: mTexture(aTexture) -, mSize(aSize) -, mFormat(aFormat) -, mNeedsClear(false) -, mNeedsClearWhite(false) -{ - MOZ_COUNT_CTOR(D3D9TextureData); -} - -D3D9TextureData::~D3D9TextureData() -{ - MOZ_COUNT_DTOR(D3D9TextureData); -} - -D3D9TextureData* -D3D9TextureData::Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, - TextureAllocationFlags aAllocFlags) -{ - _D3DFORMAT format = SurfaceFormatToD3D9Format(aFormat); - RefPtr deviceManager = DeviceManagerD3D9::Get(); - RefPtr d3d9Texture = deviceManager ? deviceManager->CreateTexture(aSize, format, - D3DPOOL_SYSTEMMEM, - nullptr) - : nullptr; - if (!d3d9Texture) { - NS_WARNING("Could not create a d3d9 texture"); - return nullptr; - } - D3D9TextureData* data = new D3D9TextureData(aSize, aFormat, d3d9Texture); - - data->mNeedsClear = aAllocFlags & ALLOC_CLEAR_BUFFER; - data->mNeedsClearWhite = aAllocFlags & ALLOC_CLEAR_BUFFER_WHITE; - - return data; -} - -TextureData* -D3D9TextureData::CreateSimilar(LayersIPCChannel*, LayersBackend, TextureFlags aFlags, TextureAllocationFlags aAllocFlags) const -{ - return D3D9TextureData::Create(mSize, mFormat, aAllocFlags); -} - -void -D3D9TextureData::FillInfo(TextureData::Info& aInfo) const -{ - aInfo.size = mSize; - aInfo.format = mFormat; - aInfo.hasIntermediateBuffer = true; - aInfo.supportsMoz2D = true; - aInfo.canExposeMappedData = false; - aInfo.hasSynchronization = false; -} - -bool -D3D9TextureData::Lock(OpenMode aMode) -{ - if (!DeviceManagerD3D9::GetDevice()) { - // If the device has failed then we should not lock the surface, - // even if we could. - mD3D9Surface = nullptr; - return false; - } - - if (!mD3D9Surface) { - HRESULT hr = mTexture->GetSurfaceLevel(0, getter_AddRefs(mD3D9Surface)); - if (FAILED(hr)) { - NS_WARNING("Failed to get texture surface level."); - return false; - } - } - return true; -} -void -D3D9TextureData::Unlock() -{ - if (mLockRect) { - mD3D9Surface->UnlockRect(); - mLockRect = false; - } -} - -bool -D3D9TextureData::Serialize(SurfaceDescriptor& aOutDescriptor) -{ - mTexture.get()->AddRef(); // Release in TextureHostD3D9::TextureHostD3D9 - aOutDescriptor = SurfaceDescriptorD3D9(reinterpret_cast(mTexture.get())); - return true; -} - -already_AddRefed -D3D9TextureData::BorrowDrawTarget() -{ - MOZ_ASSERT(mD3D9Surface); - if (!mD3D9Surface) { - return nullptr; - } - - RefPtr dt; - if (ContentForFormat(mFormat) == gfxContentType::COLOR) { - RefPtr surface = new gfxWindowsSurface(mD3D9Surface); - if (!surface || surface->CairoStatus()) { - NS_WARNING("Could not create gfxASurface for d3d9 surface"); - return nullptr; - } - dt = gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(surface, mSize); - - if (!dt) { - return nullptr; - } - } else { - // gfxWindowsSurface don't support transparency so we can't use the d3d9 - // windows surface optimization. - // Instead we have to use a gfxImageSurface and fallback for font drawing. - D3DLOCKED_RECT rect; - HRESULT hr = mD3D9Surface->LockRect(&rect, nullptr, 0); - if (FAILED(hr) || !rect.pBits) { - gfxCriticalError() << "Failed to lock rect borrowing the target in D3D9 (BDT) " << hexa(hr); - return nullptr; - } - dt = gfxPlatform::CreateDrawTargetForData((uint8_t*)rect.pBits, mSize, - rect.Pitch, mFormat); - if (!dt) { - return nullptr; - } - - mLockRect = true; - } - - if (mNeedsClear) { - dt->ClearRect(Rect(0, 0, mSize.width, mSize.height)); - mNeedsClear = false; - } - if (mNeedsClearWhite) { - dt->FillRect(Rect(0, 0, mSize.width, mSize.height), ColorPattern(Color(1.0, 1.0, 1.0, 1.0))); - mNeedsClearWhite = false; - } - - return dt.forget(); -} - -bool -D3D9TextureData::UpdateFromSurface(gfx::SourceSurface* aSurface) -{ - MOZ_ASSERT(mD3D9Surface); - - // gfxWindowsSurface don't support transparency so we can't use the d3d9 - // windows surface optimization. - // Instead we have to use a gfxImageSurface and fallback for font drawing. - D3DLOCKED_RECT rect; - HRESULT hr = mD3D9Surface->LockRect(&rect, nullptr, 0); - if (FAILED(hr) || !rect.pBits) { - gfxCriticalError() << "Failed to lock rect borrowing the target in D3D9 (UFS) " << hexa(hr); - return false; - } - - RefPtr srcSurf = aSurface->GetDataSurface(); - - if (!srcSurf) { - gfxCriticalError() << "Failed to GetDataSurface in UpdateFromSurface (D3D9)."; - mD3D9Surface->UnlockRect(); - return false; - } - - DataSourceSurface::MappedSurface sourceMap; - if (!srcSurf->Map(DataSourceSurface::READ, &sourceMap)) { - gfxCriticalError() << "Failed to map source surface for UpdateFromSurface (D3D9)."; - return false; - } - - for (int y = 0; y < srcSurf->GetSize().height; y++) { - memcpy((uint8_t*)rect.pBits + rect.Pitch * y, - sourceMap.mData + sourceMap.mStride * y, - srcSurf->GetSize().width * BytesPerPixel(srcSurf->GetFormat())); - } - - srcSurf->Unmap(); - mD3D9Surface->UnlockRect(); - - return true; -} - -DXGID3D9TextureData::DXGID3D9TextureData(gfx::SurfaceFormat aFormat, - IDirect3DTexture9* aTexture, HANDLE aHandle, - IDirect3DDevice9* aDevice) -: mDevice(aDevice) -, mTexture(aTexture) -, mFormat(aFormat) -, mHandle(aHandle) -{ - MOZ_COUNT_CTOR(DXGID3D9TextureData); -} - -DXGID3D9TextureData::~DXGID3D9TextureData() -{ - gfxWindowsPlatform::sD3D9SharedTextures -= mDesc.Width * mDesc.Height * 4; - MOZ_COUNT_DTOR(DXGID3D9TextureData); -} - -// static -DXGID3D9TextureData* -DXGID3D9TextureData::Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, - TextureFlags aFlags, - IDirect3DDevice9* aDevice) -{ - PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS); - MOZ_ASSERT(aFormat == gfx::SurfaceFormat::B8G8R8A8); - if (aFormat != gfx::SurfaceFormat::B8G8R8A8) { - return nullptr; - } - - RefPtr texture; - HANDLE shareHandle = nullptr; - HRESULT hr = aDevice->CreateTexture(aSize.width, aSize.height, - 1, - D3DUSAGE_RENDERTARGET, - D3DFMT_A8R8G8B8, - D3DPOOL_DEFAULT, - getter_AddRefs(texture), - &shareHandle); - if (FAILED(hr) || !shareHandle) { - return nullptr; - } - - D3DSURFACE_DESC surfaceDesc; - hr = texture->GetLevelDesc(0, &surfaceDesc); - if (FAILED(hr)) { - return nullptr; - } - DXGID3D9TextureData* data = new DXGID3D9TextureData(aFormat, texture, shareHandle, aDevice); - data->mDesc = surfaceDesc; - - gfxWindowsPlatform::sD3D9SharedTextures += aSize.width * aSize.height * 4; - return data; -} - -void -DXGID3D9TextureData::FillInfo(TextureData::Info& aInfo) const -{ - aInfo.size = GetSize(); - aInfo.format = mFormat; - aInfo.supportsMoz2D = false; - aInfo.canExposeMappedData = false; - aInfo.hasIntermediateBuffer = false; - aInfo.hasSynchronization = false; -} - -already_AddRefed -DXGID3D9TextureData::GetD3D9Surface() const -{ - RefPtr textureSurface; - HRESULT hr = mTexture->GetSurfaceLevel(0, getter_AddRefs(textureSurface)); - NS_ENSURE_TRUE(SUCCEEDED(hr), nullptr); - - return textureSurface.forget(); -} - -bool -DXGID3D9TextureData::Serialize(SurfaceDescriptor& aOutDescriptor) -{ - aOutDescriptor = SurfaceDescriptorD3D10((WindowsHandle)(mHandle), mFormat, GetSize()); - return true; -} - - -TextureHostD3D9::TextureHostD3D9(TextureFlags aFlags, - const SurfaceDescriptorD3D9& aDescriptor) - : TextureHost(aFlags) - , mFormat(SurfaceFormat::UNKNOWN) - , mIsLocked(false) -{ - mTexture = reinterpret_cast(aDescriptor.texture()); - MOZ_ASSERT(mTexture); - mTexture.get()->Release(); // see AddRef in TextureClientD3D9::ToSurfaceDescriptor - MOZ_ASSERT(mTexture); - D3DSURFACE_DESC desc; - HRESULT hr = mTexture->GetLevelDesc(0, &desc); - if (!FAILED(hr)) { - mFormat = D3D9FormatToSurfaceFormat(desc.Format); - mSize.width = desc.Width; - mSize.height = desc.Height; - } -} - -bool -DataTextureSourceD3D9::UpdateFromTexture(IDirect3DTexture9* aTexture, - const nsIntRegion* aRegion) -{ - PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS); - MOZ_ASSERT(aTexture); - - D3DSURFACE_DESC desc; - HRESULT hr = aTexture->GetLevelDesc(0, &desc); - if (FAILED(hr)) { - return false; - } else { - // If we changed the compositor, the size might have been reset to zero - // Otherwise the texture size must not change. - MOZ_ASSERT(mFormat == D3D9FormatToSurfaceFormat(desc.Format)); - MOZ_ASSERT(!mSize.width || mSize.width == desc.Width); - MOZ_ASSERT(!mSize.height || mSize.height == desc.Height); - mSize = IntSize(desc.Width, desc.Height); - } - - RefPtr dm = DeviceManagerD3D9::Get(); - if (!dm || !dm->device()) { - return false; - } - - if (!mTexture) { - mTexture = dm->CreateTexture(mSize, SurfaceFormatToD3D9Format(mFormat), - D3DPOOL_DEFAULT, this); - if (!mTexture) { - NS_WARNING("Failed to create a texture"); - return false; - } - } - - RefPtr srcSurface; - RefPtr dstSurface; - - hr = aTexture->GetSurfaceLevel(0, getter_AddRefs(srcSurface)); - if (FAILED(hr)) { - return false; - } - hr = mTexture->GetSurfaceLevel(0, getter_AddRefs(dstSurface)); - if (FAILED(hr)) { - return false; - } - - if (aRegion) { - for (auto iter = aRegion->RectIter(); !iter.Done(); iter.Next()) { - const IntRect& iterRect = iter.Get(); - RECT rect; - rect.left = iterRect.x; - rect.top = iterRect.y; - rect.right = iterRect.XMost(); - rect.bottom = iterRect.YMost(); - - POINT point; - point.x = iterRect.x; - point.y = iterRect.y; - hr = dm->device()->UpdateSurface(srcSurface, &rect, dstSurface, &point); - if (FAILED(hr)) { - NS_WARNING("Failed Update the surface"); - return false; - } - } - } else { - hr = dm->device()->UpdateSurface(srcSurface, nullptr, dstSurface, nullptr); - if (FAILED(hr)) { - NS_WARNING("Failed Update the surface"); - return false; - } - } - mIsTiled = false; - return true; -} - -void -TextureHostD3D9::UpdatedInternal(const nsIntRegion* aRegion) -{ - MOZ_ASSERT(mTexture); - if (!mTexture) { - return; - } - - const nsIntRegion* regionToUpdate = aRegion; - if (!mTextureSource) { - mTextureSource = new DataTextureSourceD3D9(mFormat, mSize, mCompositor, - nullptr, mFlags); - if (mFlags & TextureFlags::COMPONENT_ALPHA) { - // Update the full region the first time for component alpha textures. - regionToUpdate = nullptr; - } - } - - if (!mTextureSource->UpdateFromTexture(mTexture, regionToUpdate)) { - gfxCriticalNote << "[D3D9] DataTextureSourceD3D9::UpdateFromTexture failed"; - } - - ReadUnlock(); -} - -IDirect3DDevice9* -TextureHostD3D9::GetDevice() -{ - if (mFlags & TextureFlags::INVALID_COMPOSITOR) { - return nullptr; - } - return mCompositor ? mCompositor->device() : nullptr; -} - -void -TextureHostD3D9::SetCompositor(Compositor* aCompositor) -{ - mCompositor = AssertD3D9Compositor(aCompositor); - if (!mCompositor) { - mTextureSource = nullptr; - return; - } - if (mTextureSource) { - mTextureSource->SetCompositor(aCompositor); - } -} - -Compositor* -TextureHostD3D9::GetCompositor() -{ - return mCompositor; -} - -bool -TextureHostD3D9::BindTextureSource(CompositableTextureSourceRef& aTexture) -{ - MOZ_ASSERT(mIsLocked); - MOZ_ASSERT(mTextureSource); - aTexture = mTextureSource; - return !!aTexture; -} - -bool -TextureHostD3D9::Lock() -{ - MOZ_ASSERT(!mIsLocked); - // XXX - Currently if a TextureHostD3D9 is created but Update is never called, - // it will not have a TextureSource although it could since it has a valid - // D3D9 texture. - mIsLocked = !!mTextureSource; - return mIsLocked; -} - -void -TextureHostD3D9::Unlock() -{ - MOZ_ASSERT(mIsLocked); - mIsLocked = false; -} - -void -TextureHostD3D9::DeallocateDeviceData() -{ - mTextureSource = nullptr; -} - -DXGITextureHostD3D9::DXGITextureHostD3D9(TextureFlags aFlags, - const SurfaceDescriptorD3D10& aDescriptor) - : TextureHost(aFlags) - , mHandle(aDescriptor.handle()) - , mFormat(aDescriptor.format()) - , mSize(aDescriptor.size()) - , mIsLocked(false) -{ - MOZ_ASSERT(mHandle); - OpenSharedHandle(); -} - -IDirect3DDevice9* -DXGITextureHostD3D9::GetDevice() -{ - if (mFlags & TextureFlags::INVALID_COMPOSITOR) { - return nullptr; - } - return mCompositor ? mCompositor->device() : nullptr; -} - -void -DXGITextureHostD3D9::OpenSharedHandle() -{ - MOZ_ASSERT(!mTextureSource); - - if (!GetDevice()) { - return; - } - - RefPtr texture; - HRESULT hr = GetDevice()->CreateTexture(mSize.width, mSize.height, 1, - D3DUSAGE_RENDERTARGET, - SurfaceFormatToD3D9Format(mFormat), - D3DPOOL_DEFAULT, - getter_AddRefs(texture), - (HANDLE*)&mHandle); - if (FAILED(hr)) { - NS_WARNING("Failed to open shared texture"); - return; - } - - mTextureSource = new DataTextureSourceD3D9(mFormat, mSize, mCompositor, texture); - - return; -} - -bool -DXGITextureHostD3D9::BindTextureSource(CompositableTextureSourceRef& aTexture) -{ - MOZ_ASSERT(mIsLocked); - MOZ_ASSERT(mTextureSource); - aTexture = mTextureSource; - return !!aTexture; -} - -bool -DXGITextureHostD3D9::Lock() -{ - MOZ_ASSERT(!mIsLocked); - - if (!mCompositor) { - NS_WARNING("no suitable compositor"); - return false; - } - - if (!GetDevice()) { - return false; - } - - if (!mTextureSource) { - OpenSharedHandle(); - } - mIsLocked = !!mTextureSource; - return mIsLocked; -} - -void -DXGITextureHostD3D9::Unlock() -{ - MOZ_ASSERT(mIsLocked); - mIsLocked = false; -} - -void -DXGITextureHostD3D9::SetCompositor(Compositor* aCompositor) -{ - mCompositor = AssertD3D9Compositor(aCompositor); - if (!mCompositor) { - mTextureSource = nullptr; - } -} - -Compositor* -DXGITextureHostD3D9::GetCompositor() -{ - return mCompositor; -} - -void -DXGITextureHostD3D9::DeallocateDeviceData() -{ - mTextureSource = nullptr; -} - -DXGIYCbCrTextureHostD3D9::DXGIYCbCrTextureHostD3D9(TextureFlags aFlags, - const SurfaceDescriptorDXGIYCbCr& aDescriptor) - : TextureHost(aFlags) - , mSize(aDescriptor.size()) - , mSizeY(aDescriptor.sizeY()) - , mSizeCbCr(aDescriptor.sizeCbCr()) - , mIsLocked(false) -{ - mHandles[0] = reinterpret_cast(aDescriptor.handleY()); - mHandles[1] = reinterpret_cast(aDescriptor.handleCb()); - mHandles[2] = reinterpret_cast(aDescriptor.handleCr()); -} - -IDirect3DDevice9* -DXGIYCbCrTextureHostD3D9::GetDevice() -{ - if (mFlags & TextureFlags::INVALID_COMPOSITOR) { - return nullptr; - } - return mCompositor ? mCompositor->device() : nullptr; -} - -void -DXGIYCbCrTextureHostD3D9::SetCompositor(Compositor* aCompositor) -{ - mCompositor = AssertD3D9Compositor(aCompositor); - if (!mCompositor) { - mTextureSources[0] = nullptr; - mTextureSources[1] = nullptr; - mTextureSources[2] = nullptr; - } -} - -Compositor* -DXGIYCbCrTextureHostD3D9::GetCompositor() -{ - return mCompositor; -} - -bool -DXGIYCbCrTextureHostD3D9::Lock() -{ - if (!mCompositor) { - NS_WARNING("no suitable compositor"); - return false; - } - - if (!GetDevice()) { - NS_WARNING("trying to lock a TextureHost without a D3D device"); - return false; - } - if (!mTextureSources[0]) { - if (!mHandles[0]) { - return false; - } - - if (FAILED(GetDevice()->CreateTexture(mSizeY.width, mSizeY.height, - 1, 0, D3DFMT_A8, D3DPOOL_DEFAULT, - getter_AddRefs(mTextures[0]), &mHandles[0]))) { - return false; - } - - if (FAILED(GetDevice()->CreateTexture(mSizeCbCr.width, mSizeCbCr.height, - 1, 0, D3DFMT_A8, D3DPOOL_DEFAULT, - getter_AddRefs(mTextures[1]), &mHandles[1]))) { - return false; - } - - if (FAILED(GetDevice()->CreateTexture(mSizeCbCr.width, mSizeCbCr.height, - 1, 0, D3DFMT_A8, D3DPOOL_DEFAULT, - getter_AddRefs(mTextures[2]), &mHandles[2]))) { - return false; - } - - mTextureSources[0] = new DataTextureSourceD3D9(SurfaceFormat::A8, mSize, mCompositor, mTextures[0]); - mTextureSources[1] = new DataTextureSourceD3D9(SurfaceFormat::A8, mSize, mCompositor, mTextures[1]); - mTextureSources[2] = new DataTextureSourceD3D9(SurfaceFormat::A8, mSize, mCompositor, mTextures[2]); - mTextureSources[0]->SetNextSibling(mTextureSources[1]); - mTextureSources[1]->SetNextSibling(mTextureSources[2]); - } - - mIsLocked = true; - return mIsLocked; -} - -void -DXGIYCbCrTextureHostD3D9::Unlock() -{ - MOZ_ASSERT(mIsLocked); - mIsLocked = false; -} - -bool -DXGIYCbCrTextureHostD3D9::BindTextureSource(CompositableTextureSourceRef& aTexture) -{ - MOZ_ASSERT(mIsLocked); - // If Lock was successful we must have a valid TextureSource. - MOZ_ASSERT(mTextureSources[0] && mTextureSources[1] && mTextureSources[2]); - aTexture = mTextureSources[0].get(); - return !!aTexture; -} - -} -} diff --git a/gfx/layers/d3d9/TextureD3D9.h b/gfx/layers/d3d9/TextureD3D9.h deleted file mode 100644 index febd8e580c18..000000000000 --- a/gfx/layers/d3d9/TextureD3D9.h +++ /dev/null @@ -1,433 +0,0 @@ -/* -*- 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/. */ - -#ifndef MOZILLA_GFX_TEXTURED3D9_H -#define MOZILLA_GFX_TEXTURED3D9_H - -#include "mozilla/layers/Compositor.h" -#include "mozilla/layers/TextureClient.h" -#include "mozilla/layers/TextureHost.h" -#include "mozilla/GfxMessageUtils.h" -#include "mozilla/gfx/2D.h" -#include "gfxWindowsPlatform.h" -#include "d3d9.h" -#include -#include "DeviceManagerD3D9.h" - -namespace mozilla { -namespace layers { - -class CompositorD3D9; - -class TextureSourceD3D9 -{ - friend class DeviceManagerD3D9; - -public: - TextureSourceD3D9() - : mPreviousHost(nullptr) - , mNextHost(nullptr) - , mCreatingDeviceManager(nullptr) - {} - virtual ~TextureSourceD3D9(); - - virtual IDirect3DTexture9* GetD3D9Texture() { return mTexture; } - - StereoMode GetStereoMode() const { return mStereoMode; }; - - // Release all texture memory resources held by the texture host. - virtual void ReleaseTextureResources() - { - mTexture = nullptr; - } - -protected: - virtual gfx::IntSize GetSize() const { return mSize; } - void SetSize(const gfx::IntSize& aSize) { mSize = aSize; } - - // Helper methods for creating and copying textures. - already_AddRefed InitTextures( - DeviceManagerD3D9* aDeviceManager, - const gfx::IntSize &aSize, - _D3DFORMAT aFormat, - RefPtr& aSurface, - D3DLOCKED_RECT& aLockedRect); - - already_AddRefed DataToTexture( - DeviceManagerD3D9* aDeviceManager, - unsigned char *aData, - int aStride, - const gfx::IntSize &aSize, - _D3DFORMAT aFormat, - uint32_t aBPP); - - // aTexture should be in SYSTEMMEM, returns a texture in the default - // pool (that is, in video memory). - already_AddRefed TextureToTexture( - DeviceManagerD3D9* aDeviceManager, - IDirect3DTexture9* aTexture, - const gfx::IntSize& aSize, - _D3DFORMAT aFormat); - - gfx::IntSize mSize; - - // Linked list of all objects holding d3d9 textures. - TextureSourceD3D9* mPreviousHost; - TextureSourceD3D9* mNextHost; - // The device manager that created our textures. - RefPtr mCreatingDeviceManager; - - StereoMode mStereoMode; - RefPtr mTexture; -}; - -/** - * A TextureSource that implements the DataTextureSource interface. - * it can be used without a TextureHost and is able to upload texture data - * from a gfx::DataSourceSurface. - */ -class DataTextureSourceD3D9 : public DataTextureSource - , public TextureSourceD3D9 - , public BigImageIterator -{ -public: - /// Constructor allowing the texture to perform texture uploads. - /// - /// The texture can be used as an actual DataTextureSource. - DataTextureSourceD3D9(gfx::SurfaceFormat aFormat, - CompositorD3D9* aCompositor, - TextureFlags aFlags = TextureFlags::DEFAULT, - StereoMode aStereoMode = StereoMode::MONO); - - /// Constructor for textures created around DXGI shared handles, disallowing - /// texture uploads. - /// - /// The texture CANNOT be used as a DataTextureSource. - DataTextureSourceD3D9(gfx::SurfaceFormat aFormat, - gfx::IntSize aSize, - CompositorD3D9* aCompositor, - IDirect3DTexture9* aTexture, - TextureFlags aFlags = TextureFlags::DEFAULT); - - virtual ~DataTextureSourceD3D9(); - - virtual const char* Name() const override { return "DataTextureSourceD3D9"; } - - // DataTextureSource - - virtual bool Update(gfx::DataSourceSurface* aSurface, - nsIntRegion* aDestRegion = nullptr, - gfx::IntPoint* aSrcOffset = nullptr) override; - - // TextureSource - - virtual TextureSourceD3D9* AsSourceD3D9() override { return this; } - - virtual IDirect3DTexture9* GetD3D9Texture() override; - - // Returns nullptr if this texture was created by a DXGI TextureHost. - virtual DataTextureSource* AsDataTextureSource() override { return mAllowTextureUploads ? this : nullptr; } - - virtual void DeallocateDeviceData() override { mTexture = nullptr; } - - virtual gfx::IntSize GetSize() const override { return mSize; } - - virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; } - - virtual void SetCompositor(Compositor* aCompositor) override; - - // BigImageIterator - - virtual BigImageIterator* AsBigImageIterator() override { return mIsTiled ? this : nullptr; } - - virtual size_t GetTileCount() override { return mTileTextures.size(); } - - virtual bool NextTile() override { return (++mCurrentTile < mTileTextures.size()); } - - virtual gfx::IntRect GetTileRect() override; - - virtual void EndBigImageIteration() override { mIterating = false; } - - virtual void BeginBigImageIteration() override - { - mIterating = true; - mCurrentTile = 0; - } - - /** - * Copy the content of aTexture using the GPU. - */ - bool UpdateFromTexture(IDirect3DTexture9* aTexture, const nsIntRegion* aRegion); - -protected: - gfx::IntRect GetTileRect(uint32_t aTileIndex) const; - - void Reset(); - - std::vector< RefPtr > mTileTextures; - RefPtr mCompositor; - gfx::SurfaceFormat mFormat; - uint32_t mCurrentTile; - TextureFlags mFlags; - bool mIsTiled; - bool mIterating; - bool mAllowTextureUploads; -}; - -/** - * Needs a D3D9 context on the client side. - * The corresponding TextureHost is TextureHostD3D9. - */ -class D3D9TextureData : public TextureData -{ -public: - ~D3D9TextureData(); - - virtual bool Serialize(SurfaceDescriptor& aOutDescrptor) override; - - virtual bool Lock(OpenMode aMode) override; - - virtual void Unlock() override; - - virtual void FillInfo(TextureData::Info& aInfo) const override; - - virtual already_AddRefed BorrowDrawTarget() override; - - virtual bool UpdateFromSurface(gfx::SourceSurface* aSurface) override; - - virtual TextureData* - CreateSimilar(LayersIPCChannel* aAllocator, - LayersBackend aLayersBackend, - TextureFlags aFlags, - TextureAllocationFlags aAllocFlags) const override; - - static D3D9TextureData* - Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, TextureAllocationFlags aFlags); - - virtual void Deallocate(LayersIPCChannel* aAllocator) override {} - -protected: - D3D9TextureData(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, - IDirect3DTexture9* aTexture); - - RefPtr mTexture; - RefPtr mD3D9Surface; - gfx::IntSize mSize; - gfx::SurfaceFormat mFormat; - bool mNeedsClear; - bool mNeedsClearWhite; - bool mLockRect; -}; - -/** - * Wraps a D3D9 texture, shared with the compositor though DXGI. - * At the moment it is only used with D3D11 compositing, and the corresponding - * TextureHost is DXGITextureHostD3D11. - */ -class DXGID3D9TextureData : public TextureData -{ -public: - static DXGID3D9TextureData* - Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, TextureFlags aFlags, IDirect3DDevice9* aDevice); - - ~DXGID3D9TextureData(); - - virtual void FillInfo(TextureData::Info& aInfo) const override; - - virtual bool Lock(OpenMode) override { return true; } - - virtual void Unlock() override {} - - virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override; - - virtual void Deallocate(LayersIPCChannel* aAllocator) override {} - - IDirect3DDevice9* GetD3D9Device() { return mDevice; } - IDirect3DTexture9* GetD3D9Texture() { return mTexture; } - HANDLE GetShareHandle() const { return mHandle; } - already_AddRefed GetD3D9Surface() const; - - const D3DSURFACE_DESC& GetDesc() const - { - return mDesc; - } - - gfx::IntSize GetSize() const { return gfx::IntSize(mDesc.Width, mDesc.Height); } - -protected: - DXGID3D9TextureData(gfx::SurfaceFormat aFormat, - IDirect3DTexture9* aTexture, HANDLE aHandle, - IDirect3DDevice9* aDevice); - - RefPtr mDevice; - RefPtr mTexture; - gfx::SurfaceFormat mFormat; - HANDLE mHandle; - D3DSURFACE_DESC mDesc; -}; - -class TextureHostD3D9 : public TextureHost -{ -public: - TextureHostD3D9(TextureFlags aFlags, - const SurfaceDescriptorD3D9& aDescriptor); - - virtual bool BindTextureSource(CompositableTextureSourceRef& aTexture) override; - - virtual void DeallocateDeviceData() override; - - virtual void SetCompositor(Compositor* aCompositor) override; - - virtual Compositor* GetCompositor() override; - - virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; } - - virtual bool Lock() override; - - virtual void Unlock() override; - - virtual gfx::IntSize GetSize() const override { return mSize; } - - virtual already_AddRefed GetAsSurface() override - { - return nullptr; - } - - virtual bool HasIntermediateBuffer() const override { return true; } - -protected: - explicit TextureHostD3D9(TextureFlags aFlags); - IDirect3DDevice9* GetDevice(); - - virtual void UpdatedInternal(const nsIntRegion* aRegion) override; - - RefPtr mTextureSource; - RefPtr mTexture; - RefPtr mCompositor; - gfx::IntSize mSize; - gfx::SurfaceFormat mFormat; - bool mIsLocked; -}; - -class DXGITextureHostD3D9 : public TextureHost -{ -public: - DXGITextureHostD3D9(TextureFlags aFlags, - const SurfaceDescriptorD3D10& aDescriptor); - - virtual bool BindTextureSource(CompositableTextureSourceRef& aTexture) override; - - virtual void DeallocateDeviceData() override; - - virtual void SetCompositor(Compositor* aCompositor) override; - - virtual Compositor* GetCompositor() override; - - virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; } - - virtual gfx::IntSize GetSize() const override { return mSize; } - - virtual bool Lock() override; - - virtual void Unlock() override; - - virtual already_AddRefed GetAsSurface() override - { - return nullptr; // TODO: cf bug 872568 - } - -protected: - void OpenSharedHandle(); - IDirect3DDevice9* GetDevice(); - - RefPtr mTextureSource; - RefPtr mCompositor; - WindowsHandle mHandle; - gfx::SurfaceFormat mFormat; - gfx::IntSize mSize; - bool mIsLocked; -}; - -class DXGIYCbCrTextureHostD3D9 : public TextureHost -{ -public: - DXGIYCbCrTextureHostD3D9(TextureFlags aFlags, - const SurfaceDescriptorDXGIYCbCr& aDescriptor); - - virtual bool BindTextureSource(CompositableTextureSourceRef& aTexture) override; - - virtual void DeallocateDeviceData() override {} - - virtual void SetCompositor(Compositor* aCompositor) override; - - virtual Compositor* GetCompositor() override; - - virtual gfx::SurfaceFormat GetFormat() const override { return gfx::SurfaceFormat::YUV; } - - // Bug 1305906 fixes YUVColorSpace handling - virtual YUVColorSpace GetYUVColorSpace() const override { return YUVColorSpace::BT601; } - - virtual bool Lock() override; - virtual void Unlock() override; - virtual gfx::IntSize GetSize() const override { return mSize; } - - virtual already_AddRefed GetAsSurface() override - { - return nullptr; - } - - protected: - IDirect3DDevice9* GetDevice(); - - HANDLE mHandles[3]; - RefPtr mTextures[3]; - RefPtr mTextureSources[3]; - - RefPtr mCompositor; - gfx::IntSize mSize; - gfx::IntSize mSizeY; - gfx::IntSize mSizeCbCr; - bool mIsLocked; - }; - -class CompositingRenderTargetD3D9 : public CompositingRenderTarget, - public TextureSourceD3D9 -{ -public: - CompositingRenderTargetD3D9(IDirect3DTexture9* aTexture, - SurfaceInitMode aInit, - const gfx::IntRect& aRect); - // use for rendering to the main window, cannot be rendered as a texture - CompositingRenderTargetD3D9(IDirect3DSurface9* aSurface, - SurfaceInitMode aInit, - const gfx::IntRect& aRect); - virtual ~CompositingRenderTargetD3D9(); - - virtual const char* Name() const override { return "CompositingRenderTargetD3D9"; } - - virtual TextureSourceD3D9* AsSourceD3D9() override - { - MOZ_ASSERT(mTexture, - "No texture, can't be indirectly rendered. Is this the screen backbuffer?"); - return this; - } - - virtual gfx::IntSize GetSize() const override; - - void BindRenderTarget(IDirect3DDevice9* aDevice); - - IDirect3DSurface9* GetD3D9Surface() const { return mSurface; } - -private: - friend class CompositorD3D9; - - RefPtr mSurface; - SurfaceInitMode mInitMode; -}; - -} -} - -#endif /* MOZILLA_GFX_TEXTURED3D9_H */ diff --git a/gfx/layers/d3d9/genshaders.sh b/gfx/layers/d3d9/genshaders.sh deleted file mode 100644 index f857624504e4..000000000000 --- a/gfx/layers/d3d9/genshaders.sh +++ /dev/null @@ -1,35 +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/. - -tempfile=tmpShaderHeader -rm LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -ELayerQuadVS -nologo -Fh$tempfile -VnLayerQuadVS -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -ERGBAShader -nologo -Tps_2_0 -Fh$tempfile -VnRGBAShaderPS -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -EComponentPass1Shader -nologo -Tps_2_0 -Fh$tempfile -VnComponentPass1ShaderPS -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -EComponentPass2Shader -nologo -Tps_2_0 -Fh$tempfile -VnComponentPass2ShaderPS -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -ERGBShader -nologo -Tps_2_0 -Fh$tempfile -VnRGBShaderPS -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -EYCbCrShader -nologo -Tps_2_0 -Fh$tempfile -VnYCbCrShaderPS -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -ESolidColorShader -nologo -Tps_2_0 -Fh$tempfile -VnSolidColorShaderPS -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -ELayerQuadVSMask -nologo -Fh$tempfile -VnLayerQuadVSMask -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -ERGBAShaderMask -nologo -Tps_2_0 -Fh$tempfile -VnRGBAShaderPSMask -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -EComponentPass1ShaderMask -nologo -Tps_2_0 -Fh$tempfile -VnComponentPass1ShaderPSMask -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -EComponentPass2ShaderMask -nologo -Tps_2_0 -Fh$tempfile -VnComponentPass2ShaderPSMask -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -ERGBShaderMask -nologo -Tps_2_0 -Fh$tempfile -VnRGBShaderPSMask -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -EYCbCrShaderMask -nologo -Tps_2_0 -Fh$tempfile -VnYCbCrShaderPSMask -cat $tempfile >> LayerManagerD3D9Shaders.h -fxc LayerManagerD3D9Shaders.hlsl -ESolidColorShaderMask -nologo -Tps_2_0 -Fh$tempfile -VnSolidColorShaderPSMask -cat $tempfile >> LayerManagerD3D9Shaders.h -rm $tempfile diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index 03cda88a8353..cff723e29ea1 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -73,7 +73,6 @@ #include "nsXULAppAPI.h" // for XRE_GetIOMessageLoop #ifdef XP_WIN #include "mozilla/layers/CompositorD3D11.h" -#include "mozilla/layers/CompositorD3D9.h" #endif #include "GeckoProfiler.h" #include "mozilla/ipc/ProtocolTypes.h" @@ -1403,8 +1402,6 @@ CompositorBridgeParent::NewCompositor(const nsTArray& aBackendHin #ifdef XP_WIN } else if (aBackendHints[i] == LayersBackend::LAYERS_D3D11) { compositor = new CompositorD3D11(this, mWidget); - } else if (aBackendHints[i] == LayersBackend::LAYERS_D3D9) { - compositor = new CompositorD3D9(this, mWidget); #endif } nsCString failureReason; @@ -1418,9 +1415,6 @@ CompositorBridgeParent::NewCompositor(const nsTArray& aBackendHin Telemetry::Accumulate(Telemetry::OPENGL_COMPOSITING_FAILURE_ID, failureReason); } #ifdef XP_WIN - else if (aBackendHints[i] == LayersBackend::LAYERS_D3D9){ - Telemetry::Accumulate(Telemetry::D3D9_COMPOSITING_FAILURE_ID, failureReason); - } else if (aBackendHints[i] == LayersBackend::LAYERS_D3D11){ Telemetry::Accumulate(Telemetry::D3D11_COMPOSITING_FAILURE_ID, failureReason); } @@ -1437,11 +1431,6 @@ CompositorBridgeParent::NewCompositor(const nsTArray& aBackendHin Telemetry::Accumulate(Telemetry::OPENGL_COMPOSITING_FAILURE_ID, failureReason); } #ifdef XP_WIN - else if (aBackendHints[i] == LayersBackend::LAYERS_D3D9){ - gfxCriticalNote << "[D3D9] Failed to init compositor with reason: " - << failureReason.get(); - Telemetry::Accumulate(Telemetry::D3D9_COMPOSITING_FAILURE_ID, failureReason); - } else if (aBackendHints[i] == LayersBackend::LAYERS_D3D11){ gfxCriticalNote << "[D3D11] Failed to init compositor with reason: " << failureReason.get(); diff --git a/gfx/layers/ipc/LayersSurfaces.ipdlh b/gfx/layers/ipc/LayersSurfaces.ipdlh index 97ff049e60d2..c6e24e43a8ad 100644 --- a/gfx/layers/ipc/LayersSurfaces.ipdlh +++ b/gfx/layers/ipc/LayersSurfaces.ipdlh @@ -27,11 +27,6 @@ struct OverlaySource { IntSize size; }; -struct SurfaceDescriptorD3D9 { - // IDirect3DTexture9* - uintptr_t texture; -}; - struct SurfaceDescriptorFileMapping { WindowsHandle handle; SurfaceFormat format; @@ -122,7 +117,6 @@ struct SurfaceDescriptorBuffer { union SurfaceDescriptor { SurfaceDescriptorBuffer; - SurfaceDescriptorD3D9; SurfaceDescriptorDIB; SurfaceDescriptorD3D10; SurfaceDescriptorFileMapping; diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index 0cb1bf9fd0ba..35735bcf5491 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -59,22 +59,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': EXPORTS.mozilla.layers += [ 'TextureDIB.h', ] - if CONFIG['MOZ_ENABLE_D3D9_LAYER']: - EXPORTS += [ - 'd3d9/DeviceManagerD3D9.h', - ] - EXPORTS.mozilla.layers += [ - 'd3d9/CompositorD3D9.h', - 'd3d9/TextureD3D9.h', - ] - UNIFIED_SOURCES += [ - 'd3d9/TextureD3D9.cpp', - ] - SOURCES += [ - 'd3d9/CompositorD3D9.cpp', - 'd3d9/DeviceManagerD3D9.cpp', - 'd3d9/Nv3DVUtils.cpp', - ] if CONFIG['MOZ_ENABLE_D3D10_LAYER']: EXPORTS.mozilla.layers += [ 'd3d11/CompositorD3D11.h', diff --git a/gfx/src/DriverCrashGuard.cpp b/gfx/src/DriverCrashGuard.cpp index e7db923981f7..f1f09a0187e7 100644 --- a/gfx/src/DriverCrashGuard.cpp +++ b/gfx/src/DriverCrashGuard.cpp @@ -5,6 +5,7 @@ #include "DriverCrashGuard.h" #include "gfxEnv.h" #include "gfxPrefs.h" +#include "gfxConfig.h" #include "nsAppDirectoryServiceDefs.h" #include "nsDirectoryServiceUtils.h" #ifdef MOZ_CRASHREPORTER @@ -456,10 +457,7 @@ D3D11LayersCrashGuard::UpdateEnvironment() (!gfxPrefs::Direct2DDisabled() && FeatureEnabled(nsIGfxInfo::FEATURE_DIRECT2D)); changed |= CheckAndUpdateBoolPref("feature-d2d", d2dEnabled); - bool d3d11Enabled = !gfxPrefs::LayersPreferD3D9(); - if (!FeatureEnabled(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS)) { - d3d11Enabled = false; - } + bool d3d11Enabled = gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING); changed |= CheckAndUpdateBoolPref("feature-d3d11", d3d11Enabled); #endif diff --git a/gfx/tests/crashtests/595727-1.html b/gfx/tests/crashtests/595727-1.html index 13b048f8226d..d2012c715395 100644 --- a/gfx/tests/crashtests/595727-1.html +++ b/gfx/tests/crashtests/595727-1.html @@ -6,7 +6,7 @@ function doTest() { var r = document.documentElement; - while(r.firstChild) { r.removeChild(r.firstChild); } + while(r.firstChild) { r.firstChild.remove(); } var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body"); r.appendChild(body); body.contentEditable = "true"; diff --git a/gfx/tests/gtest/TextureHelper.h b/gfx/tests/gtest/TextureHelper.h index 8d7953a484b5..f2d1d9840103 100644 --- a/gfx/tests/gtest/TextureHelper.h +++ b/gfx/tests/gtest/TextureHelper.h @@ -14,11 +14,9 @@ #include "mozilla/layers/TextureHost.h" #include "mozilla/RefPtr.h" #ifdef XP_WIN -#include "DeviceManagerD3D9.h" #include "IMFYCbCrImage.h" #include "mozilla/gfx/DeviceManagerDx.h" #include "mozilla/layers/TextureD3D11.h" -#include "mozilla/layers/TextureD3D9.h" #include "mozilla/layers/TextureDIB.h" #endif @@ -26,42 +24,6 @@ using mozilla::gfx::SurfaceFormat; namespace mozilla { namespace layers { -#ifdef XP_WIN - -TextureData* -CreateDXGID3D9TextureData(IntSize aSize, SurfaceFormat aFormat, - TextureFlags aTextureFlag) -{ - - RefPtr d3d9Ex; - HMODULE d3d9lib = LoadLibraryW(L"d3d9.dll"); - decltype(Direct3DCreate9Ex)* d3d9Create = - (decltype(Direct3DCreate9Ex)*)GetProcAddress(d3d9lib, "Direct3DCreate9Ex"); - HRESULT hr = d3d9Create(D3D_SDK_VERSION, getter_AddRefs(d3d9Ex)); - - if (!d3d9Ex) { - return nullptr; - } - - D3DPRESENT_PARAMETERS params = { 0 }; - params.BackBufferWidth = 1; - params.BackBufferHeight = 1; - params.BackBufferFormat = D3DFMT_A8R8G8B8; - params.BackBufferCount = 1; - params.SwapEffect = D3DSWAPEFFECT_DISCARD; - params.hDeviceWindow = nullptr; - params.Windowed = TRUE; - params.Flags = D3DPRESENTFLAG_VIDEO; - - RefPtr device; - hr = d3d9Ex->CreateDeviceEx(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, nullptr, - D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | - D3DCREATE_MIXED_VERTEXPROCESSING, - ¶ms, nullptr, getter_AddRefs(device)); - - return DXGID3D9TextureData::Create(aSize, aFormat, aTextureFlag, device); -} -#endif /** * Create a YCbCrTextureClient according to the given backend. @@ -109,13 +71,7 @@ CreateYCbCrTextureClientWithBackend(LayersBackend aLayersBackend) #ifdef XP_WIN RefPtr device = DeviceManagerDx::Get()->GetContentDevice(); - if (!device || aLayersBackend != LayersBackend::LAYERS_D3D11) { - if (aLayersBackend == LayersBackend::LAYERS_D3D11 || - aLayersBackend == LayersBackend::LAYERS_D3D9) { - // Create GetD3D9TextureData. - data = IMFYCbCrImage::GetD3D9TextureData(clientData, size); - } - } else { + if (device && aLayersBackend == LayersBackend::LAYERS_D3D11) { // Create YCbCrD3D11TextureData data = IMFYCbCrImage::GetD3D11TextureData(clientData, size); } @@ -154,14 +110,6 @@ CreateTextureClientWithBackend(LayersBackend aLayersBackend) moz2DBackend == BackendType::DIRECT2D1_1)) { // Create DXGITextureData. data = DXGITextureData::Create(size, format, allocFlags); - } else if (aLayersBackend == LayersBackend::LAYERS_D3D9 && - moz2DBackend == BackendType::CAIRO) { - // Create DXGID3D9TextureData or D3D9TextureData. - data = CreateDXGID3D9TextureData(size, format, textureFlags); - - if (!data && DeviceManagerD3D9::GetDevice()) { - data = D3D9TextureData::Create(size, format, allocFlags); - } } else if (!data && format == SurfaceFormat::B8G8R8X8 && moz2DBackend == BackendType::CAIRO) { // Create DIBTextureData. diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index a55ddbbfcc78..42237858ccd2 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -325,6 +325,7 @@ private: DECL_GFX_PREF(Once, "dom.vr.openvr.enabled", VROpenVREnabled, bool, false); DECL_GFX_PREF(Once, "dom.vr.osvr.enabled", VROSVREnabled, bool, false); DECL_GFX_PREF(Live, "dom.vr.poseprediction.enabled", VRPosePredictionEnabled, bool, false); + DECL_GFX_PREF(Once, "dom.vr.require-gesture", VRRequireGesture, bool, true); DECL_GFX_PREF(Live, "dom.vr.puppet.enabled", VRPuppetEnabled, bool, false); DECL_GFX_PREF(Live, "dom.w3c_pointer_events.enabled", PointerEventsEnabled, bool, false); DECL_GFX_PREF(Live, "dom.w3c_touch_events.enabled", TouchEventsEnabled, int32_t, 0); @@ -465,7 +466,6 @@ private: DECL_GFX_PREF(Live, "layers.advanced.boxshadow-outer-layers", LayersAllowOuterBoxShadow, bool, false); DECL_GFX_PREF(Live, "layers.advanced.boxshadow-inset-layers", LayersAllowInsetBoxShadow, bool, false); DECL_GFX_PREF(Live, "layers.advanced.outline-layers", LayersAllowOutlineLayers, bool, false); - DECL_GFX_PREF(Skip, "layers.allow-d3d9-fallback", LayersAllowD3D9Fallback, bool, false); DECL_GFX_PREF(Once, "layers.amd-switchable-gfx.enabled", LayersAMDSwitchableGfxEnabled, bool, false); DECL_GFX_PREF(Once, "layers.async-pan-zoom.enabled", AsyncPanZoomEnabledDoNotUseDirectly, bool, true); DECL_GFX_PREF(Once, "layers.async-pan-zoom.separate-event-thread", AsyncPanZoomSeparateEventThread, bool, false); @@ -516,7 +516,6 @@ private: DECL_GFX_PREF(Once, "layers.offmainthreadcomposition.force-disabled", LayersOffMainThreadCompositionForceDisabled, bool, false); DECL_GFX_PREF(Live, "layers.offmainthreadcomposition.frame-rate", LayersCompositionFrameRate, int32_t,-1); DECL_GFX_PREF(Live, "layers.orientation.sync.timeout", OrientationSyncMillis, uint32_t, (uint32_t)0); - DECL_GFX_PREF(Skip, "layers.prefer-d3d9", LayersPreferD3D9, bool, false); DECL_GFX_PREF(Once, "layers.prefer-opengl", LayersPreferOpenGL, bool, false); DECL_GFX_PREF(Live, "layers.progressive-paint", ProgressivePaint, bool, false); DECL_GFX_PREF(Live, "layers.shared-buffer-provider.enabled", PersistentBufferProviderSharedEnabled, bool, false); @@ -576,6 +575,8 @@ private: #ifdef XP_WIN DECL_GFX_PREF(Live, "media.windows-media-foundation.allow-d3d11-dxva", PDMWMFAllowD3D11, bool, true); DECL_GFX_PREF(Live, "media.windows-media-foundation.max-dxva-videos", PDMWMFMaxDXVAVideos, uint32_t, 8); + DECL_GFX_PREF(Live, "media.windows-media-foundation.use-nv12-format", PDMWMFUseNV12Format, bool, true); + DECL_GFX_PREF(Once, "media.windows-media-foundation.use-sync-texture", PDMWMFUseSyncTexture, bool, true); DECL_GFX_PREF(Live, "media.wmf.low-latency.enabled", PDMWMFLowLatencyEnabled, bool, false); DECL_GFX_PREF(Live, "media.wmf.skip-blacklist", PDMWMFSkipBlacklist, bool, false); #endif diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index adc6a762edd1..860245a8d08f 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -37,7 +37,6 @@ #include "gfxGDIFont.h" #include "mozilla/layers/CompositorThread.h" -#include "DeviceManagerD3D9.h" #include "mozilla/layers/ReadbackManagerD3D11.h" #include "gfxDWriteFontList.h" @@ -325,7 +324,6 @@ gfxWindowsPlatform::~gfxWindowsPlatform() { mozilla::gfx::Factory::D2DCleanup(); - DeviceManagerD3D9::Shutdown(); DeviceManagerDx::Shutdown(); /* @@ -357,7 +355,6 @@ gfxWindowsPlatform::InitAcceleration() mFeatureLevels.AppendElement(D3D_FEATURE_LEVEL_9_3); DeviceManagerDx::Init(); - DeviceManagerD3D9::Init(); InitializeConfig(); InitializeDevices(); @@ -381,7 +378,7 @@ gfxWindowsPlatform::CanUseHardwareVideoDecoding() if (!dm) { return false; } - if (!gfxPrefs::LayersPreferD3D9() && !dm->TextureSharingWorks()) { + if (!dm->TextureSharingWorks()) { return false; } return !dm->IsWARP() && gfxPlatform::CanUseHardwareVideoDecoding(); @@ -1325,7 +1322,6 @@ gfxWindowsPlatform::InitializeConfig() if (XRE_IsParentProcess()) { // The parent process first determines which features can be attempted. // This information is relayed to content processes and the GPU process. - InitializeD3D9Config(); InitializeD3D11Config(); InitializeANGLEConfig(); InitializeD2DConfig(); @@ -1335,40 +1331,6 @@ gfxWindowsPlatform::InitializeConfig() } } -void -gfxWindowsPlatform::InitializeD3D9Config() -{ - MOZ_ASSERT(XRE_IsParentProcess()); - - FeatureState& d3d9 = gfxConfig::GetFeature(Feature::D3D9_COMPOSITING); - - if (!gfxConfig::IsEnabled(Feature::HW_COMPOSITING)) { - d3d9.DisableByDefault(FeatureStatus::Unavailable, "Hardware compositing is disabled", - NS_LITERAL_CSTRING("FEATURE_FAILURE_D3D9_NEED_HWCOMP")); - return; - } - - d3d9.SetDefaultFromPref( - gfxPrefs::GetLayersAllowD3D9FallbackPrefName(), - true, - gfxPrefs::GetLayersAllowD3D9FallbackPrefDefault()); - - if (!d3d9.IsEnabled() && gfxPrefs::LayersPreferD3D9()) { - d3d9.UserEnable("Direct3D9 enabled via layers.prefer-d3d9"); - } - - nsCString message; - nsCString failureId; - if (!gfxPlatform::IsGfxInfoStatusOkay(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, &message, - failureId)) { - d3d9.Disable(FeatureStatus::Blacklisted, message.get(), failureId); - } - - if (gfxConfig::IsForcedOnByUser(Feature::HW_COMPOSITING)) { - d3d9.UserForceEnable("Hardware compositing is force-enabled"); - } -} - void gfxWindowsPlatform::InitializeD3D11Config() { @@ -1384,13 +1346,6 @@ gfxWindowsPlatform::InitializeD3D11Config() d3d11.EnableByDefault(); - // If the user prefers D3D9, act as though they disabled D3D11. - if (gfxPrefs::LayersPreferD3D9()) { - d3d11.UserDisable("Disabled due to user preference for Direct3D 9", - NS_LITERAL_CSTRING("FEATURE_FAILURE_D3D11_PREF")); - return; - } - nsCString message; nsCString failureId; if (!gfxPlatform::IsGfxInfoStatusOkay(nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS, &message, failureId)) { @@ -1474,8 +1429,8 @@ gfxWindowsPlatform::InitializeD3D11() // is not blacklisted for D3D11 layers. This first attempt will try to create // a hardware accelerated device. If this creation fails or the hardware is // blacklisted, then this function will abort if WARP is disabled, causing us - // to fallback to D3D9 or Basic layers. If WARP is not disabled it will use - // a WARP device which should always be available on Windows 7 and higher. + // to fallback to Basic layers. If WARP is not disabled it will use a WARP + // device which should always be available on Windows 7 and higher. if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) { return; } @@ -1600,8 +1555,8 @@ gfxWindowsPlatform::InitGPUProcessSupport() NS_LITERAL_CSTRING("FEATURE_FAILURE_NO_D3D11")); } else if (!IsWin7SP1OrLater()) { // On Windows 7 Pre-SP1, DXGI 1.2 is not available and remote presentation - // for D3D11 will not work. Rather than take a regression and use D3D9, we - // revert back to in-process rendering. + // for D3D11 will not work. Rather than take a regression we revert back + // to in-process rendering. gpuProc.Disable( FeatureStatus::Unavailable, "Windows 7 Pre-SP1 cannot use the GPU process", @@ -1937,17 +1892,9 @@ gfxWindowsPlatform::GetAcceleratedCompositorBackends(nsTArray& aB aBackends.AppendElement(LayersBackend::LAYERS_OPENGL); } - if (gfxConfig::IsEnabled(Feature::D3D9_COMPOSITING) && gfxPrefs::LayersPreferD3D9()) { - aBackends.AppendElement(LayersBackend::LAYERS_D3D9); - } - if (gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) { aBackends.AppendElement(LayersBackend::LAYERS_D3D11); } - - if (gfxConfig::IsEnabled(Feature::D3D9_COMPOSITING) && !gfxPrefs::LayersPreferD3D9()) { - aBackends.AppendElement(LayersBackend::LAYERS_D3D9); - } } void @@ -1958,7 +1905,6 @@ gfxWindowsPlatform::ImportGPUDeviceData(const mozilla::gfx::GPUDeviceData& aData gfxPlatform::ImportGPUDeviceData(aData); gfxConfig::ImportChange(Feature::D3D11_COMPOSITING, aData.d3d11Compositing()); - gfxConfig::ImportChange(Feature::D3D9_COMPOSITING, aData.d3d9Compositing()); DeviceManagerDx* dm = DeviceManagerDx::Get(); if (gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) { @@ -1996,7 +1942,6 @@ gfxWindowsPlatform::ImportContentDeviceData(const mozilla::gfx::ContentDeviceDat const DevicePrefs& prefs = aData.prefs(); gfxConfig::Inherit(Feature::D3D11_COMPOSITING, prefs.d3d11Compositing()); - gfxConfig::Inherit(Feature::D3D9_COMPOSITING, prefs.d3d9Compositing()); gfxConfig::Inherit(Feature::DIRECT2D, prefs.useD2D1()); if (gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) { @@ -2015,7 +1960,6 @@ gfxWindowsPlatform::BuildContentDeviceData(ContentDeviceData* aOut) const FeatureState& d3d11 = gfxConfig::GetFeature(Feature::D3D11_COMPOSITING); aOut->prefs().d3d11Compositing() = d3d11.GetValue(); - aOut->prefs().d3d9Compositing() = gfxConfig::GetValue(Feature::D3D9_COMPOSITING); aOut->prefs().useD2D1() = gfxConfig::GetValue(Feature::DIRECT2D); if (d3d11.IsEnabled()) { diff --git a/gfx/thebes/gfxWindowsPlatform.h b/gfx/thebes/gfxWindowsPlatform.h index 24e626d62860..e502db08e4c5 100644 --- a/gfx/thebes/gfxWindowsPlatform.h +++ b/gfx/thebes/gfxWindowsPlatform.h @@ -50,7 +50,6 @@ class FeatureState; class DeviceManagerDx; } namespace layers { -class DeviceManagerD3D9; class ReadbackManagerD3D11; } } diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build index dee9b7bfa2cb..27fd92ea739d 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build @@ -256,7 +256,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'): DEFINES['MOZ_ENABLE_FREETYPE'] = True if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': - for var in ('MOZ_ENABLE_D3D9_LAYER', 'MOZ_ENABLE_D3D10_LAYER'): + for var in ('MOZ_ENABLE_D3D10_LAYER',): if CONFIG[var]: DEFINES[var] = True diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp index 8cc7096791ff..d6b4ec5b7711 100644 --- a/image/imgLoader.cpp +++ b/image/imgLoader.cpp @@ -772,12 +772,11 @@ NewImageChannel(nsIChannel** aResult, // If this is a favicon loading, we will use the originAttributes from the // loadingPrincipal as the channel's originAttributes. This allows the favicon // loading from XUL will use the correct originAttributes. - OriginAttributes attrs; - attrs.Inherit(aLoadingPrincipal->OriginAttributesRef()); nsCOMPtr loadInfo = (*aResult)->GetLoadInfo(); if (loadInfo) { - rv = loadInfo->SetOriginAttributes(attrs); + rv = + loadInfo->SetOriginAttributes(aLoadingPrincipal->OriginAttributesRef()); } } } else { @@ -805,7 +804,7 @@ NewImageChannel(nsIChannel** aResult, // has asked us to perform. OriginAttributes attrs; if (aLoadingPrincipal) { - attrs.Inherit(aLoadingPrincipal->OriginAttributesRef()); + attrs = aLoadingPrincipal->OriginAttributesRef(); } attrs.mPrivateBrowsingId = aRespectPrivacy ? 1 : 0; @@ -2349,7 +2348,7 @@ imgLoader::LoadImageWithChannel(nsIChannel* channel, OriginAttributes attrs; if (loadInfo) { - attrs.Inherit(loadInfo->GetOriginAttributes()); + attrs = loadInfo->GetOriginAttributes(); } nsresult rv; diff --git a/js/public/Value.h b/js/public/Value.h index 0874a76f7c2e..8bf1d4973cc9 100644 --- a/js/public/Value.h +++ b/js/public/Value.h @@ -966,7 +966,7 @@ ExposeValueToActiveJS(const Value& v) /************************************************************************/ -static inline Value +static inline MOZ_MAY_CALL_AFTER_MUST_RETURN Value NullValue() { Value v; diff --git a/js/src/jit-test/tests/cacheir/alloc-dense-elements.js b/js/src/jit-test/tests/cacheir/alloc-dense-elements.js new file mode 100644 index 000000000000..3013aa9ec1cb --- /dev/null +++ b/js/src/jit-test/tests/cacheir/alloc-dense-elements.js @@ -0,0 +1,9 @@ +function f() { + for (var i=0; i<100; i++) { + // Int32Array to force an IC in Ion. + var o = (i == 20) ? new Int32Array(1) : {}; + o[0] = i; + assertEq(o[0], i); + } +} +f(); diff --git a/js/src/jit/BaselineCacheIRCompiler.cpp b/js/src/jit/BaselineCacheIRCompiler.cpp index bd7a19a325c9..16c922016728 100644 --- a/js/src/jit/BaselineCacheIRCompiler.cpp +++ b/js/src/jit/BaselineCacheIRCompiler.cpp @@ -1116,9 +1116,36 @@ BaselineCacheIRCompiler::emitStoreDenseElementHole() // Fail if index > initLength. masm.branch32(Assembler::Below, initLength, index, failure->label()); - // Check the capacity. + // If index < capacity, we can add a dense element inline. If not we + // need to allocate more elements. + Label capacityOk; Address capacity(scratch, ObjectElements::offsetOfCapacity()); - masm.branch32(Assembler::BelowOrEqual, capacity, index, failure->label()); + masm.branch32(Assembler::Above, capacity, index, &capacityOk); + + // Check for non-writable array length. We only have to do this if + // index >= capacity. + masm.branchTest32(Assembler::NonZero, elementsFlags, + Imm32(ObjectElements::NONWRITABLE_ARRAY_LENGTH), + failure->label()); + + LiveRegisterSet save(GeneralRegisterSet::Volatile(), liveVolatileFloatRegs()); + save.takeUnchecked(scratch); + masm.PushRegsInMask(save); + + masm.setupUnalignedABICall(scratch); + masm.loadJSContext(scratch); + masm.passABIArg(scratch); + masm.passABIArg(obj); + masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, NativeObject::addDenseElementDontReportOOM)); + masm.mov(ReturnReg, scratch); + + masm.PopRegsInMask(save); + masm.branchIfFalseBool(scratch, failure->label()); + + // Load the reallocated elements pointer. + masm.loadPtr(Address(obj, NativeObject::offsetOfElements()), scratch); + + masm.bind(&capacityOk); // We increment initLength after the callTypeUpdateIC call, to ensure // the type update code doesn't read uninitialized memory. diff --git a/js/src/jit/CacheIR.cpp b/js/src/jit/CacheIR.cpp index 39df46f511b9..194133783304 100644 --- a/js/src/jit/CacheIR.cpp +++ b/js/src/jit/CacheIR.cpp @@ -2472,7 +2472,6 @@ SetPropIRGenerator::tryAttachSetDenseElementHole(HandleObject obj, ObjOperandId if (nobj->getElementsHeader()->isFrozen()) return false; - uint32_t capacity = nobj->getDenseCapacity(); uint32_t initLength = nobj->getDenseInitializedLength(); // Optimize if we're adding an element at initLength or writing to a hole. @@ -2483,12 +2482,13 @@ SetPropIRGenerator::tryAttachSetDenseElementHole(HandleObject obj, ObjOperandId if (!isAdd && !isHoleInBounds) return false; - // Checking the capacity also checks for arrays with non-writable length, - // as the capacity is always less than or equal to the length in this case. - if (index >= capacity) + // Can't add new elements to arrays with non-writable length. + if (isAdd && nobj->is() && !nobj->as().lengthIsWritable()) return false; - MOZ_ASSERT(!nobj->is()); + // Typed arrays don't have dense elements. + if (nobj->is()) + return false; // Check for other indexed properties or class hooks. if (!CanAttachAddElement(nobj, IsPropertyInitOp(op))) diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index 80bc47656a83..ca3a13dfcf4c 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -9614,48 +9614,81 @@ IonBuilder::jsop_not() return Ok(); } -bool -IonBuilder::objectsHaveCommonPrototype(TemporaryTypeSet* types, PropertyName* name, - bool isGetter, JSObject* foundProto, bool* guardGlobal) +NativeObject* +IonBuilder::commonPrototypeWithGetterSetter(TemporaryTypeSet* types, PropertyName* name, + bool isGetter, JSFunction* getterOrSetter, + bool* guardGlobal) { - // With foundProto a prototype with a getter or setter for name, return - // whether looking up name on any object in |types| will go through - // foundProto, i.e. all the objects have foundProto on their prototype - // chain and do not have a property for name before reaching foundProto. + // If there's a single object on the proto chain of all objects in |types| + // that contains a property |name| with |getterOrSetter| getter or setter + // function, return that object. // No sense looking if we don't know what's going on. if (!types || types->unknownObject()) - return false; + return nullptr; *guardGlobal = false; + NativeObject* foundProto = nullptr; for (unsigned i = 0; i < types->getObjectCount(); i++) { - if (types->getSingleton(i) == foundProto) - continue; - TypeSet::ObjectKey* key = types->getObject(i); if (!key) continue; while (key) { if (key->unknownProperties()) - return false; + return nullptr; const Class* clasp = key->clasp(); if (!ClassHasEffectlessLookup(clasp)) - return false; + return nullptr; JSObject* singleton = key->isSingleton() ? key->singleton() : nullptr; if (ObjectHasExtraOwnProperty(compartment, key, NameToId(name))) { if (!singleton || !singleton->is()) - return false; + return nullptr; *guardGlobal = true; } // Look for a getter/setter on the class itself which may need // to be called. if (isGetter && clasp->getOpsGetProperty()) - return false; + return nullptr; if (!isGetter && clasp->getOpsSetProperty()) - return false; + return nullptr; + + // If we have a singleton, check if it contains the getter or + // setter we're looking for. Note that we don't need to add any + // type constraints as the caller will add a Shape guard for the + // holder and type constraints for other objects on the proto + // chain. + // + // If the object is not a singleton, we fall back to the code below + // and check whether the property is missing. That's fine because + // we're looking for a getter or setter on the proto chain and + // these objects are singletons. + if (singleton) { + if (!singleton->is()) + return nullptr; + + NativeObject* singletonNative = &singleton->as(); + if (Shape* propShape = singletonNative->lookupPure(name)) { + // We found a property. Check if it's the getter or setter + // we're looking for. + Value getterSetterVal = ObjectValue(*getterOrSetter); + if (isGetter) { + if (propShape->getterOrUndefined() != getterSetterVal) + return nullptr; + } else { + if (propShape->setterOrUndefined() != getterSetterVal) + return nullptr; + } + + if (!foundProto) + foundProto = singletonNative; + else if (foundProto != singletonNative) + return nullptr; + break; + } + } // Test for isOwnProperty() without freezing. If we end up // optimizing, freezePropertiesForCommonPropFunc will freeze the @@ -9663,7 +9696,7 @@ IonBuilder::objectsHaveCommonPrototype(TemporaryTypeSet* types, PropertyName* na HeapTypeSetKey property = key->property(NameToId(name)); if (TypeSet* types = property.maybeTypes()) { if (!types->empty() || types->nonDataProperty()) - return false; + return nullptr; } if (singleton) { if (CanHaveEmptyPropertyTypesForOwnProperty(singleton)) { @@ -9673,19 +9706,22 @@ IonBuilder::objectsHaveCommonPrototype(TemporaryTypeSet* types, PropertyName* na } JSObject* proto = checkNurseryObject(key->proto().toObjectOrNull()); - - if (proto == foundProto) + if (foundProto && proto == foundProto) { + // We found an object on the proto chain that's known to have + // the getter or setter property, so we can stop looking. break; + } + if (!proto) { - // The foundProto being searched for did not show up on the - // object's prototype chain. - return false; + // The getter or setter being searched for did not show up on + // the object's prototype chain. + return nullptr; } key = TypeSet::ObjectKey::get(proto); } } - return true; + return foundProto; } void @@ -9719,20 +9755,19 @@ IonBuilder::freezePropertiesForCommonPrototype(TemporaryTypeSet* types, Property bool IonBuilder::testCommonGetterSetter(TemporaryTypeSet* types, PropertyName* name, - bool isGetter, JSObject* foundProto, Shape* lastProperty, - JSFunction* getterOrSetter, + bool isGetter, JSFunction* getterOrSetter, MDefinition** guard, Shape* globalShape/* = nullptr*/, MDefinition** globalGuard/* = nullptr */) { - MOZ_ASSERT(foundProto); + MOZ_ASSERT(getterOrSetter); MOZ_ASSERT_IF(globalShape, globalGuard); bool guardGlobal; // Check if all objects being accessed will lookup the name through foundProto. - if (!objectsHaveCommonPrototype(types, name, isGetter, foundProto, &guardGlobal) || - (guardGlobal && !globalShape)) - { + NativeObject* foundProto = + commonPrototypeWithGetterSetter(types, name, isGetter, getterOrSetter, &guardGlobal); + if (!foundProto || (guardGlobal && !globalShape)) { trackOptimizationOutcome(TrackedOutcome::MultiProtoPaths); return false; } @@ -9755,22 +9790,16 @@ IonBuilder::testCommonGetterSetter(TemporaryTypeSet* types, PropertyName* name, *globalGuard = addShapeGuard(globalObj, globalShape, Bailout_ShapeGuard); } - if (foundProto->isNative()) { - NativeObject& nativeProto = foundProto->as(); - if (nativeProto.lastProperty() == lastProperty) { - // The proto shape is the same as it was at the point when we - // created the baseline IC, so looking up the prop on the object as - // it is now should be safe. - Shape* propShape = nativeProto.lookupPure(name); - MOZ_ASSERT_IF(isGetter, propShape->getterObject() == getterOrSetter); - MOZ_ASSERT_IF(!isGetter, propShape->setterObject() == getterOrSetter); - if (propShape && !propShape->configurable()) - return true; - } - } + // If the getter/setter is not configurable we don't have to guard on the + // proto's shape. + Shape* propShape = foundProto->lookupPure(name); + MOZ_ASSERT_IF(isGetter, propShape->getterObject() == getterOrSetter); + MOZ_ASSERT_IF(!isGetter, propShape->setterObject() == getterOrSetter); + if (propShape && !propShape->configurable()) + return true; MInstruction* wrapper = constant(ObjectValue(*foundProto)); - *guard = addShapeGuard(wrapper, lastProperty, Bailout_ShapeGuard); + *guard = addShapeGuard(wrapper, foundProto->lastProperty(), Bailout_ShapeGuard); return true; } @@ -10719,39 +10748,44 @@ IonBuilder::getPropTryCommonGetter(bool* emitted, MDefinition* obj, PropertyName { MOZ_ASSERT(*emitted == false); - Shape* lastProperty = nullptr; - JSFunction* commonGetter = nullptr; - Shape* globalShape = nullptr; - JSObject* foundProto = nullptr; - bool isOwnProperty = false; - BaselineInspector::ReceiverVector receivers(alloc()); - BaselineInspector::ObjectGroupVector convertUnboxedGroups(alloc()); - if (!inspector->commonGetPropFunction(pc, innerized, &foundProto, &lastProperty, &commonGetter, - &globalShape, &isOwnProperty, - receivers, convertUnboxedGroups)) - { - return Ok(); - } - TemporaryTypeSet* objTypes = obj->resultTypeSet(); + + JSFunction* commonGetter = nullptr; MDefinition* guard = nullptr; MDefinition* globalGuard = nullptr; - bool canUseTIForGetter = false; - if (!isOwnProperty) { - // If it's not an own property, try to use TI to avoid shape guards. - // For own properties we use the path below. - canUseTIForGetter = testCommonGetterSetter(objTypes, name, /* isGetter = */ true, - foundProto, lastProperty, commonGetter, &guard, - globalShape, &globalGuard); - } - if (!canUseTIForGetter) { - // If it's an own property or type information is bad, we can still - // optimize the getter if we shape guard. - obj = addShapeGuardsForGetterSetter(obj, foundProto, lastProperty, - receivers, convertUnboxedGroups, - isOwnProperty); - if (!obj) - return abort(AbortReason::Alloc); + + { + Shape* lastProperty = nullptr; + Shape* globalShape = nullptr; + JSObject* foundProto = nullptr; + bool isOwnProperty = false; + BaselineInspector::ReceiverVector receivers(alloc()); + BaselineInspector::ObjectGroupVector convertUnboxedGroups(alloc()); + if (inspector->commonGetPropFunction(pc, innerized, &foundProto, &lastProperty, &commonGetter, + &globalShape, &isOwnProperty, + receivers, convertUnboxedGroups)) + { + bool canUseTIForGetter = false; + if (!isOwnProperty) { + // If it's not an own property, try to use TI to avoid shape guards. + // For own properties we use the path below. + canUseTIForGetter = testCommonGetterSetter(objTypes, name, /* isGetter = */ true, + commonGetter, &guard, + globalShape, &globalGuard); + } + if (!canUseTIForGetter) { + // If it's an own property or type information is bad, we can still + // optimize the getter if we shape guard. + obj = addShapeGuardsForGetterSetter(obj, foundProto, lastProperty, + receivers, convertUnboxedGroups, + isOwnProperty); + if (!obj) + return abort(AbortReason::Alloc); + } + } else { + // The Baseline IC didn't have any information we can use. + return Ok(); + } } bool isDOM = objTypes && objTypes->isDOMClass(constraints()); @@ -11274,37 +11308,40 @@ IonBuilder::setPropTryCommonSetter(bool* emitted, MDefinition* obj, { MOZ_ASSERT(*emitted == false); - Shape* lastProperty = nullptr; - JSFunction* commonSetter = nullptr; - JSObject* foundProto = nullptr; - bool isOwnProperty; - BaselineInspector::ReceiverVector receivers(alloc()); - BaselineInspector::ObjectGroupVector convertUnboxedGroups(alloc()); - if (!inspector->commonSetPropFunction(pc, &foundProto, &lastProperty, &commonSetter, - &isOwnProperty, - receivers, convertUnboxedGroups)) - { - trackOptimizationOutcome(TrackedOutcome::NoProtoFound); - return Ok(); - } - TemporaryTypeSet* objTypes = obj->resultTypeSet(); + JSFunction* commonSetter = nullptr; MDefinition* guard = nullptr; - bool canUseTIForSetter = false; - if (!isOwnProperty) { - // If it's not an own property, try to use TI to avoid shape guards. - // For own properties we use the path below. - canUseTIForSetter = testCommonGetterSetter(objTypes, name, /* isGetter = */ false, - foundProto, lastProperty, commonSetter, &guard); - } - if (!canUseTIForSetter) { - // If it's an own property or type information is bad, we can still - // optimize the setter if we shape guard. - obj = addShapeGuardsForGetterSetter(obj, foundProto, lastProperty, - receivers, convertUnboxedGroups, - isOwnProperty); - if (!obj) - return abort(AbortReason::Alloc); + + { + Shape* lastProperty = nullptr; + JSObject* foundProto = nullptr; + bool isOwnProperty; + BaselineInspector::ReceiverVector receivers(alloc()); + BaselineInspector::ObjectGroupVector convertUnboxedGroups(alloc()); + if (inspector->commonSetPropFunction(pc, &foundProto, &lastProperty, &commonSetter, + &isOwnProperty, + receivers, convertUnboxedGroups)) + { + bool canUseTIForSetter = false; + if (!isOwnProperty) { + // If it's not an own property, try to use TI to avoid shape guards. + // For own properties we use the path below. + canUseTIForSetter = testCommonGetterSetter(objTypes, name, /* isGetter = */ false, + commonSetter, &guard); + } + if (!canUseTIForSetter) { + // If it's an own property or type information is bad, we can still + // optimize the setter if we shape guard. + obj = addShapeGuardsForGetterSetter(obj, foundProto, lastProperty, + receivers, convertUnboxedGroups, + isOwnProperty); + if (!obj) + return abort(AbortReason::Alloc); + } + } else { + // The Baseline IC didn't have any information we can use. + return Ok(); + } } // Emit common setter. diff --git a/js/src/jit/IonBuilder.h b/js/src/jit/IonBuilder.h index 00de7fd54a3e..cc94b2109ec4 100644 --- a/js/src/jit/IonBuilder.h +++ b/js/src/jit/IonBuilder.h @@ -817,17 +817,16 @@ class IonBuilder MBasicBlock* bottom); MDefinition* specializeInlinedReturn(MDefinition* rdef, MBasicBlock* exit); - bool objectsHaveCommonPrototype(TemporaryTypeSet* types, PropertyName* name, - bool isGetter, JSObject* foundProto, - bool* guardGlobal); + NativeObject* commonPrototypeWithGetterSetter(TemporaryTypeSet* types, PropertyName* name, + bool isGetter, JSFunction* getterOrSetter, + bool* guardGlobal); void freezePropertiesForCommonPrototype(TemporaryTypeSet* types, PropertyName* name, JSObject* foundProto, bool allowEmptyTypesForGlobal = false); /* * Callers must pass a non-null globalGuard if they pass a non-null globalShape. */ bool testCommonGetterSetter(TemporaryTypeSet* types, PropertyName* name, - bool isGetter, JSObject* foundProto, - Shape* lastProperty, JSFunction* getterOrSetter, + bool isGetter, JSFunction* getterOrSetter, MDefinition** guard, Shape* globalShape = nullptr, MDefinition** globalGuard = nullptr); AbortReasonOr testShouldDOMCall(TypeSet* inTypes, diff --git a/js/src/jit/IonCacheIRCompiler.cpp b/js/src/jit/IonCacheIRCompiler.cpp index 46660e1a9b46..e8e47975dbbc 100644 --- a/js/src/jit/IonCacheIRCompiler.cpp +++ b/js/src/jit/IonCacheIRCompiler.cpp @@ -1305,9 +1305,37 @@ IonCacheIRCompiler::emitStoreDenseElementHole() masm.branch32(Assembler::Above, initLength, index, &inBounds); masm.branch32(Assembler::NotEqual, initLength, index, failure->label()); - // Check the capacity. + // If index < capacity, we can add a dense element inline. If not we + // need to allocate more elements. + Label capacityOk; Address capacity(scratch, ObjectElements::offsetOfCapacity()); - masm.branch32(Assembler::BelowOrEqual, capacity, index, failure->label()); + masm.branch32(Assembler::Above, capacity, index, &capacityOk); + + // Check for non-writable array length. We only have to do this if + // index >= capacity. + Address elementsFlags(scratch, ObjectElements::offsetOfFlags()); + masm.branchTest32(Assembler::NonZero, elementsFlags, + Imm32(ObjectElements::NONWRITABLE_ARRAY_LENGTH), + failure->label()); + + LiveRegisterSet save(GeneralRegisterSet::Volatile(), liveVolatileFloatRegs()); + save.takeUnchecked(scratch); + masm.PushRegsInMask(save); + + masm.setupUnalignedABICall(scratch); + masm.loadJSContext(scratch); + masm.passABIArg(scratch); + masm.passABIArg(obj); + masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, NativeObject::addDenseElementDontReportOOM)); + masm.mov(ReturnReg, scratch); + + masm.PopRegsInMask(save); + masm.branchIfFalseBool(scratch, failure->label()); + + // Load the reallocated elements pointer. + masm.loadPtr(Address(obj, NativeObject::offsetOfElements()), scratch); + + masm.bind(&capacityOk); // Increment initLength. masm.add32(Imm32(1), initLength); diff --git a/js/src/vm/NativeObject.cpp b/js/src/vm/NativeObject.cpp index 0fe6314d33ba..75c5dafc79b3 100644 --- a/js/src/vm/NativeObject.cpp +++ b/js/src/vm/NativeObject.cpp @@ -480,6 +480,32 @@ NativeObject::growSlotsDontReportOOM(JSContext* cx, NativeObject* obj, uint32_t return true; } +/* static */ bool +NativeObject::addDenseElementDontReportOOM(JSContext* cx, NativeObject* obj) +{ + // IC code calls this directly. + AutoCheckCannotGC nogc; + + MOZ_ASSERT(obj->getDenseInitializedLength() == obj->getDenseCapacity()); + MOZ_ASSERT(!obj->denseElementsAreCopyOnWrite()); + MOZ_ASSERT(!obj->denseElementsAreFrozen()); + MOZ_ASSERT(!obj->isIndexed()); + MOZ_ASSERT(!obj->is()); + MOZ_ASSERT_IF(obj->is(), obj->as().lengthIsWritable()); + + // growElements will report OOM also if the number of dense elements will + // exceed MAX_DENSE_ELEMENTS_COUNT. See goodElementsAllocationAmount. + uint32_t oldCapacity = obj->getDenseCapacity(); + if (MOZ_UNLIKELY(!obj->growElements(cx, oldCapacity + 1))) { + cx->recoverFromOutOfMemory(); + return false; + } + + MOZ_ASSERT(obj->getDenseCapacity() > oldCapacity); + MOZ_ASSERT(obj->getDenseCapacity() <= MAX_DENSE_ELEMENTS_COUNT); + return true; +} + static void FreeSlots(JSContext* cx, HeapSlot* slots) { diff --git a/js/src/vm/NativeObject.h b/js/src/vm/NativeObject.h index 6a4bbd917001..a760340e2dd9 100644 --- a/js/src/vm/NativeObject.h +++ b/js/src/vm/NativeObject.h @@ -669,6 +669,13 @@ class NativeObject : public ShapedObject */ static bool growSlotsDontReportOOM(JSContext* cx, NativeObject* obj, uint32_t newCount); + /* + * Like growSlotsDontReportOOM but for dense elements. This will return + * false if we failed to allocate a dense element for some reason (OOM, too + * many dense elements, non-writable array length, etc). + */ + static bool addDenseElementDontReportOOM(JSContext* cx, NativeObject* obj); + bool hasDynamicSlots() const { return !!slots_; } /* Compute dynamicSlotsCount() for this object. */ diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp index 273cf406de0f..3c8614098f7e 100644 --- a/js/src/wasm/WasmSignalHandlers.cpp +++ b/js/src/wasm/WasmSignalHandlers.cpp @@ -1233,6 +1233,10 @@ RedirectIonBackedgesToInterruptCheck(JSContext* cx) static bool RedirectJitCodeToInterruptCheck(JSContext* cx, CONTEXT* context) { + // Jitcode may only be modified on the runtime's active thread. + if (cx != cx->runtime()->activeContext()) + return false; + RedirectIonBackedgesToInterruptCheck(cx); if (WasmActivation* activation = cx->wasmActivationStack()) { diff --git a/js/xpconnect/tests/mochitest/test_bug965082.html b/js/xpconnect/tests/mochitest/test_bug965082.html index 8f04cd3f831b..32e76eb6fc41 100644 --- a/js/xpconnect/tests/mochitest/test_bug965082.html +++ b/js/xpconnect/tests/mochitest/test_bug965082.html @@ -15,7 +15,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=965082 function checkThrows(f, msg) { try { f(); ok(false, "Should have thrown: " + msg); } - catch (e) { ok(/denied|insecure/.test(e), "Should throw security exception: " + e + " (" + msg + ")"); } + catch (e) { ok(/denied|insecure|can't set prototype/.test(e), "Should throw security exception: " + e + " (" + msg + ")"); } } function go() { diff --git a/js/xpconnect/wrappers/FilteringWrapper.cpp b/js/xpconnect/wrappers/FilteringWrapper.cpp index acc819aba221..6ac9d1fc10b9 100644 --- a/js/xpconnect/wrappers/FilteringWrapper.cpp +++ b/js/xpconnect/wrappers/FilteringWrapper.cpp @@ -301,6 +301,20 @@ CrossOriginXrayWrapper::delete_(JSContext* cx, JS::Handle wrapper, return false; } +bool +CrossOriginXrayWrapper::setPrototype(JSContext* cx, JS::HandleObject wrapper, + JS::HandleObject proto, + JS::ObjectOpResult& result) const +{ + // https://html.spec.whatwg.org/multipage/browsers.html#windowproxy-setprototypeof + // and + // https://html.spec.whatwg.org/multipage/browsers.html#location-setprototypeof + // both say to return false. In terms of ObjectOpResult that means + // calling one of the fail*() things on it, and it's got one that does just + // what we want. + return result.failCantSetProto(); +} + #define XOW FilteringWrapper #define NNXOW FilteringWrapper #define NNXOWC FilteringWrapper diff --git a/js/xpconnect/wrappers/FilteringWrapper.h b/js/xpconnect/wrappers/FilteringWrapper.h index b13f3c025f86..2523fb1ea228 100644 --- a/js/xpconnect/wrappers/FilteringWrapper.h +++ b/js/xpconnect/wrappers/FilteringWrapper.h @@ -80,6 +80,10 @@ class CrossOriginXrayWrapper : public SecurityXrayDOM { virtual bool getPropertyDescriptor(JSContext* cx, JS::Handle wrapper, JS::Handle id, JS::MutableHandle desc) const override; + + virtual bool setPrototype(JSContext* cx, JS::HandleObject wrapper, + JS::HandleObject proto, + JS::ObjectOpResult& result) const override; }; // Check whether the given jsid is a symbol whose value can be gotten diff --git a/layout/base/crashtests/372550-1.html b/layout/base/crashtests/372550-1.html index a1dd8ea5b8b9..778652f0b52b 100644 --- a/layout/base/crashtests/372550-1.html +++ b/layout/base/crashtests/372550-1.html @@ -11,7 +11,7 @@ document.body.offsetWidth; var div = document.getElementById("x"); div.id = "y"; - div.removeChild(div.firstChild); + div.firstChild.remove(); diff --git a/layout/base/crashtests/393661-1.html b/layout/base/crashtests/393661-1.html index d2e256d5f3dc..b7ea19cd3c5a 100644 --- a/layout/base/crashtests/393661-1.html +++ b/layout/base/crashtests/393661-1.html @@ -7,7 +7,7 @@ function boom() { var z = document.getElementById("z"); - z.removeChild(z.firstChild); + z.firstChild.remove(); } diff --git a/layout/base/crashtests/403175-1.html b/layout/base/crashtests/403175-1.html index 08764ff70769..a1c02a55396f 100644 --- a/layout/base/crashtests/403175-1.html +++ b/layout/base/crashtests/403175-1.html @@ -9,7 +9,7 @@ function boom() ++i; while (document.body.firstChild) - document.body.removeChild(document.body.firstChild); + document.body.firstChild.remove(); var table = document.createElement("table"); document.body.appendChild(table); diff --git a/layout/base/crashtests/468578-1.xhtml b/layout/base/crashtests/468578-1.xhtml index 278ff51ae538..3643e91d0ec0 100644 --- a/layout/base/crashtests/468578-1.xhtml +++ b/layout/base/crashtests/468578-1.xhtml @@ -8,7 +8,7 @@ function boom() var legend = document.getElementById("legend"); legend.appendChild(document.createTextNode("T")); document.documentElement.offsetHeight; - legend.removeChild(legend.firstChild); + legend.firstChild.remove(); document.body.removeChild(legend); } diff --git a/layout/base/crashtests/538267-1.html b/layout/base/crashtests/538267-1.html index c8942797482c..c192496cdfbb 100644 --- a/layout/base/crashtests/538267-1.html +++ b/layout/base/crashtests/538267-1.html @@ -8,7 +8,7 @@ div { -moz-column-count: 2; width: 0; } function boom() { var v = document.getElementById("v"); - v.removeChild(v.firstChild); + v.firstChild.remove(); } diff --git a/layout/base/crashtests/852293.html b/layout/base/crashtests/852293.html index d1098d080744..8c4783933d0a 100644 --- a/layout/base/crashtests/852293.html +++ b/layout/base/crashtests/852293.html @@ -57,7 +57,7 @@ function bounceDE() function clearChildren(root) { - while(root.firstChild) { root.removeChild(root.firstChild); } + while(root.firstChild) { root.firstChild.remove(); } } diff --git a/layout/base/crashtests/898913.html b/layout/base/crashtests/898913.html index 39adbd463f8b..f81602a111e5 100644 --- a/layout/base/crashtests/898913.html +++ b/layout/base/crashtests/898913.html @@ -13,7 +13,7 @@ div:first-letter { float: right; } function boom() { var d = document.getElementById('d'); - d.removeChild(d.firstChild); + d.firstChild.remove(); } diff --git a/layout/generic/crashtests/413085-1.html b/layout/generic/crashtests/413085-1.html index 8f1ddad97caf..edb752d5b503 100644 --- a/layout/generic/crashtests/413085-1.html +++ b/layout/generic/crashtests/413085-1.html @@ -10,7 +10,7 @@ body:first-letter { float: right; } function boom() { - document.body.removeChild(document.body.firstChild); + document.body.firstChild.remove(); document.body.appendChild(document.createTextNode('x')); } diff --git a/layout/generic/crashtests/413085-2.html b/layout/generic/crashtests/413085-2.html index bb82c6628078..6128304abdf6 100644 --- a/layout/generic/crashtests/413085-2.html +++ b/layout/generic/crashtests/413085-2.html @@ -5,7 +5,7 @@ diff --git a/layout/generic/crashtests/426040-1.html b/layout/generic/crashtests/426040-1.html index 196a541cb04e..9863af7b834f 100644 --- a/layout/generic/crashtests/426040-1.html +++ b/layout/generic/crashtests/426040-1.html @@ -12,7 +12,7 @@ div { height: 1px; } function boom() { var a = document.getElementById("a"); - a.removeChild(a.firstChild); + a.firstChild.remove(); document.documentElement.style.outline = "none"; } diff --git a/layout/generic/crashtests/472776-1.html b/layout/generic/crashtests/472776-1.html index 745dcc1676f8..be9a6a92d635 100644 --- a/layout/generic/crashtests/472776-1.html +++ b/layout/generic/crashtests/472776-1.html @@ -9,7 +9,7 @@ function boom() v.childNodes[1].firstChild.data = ""; document.documentElement.offsetHeight; v.appendChild(document.createTextNode("D")); - v.removeChild(v.firstChild); + v.firstChild.remove(); } diff --git a/layout/generic/crashtests/603490-1.html b/layout/generic/crashtests/603490-1.html index f857c9f8379d..a9a8a8c2a3dd 100644 --- a/layout/generic/crashtests/603490-1.html +++ b/layout/generic/crashtests/603490-1.html @@ -3,7 +3,7 @@ function boom() { while (document.documentElement.firstChild) - document.documentElement.removeChild(document.documentElement.firstChild); + document.documentElement.firstChild.remove(); document.documentElement.contentEditable = "true"; document.execCommand("strikethrough", false, null); try { document.execCommand("justifyfull", false, null); } catch(e) { } diff --git a/layout/generic/crashtests/603510-1.html b/layout/generic/crashtests/603510-1.html index 697845d07871..90d16bed2dbb 100644 --- a/layout/generic/crashtests/603510-1.html +++ b/layout/generic/crashtests/603510-1.html @@ -6,7 +6,7 @@ function boom() var r = document.documentElement; while (r.firstChild) - r.removeChild(r.firstChild); + r.firstChild.remove(); var a = document.createTextNode("a"); r.appendChild(a); diff --git a/layout/generic/crashtests/667025.html b/layout/generic/crashtests/667025.html index 29ef3d32b5e0..036aeda31921 100644 --- a/layout/generic/crashtests/667025.html +++ b/layout/generic/crashtests/667025.html @@ -11,7 +11,7 @@ function boom() document.documentElement.offsetHeight; var s = document.getElementById("s"); - s.removeChild(s.firstChild); + s.firstChild.remove(); document.documentElement.offsetHeight; } diff --git a/layout/generic/crashtests/868906.html b/layout/generic/crashtests/868906.html index f0b92c5a671a..24d3bfa3e88f 100644 --- a/layout/generic/crashtests/868906.html +++ b/layout/generic/crashtests/868906.html @@ -7,7 +7,7 @@ function boom() { var root = document.documentElement; - while(root.firstChild) { root.removeChild(root.firstChild); } + while(root.firstChild) { root.firstChild.remove(); } root.appendChild(document.createElement("body")); root.offsetHeight; diff --git a/layout/ipc/RenderFrameParent.cpp b/layout/ipc/RenderFrameParent.cpp index 26cf76ceb7b0..783de20ee10b 100644 --- a/layout/ipc/RenderFrameParent.cpp +++ b/layout/ipc/RenderFrameParent.cpp @@ -9,9 +9,6 @@ #include "BasicLayers.h" #include "gfxPrefs.h" -#ifdef MOZ_ENABLE_D3D9_LAYER -# include "LayerManagerD3D9.h" -#endif //MOZ_ENABLE_D3D9_LAYER #include "mozilla/BrowserElementParent.h" #include "mozilla/EventForwards.h" // for Modifiers #include "mozilla/ViewportFrame.h" diff --git a/layout/reftests/bidi/730562-1.html b/layout/reftests/bidi/730562-1.html index 3b6ca3bf3c6e..b751b5120c77 100644 --- a/layout/reftests/bidi/730562-1.html +++ b/layout/reftests/bidi/730562-1.html @@ -11,7 +11,7 @@ function boom() // A dynamic change var x = document.getElementById("x"); - x.removeChild(x.firstChild); + x.firstChild.remove(); x.appendChild(document.createTextNode("\n\n\n")); } diff --git a/layout/reftests/bugs/306660-3.html b/layout/reftests/bugs/306660-3.html index c45be92a22e9..f8bd44235e4e 100644 --- a/layout/reftests/bugs/306660-3.html +++ b/layout/reftests/bugs/306660-3.html @@ -4,7 +4,7 @@ diff --git a/layout/reftests/bugs/398682-1.html b/layout/reftests/bugs/398682-1.html index d9e0a1f8727e..0e5793b35232 100644 --- a/layout/reftests/bugs/398682-1.html +++ b/layout/reftests/bugs/398682-1.html @@ -37,7 +37,7 @@ function bounce() var docElemChildren = []; while (docElem.firstChild) { docElemChildren.push(docElem.firstChild); - docElem.removeChild(docElem.firstChild); + docElem.firstChild.remove(); } for (var i = 0; i < docElemChildren.length; ++i) diff --git a/layout/reftests/bugs/418766-1a.html b/layout/reftests/bugs/418766-1a.html index 4187b8b10ac6..8dcfe6e19825 100644 --- a/layout/reftests/bugs/418766-1a.html +++ b/layout/reftests/bugs/418766-1a.html @@ -4,7 +4,7 @@ function boom() { var n = document.getElementById("editMe"); - n.removeChild(n.firstChild); + n.firstChild.remove(); document.documentElement.className = ""; } diff --git a/layout/reftests/bugs/421239-1.html b/layout/reftests/bugs/421239-1.html index d4d94b0bacc6..d9cc8b5b4818 100644 --- a/layout/reftests/bugs/421239-1.html +++ b/layout/reftests/bugs/421239-1.html @@ -8,7 +8,7 @@ function boom() { var a = document.getElementById("a"); - a.removeChild(a.firstChild); + a.firstChild.remove(); document.documentElement.className = ""; } diff --git a/layout/reftests/bugs/421239-2.html b/layout/reftests/bugs/421239-2.html index 39f5bf47e4c9..6db0b8e89cb5 100644 --- a/layout/reftests/bugs/421239-2.html +++ b/layout/reftests/bugs/421239-2.html @@ -8,7 +8,7 @@ function boom() { var a = document.getElementById("a"); - a.removeChild(a.firstChild); + a.firstChild.remove(); document.documentElement.className = ""; } diff --git a/layout/reftests/bugs/496840-1.html b/layout/reftests/bugs/496840-1.html index 291d9abb2676..3901069e7de7 100644 --- a/layout/reftests/bugs/496840-1.html +++ b/layout/reftests/bugs/496840-1.html @@ -12,7 +12,7 @@ l.textContent = "#1"; fs1.insertBefore(l, fs1.firstChild); var fs2 = document.getElementById("fs2"); -fs2.removeChild(fs2.firstChild); +fs2.firstChild.remove(); diff --git a/layout/reftests/forms/textarea/setvalue-framereconstruction-1.html b/layout/reftests/forms/textarea/setvalue-framereconstruction-1.html index 2fe3b0d54a0f..03b3a4929032 100644 --- a/layout/reftests/forms/textarea/setvalue-framereconstruction-1.html +++ b/layout/reftests/forms/textarea/setvalue-framereconstruction-1.html @@ -22,7 +22,7 @@ function boom() document.getElementById("div").style.MozBinding = "url('#foo')"; var opt1 = document.getElementById("opt1"); - opt1.removeChild(opt1.firstChild); + opt1.firstChild.remove(); document.getElementById("textarea").value += " y"; diff --git a/layout/reftests/table-anonymous-boxes/277995-1.html b/layout/reftests/table-anonymous-boxes/277995-1.html index 61951ff0548f..e513d6a8fa49 100644 --- a/layout/reftests/table-anonymous-boxes/277995-1.html +++ b/layout/reftests/table-anonymous-boxes/277995-1.html @@ -4,7 +4,7 @@