From f9878eaf1bb2c91bfe71fe0dadf6d93947e947e1 Mon Sep 17 00:00:00 2001 From: Kai Engert Date: Thu, 22 Jan 2015 23:51:22 +0100 Subject: [PATCH 001/106] Bug 1107731, Upgrade to NSS 3.17.4, landing release candidate NSS_3_17_4_RC0, r=wtc --- configure.in | 2 +- security/nss/TAG-INFO | 2 +- security/nss/coreconf/command.mk | 3 +- security/nss/coreconf/coreconf.dep | 1 + security/nss/coreconf/rules.mk | 4 +- security/nss/lib/ckfw/dbm/db.c | 3 +- security/nss/lib/ckfw/nssmkey/mobject.c | 2 +- security/nss/lib/freebl/mpi/doc/LICENSE-MPL | 38 ++------------- security/nss/lib/freebl/mpi/tests/LICENSE-MPL | 38 ++------------- security/nss/lib/freebl/mpi/utils/LICENSE-MPL | 38 ++------------- .../libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h | 5 ++ security/nss/lib/nss/nss.h | 8 ++-- security/nss/lib/softoken/softkver.h | 8 ++-- security/nss/lib/util/nssutil.h | 8 ++-- security/nss/tests/chains/scenarios/scenarios | 47 ++----------------- security/nss/tests/iopr/server_scr/config | 37 ++------------- 16 files changed, 41 insertions(+), 203 deletions(-) diff --git a/configure.in b/configure.in index bbe7b895517..cfb703619f5 100644 --- a/configure.in +++ b/configure.in @@ -3595,7 +3595,7 @@ MOZ_ARG_WITH_BOOL(system-nss, _USE_SYSTEM_NSS=1 ) if test -n "$_USE_SYSTEM_NSS"; then - AM_PATH_NSS(3.17.3, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) + AM_PATH_NSS(3.17.4, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) fi if test -n "$MOZ_NATIVE_NSS"; then diff --git a/security/nss/TAG-INFO b/security/nss/TAG-INFO index dde7cbc3cb1..70b0cd0c21e 100644 --- a/security/nss/TAG-INFO +++ b/security/nss/TAG-INFO @@ -1 +1 @@ -NSS_3_18_BETA6 +NSS_3_17_4_RC0 diff --git a/security/nss/coreconf/command.mk b/security/nss/coreconf/command.mk index 35ebe868945..ec1fd4d3683 100644 --- a/security/nss/coreconf/command.mk +++ b/security/nss/coreconf/command.mk @@ -11,8 +11,7 @@ AS = $(CC) ASFLAGS += $(CFLAGS) CCF = $(CC) $(CFLAGS) -LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS) -LINK_EXE = $(LINK) $(OS_LFLAGS) $(LFLAGS) +LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS) $(XLDFLAGS) CFLAGS = $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \ $(XCFLAGS) PERL = perl diff --git a/security/nss/coreconf/coreconf.dep b/security/nss/coreconf/coreconf.dep index 5182f75552c..590d1bfaeee 100644 --- a/security/nss/coreconf/coreconf.dep +++ b/security/nss/coreconf/coreconf.dep @@ -10,3 +10,4 @@ */ #error "Do not include this header file." + diff --git a/security/nss/coreconf/rules.mk b/security/nss/coreconf/rules.mk index 937eed4edec..5495b0c329f 100644 --- a/security/nss/coreconf/rules.mk +++ b/security/nss/coreconf/rules.mk @@ -241,7 +241,7 @@ alltags: $(PROGRAM): $(OBJS) $(EXTRA_LIBS) @$(MAKE_OBJDIR) ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) - $(MKPROG) $(subst /,\\,$(OBJS)) -Fe$@ -link $(LDFLAGS) $(subst /,\\,$(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)) + $(MKPROG) $(subst /,\\,$(OBJS)) -Fe$@ -link $(LDFLAGS) $(XLDFLAGS) $(subst /,\\,$(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)) ifdef MT if test -f $@.manifest; then \ $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \ @@ -332,7 +332,7 @@ $(OBJDIR)/$(PROG_PREFIX)%$(PROG_SUFFIX): $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX) @$(MAKE_OBJDIR) ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) $(MKPROG) $< -Fe$@ -link \ - $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) + $(LDFLAGS) $(XLDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) ifdef MT if test -f $@.manifest; then \ $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \ diff --git a/security/nss/lib/ckfw/dbm/db.c b/security/nss/lib/ckfw/dbm/db.c index 7880afbebf6..8d0a6cba8d8 100644 --- a/security/nss/lib/ckfw/dbm/db.c +++ b/security/nss/lib/ckfw/dbm/db.c @@ -137,7 +137,8 @@ nss_dbm_db_set_label /* Locked region */ { - if( CKR_OK != NSSCKFWMutex_Lock(db->crustylock) ) { + rv = NSSCKFWMutex_Lock(db->crustylock); + if( CKR_OK != rv ) { return rv; } diff --git a/security/nss/lib/ckfw/nssmkey/mobject.c b/security/nss/lib/ckfw/nssmkey/mobject.c index 36867db340b..2013e7e9914 100644 --- a/security/nss/lib/ckfw/nssmkey/mobject.c +++ b/security/nss/lib/ckfw/nssmkey/mobject.c @@ -1880,7 +1880,7 @@ nss_ckmk_CreateObject ) { CK_OBJECT_CLASS objClass; - ckmkInternalObject *io; + ckmkInternalObject *io = NULL; CK_BBOOL isToken; /* diff --git a/security/nss/lib/freebl/mpi/doc/LICENSE-MPL b/security/nss/lib/freebl/mpi/doc/LICENSE-MPL index d1f78f522fb..41dc2327f16 100644 --- a/security/nss/lib/freebl/mpi/doc/LICENSE-MPL +++ b/security/nss/lib/freebl/mpi/doc/LICENSE-MPL @@ -1,35 +1,3 @@ -***** BEGIN LICENSE BLOCK ***** -Version: MPL 1.1/GPL 2.0/LGPL 2.1 - -The contents of this file are subject to the Mozilla Public License Version -1.1 (the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at -http://www.mozilla.org/MPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the -License. - -The Original Code is the Netscape security libraries. - -The Initial Developer of the Original Code is Netscape -Communications Corporation. Portions created by Netscape are -Copyright (C) 1994-2000 Netscape Communications Corporation. All -Rights Reserved. - -Contributor(s): - -Alternatively, the contents of this file may be used under the terms of -either the GNU General Public License Version 2 or later (the "GPL"), or -the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -in which case the provisions of the GPL or the LGPL are applicable instead -of those above. If you wish to allow use of your version of this file only -under the terms of either the GPL or the LGPL, and not to allow others to -use your version of this file under the terms of the MPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the GPL or the LGPL. If you do not delete -the provisions above, a recipient may use your version of this file under -the terms of any one of the MPL, the GPL or the LGPL. - -***** END LICENSE BLOCK ***** +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/. diff --git a/security/nss/lib/freebl/mpi/tests/LICENSE-MPL b/security/nss/lib/freebl/mpi/tests/LICENSE-MPL index d1f78f522fb..41dc2327f16 100644 --- a/security/nss/lib/freebl/mpi/tests/LICENSE-MPL +++ b/security/nss/lib/freebl/mpi/tests/LICENSE-MPL @@ -1,35 +1,3 @@ -***** BEGIN LICENSE BLOCK ***** -Version: MPL 1.1/GPL 2.0/LGPL 2.1 - -The contents of this file are subject to the Mozilla Public License Version -1.1 (the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at -http://www.mozilla.org/MPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the -License. - -The Original Code is the Netscape security libraries. - -The Initial Developer of the Original Code is Netscape -Communications Corporation. Portions created by Netscape are -Copyright (C) 1994-2000 Netscape Communications Corporation. All -Rights Reserved. - -Contributor(s): - -Alternatively, the contents of this file may be used under the terms of -either the GNU General Public License Version 2 or later (the "GPL"), or -the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -in which case the provisions of the GPL or the LGPL are applicable instead -of those above. If you wish to allow use of your version of this file only -under the terms of either the GPL or the LGPL, and not to allow others to -use your version of this file under the terms of the MPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the GPL or the LGPL. If you do not delete -the provisions above, a recipient may use your version of this file under -the terms of any one of the MPL, the GPL or the LGPL. - -***** END LICENSE BLOCK ***** +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/. diff --git a/security/nss/lib/freebl/mpi/utils/LICENSE-MPL b/security/nss/lib/freebl/mpi/utils/LICENSE-MPL index d1f78f522fb..41dc2327f16 100644 --- a/security/nss/lib/freebl/mpi/utils/LICENSE-MPL +++ b/security/nss/lib/freebl/mpi/utils/LICENSE-MPL @@ -1,35 +1,3 @@ -***** BEGIN LICENSE BLOCK ***** -Version: MPL 1.1/GPL 2.0/LGPL 2.1 - -The contents of this file are subject to the Mozilla Public License Version -1.1 (the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at -http://www.mozilla.org/MPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the -License. - -The Original Code is the Netscape security libraries. - -The Initial Developer of the Original Code is Netscape -Communications Corporation. Portions created by Netscape are -Copyright (C) 1994-2000 Netscape Communications Corporation. All -Rights Reserved. - -Contributor(s): - -Alternatively, the contents of this file may be used under the terms of -either the GNU General Public License Version 2 or later (the "GPL"), or -the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -in which case the provisions of the GPL or the LGPL are applicable instead -of those above. If you wish to allow use of your version of this file only -under the terms of either the GPL or the LGPL, and not to allow others to -use your version of this file under the terms of the MPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the GPL or the LGPL. If you do not delete -the provisions above, a recipient may use your version of this file under -the terms of any one of the MPL, the GPL or the LGPL. - -***** END LICENSE BLOCK ***** +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/. diff --git a/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h b/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h index 6219992036c..49cd9d2cdf6 100644 --- a/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h +++ b/security/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h @@ -45,4 +45,9 @@ pkix_pl_CrlDp_Create(const CRLDistributionPoint *dp, const CERTName *certIssuerName, pkix_pl_CrlDp **pPkixDP, void *plContext); + +#ifdef __cplusplus +} +#endif + #endif /* _PKIX_PL_CRLDP_H */ diff --git a/security/nss/lib/nss/nss.h b/security/nss/lib/nss/nss.h index c5fd3252598..8d7a52f742f 100644 --- a/security/nss/lib/nss/nss.h +++ b/security/nss/lib/nss/nss.h @@ -33,12 +33,12 @@ * The format of the version string should be * ".[.[.]][ ][ ]" */ -#define NSS_VERSION "3.18" _NSS_ECC_STRING _NSS_CUSTOMIZED " Beta" +#define NSS_VERSION "3.17.4" _NSS_ECC_STRING _NSS_CUSTOMIZED #define NSS_VMAJOR 3 -#define NSS_VMINOR 18 -#define NSS_VPATCH 0 +#define NSS_VMINOR 17 +#define NSS_VPATCH 4 #define NSS_VBUILD 0 -#define NSS_BETA PR_TRUE +#define NSS_BETA PR_FALSE #ifndef RC_INVOKED diff --git a/security/nss/lib/softoken/softkver.h b/security/nss/lib/softoken/softkver.h index c3f1a03920e..e387352073a 100644 --- a/security/nss/lib/softoken/softkver.h +++ b/security/nss/lib/softoken/softkver.h @@ -25,11 +25,11 @@ * The format of the version string should be * ".[.[.]][ ][ ]" */ -#define SOFTOKEN_VERSION "3.18" SOFTOKEN_ECC_STRING " Beta" +#define SOFTOKEN_VERSION "3.17.4" SOFTOKEN_ECC_STRING #define SOFTOKEN_VMAJOR 3 -#define SOFTOKEN_VMINOR 18 -#define SOFTOKEN_VPATCH 0 +#define SOFTOKEN_VMINOR 17 +#define SOFTOKEN_VPATCH 4 #define SOFTOKEN_VBUILD 0 -#define SOFTOKEN_BETA PR_TRUE +#define SOFTOKEN_BETA PR_FALSE #endif /* _SOFTKVER_H_ */ diff --git a/security/nss/lib/util/nssutil.h b/security/nss/lib/util/nssutil.h index 03bd6da9026..ff9d19a2ee5 100644 --- a/security/nss/lib/util/nssutil.h +++ b/security/nss/lib/util/nssutil.h @@ -19,12 +19,12 @@ * The format of the version string should be * ".[.[.]][ ]" */ -#define NSSUTIL_VERSION "3.18 Beta" +#define NSSUTIL_VERSION "3.17.4" #define NSSUTIL_VMAJOR 3 -#define NSSUTIL_VMINOR 18 -#define NSSUTIL_VPATCH 0 +#define NSSUTIL_VMINOR 17 +#define NSSUTIL_VPATCH 4 #define NSSUTIL_VBUILD 0 -#define NSSUTIL_BETA PR_TRUE +#define NSSUTIL_BETA PR_FALSE SEC_BEGIN_PROTOS diff --git a/security/nss/tests/chains/scenarios/scenarios b/security/nss/tests/chains/scenarios/scenarios index 3a704754ce3..d26c3f92efd 100644 --- a/security/nss/tests/chains/scenarios/scenarios +++ b/security/nss/tests/chains/scenarios/scenarios @@ -1,47 +1,6 @@ -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Network Security Services (NSS) -# -# The Initial Developer of the Original Code is Sun Microsystems, Inc. -# Portions created by the Initial Developer are Copyright (C) 2009 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Slavomir Katuscak , Sun Microsystems -# Ryan Sleevi , Google -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** -# -# Scenario ocspd.cfg will always be processed first, -# regardless of its presence in this list. -# -# Scenario method.cfg will always be processed, regardless of its presence -# in this list, and will be processed twice, once with httpserv -O get -# and once with -O post. Because method.cfg will be executed with both -# classic and libpkix engines, it must not contain any policy checks. +# 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/. # bridge.cfg megabridge_3_2.cfg diff --git a/security/nss/tests/iopr/server_scr/config b/security/nss/tests/iopr/server_scr/config index 19821c79a17..9e65b926c87 100644 --- a/security/nss/tests/iopr/server_scr/config +++ b/security/nss/tests/iopr/server_scr/config @@ -1,37 +1,6 @@ -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Network Security Services (NSS) -# -# The Initial Developer of the Original Code is Sun Microsystems, Inc. -# Portions created by the Initial Developer are Copyright (C) 2006-2009 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** +# 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/. certDir=/iopr caCertName=TestCA From 13082752571d7eb32339aab8e884b72141db334f Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Thu, 22 Jan 2015 22:52:26 +0000 Subject: [PATCH 002/106] Bug 1123654 - Replace use of [deprecated] GetStockObject(DEFAULT_GUI_FONT) with newer API; results in use of Tahoma in place of Microsoft Sans Serif in various contexts. r=jimm --- gfx/thebes/gfxGDIFontList.cpp | 20 +++---- layout/reftests/bugs/reftest.list | 4 +- .../reftests/forms/placeholder/reftest.list | 2 +- widget/windows/nsLookAndFeel.cpp | 60 ++++++++----------- 4 files changed, 39 insertions(+), 47 deletions(-) diff --git a/gfx/thebes/gfxGDIFontList.cpp b/gfx/thebes/gfxGDIFontList.cpp index cce880b4501..6550ba7718a 100644 --- a/gfx/thebes/gfxGDIFontList.cpp +++ b/gfx/thebes/gfxGDIFontList.cpp @@ -860,22 +860,22 @@ gfxGDIFontList::GetDefaultFont(const gfxFontStyle* aStyle) gfxFontFamily *ff = nullptr; // this really shouldn't fail to find a font.... - HGDIOBJ hGDI = ::GetStockObject(DEFAULT_GUI_FONT); - LOGFONTW logFont; - if (hGDI && ::GetObjectW(hGDI, sizeof(logFont), &logFont)) { - ff = FindFamily(nsDependentString(logFont.lfFaceName)); - if (ff) { - return ff; - } - } - - // ...but just in case, try another approach as well NONCLIENTMETRICSW ncm; ncm.cbSize = sizeof(ncm); BOOL status = ::SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0); if (status) { ff = FindFamily(nsDependentString(ncm.lfMessageFont.lfFaceName)); + if (ff) { + return ff; + } + } + + // ...but just in case, try another (long-deprecated) approach as well + HGDIOBJ hGDI = ::GetStockObject(DEFAULT_GUI_FONT); + LOGFONTW logFont; + if (hGDI && ::GetObjectW(hGDI, sizeof(logFont), &logFont)) { + ff = FindFamily(nsDependentString(logFont.lfFaceName)); } return ff; diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 0063aa16d5f..a3d96a56c94 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -557,9 +557,9 @@ skip-if(B2G) == 363858-1.html 363858-1-ref.html skip-if(B2G) == 363858-2.html 363858-2-ref.html skip-if(B2G) == 363858-3.html 363858-3-ref.html skip-if(B2G) == 363858-4.html 363858-4-ref.html -fuzzy-if(OSX>=1008,45,2) == 363858-5a.html 363858-5-ref.html +fuzzy-if(OSX>=1008,45,2) fuzzy-if(winWidget,37,1) == 363858-5a.html 363858-5-ref.html == 363858-5b.html 363858-5-ref.html -fuzzy-if(OSX>=1008,45,2) == 363858-6a.html 363858-6-ref.html +fuzzy-if(OSX>=1008,45,2) fuzzy-if(winWidget,37,1) == 363858-6a.html 363858-6-ref.html == 363858-6b.html 363858-6-ref.html == 363874.html 363874-ref.html == 363874-max-width.html 363874-max-width-ref.html diff --git a/layout/reftests/forms/placeholder/reftest.list b/layout/reftests/forms/placeholder/reftest.list index 75100696095..b86773c8f81 100644 --- a/layout/reftests/forms/placeholder/reftest.list +++ b/layout/reftests/forms/placeholder/reftest.list @@ -16,7 +16,7 @@ == placeholder-3.html placeholder-overridden-ref.html == placeholder-4.html placeholder-overridden-ref.html == placeholder-5.html placeholder-visible-ref.html -fuzzy-if(winWidget,160,6) == placeholder-6.html placeholder-overflow-ref.html +fuzzy-if(winWidget,160,7) == placeholder-6.html placeholder-overflow-ref.html skip-if(B2G) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html # needs-focus == placeholder-7.html placeholder-focus-ref.html # needs-focus == placeholder-8.html placeholder-focus-ref.html diff --git a/widget/windows/nsLookAndFeel.cpp b/widget/windows/nsLookAndFeel.cpp index 1b7d7fc7233..d56369fdf3b 100644 --- a/widget/windows/nsLookAndFeel.cpp +++ b/widget/windows/nsLookAndFeel.cpp @@ -535,10 +535,10 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID, LOGFONTW* ptrLogFont = nullptr; LOGFONTW logFont; NONCLIENTMETRICSW ncm; - HGDIOBJ hGDI; char16_t name[LF_FACESIZE]; + bool useShellDlg = false; - // Depending on which stock font we want, there are three different + // Depending on which stock font we want, there are a couple of // places we might have to look it up. switch (anID) { case LookAndFeel::eFont_Icon: @@ -549,11 +549,7 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID, ptrLogFont = &logFont; break; - case LookAndFeel::eFont_Menu: - case LookAndFeel::eFont_MessageBox: - case LookAndFeel::eFont_SmallCaption: - case LookAndFeel::eFont_StatusBar: - case LookAndFeel::eFont_Tooltips: + default: ncm.cbSize = sizeof(NONCLIENTMETRICSW); if (!::SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), (PVOID)&ncm, 0)) @@ -561,10 +557,11 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID, switch (anID) { case LookAndFeel::eFont_Menu: + case LookAndFeel::eFont_PullDownMenu: ptrLogFont = &ncm.lfMenuFont; break; - case LookAndFeel::eFont_MessageBox: - ptrLogFont = &ncm.lfMessageFont; + case LookAndFeel::eFont_Caption: + ptrLogFont = &ncm.lfCaptionFont; break; case LookAndFeel::eFont_SmallCaption: ptrLogFont = &ncm.lfSmCaptionFont; @@ -573,30 +570,22 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID, case LookAndFeel::eFont_Tooltips: ptrLogFont = &ncm.lfStatusFont; break; + case LookAndFeel::eFont_Widget: + case LookAndFeel::eFont_Dialog: + case LookAndFeel::eFont_Button: + // XXX It's not clear to me whether this is exactly the right + // set of LookAndFeel values to map to the dialog font; we may + // want to add or remove cases here after reviewing the visual + // results under various Windows versions. + useShellDlg = true; + // Fall through so that we can get size from lfMessageFont; + // but later we'll use the (virtual) "MS Shell Dlg 2" font name + // instead of the LOGFONT's. + default: + ptrLogFont = &ncm.lfMessageFont; + break; } break; - - case LookAndFeel::eFont_Widget: - case LookAndFeel::eFont_Window: // css3 - case LookAndFeel::eFont_Document: - case LookAndFeel::eFont_Workspace: - case LookAndFeel::eFont_Desktop: - case LookAndFeel::eFont_Info: - case LookAndFeel::eFont_Dialog: - case LookAndFeel::eFont_Button: - case LookAndFeel::eFont_PullDownMenu: - case LookAndFeel::eFont_List: - case LookAndFeel::eFont_Field: - case LookAndFeel::eFont_Caption: - hGDI = ::GetStockObject(DEFAULT_GUI_FONT); - if (!hGDI) - return false; - - if (::GetObjectW(hGDI, sizeof(logFont), &logFont) <= 0) - return false; - - ptrLogFont = &logFont; - break; } // Get scaling factor from physical to logical pixels @@ -649,9 +638,12 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID, aFontStyle.systemFont = true; - name[0] = 0; - memcpy(name, ptrLogFont->lfFaceName, LF_FACESIZE*sizeof(char16_t)); - aFontName = name; + if (useShellDlg) { + aFontName = NS_LITERAL_STRING("MS Shell Dlg 2"); + } else { + memcpy(name, ptrLogFont->lfFaceName, LF_FACESIZE*sizeof(char16_t)); + aFontName = name; + } return true; } From d0bde90a267dd810cfa4537f7a97abd633942f7c Mon Sep 17 00:00:00 2001 From: Kai Engert Date: Thu, 22 Jan 2015 23:53:31 +0100 Subject: [PATCH 003/106] Bug 1124903 - Update to NSPR 4.10.8 final (not beta), r=wtc --- nsprpub/TAG-INFO | 2 +- nsprpub/config/prdepend.h | 1 - nsprpub/pr/include/prinit.h | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nsprpub/TAG-INFO b/nsprpub/TAG-INFO index a5b9555a9bf..68dc8df3471 100644 --- a/nsprpub/TAG-INFO +++ b/nsprpub/TAG-INFO @@ -1 +1 @@ -NSPR_4_10_8_BETA3 +NSPR_4_10_8_RTM diff --git a/nsprpub/config/prdepend.h b/nsprpub/config/prdepend.h index 6c66b37ca0f..e49e92677e3 100644 --- a/nsprpub/config/prdepend.h +++ b/nsprpub/config/prdepend.h @@ -10,4 +10,3 @@ */ #error "Do not include this header file." - diff --git a/nsprpub/pr/include/prinit.h b/nsprpub/pr/include/prinit.h index 032398c79c6..5cdf6d24c91 100644 --- a/nsprpub/pr/include/prinit.h +++ b/nsprpub/pr/include/prinit.h @@ -31,11 +31,11 @@ PR_BEGIN_EXTERN_C ** The format of the version string is ** ".[.] []" */ -#define PR_VERSION "4.10.8 Beta" +#define PR_VERSION "4.10.8" #define PR_VMAJOR 4 #define PR_VMINOR 10 #define PR_VPATCH 8 -#define PR_BETA PR_TRUE +#define PR_BETA PR_FALSE /* ** PRVersionCheck From 98e50f6d709b5b816bd097d8624a4f10e0845304 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 8 Jan 2015 10:14:49 -0500 Subject: [PATCH 004/106] Bug 1119260 - Mark virtual overridden functions as MOZ_OVERRIDE in XPConnect; r=bholley --- js/xpconnect/loader/mozJSComponentLoader.h | 2 +- js/xpconnect/public/SandboxPrivate.h | 4 ++-- js/xpconnect/src/BackstagePass.h | 8 ++++---- js/xpconnect/src/XPCJSRuntime.cpp | 6 +++--- js/xpconnect/src/xpcprivate.h | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/js/xpconnect/loader/mozJSComponentLoader.h b/js/xpconnect/loader/mozJSComponentLoader.h index e06265bc011..c6b895a4f79 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.h +++ b/js/xpconnect/loader/mozJSComponentLoader.h @@ -44,7 +44,7 @@ class mozJSComponentLoader : public mozilla::ModuleLoader, mozJSComponentLoader(); // ModuleLoader - const mozilla::Module* LoadModule(mozilla::FileLocation &aFile); + const mozilla::Module* LoadModule(mozilla::FileLocation &aFile) MOZ_OVERRIDE; nsresult FindTargetObject(JSContext* aCx, JS::MutableHandleObject aTargetObject); diff --git a/js/xpconnect/public/SandboxPrivate.h b/js/xpconnect/public/SandboxPrivate.h index cc1a2fc1a21..5d8323eeac5 100644 --- a/js/xpconnect/public/SandboxPrivate.h +++ b/js/xpconnect/public/SandboxPrivate.h @@ -35,12 +35,12 @@ public: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(SandboxPrivate, nsIGlobalObject) - nsIPrincipal *GetPrincipal() + nsIPrincipal *GetPrincipal() MOZ_OVERRIDE { return mPrincipal; } - JSObject *GetGlobalJSObject() + JSObject *GetGlobalJSObject() MOZ_OVERRIDE { return GetWrapper(); } diff --git a/js/xpconnect/src/BackstagePass.h b/js/xpconnect/src/BackstagePass.h index 4a8ada36a16..f968d0e2952 100644 --- a/js/xpconnect/src/BackstagePass.h +++ b/js/xpconnect/src/BackstagePass.h @@ -28,17 +28,17 @@ public: NS_DECL_NSIXPCSCRIPTABLE NS_DECL_NSICLASSINFO - virtual nsIPrincipal* GetPrincipal() { + virtual nsIPrincipal* GetPrincipal() MOZ_OVERRIDE { return mPrincipal; } - virtual JSObject* GetGlobalJSObject(); + virtual JSObject* GetGlobalJSObject() MOZ_OVERRIDE; - virtual void ForgetGlobalObject() { + void ForgetGlobalObject() { mWrapper = nullptr; } - virtual void SetGlobalObject(JSObject* global); + void SetGlobalObject(JSObject* global); explicit BackstagePass(nsIPrincipal *prin) : mPrincipal(prin) diff --git a/js/xpconnect/src/XPCJSRuntime.cpp b/js/xpconnect/src/XPCJSRuntime.cpp index a2c0bda0eef..46cfdde1c5e 100644 --- a/js/xpconnect/src/XPCJSRuntime.cpp +++ b/js/xpconnect/src/XPCJSRuntime.cpp @@ -1156,7 +1156,7 @@ class WatchdogManager : public nsIObserver public: NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, - const char16_t* aData) + const char16_t* aData) MOZ_OVERRIDE { RefreshWatchdog(); return NS_OK; @@ -1792,7 +1792,7 @@ class JSMainRuntimeTemporaryPeakReporter MOZ_FINAL : public nsIMemoryReporter NS_DECL_ISUPPORTS NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport, - nsISupports* aData, bool aAnonymize) + nsISupports* aData, bool aAnonymize) MOZ_OVERRIDE { return MOZ_COLLECT_REPORT("js-main-runtime-temporary-peak", KIND_OTHER, UNITS_BYTES, @@ -2630,7 +2630,7 @@ class JSMainRuntimeCompartmentsReporter MOZ_FINAL : public nsIMemoryReporter } NS_IMETHOD CollectReports(nsIMemoryReporterCallback *cb, - nsISupports *closure, bool anonymize) + nsISupports *closure, bool anonymize) MOZ_OVERRIDE { // First we collect the compartment paths. Then we report them. Doing // the two steps interleaved is a bad idea, because calling |cb| diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 1e529ed0744..80a727af1ed 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -305,12 +305,12 @@ public: nsresult GetInfoForName(const char * name, nsIInterfaceInfo** info); virtual nsIPrincipal* GetPrincipal(JSObject* obj, - bool allowShortCircuit) const; + bool allowShortCircuit) const MOZ_OVERRIDE; void RecordTraversal(void *p, nsISupports *s); virtual char* DebugPrintJSStack(bool showArgs, bool showLocals, - bool showThisProps); + bool showThisProps) MOZ_OVERRIDE; static bool ReportAllJSExceptions() @@ -2324,7 +2324,7 @@ class nsXPCWrappedJSClass : public nsIXPCWrappedJSClass { // all the interface method declarations... NS_DECL_ISUPPORTS - NS_IMETHOD DebugDump(int16_t depth); + NS_IMETHOD DebugDump(int16_t depth) MOZ_OVERRIDE; public: static already_AddRefed @@ -2430,7 +2430,7 @@ public: NS_IMETHOD CallMethod(uint16_t methodIndex, const XPTMethodDescriptor *info, - nsXPTCMiniVariant* params); + nsXPTCMiniVariant* params) MOZ_OVERRIDE; /* * This is rarely called directly. Instead one usually calls From 5688d549a4da528a4eca9a65faa2555fccab1501 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 25 Dec 2014 16:22:09 -0500 Subject: [PATCH 005/106] Bug 1116357 - Prevent double releasing the wrapper object in the error handling code in FinishCreate; r=bholley --- js/xpconnect/src/XPCWrappedNative.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index e4ed25ce049..c24a7a2fcde 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -505,7 +505,6 @@ FinishCreate(XPCWrappedNativeScope* Scope, if (cache) cache->ClearWrapper(); - wrapper->Release(); return rv; } } From b0661f5ce2f24b71fcb8781853b3c3082a838792 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 25 Dec 2014 14:44:02 -0500 Subject: [PATCH 006/106] Bug 1114999 - Part 1: Create an analysis for disallowing calling AddRef and Release on the return value of functions; r=jrmuizel --- build/clang-plugin/clang-plugin.cpp | 42 ++++++++++++ build/clang-plugin/tests/Makefile.in | 6 +- .../tests/TestNoAddRefReleaseOnReturn.cpp | 65 +++++++++++++++++++ build/clang-plugin/tests/moz.build | 1 + 4 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 build/clang-plugin/tests/TestNoAddRefReleaseOnReturn.cpp diff --git a/build/clang-plugin/clang-plugin.cpp b/build/clang-plugin/clang-plugin.cpp index c6e1e7ec1e0..455d3e2d06f 100644 --- a/build/clang-plugin/clang-plugin.cpp +++ b/build/clang-plugin/clang-plugin.cpp @@ -74,12 +74,18 @@ private: virtual void run(const MatchFinder::MatchResult &Result); }; + class NoAddRefReleaseOnReturnChecker : public MatchFinder::MatchCallback { + public: + virtual void run(const MatchFinder::MatchResult &Result); + }; + ScopeChecker stackClassChecker; ScopeChecker globalClassChecker; NonHeapClassChecker nonheapClassChecker; ArithmeticArgChecker arithmeticArgChecker; TrivialCtorDtorChecker trivialCtorDtorChecker; NaNExprChecker nanExprChecker; + NoAddRefReleaseOnReturnChecker noAddRefReleaseOnReturnChecker; MatchFinder astMatcher; }; @@ -389,6 +395,12 @@ AST_MATCHER(CXXRecordDecl, hasTrivialCtorDtor) { return MozChecker::hasCustomAnnotation(&Node, "moz_trivial_ctor_dtor"); } +/// This matcher will match any function declaration that is marked to prohibit +/// calling AddRef or Release on its return value. +AST_MATCHER(FunctionDecl, hasNoAddRefReleaseOnReturnAttr) { + return MozChecker::hasCustomAnnotation(&Node, "moz_no_addref_release_on_return"); +} + /// This matcher will match all arithmetic binary operators. AST_MATCHER(BinaryOperator, binaryArithmeticOperator) { BinaryOperatorKind opcode = Node.getOpcode(); @@ -458,6 +470,17 @@ AST_MATCHER(BinaryOperator, isInSkScalarDotH) { return llvm::sys::path::rbegin(FileName)->equals("SkScalar.h"); } +/// This matcher will match all accesses to AddRef or Release methods. +AST_MATCHER(MemberExpr, isAddRefOrRelease) { + ValueDecl *Member = Node.getMemberDecl(); + CXXMethodDecl *Method = dyn_cast(Member); + if (Method) { + std::string Name = Method->getNameAsString(); + return Name == "AddRef" || Name == "Release"; + } + return false; +} + } } @@ -548,6 +571,12 @@ DiagnosticsMatcher::DiagnosticsMatcher() unless(anyOf(isInSystemHeader(), isInSkScalarDotH())) )).bind("node"), &nanExprChecker); + + astMatcher.addMatcher(callExpr(callee(functionDecl(hasNoAddRefReleaseOnReturnAttr()).bind("func")), + hasParent(memberExpr(isAddRefOrRelease(), + hasParent(callExpr())).bind("member") + )).bind("node"), + &noAddRefReleaseOnReturnChecker); } void DiagnosticsMatcher::ScopeChecker::run( @@ -733,6 +762,19 @@ void DiagnosticsMatcher::NaNExprChecker::run( } } +void DiagnosticsMatcher::NoAddRefReleaseOnReturnChecker::run( + const MatchFinder::MatchResult &Result) { + DiagnosticsEngine &Diag = Result.Context->getDiagnostics(); + unsigned errorID = Diag.getDiagnosticIDs()->getCustomDiagID( + DiagnosticIDs::Error, "%1 cannot be called on the return value of %0"); + const Stmt *node = Result.Nodes.getNodeAs("node"); + const FunctionDecl *func = Result.Nodes.getNodeAs("func"); + const MemberExpr *member = Result.Nodes.getNodeAs("member"); + const CXXMethodDecl *method = dyn_cast(member->getMemberDecl()); + + Diag.Report(node->getLocStart(), errorID) << func << method; +} + class MozCheckAction : public PluginASTAction { public: ASTConsumerPtr CreateASTConsumer(CompilerInstance &CI, StringRef fileName) override { diff --git a/build/clang-plugin/tests/Makefile.in b/build/clang-plugin/tests/Makefile.in index 7d67f8be67f..47393978c72 100644 --- a/build/clang-plugin/tests/Makefile.in +++ b/build/clang-plugin/tests/Makefile.in @@ -3,9 +3,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Build without any warning flags, and with clang verify flag for a -# syntax-only build (no codegen). -OS_CFLAGS := $(filter-out -W%,$(OS_CFLAGS)) -fsyntax-only -Xclang -verify -OS_CXXFLAGS := $(filter-out -W%,$(OS_CXXFLAGS)) -fsyntax-only -Xclang -verify +# syntax-only build (no codegen), without a limit on the number of errors. +OS_CFLAGS := $(filter-out -W%,$(OS_CFLAGS)) -fsyntax-only -Xclang -verify -ferror-limit=0 +OS_CXXFLAGS := $(filter-out -W%,$(OS_CXXFLAGS)) -fsyntax-only -Xclang -verify -ferror-limit=0 include $(topsrcdir)/config/rules.mk diff --git a/build/clang-plugin/tests/TestNoAddRefReleaseOnReturn.cpp b/build/clang-plugin/tests/TestNoAddRefReleaseOnReturn.cpp new file mode 100644 index 00000000000..8283a72583e --- /dev/null +++ b/build/clang-plugin/tests/TestNoAddRefReleaseOnReturn.cpp @@ -0,0 +1,65 @@ +#define MOZ_NO_ADDREF_RELEASE_ON_RETURN __attribute__((annotate("moz_no_addref_release_on_return"))) + +struct Test { + void AddRef(); + void Release(); + void foo(); +}; + +struct S { + Test* f() MOZ_NO_ADDREF_RELEASE_ON_RETURN; + Test& g() MOZ_NO_ADDREF_RELEASE_ON_RETURN; + Test h() MOZ_NO_ADDREF_RELEASE_ON_RETURN; +}; + +template +struct X { + T* f() MOZ_NO_ADDREF_RELEASE_ON_RETURN; + T& g() MOZ_NO_ADDREF_RELEASE_ON_RETURN; + T h() MOZ_NO_ADDREF_RELEASE_ON_RETURN; +}; + +template +struct SP { + T* operator->() MOZ_NO_ADDREF_RELEASE_ON_RETURN; +}; + +Test* f() MOZ_NO_ADDREF_RELEASE_ON_RETURN; +Test& g() MOZ_NO_ADDREF_RELEASE_ON_RETURN; +Test h() MOZ_NO_ADDREF_RELEASE_ON_RETURN; + +void test() { + S s; + s.f()->AddRef(); // expected-error{{'AddRef' cannot be called on the return value of 'f'}} + s.f()->Release(); // expected-error{{'Release' cannot be called on the return value of 'f'}} + s.f()->foo(); + s.g().AddRef(); // expected-error{{'AddRef' cannot be called on the return value of 'g'}} + s.g().Release(); // expected-error{{'Release' cannot be called on the return value of 'g'}} + s.g().foo(); + s.h().AddRef(); // expected-error{{'AddRef' cannot be called on the return value of 'h'}} + s.h().Release(); // expected-error{{'Release' cannot be called on the return value of 'h'}} + s.h().foo(); + X x; + x.f()->AddRef(); // expected-error{{'AddRef' cannot be called on the return value of 'f'}} + x.f()->Release(); // expected-error{{'Release' cannot be called on the return value of 'f'}} + x.f()->foo(); + x.g().AddRef(); // expected-error{{'AddRef' cannot be called on the return value of 'g'}} + x.g().Release(); // expected-error{{'Release' cannot be called on the return value of 'g'}} + x.g().foo(); + x.h().AddRef(); // expected-error{{'AddRef' cannot be called on the return value of 'h'}} + x.h().Release(); // expected-error{{'Release' cannot be called on the return value of 'h'}} + x.h().foo(); + SP sp; + sp->AddRef(); // expected-error{{'AddRef' cannot be called on the return value of 'operator->'}} + sp->Release(); // expected-error{{'Release' cannot be called on the return value of 'operator->'}} + sp->foo(); + f()->AddRef(); // expected-error{{'AddRef' cannot be called on the return value of 'f'}} + f()->Release(); // expected-error{{'Release' cannot be called on the return value of 'f'}} + f()->foo(); + g().AddRef(); // expected-error{{'AddRef' cannot be called on the return value of 'g'}} + g().Release(); // expected-error{{'Release' cannot be called on the return value of 'g'}} + g().foo(); + h().AddRef(); // expected-error{{'AddRef' cannot be called on the return value of 'h'}} + h().Release(); // expected-error{{'Release' cannot be called on the return value of 'h'}} + h().foo(); +} diff --git a/build/clang-plugin/tests/moz.build b/build/clang-plugin/tests/moz.build index 0d7f35b6a6d..2b5bf2a277a 100644 --- a/build/clang-plugin/tests/moz.build +++ b/build/clang-plugin/tests/moz.build @@ -11,6 +11,7 @@ SOURCES += [ 'TestMustOverride.cpp', 'TestNANTestingExpr.cpp', 'TestNANTestingExprC.c', + 'TestNoAddRefReleaseOnReturn.cpp', 'TestNoArithmeticExprInArgument.cpp', 'TestNonHeapClass.cpp', 'TestStackClass.cpp', From 16b003d14962f5a0d9cd10cdd3eb7a853cd3d237 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sun, 18 Jan 2015 14:25:59 -0500 Subject: [PATCH 007/106] Bug 1123108 - Mark nsIXPConnectWrappedNative::mIdentity as an nsCOMPtr; r=bholley --- js/xpconnect/idl/nsIXPConnect.idl | 5 +++-- js/xpconnect/src/XPCWrappedNative.cpp | 13 ++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/js/xpconnect/idl/nsIXPConnect.idl b/js/xpconnect/idl/nsIXPConnect.idl index a42c9517299..f2fcfc3b192 100644 --- a/js/xpconnect/idl/nsIXPConnect.idl +++ b/js/xpconnect/idl/nsIXPConnect.idl @@ -11,6 +11,8 @@ %{ C++ #include "jspubtd.h" #include "js/TypeDecls.h" +#include "mozilla/Attributes.h" +#include "nsCOMPtr.h" struct JSFreeOp; @@ -89,13 +91,12 @@ interface nsIXPConnectWrappedNative : nsIXPConnectJSObjectHolder nsISupports* Native() const { return mIdentity; } protected: - nsISupports *mIdentity; + nsCOMPtr mIdentity; public: %} }; %{C++ -#include "nsCOMPtr.h" inline const nsQueryInterface diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index c24a7a2fcde..44665eaf30c 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -572,7 +572,7 @@ XPCWrappedNative::XPCWrappedNative(already_AddRefed&& aIdentity, { MOZ_ASSERT(NS_IsMainThread()); - mIdentity = aIdentity.take(); + mIdentity = aIdentity; mFlatJSObject.setFlags(FLAT_JS_OBJECT_VALID); MOZ_ASSERT(mMaybeProto, "bad ctor param"); @@ -590,7 +590,7 @@ XPCWrappedNative::XPCWrappedNative(already_AddRefed&& aIdentity, { MOZ_ASSERT(NS_IsMainThread()); - mIdentity = aIdentity.take(); + mIdentity = aIdentity; mFlatJSObject.setFlags(FLAT_JS_OBJECT_VALID); MOZ_ASSERT(aScope, "bad ctor param"); @@ -626,10 +626,9 @@ XPCWrappedNative::Destroy() if (mIdentity) { XPCJSRuntime* rt = GetRuntime(); if (rt && rt->GetDoingFinalization()) { - cyclecollector::DeferredFinalize(mIdentity); - mIdentity = nullptr; + cyclecollector::DeferredFinalize(mIdentity.forget().take()); } else { - NS_RELEASE(mIdentity); + mIdentity = nullptr; } } @@ -2492,7 +2491,7 @@ NS_IMETHODIMP XPCWrappedNative::DebugDump(int16_t depth) XPC_LOG_ALWAYS(("mSet @ %x", mSet)); XPC_LOG_ALWAYS(("mFlatJSObject of %x", mFlatJSObject.getPtr())); - XPC_LOG_ALWAYS(("mIdentity of %x", mIdentity)); + XPC_LOG_ALWAYS(("mIdentity of %x", mIdentity.get())); XPC_LOG_ALWAYS(("mScriptableInfo @ %x", mScriptableInfo)); if (depth && mScriptableInfo) { @@ -2561,7 +2560,7 @@ XPCWrappedNative::ToString(XPCWrappedNativeTearOff* to /* = nullptr */ ) const if (si) { fmt = "[object %s" FMT_ADDR FMT_STR(" (native") FMT_ADDR FMT_STR(")") "]"; } - sz = JS_smprintf(fmt, name PARAM_ADDR(this) PARAM_ADDR(mIdentity)); + sz = JS_smprintf(fmt, name PARAM_ADDR(this) PARAM_ADDR(mIdentity.get())); JS_smprintf_free(name); From dea7f51f56270bbe139327990330765a24efa31f Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 22 Jan 2015 10:02:15 -0500 Subject: [PATCH 008/106] Bug 611103 - Don't depend on the editor in nsDocumentEncoder; r=bzbarsky --- dom/base/nsDocumentEncoder.cpp | 36 +++++++------------------------ editor/libeditor/nsHTMLEditor.cpp | 12 ----------- editor/nsIHTMLEditor.idl | 8 +------ 3 files changed, 9 insertions(+), 47 deletions(-) diff --git a/dom/base/nsDocumentEncoder.cpp b/dom/base/nsDocumentEncoder.cpp index 04b94be0984..12fdcceaa06 100644 --- a/dom/base/nsDocumentEncoder.cpp +++ b/dom/base/nsDocumentEncoder.cpp @@ -47,9 +47,6 @@ #include "nsStringBuffer.h" #include "mozilla/dom/Element.h" #include "mozilla/dom/ShadowRoot.h" -#include "nsIEditor.h" -#include "nsIHTMLEditor.h" -#include "nsIDocShell.h" #include "mozilla/dom/EncodingUtils.h" #include "nsComputedDOMStyle.h" @@ -324,34 +321,17 @@ nsDocumentEncoder::IncludeInContext(nsINode *aNode) static bool IsInvisibleBreak(nsINode *aNode) { - // xxxehsan: we should probably figure out a way to determine - // if a BR node is visible without using the editor. - Element* elt = aNode->AsElement(); - if (!elt->IsHTML(nsGkAtoms::br) || - !aNode->IsEditable()) { + if (!aNode->IsElement() || !aNode->IsEditable()) { + return false; + } + nsIFrame* frame = aNode->AsElement()->GetPrimaryFrame(); + if (!frame || frame->GetType() != nsGkAtoms::brFrame) { return false; } - // Grab the editor associated with the document - nsIDocument *doc = aNode->GetComposedDoc(); - if (doc) { - nsPIDOMWindow *window = doc->GetWindow(); - if (window) { - nsIDocShell *docShell = window->GetDocShell(); - if (docShell) { - nsCOMPtr editor; - docShell->GetEditor(getter_AddRefs(editor)); - nsCOMPtr htmlEditor = do_QueryInterface(editor); - if (htmlEditor) { - bool isVisible = false; - nsCOMPtr domNode = do_QueryInterface(aNode); - htmlEditor->BreakIsVisible(domNode, &isVisible); - return !isVisible; - } - } - } - } - return false; + // If the BRFrame has caused a visible line break, it should have a next + // sibling. + return !frame->GetNextSibling(); } nsresult diff --git a/editor/libeditor/nsHTMLEditor.cpp b/editor/libeditor/nsHTMLEditor.cpp index ea1e6d9f622..8069fdafcfe 100644 --- a/editor/libeditor/nsHTMLEditor.cpp +++ b/editor/libeditor/nsHTMLEditor.cpp @@ -969,7 +969,6 @@ nsHTMLEditor::IsVisBreak(nsINode* aNode) return true; } - bool nsHTMLEditor::IsVisBreak(nsIDOMNode* aNode) { @@ -978,17 +977,6 @@ nsHTMLEditor::IsVisBreak(nsIDOMNode* aNode) return IsVisBreak(node); } -NS_IMETHODIMP -nsHTMLEditor::BreakIsVisible(nsIDOMNode *aNode, bool *aIsVisible) -{ - NS_ENSURE_ARG_POINTER(aNode && aIsVisible); - - *aIsVisible = IsVisBreak(aNode); - - return NS_OK; -} - - NS_IMETHODIMP nsHTMLEditor::GetIsDocumentEditable(bool *aIsDocumentEditable) { diff --git a/editor/nsIHTMLEditor.idl b/editor/nsIHTMLEditor.idl index 6347f13c59d..d49ec4157a1 100644 --- a/editor/nsIHTMLEditor.idl +++ b/editor/nsIHTMLEditor.idl @@ -22,8 +22,7 @@ class Element; [ptr] native Element (mozilla::dom::Element); -[scriptable, uuid(393a364f-e8e2-48a1-a271-a0067b6bac9b)] - +[scriptable, uuid(87ee993e-985f-4a43-a974-0d9512da2fb0)] interface nsIHTMLEditor : nsISupports { %{C++ @@ -551,11 +550,6 @@ interface nsIHTMLEditor : nsISupports */ attribute boolean returnInParagraphCreatesNewParagraph; - /** - * Checks whether a BR node is visible to the user. - */ - boolean breakIsVisible(in nsIDOMNode aNode); - /** * Get an active editor's editing host in DOM window. If this editor isn't * active in the DOM window, this returns NULL. From 96ba494c9748223f80c20759c3d4eca5c0183ab6 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Wed, 21 Jan 2015 04:00:40 -0800 Subject: [PATCH 009/106] Bug 1114703: Remove mozilla::pkix's polyfill for std::bind, r=mmc --HG-- extra : rebase_source : 11457f210c7f7534db2e6ebe1a8328985ff6d8b0 --- security/pkix/include/pkix/bind.h | 231 ------------------ security/pkix/lib/pkixbind.cpp | 38 --- security/pkix/lib/pkixcert.cpp | 14 +- security/pkix/lib/pkixcheck.cpp | 44 ++-- security/pkix/lib/pkixder.cpp | 1 - security/pkix/lib/pkixder.h | 20 +- security/pkix/lib/pkixnames.cpp | 18 +- security/pkix/lib/pkixocsp.cpp | 29 ++- security/pkix/lib/pkixutil.h | 4 +- security/pkix/moz.build | 1 - .../pkix/test/gtest/pkixder_input_tests.cpp | 13 +- .../gtest/pkixder_universal_types_tests.cpp | 1 - 12 files changed, 76 insertions(+), 338 deletions(-) delete mode 100644 security/pkix/include/pkix/bind.h delete mode 100644 security/pkix/lib/pkixbind.cpp diff --git a/security/pkix/include/pkix/bind.h b/security/pkix/include/pkix/bind.h deleted file mode 100644 index db13deec376..00000000000 --- a/security/pkix/include/pkix/bind.h +++ /dev/null @@ -1,231 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -/* This code is made available to you under your choice of the following sets - * of licensing terms: - */ -/* 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/. - */ -/* Copyright 2013 Mozilla Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Work around missing std::bind, std::ref, std::cref in older compilers. This -// implementation isn't intended to be complete; rather, it is the minimal -// implementation needed to make our use of std::bind work for compilers that -// lack both C++11 and TR1 support for these features. We cannot even assume -// that rvalue references work, which means we don't get perfect forwarding -// and thus we basically have to define a new overload for every distinct call -// signature. -// -// A positive side-effect of this code is improved debugging usability; it is -// much more convenient to step through code that uses this polyfill than it is -// to step through the many nested layers of a real std::bind implementation. -// -// Build with MOZILLA_PKIX_USE_REAL_FUNCTIONAL defined in order to use the -// compiler's definitions of these functions. This is helpful in order to -// ensure that the calling code is actually compatible with the real std::bind -// and friends. - -#ifndef mozilla_pkix__bind_h -#define mozilla_pkix__bind_h - -#ifdef MOZILLA_PKIX_USE_REAL_FUNCTIONAL -#include -#endif - -namespace mozilla { namespace pkix { - -#ifdef MOZILLA_PKIX_USE_REAL_FUNCTIONAL - -using std::bind; -using std::cref; -using std::ref; -using std::placeholders::_1; -using std::placeholders::_2; -using std::placeholders::_3; -using std::placeholders::_4; - -#else - -extern class Placeholder1 { } _1; -extern class Placeholder2 { } _2; -extern class Placeholder3 { } _3; -extern class Placeholder4 { } _4; - -template V& ref(V& v) { return v; } -template const V& cref(const V& v) { return v; } - -namespace internal { - -template -class Bind1 -{ -public: - typedef R (&F)(P1&, B1&); - Bind1(F f, B1& b1) : f(f), b1(b1) { } - R operator()(P1& p1) const { return f(p1, b1); } -private: - F f; - B1& b1; - void operator=(const Bind1&) = delete; -}; - -template -class Bind2 -{ -public: - typedef R (&F)(P1&, B1&, B2&); - Bind2(F f, B1& b1, B2& b2) : f(f), b1(b1), b2(b2) { } - R operator()(P1& p1) const { return f(p1, b1, b2); } -private: - F f; - B1& b1; - B2& b2; - void operator=(const Bind2&) = delete; -}; - -template -class Bind3 -{ -public: - typedef R (&F)(P1&, B1, B2, B3&); - Bind3(F f, B1& b1, B2& b2, B3& b3) - : f(f), b1(b1), b2(b2), b3(b3) { } - R operator()(P1& p1) const { return f(p1, b1, b2, b3); } -private: - F f; - B1& b1; - B2& b2; - B3& b3; - void operator=(const Bind3&) = delete; -}; - -template -class Bind4 -{ -public: - typedef R (&F)(P1&, B1, B2, B3&, B4&); - Bind4(F f, B1& b1, B2& b2, B3& b3, B4& b4) - : f(f), b1(b1), b2(b2), b3(b3), b4(b4) { } - R operator()(P1& p1) const { return f(p1, b1, b2, b3, b4); } -private: - F f; - B1& b1; - B2& b2; - B3& b3; - B4& b4; - void operator=(const Bind4&) = delete; -}; - -template -class BindToMemberFunction4 -{ -public: - // XXX: C++ doesn't have reference-to-member function, only - // pointer-to-member function, so we can't enforce the non-nullness of f - // using the type system. - typedef R (C1::*F)(P1&, P2&, P3, P4&); - BindToMemberFunction4(F f, C1& that) : f(f), that(that) { } - R operator()(P1& p1, P2& p2, P3 p3, P4& p4) const - { - return (that.*f)(p1, p2, p3, p4); - } -private: - const F f; - C1& that; - void operator=(const BindToMemberFunction4&) = delete; -}; - -template -class Bind5 -{ -public: - typedef R (&F)(P1&, B1, B2, B3, B4, B5); - Bind5(F f, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5) - : f(f), b1(b1), b2(b2), b3(b3), b4(b4), b5(b5) { } - R operator()(P1& p1) const { return f(p1, b1, b2, b3, b4, b5); } -private: - F f; - B1 b1; - B2 b2; - B3 b3; - B4 b4; - B5 b5; - void operator=(const Bind5&) = delete; -}; - -} // namespace internal - -template -inline internal::Bind1 -bind(R (&f)(P1&, B1&), Placeholder1&, B1& b1) -{ - return internal::Bind1(f, b1); -} - -template -inline internal::Bind2 -bind(R (&f)(P1&, B1&, B2&), Placeholder1&, B1& b1, B2& b2) -{ - return internal::Bind2(f, b1, b2); -} - -template -inline internal::Bind3 -bind(R (&f)(P1&, B1, B2, B3&), Placeholder1&, const B1& b1, const B2& b2, - B3& b3) -{ - return internal::Bind3(f, b1, b2, b3); -} - -template -inline internal::Bind4 -bind(R (&f)(P1&, B1, B2, B3&, B4&), Placeholder1&, const B1& b1, const B2& b2, - B3& b3, B4& b4) -{ - return internal::Bind4(f, b1, b2, b3, b4); -} - -// XXX: C++ doesn't have reference-to-member function, only -// pointer-to-member function, so we can't enforce the non-nullness of f -// using the type system. -template -inline internal::BindToMemberFunction4 -bind(R (C1::*f)(P1&, P2&, P3, P4&), C1& that, Placeholder1&, - Placeholder2&, Placeholder3, Placeholder4&) -{ - return internal::BindToMemberFunction4(f, that); -} - -template -inline internal::Bind5 -bind(R (&f)(P1&, B1, B2, B3, B4, B5&), Placeholder1&, B1 b1, B2 b2, B3 b3, - B4 b4, B5& b5) -{ - return internal::Bind5(f, b1, b2, b3, b4, b5); -} - -#endif - -} } // namespace mozilla::pkix - -#endif // mozilla_pkix__bind_h diff --git a/security/pkix/lib/pkixbind.cpp b/security/pkix/lib/pkixbind.cpp deleted file mode 100644 index 62caee9cbaf..00000000000 --- a/security/pkix/lib/pkixbind.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -/* This code is made available to you under your choice of the following sets - * of licensing terms: - */ -/* 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/. - */ -/* Copyright 2013 Mozilla Contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "pkix/bind.h" - -#ifndef MOZILLA_PKIX_USE_REAL_FUNCTIONAL - -namespace mozilla { namespace pkix { - -Placeholder1 _1; -Placeholder2 _2; -Placeholder3 _3; -Placeholder4 _4; - -} } // namespace mozilla::pkix - -#endif diff --git a/security/pkix/lib/pkixcert.cpp b/security/pkix/lib/pkixcert.cpp index f5daacfe265..6371f5d30b5 100644 --- a/security/pkix/lib/pkixcert.cpp +++ b/security/pkix/lib/pkixcert.cpp @@ -22,7 +22,6 @@ * limitations under the License. */ -#include "pkix/bind.h" #include "pkixutil.h" namespace mozilla { namespace pkix { @@ -140,9 +139,12 @@ BackCert::Init() } } - rv = der::OptionalExtensions(tbsCertificate, CSC | 3, - bind(&BackCert::RememberExtension, *this, _1, - _2, _3, _4)); + rv = der::OptionalExtensions( + tbsCertificate, CSC | 3, + [this](Reader& extnID, const Input& extnValue, bool critical, + /*out*/ bool& understood) { + return RememberExtension(extnID, extnValue, critical, understood); + }); if (rv != Success) { return rv; } @@ -178,10 +180,8 @@ BackCert::Init() return der::End(tbsCertificate); } -// XXX: The second value is of type |const Input&| instead of type |Input| due -// to limitations in our std::bind polyfill. Result -BackCert::RememberExtension(Reader& extnID, const Input& extnValue, +BackCert::RememberExtension(Reader& extnID, Input extnValue, bool critical, /*out*/ bool& understood) { understood = false; diff --git a/security/pkix/lib/pkixcheck.cpp b/security/pkix/lib/pkixcheck.cpp index 19b43c882b9..9cab151114f 100644 --- a/security/pkix/lib/pkixcheck.cpp +++ b/security/pkix/lib/pkixcheck.cpp @@ -24,7 +24,6 @@ #include "pkixcheck.h" -#include "pkix/bind.h" #include "pkixder.h" #include "pkixutil.h" @@ -296,24 +295,6 @@ static const long UNLIMITED_PATH_LEN = -1; // must be less than zero // BasicConstraints ::= SEQUENCE { // cA BOOLEAN DEFAULT FALSE, // pathLenConstraint INTEGER (0..MAX) OPTIONAL } -static Result -DecodeBasicConstraints(Reader& input, /*out*/ bool& isCA, - /*out*/ long& pathLenConstraint) -{ - if (der::OptionalBoolean(input, isCA) != Success) { - return Result::ERROR_EXTENSION_VALUE_INVALID; - } - - // TODO(bug 985025): If isCA is false, pathLenConstraint MUST NOT - // be included (as per RFC 5280 section 4.2.1.9), but for compatibility - // reasons, we don't check this for now. - if (der::OptionalInteger(input, UNLIMITED_PATH_LEN, pathLenConstraint) - != Success) { - return Result::ERROR_EXTENSION_VALUE_INVALID; - } - - return Success; -} // RFC5280 4.2.1.9. Basic Constraints (id-ce-basicConstraints) Result @@ -327,9 +308,19 @@ CheckBasicConstraints(EndEntityOrCA endEntityOrCA, if (encodedBasicConstraints) { Reader input(*encodedBasicConstraints); - if (der::Nested(input, der::SEQUENCE, - bind(DecodeBasicConstraints, _1, ref(isCA), - ref(pathLenConstraint))) != Success) { + Result rv = der::Nested(input, der::SEQUENCE, + [&isCA, &pathLenConstraint](Reader& r) { + Result rv = der::OptionalBoolean(r, isCA); + if (rv != Success) { + return rv; + } + // TODO(bug 985025): If isCA is false, pathLenConstraint + // MUST NOT be included (as per RFC 5280 section + // 4.2.1.9), but for compatibility reasons, we don't + // check this. + return der::OptionalInteger(r, UNLIMITED_PATH_LEN, pathLenConstraint); + }); + if (rv != Success) { return Result::ERROR_EXTENSION_VALUE_INVALID; } if (der::End(input) != Success) { @@ -488,10 +479,11 @@ CheckExtendedKeyUsage(EndEntityOrCA endEntityOrCA, bool found = requiredEKU == KeyPurposeId::anyExtendedKeyUsage; Reader input(*encodedExtendedKeyUsage); - if (der::NestedOf(input, der::SEQUENCE, der::OIDTag, der::EmptyAllowed::No, - bind(MatchEKU, _1, requiredEKU, endEntityOrCA, - ref(found), ref(foundOCSPSigning))) - != Success) { + Result rv = der::NestedOf(input, der::SEQUENCE, der::OIDTag, + der::EmptyAllowed::No, [&](Reader& r) { + return MatchEKU(r, requiredEKU, endEntityOrCA, found, foundOCSPSigning); + }); + if (rv != Success) { return Result::ERROR_INADEQUATE_CERT_TYPE; } if (der::End(input) != Success) { diff --git a/security/pkix/lib/pkixder.cpp b/security/pkix/lib/pkixder.cpp index 645bdf801cd..252c08511e3 100644 --- a/security/pkix/lib/pkixder.cpp +++ b/security/pkix/lib/pkixder.cpp @@ -24,7 +24,6 @@ #include "pkixder.h" -#include "pkix/bind.h" #include "pkixutil.h" namespace mozilla { namespace pkix { namespace der { diff --git a/security/pkix/lib/pkixder.h b/security/pkix/lib/pkixder.h index 30f7ab0dfab..750109bfffc 100644 --- a/security/pkix/lib/pkixder.h +++ b/security/pkix/lib/pkixder.h @@ -186,14 +186,24 @@ Nested(Reader& input, uint8_t outerTag, uint8_t innerTag, Decoder decoder) // Foo ::= SEQUENCE { // } // -// using a call like this: +// using code like this: // -// rv = NestedOf(input, SEQEUENCE, SEQUENCE, bind(_1, Foo)); +// Result Foo(Reader& r) { /*...*/ } // -// Result Foo(Reader& input) { -// } +// rv = der::NestedOf(input, der::SEQEUENCE, der::SEQUENCE, Foo); // -// In this example, Foo will get called once for each element of foos. +// or: +// +// Result Bar(Reader& r, int value) { /*...*/ } +// +// int value = /*...*/; +// +// rv = der::NestedOf(input, der::SEQUENCE, [value](Reader& r) { +// return Bar(r, value); +// }); +// +// In these examples the function will get called once for each element of +// foos. // template inline Result diff --git a/security/pkix/lib/pkixnames.cpp b/security/pkix/lib/pkixnames.cpp index 04e0966ad8a..a74b4b45199 100644 --- a/security/pkix/lib/pkixnames.cpp +++ b/security/pkix/lib/pkixnames.cpp @@ -34,7 +34,6 @@ // constraints, the reference identifier is the entire encoded name constraint // extension value. -#include "pkix/bind.h" #include "pkixcheck.h" #include "pkixutil.h" @@ -468,10 +467,10 @@ SearchNames(/*optional*/ const Input* subjectAltName, // SET SIZE (1..MAX) OF AttributeTypeAndValue Reader subjectReader(subject); return der::NestedOf(subjectReader, der::SEQUENCE, der::SET, - der::EmptyAllowed::Yes, - bind(SearchWithinRDN, _1, referenceIDType, - referenceID, fallBackToEmailAddress, - fallBackToCommonName, ref(match))); + der::EmptyAllowed::Yes, [&](Reader& r) { + return SearchWithinRDN(r, referenceIDType, referenceID, + fallBackToEmailAddress, fallBackToCommonName, match); + }); } // RelativeDistinguishedName ::= @@ -489,10 +488,11 @@ SearchWithinRDN(Reader& rdn, /*in/out*/ MatchResult& match) { do { - Result rv = der::Nested(rdn, der::SEQUENCE, - bind(SearchWithinAVA, _1, referenceIDType, - referenceID, fallBackToEmailAddress, - fallBackToCommonName, ref(match))); + Result rv = der::Nested(rdn, der::SEQUENCE, [&](Reader& r) { + return SearchWithinAVA(r, referenceIDType, referenceID, + fallBackToEmailAddress, fallBackToCommonName, + match); + }); if (rv != Success) { return rv; } diff --git a/security/pkix/lib/pkixocsp.cpp b/security/pkix/lib/pkixocsp.cpp index 2581db7e482..89f8a0b3011 100644 --- a/security/pkix/lib/pkixocsp.cpp +++ b/security/pkix/lib/pkixocsp.cpp @@ -24,7 +24,6 @@ #include -#include "pkix/bind.h" #include "pkix/pkix.h" #include "pkixcheck.h" #include "pkixutil.h" @@ -298,8 +297,9 @@ VerifyEncodedOCSPResponse(TrustDomain& trustDomain, const struct CertID& certID, thisUpdate, validThrough); Reader input(encodedResponse); - Result rv = der::Nested(input, der::SEQUENCE, - bind(OCSPResponse, _1, ref(context))); + Result rv = der::Nested(input, der::SEQUENCE, [&context](Reader& r) { + return OCSPResponse(r, context); + }); if (rv != Success) { return MapBadDERToMalformedOCSPResponse(rv); } @@ -358,7 +358,9 @@ OCSPResponse(Reader& input, Context& context) } return der::Nested(input, der::CONTEXT_SPECIFIC | der::CONSTRUCTED | 0, - der::SEQUENCE, bind(ResponseBytes, _1, ref(context))); + der::SEQUENCE, [&context](Reader& r) { + return ResponseBytes(r, context); + }); } // ResponseBytes ::= SEQUENCE { @@ -377,7 +379,9 @@ ResponseBytes(Reader& input, Context& context) } return der::Nested(input, der::OCTET_STRING, der::SEQUENCE, - bind(BasicResponse, _1, ref(context))); + [&context](Reader& r) { + return BasicResponse(r, context); + }); } // BasicOCSPResponse ::= SEQUENCE { @@ -493,8 +497,9 @@ ResponseData(Reader& input, Context& context, // responder will never return an empty response, and handling the case of an // empty response makes things unnecessarily complicated. rv = der::NestedOf(input, der::SEQUENCE, der::SEQUENCE, - der::EmptyAllowed::No, - bind(SingleResponse, _1, ref(context))); + der::EmptyAllowed::No, [&context](Reader& r) { + return SingleResponse(r, context); + }); if (rv != Success) { return rv; } @@ -517,8 +522,9 @@ static inline Result SingleResponse(Reader& input, Context& context) { bool match = false; - Result rv = der::Nested(input, der::SEQUENCE, - bind(CertID, _1, cref(context), ref(match))); + Result rv = der::Nested(input, der::SEQUENCE, [&context, &match](Reader& r) { + return CertID(r, context, match); + }); if (rv != Success) { return rv; } @@ -599,8 +605,9 @@ SingleResponse(Reader& input, Context& context) der::CONTEXT_SPECIFIC | der::CONSTRUCTED | 0; if (input.Peek(NEXT_UPDATE_TAG)) { Time nextUpdate(Time::uninitialized); - rv = der::Nested(input, NEXT_UPDATE_TAG, - bind(der::GeneralizedTime, _1, ref(nextUpdate))); + rv = der::Nested(input, NEXT_UPDATE_TAG, [&nextUpdate](Reader& r) { + return der::GeneralizedTime(r, nextUpdate); + }); if (rv != Success) { return rv; } diff --git a/security/pkix/lib/pkixutil.h b/security/pkix/lib/pkixutil.h index 6c176bb043b..238bd62b27c 100644 --- a/security/pkix/lib/pkixutil.h +++ b/security/pkix/lib/pkixutil.h @@ -140,8 +140,8 @@ private: Input subjectAltName; Input criticalNetscapeCertificateType; - Result RememberExtension(Reader& extnID, const Input& extnValue, - bool critical, /*out*/ bool& understood); + Result RememberExtension(Reader& extnID, Input extnValue, bool critical, + /*out*/ bool& understood); BackCert(const BackCert&) = delete; void operator=(const BackCert&) = delete; diff --git a/security/pkix/moz.build b/security/pkix/moz.build index 5f735624286..9ebaee7cc4d 100644 --- a/security/pkix/moz.build +++ b/security/pkix/moz.build @@ -5,7 +5,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. SOURCES += [ - 'lib/pkixbind.cpp', 'lib/pkixbuild.cpp', 'lib/pkixcert.cpp', 'lib/pkixcheck.cpp', diff --git a/security/pkix/test/gtest/pkixder_input_tests.cpp b/security/pkix/test/gtest/pkixder_input_tests.cpp index 4f862b28ebf..56bee20820e 100644 --- a/security/pkix/test/gtest/pkixder_input_tests.cpp +++ b/security/pkix/test/gtest/pkixder_input_tests.cpp @@ -26,7 +26,6 @@ #include #include -#include "pkix/bind.h" #include "pkixder.h" using namespace mozilla::pkix; @@ -844,9 +843,10 @@ TEST_F(pkixder_input_tests, NestedOf) std::vector readValues; ASSERT_EQ(Success, - NestedOf(input, SEQUENCE, INTEGER, EmptyAllowed::No, - mozilla::pkix::bind(NestedOfHelper, mozilla::pkix::_1, - mozilla::pkix::ref(readValues)))); + NestedOf(input, SEQUENCE, INTEGER, EmptyAllowed::No, + [&readValues](Reader& r) { + return NestedOfHelper(r, readValues); + })); ASSERT_EQ((size_t) 3, readValues.size()); ASSERT_EQ(0x01, readValues[0]); ASSERT_EQ(0x02, readValues[1]); @@ -862,8 +862,9 @@ TEST_F(pkixder_input_tests, NestedOfWithTruncatedData) std::vector readValues; ASSERT_EQ(Result::ERROR_BAD_DER, NestedOf(input, SEQUENCE, INTEGER, EmptyAllowed::No, - mozilla::pkix::bind(NestedOfHelper, mozilla::pkix::_1, - mozilla::pkix::ref(readValues)))); + [&readValues](Reader& r) { + return NestedOfHelper(r, readValues); + })); ASSERT_EQ((size_t) 0, readValues.size()); } diff --git a/security/pkix/test/gtest/pkixder_universal_types_tests.cpp b/security/pkix/test/gtest/pkixder_universal_types_tests.cpp index df2fb15b3f1..52a3562e26d 100644 --- a/security/pkix/test/gtest/pkixder_universal_types_tests.cpp +++ b/security/pkix/test/gtest/pkixder_universal_types_tests.cpp @@ -26,7 +26,6 @@ #include #include -#include "pkix/bind.h" #include "pkixder.h" #include "pkixtestutil.h" #include "stdint.h" From 7d9cc5ecf212a690b50edc3c771aee81274f533d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 21 Jan 2015 22:41:02 -0800 Subject: [PATCH 010/106] Bug 1124545 - Avoid creating the mergedFeatures hash table when possible. r=jdaggett. When scrolling all the way through https://bugzilla.mozilla.org/show_bug.cgi?id=MNG, |mergedFeatures| gets initialized more than 50,000 times -- each one involving a heap allocation for the entry storage -- but it never has anything put into it. This patch refactors MergeFontFeatures to move |mergedFeatures| inside it. It now doesn't get created in the common case. --HG-- extra : rebase_source : 5a8d44b30f90169b70e5f50a5e38bbe57f02b12b --- gfx/thebes/gfxFont.cpp | 45 ++++++++++++++++++-------------- gfx/thebes/gfxFont.h | 7 ++--- gfx/thebes/gfxGraphiteShaper.cpp | 23 +++++++--------- gfx/thebes/gfxHarfBuzzShaper.cpp | 23 +++++++--------- 4 files changed, 48 insertions(+), 50 deletions(-) diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index 056500c4bab..f757e5911d6 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -442,34 +442,37 @@ LookupAlternateValues(gfxFontFeatureValueSet *featureLookup, } } -/* static */ bool +/* static */ void gfxFontShaper::MergeFontFeatures( const gfxFontStyle *aStyle, const nsTArray& aFontFeatures, bool aDisableLigatures, const nsAString& aFamilyName, bool aAddSmallCaps, - nsDataHashtable& aMergedFeatures) + PLDHashOperator (*aHandleFeature)(const uint32_t&, uint32_t&, void*), + void* aHandleFeatureData) { uint32_t numAlts = aStyle->alternateValues.Length(); const nsTArray& styleRuleFeatures = aStyle->featureSettings; - // bail immediately if nothing to do + // Bail immediately if nothing to do, which is the common case. if (styleRuleFeatures.IsEmpty() && aFontFeatures.IsEmpty() && !aDisableLigatures && aStyle->variantCaps == NS_FONT_VARIANT_CAPS_NORMAL && aStyle->variantSubSuper == NS_FONT_VARIANT_POSITION_NORMAL && numAlts == 0) { - return false; + return; } + nsDataHashtable mergedFeatures; + // Ligature features are enabled by default in the generic shaper, // so we explicitly turn them off if necessary (for letter-spacing) if (aDisableLigatures) { - aMergedFeatures.Put(HB_TAG('l','i','g','a'), 0); - aMergedFeatures.Put(HB_TAG('c','l','i','g'), 0); + mergedFeatures.Put(HB_TAG('l','i','g','a'), 0); + mergedFeatures.Put(HB_TAG('c','l','i','g'), 0); } // add feature values from font @@ -478,7 +481,7 @@ gfxFontShaper::MergeFontFeatures( count = aFontFeatures.Length(); for (i = 0; i < count; i++) { const gfxFontFeature& feature = aFontFeatures.ElementAt(i); - aMergedFeatures.Put(feature.mTag, feature.mValue); + mergedFeatures.Put(feature.mTag, feature.mValue); } // font-variant-caps - handled here due to the need for fallback handling @@ -486,27 +489,27 @@ gfxFontShaper::MergeFontFeatures( uint32_t variantCaps = aStyle->variantCaps; switch (variantCaps) { case NS_FONT_VARIANT_CAPS_ALLSMALL: - aMergedFeatures.Put(HB_TAG('c','2','s','c'), 1); + mergedFeatures.Put(HB_TAG('c','2','s','c'), 1); // fall through to the small-caps case case NS_FONT_VARIANT_CAPS_SMALLCAPS: - aMergedFeatures.Put(HB_TAG('s','m','c','p'), 1); + mergedFeatures.Put(HB_TAG('s','m','c','p'), 1); break; case NS_FONT_VARIANT_CAPS_ALLPETITE: - aMergedFeatures.Put(aAddSmallCaps ? HB_TAG('c','2','s','c') : - HB_TAG('c','2','p','c'), 1); + mergedFeatures.Put(aAddSmallCaps ? HB_TAG('c','2','s','c') : + HB_TAG('c','2','p','c'), 1); // fall through to the petite-caps case case NS_FONT_VARIANT_CAPS_PETITECAPS: - aMergedFeatures.Put(aAddSmallCaps ? HB_TAG('s','m','c','p') : - HB_TAG('p','c','a','p'), 1); + mergedFeatures.Put(aAddSmallCaps ? HB_TAG('s','m','c','p') : + HB_TAG('p','c','a','p'), 1); break; case NS_FONT_VARIANT_CAPS_TITLING: - aMergedFeatures.Put(HB_TAG('t','i','t','l'), 1); + mergedFeatures.Put(HB_TAG('t','i','t','l'), 1); break; case NS_FONT_VARIANT_CAPS_UNICASE: - aMergedFeatures.Put(HB_TAG('u','n','i','c'), 1); + mergedFeatures.Put(HB_TAG('u','n','i','c'), 1); break; default: @@ -516,10 +519,10 @@ gfxFontShaper::MergeFontFeatures( // font-variant-position - handled here due to the need for fallback switch (aStyle->variantSubSuper) { case NS_FONT_VARIANT_POSITION_SUPER: - aMergedFeatures.Put(HB_TAG('s','u','p','s'), 1); + mergedFeatures.Put(HB_TAG('s','u','p','s'), 1); break; case NS_FONT_VARIANT_POSITION_SUB: - aMergedFeatures.Put(HB_TAG('s','u','b','s'), 1); + mergedFeatures.Put(HB_TAG('s','u','b','s'), 1); break; default: break; @@ -536,7 +539,7 @@ gfxFontShaper::MergeFontFeatures( count = featureList.Length(); for (i = 0; i < count; i++) { const gfxFontFeature& feature = featureList.ElementAt(i); - aMergedFeatures.Put(feature.mTag, feature.mValue); + mergedFeatures.Put(feature.mTag, feature.mValue); } } @@ -544,10 +547,12 @@ gfxFontShaper::MergeFontFeatures( count = styleRuleFeatures.Length(); for (i = 0; i < count; i++) { const gfxFontFeature& feature = styleRuleFeatures.ElementAt(i); - aMergedFeatures.Put(feature.mTag, feature.mValue); + mergedFeatures.Put(feature.mTag, feature.mValue); } - return aMergedFeatures.Count() != 0; + if (mergedFeatures.Count() != 0) { + mergedFeatures.Enumerate(aHandleFeature, aHandleFeatureData); + } } void diff --git a/gfx/thebes/gfxFont.h b/gfx/thebes/gfxFont.h index dbb535ef0f6..d28f1f331e7 100644 --- a/gfx/thebes/gfxFont.h +++ b/gfx/thebes/gfxFont.h @@ -636,14 +636,15 @@ public: gfxFont *GetFont() const { return mFont; } - // returns true if features exist in output, false otherwise - static bool + static void MergeFontFeatures(const gfxFontStyle *aStyle, const nsTArray& aFontFeatures, bool aDisableLigatures, const nsAString& aFamilyName, bool aAddSmallCaps, - nsDataHashtable& aMergedFeatures); + PLDHashOperator (*aHandleFeature)(const uint32_t&, + uint32_t&, void*), + void* aHandleFeatureData); protected: // the font this shaper is working with diff --git a/gfx/thebes/gfxGraphiteShaper.cpp b/gfx/thebes/gfxGraphiteShaper.cpp index a31b24cf850..5088068a33f 100644 --- a/gfx/thebes/gfxGraphiteShaper.cpp +++ b/gfx/thebes/gfxGraphiteShaper.cpp @@ -152,20 +152,15 @@ gfxGraphiteShaper::ShapeText(gfxContext *aContext, } gr_feature_val *grFeatures = gr_face_featureval_for_lang(mGrFace, grLang); - // if style contains font-specific features - nsDataHashtable mergedFeatures; - - if (MergeFontFeatures(style, - mFont->GetFontEntry()->mFeatureSettings, - aShapedText->DisableLigatures(), - mFont->GetFontEntry()->FamilyName(), - mFallbackToSmallCaps, - mergedFeatures)) - { - // enumerate result and insert into Graphite feature list - GrFontFeatures f = {mGrFace, grFeatures}; - mergedFeatures.Enumerate(AddFeature, &f); - } + // insert any merged features into Graphite feature list + GrFontFeatures f = {mGrFace, grFeatures}; + MergeFontFeatures(style, + mFont->GetFontEntry()->mFeatureSettings, + aShapedText->DisableLigatures(), + mFont->GetFontEntry()->FamilyName(), + mFallbackToSmallCaps, + AddFeature, + &f); size_t numChars = gr_count_unicode_characters(gr_utf16, aText, aText + aLength, diff --git a/gfx/thebes/gfxHarfBuzzShaper.cpp b/gfx/thebes/gfxHarfBuzzShaper.cpp index 7df10a42b30..3868cdb9731 100644 --- a/gfx/thebes/gfxHarfBuzzShaper.cpp +++ b/gfx/thebes/gfxHarfBuzzShaper.cpp @@ -1272,9 +1272,6 @@ gfxHarfBuzzShaper::ShapeText(gfxContext *aContext, const gfxFontStyle *style = mFont->GetStyle(); - nsAutoTArray features; - nsDataHashtable mergedFeatures; - // determine whether petite-caps falls back to small-caps bool addSmallCaps = false; if (style->variantCaps != NS_FONT_VARIANT_CAPS_NORMAL) { @@ -1291,16 +1288,16 @@ gfxHarfBuzzShaper::ShapeText(gfxContext *aContext, } gfxFontEntry *entry = mFont->GetFontEntry(); - if (MergeFontFeatures(style, - entry->mFeatureSettings, - aShapedText->DisableLigatures(), - entry->FamilyName(), - addSmallCaps, - mergedFeatures)) - { - // enumerate result and insert into hb_feature array - mergedFeatures.Enumerate(AddOpenTypeFeature, &features); - } + + // insert any merged features into hb_feature array + nsAutoTArray features; + MergeFontFeatures(style, + entry->mFeatureSettings, + aShapedText->DisableLigatures(), + entry->FamilyName(), + addSmallCaps, + AddOpenTypeFeature, + &features); bool isRightToLeft = aShapedText->IsRightToLeft(); hb_buffer_t *buffer = hb_buffer_create(); From daf2d9092c0591caca5124297a2ffca09e1f924c Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 22 Jan 2015 15:12:10 -0800 Subject: [PATCH 011/106] Bug 1124748: Annotate HttpBaseChannel::GetProxyURI as MOZ_OVERRIDE. r=mcmanus --- netwerk/protocol/http/HttpBaseChannel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netwerk/protocol/http/HttpBaseChannel.h b/netwerk/protocol/http/HttpBaseChannel.h index 2ad71807cef..4c05db762f3 100644 --- a/netwerk/protocol/http/HttpBaseChannel.h +++ b/netwerk/protocol/http/HttpBaseChannel.h @@ -190,7 +190,7 @@ public: NS_IMETHOD ForceNoIntercept() MOZ_OVERRIDE; NS_IMETHOD GetTopWindowURI(nsIURI **aTopWindowURI) MOZ_OVERRIDE; NS_IMETHOD ContinueBeginConnect() MOZ_OVERRIDE; - NS_IMETHOD GetProxyURI(nsIURI **proxyURI); + NS_IMETHOD GetProxyURI(nsIURI **proxyURI) MOZ_OVERRIDE; inline void CleanRedirectCacheChainIfNecessary() { From 2c81d1a3d6816de4211afbaaa4f4d2e27f229b3f Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 22 Jan 2015 15:12:10 -0800 Subject: [PATCH 012/106] Bug 1054058 part 1: Proactively save flex items' ascent values, whenever they're reflowed, if there's a chance we'll need them later. r=mats --- layout/generic/nsFlexContainerFrame.cpp | 51 ++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index cb5d3174903..c57fa7463d5 100644 --- a/layout/generic/nsFlexContainerFrame.cpp +++ b/layout/generic/nsFlexContainerFrame.cpp @@ -531,7 +531,14 @@ public: mCrossPosn = aPosn; } - void SetAscent(nscoord aAscent) { + // After a FlexItem has had a reflow, this method can be used to cache its + // ascent, in case it's needed later for baseline-alignment or to establish + // the container's baseline. + // (NOTE: This can be marked 'const' even though it's modifying mAscent, + // because mAscent is mutable. It's nice for this to be 'const', because it + // means our final reflow can iterate over const FlexItem pointers, and we + // can be sure it's not modifying those FlexItems, except via this method.) + void SetAscent(nscoord aAscent) const { mAscent = aAscent; } @@ -586,7 +593,8 @@ protected: nscoord mMainPosn; nscoord mCrossSize; nscoord mCrossPosn; - nscoord mAscent; + mutable nscoord mAscent; // Mutable b/c it's set lazily, & sometimes via a + // const pointer. See comment above SetAscent(). // Temporary state, while we're resolving flexible widths (for our main size) // XXXdholbert To save space, we could use a union to make these variables @@ -1379,6 +1387,13 @@ nsFlexContainerFrame:: } } +// XXXdholbert Forward-decl, to let us call this helper-function from +// MeasureFlexItemContentHeight. This helper-function is going away in my +// next patch, so this forward-decl is extremely temporary. +static void +ResolveReflowedChildAscent(nsIFrame* aFrame, + nsHTMLReflowMetrics& aChildDesiredSize); + nscoord nsFlexContainerFrame:: MeasureFlexItemContentHeight(nsPresContext* aPresContext, @@ -1423,6 +1438,15 @@ nsFlexContainerFrame:: aFlexItem.SetHadMeasuringReflow(); + // If this is the first child, save its ascent, since it may be what + // establishes the container's baseline. Also save the ascent if this child + // needs to be baseline-aligned. (Else, we don't care about ascent/baseline.) + if (aFlexItem.Frame() == mFrames.FirstChild() || + aFlexItem.GetAlignSelf() == NS_STYLE_ALIGN_ITEMS_BASELINE) { + ResolveReflowedChildAscent(aFlexItem.Frame(), childDesiredSize); + aFlexItem.SetAscent(childDesiredSize.BlockStartAscent()); + } + // Subtract border/padding in vertical axis, to get _just_ // the effective computed value of the "height" property. nscoord childDesiredHeight = childDesiredSize.Height() - @@ -3331,8 +3355,11 @@ nsFlexContainerFrame::SizeItemInCrossAxis( aItem.SetCrossSize(childDesiredSize.Height() - crossAxisBorderPadding); } - // If we need to do baseline-alignment, store the child's ascent. - if (aItem.GetAlignSelf() == NS_STYLE_ALIGN_ITEMS_BASELINE) { + // If this is the first child, save its ascent, since it may be what + // establishes the container's baseline. Also save the ascent if this child + // needs to be baseline-aligned. (Else, we don't care about baseline/ascent.) + if (aItem.Frame() == mFrames.FirstChild() || + aItem.GetAlignSelf() == NS_STYLE_ALIGN_ITEMS_BASELINE) { ResolveReflowedChildAscent(aItem.Frame(), childDesiredSize); aItem.SetAscent(childDesiredSize.BlockStartAscent()); } @@ -3741,13 +3768,25 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext, childDesiredSize, &childReflowState, outerWM, framePos, containerWidth, 0); + // Save the first child's ascent; it may establish container's baseline. + if (item->Frame() == mFrames.FirstChild()) { + // XXXdholbert (This clause may look a bit odd right now, split as it + // is from the code immediately after it, which *uses* |item|'s saved + // ascent. It may superficially look like these clauses should just be + // merged. The separation will make more sense once we change this flex + // item's final reflow to be *optional*, in bug 1054010. That bug will + // shift *this* clause to a different logic level -- conditional on + // whether |item| needs a final reflow -- whereas the subsequent clause + // will not be shifted.) + ResolveReflowedChildAscent(item->Frame(), childDesiredSize); + item->SetAscent(childDesiredSize.BlockStartAscent()); + } + // If this is our first child and we haven't established a baseline for // the container yet (i.e. if we don't have 'align-self: baseline' on any // children), then use this child's baseline as the container's baseline. if (item->Frame() == mFrames.FirstChild() && flexContainerAscent == nscoord_MIN) { - ResolveReflowedChildAscent(item->Frame(), childDesiredSize); - // (We use GetNormalPosition() instead of physicalPosn because we don't // want relative positioning on the child to affect the baseline that we // read from it). From 96338ed43cad47c90e2c73d006c794604dd0a1a4 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 22 Jan 2015 15:12:11 -0800 Subject: [PATCH 013/106] Bug 1054058 part 2: Resolve flex item ascent (baseline) values lazily. r=mats --- layout/generic/nsFlexContainerFrame.cpp | 61 ++++++++++--------------- 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index c57fa7463d5..e8cb3db286a 100644 --- a/layout/generic/nsFlexContainerFrame.cpp +++ b/layout/generic/nsFlexContainerFrame.cpp @@ -292,6 +292,24 @@ public: nscoord GetCrossSize() const { return mCrossSize; } nscoord GetCrossPosition() const { return mCrossPosn; } + nscoord ResolvedAscent() const { + if (mAscent == nsHTMLReflowMetrics::ASK_FOR_BASELINE) { + // XXXdholbert We should probably be using the *container's* writing-mode + // here, instead of the item's -- though it doesn't much matter right + // now, because all of the baseline-handling code here essentially + // assumes that the container & items have the same writing-mode. This + // will matter more (& can be expanded/tested) once we officially support + // logical directions & vertical writing-modes in flexbox, in bug 1079155 + // or a dependency. + WritingMode wm = mFrame->GetWritingMode(); + // Use GetFirstLineBaseline(), or just GetBaseline() if that fails. + if (!nsLayoutUtils::GetFirstLineBaseline(wm, mFrame, &mAscent)) { + mAscent = mFrame->GetLogicalBaseline(wm); + } + } + return mAscent; + } + // Convenience methods to compute the main & cross size of our *margin-box*. // The caller is responsible for telling us the right axis, so that we can // pull out the appropriate components of our margin/border/padding structs. @@ -532,14 +550,14 @@ public: } // After a FlexItem has had a reflow, this method can be used to cache its - // ascent, in case it's needed later for baseline-alignment or to establish - // the container's baseline. + // (possibly-unresolved) ascent, in case it's needed later for + // baseline-alignment or to establish the container's baseline. // (NOTE: This can be marked 'const' even though it's modifying mAscent, // because mAscent is mutable. It's nice for this to be 'const', because it // means our final reflow can iterate over const FlexItem pointers, and we // can be sure it's not modifying those FlexItems, except via this method.) void SetAscent(nscoord aAscent) const { - mAscent = aAscent; + mAscent = aAscent; // NOTE: this may be ASK_FOR_BASELINE } void SetHadMeasuringReflow() { @@ -593,8 +611,8 @@ protected: nscoord mMainPosn; nscoord mCrossSize; nscoord mCrossPosn; - mutable nscoord mAscent; // Mutable b/c it's set lazily, & sometimes via a - // const pointer. See comment above SetAscent(). + mutable nscoord mAscent; // Mutable b/c it's set & resolved lazily, sometimes + // via const pointer. See comment above SetAscent(). // Temporary state, while we're resolving flexible widths (for our main size) // XXXdholbert To save space, we could use a union to make these variables @@ -1387,13 +1405,6 @@ nsFlexContainerFrame:: } } -// XXXdholbert Forward-decl, to let us call this helper-function from -// MeasureFlexItemContentHeight. This helper-function is going away in my -// next patch, so this forward-decl is extremely temporary. -static void -ResolveReflowedChildAscent(nsIFrame* aFrame, - nsHTMLReflowMetrics& aChildDesiredSize); - nscoord nsFlexContainerFrame:: MeasureFlexItemContentHeight(nsPresContext* aPresContext, @@ -1443,7 +1454,6 @@ nsFlexContainerFrame:: // needs to be baseline-aligned. (Else, we don't care about ascent/baseline.) if (aFlexItem.Frame() == mFrames.FirstChild() || aFlexItem.GetAlignSelf() == NS_STYLE_ALIGN_ITEMS_BASELINE) { - ResolveReflowedChildAscent(aFlexItem.Frame(), childDesiredSize); aFlexItem.SetAscent(childDesiredSize.BlockStartAscent()); } @@ -1608,7 +1618,7 @@ FlexItem::GetBaselineOffsetFromOuterCrossEdge(AxisOrientationType aCrossAxis, mozilla::Side sideToMeasureFrom = kAxisOrientationToSidesMap[aCrossAxis][aEdge]; - nscoord marginTopToBaseline = mAscent + mMargin.top; + nscoord marginTopToBaseline = ResolvedAscent() + mMargin.top; if (sideToMeasureFrom == eSideTop) { // Measuring from top (normal case): the distance from the margin-box top @@ -3241,25 +3251,6 @@ FlexLine::PositionItemsInMainAxis(uint8_t aJustifyContent, } } -// Helper method to take care of children who ASK_FOR_BASELINE, when -// we need their baseline. -static void -ResolveReflowedChildAscent(nsIFrame* aFrame, - nsHTMLReflowMetrics& aChildDesiredSize) -{ - WritingMode wm = aChildDesiredSize.GetWritingMode(); - if (aChildDesiredSize.BlockStartAscent() == - nsHTMLReflowMetrics::ASK_FOR_BASELINE) { - // Use GetFirstLineBaseline(), or just GetBaseline() if that fails. - nscoord ascent; - if (nsLayoutUtils::GetFirstLineBaseline(wm, aFrame, &ascent)) { - aChildDesiredSize.SetBlockStartAscent(ascent); - } else { - aChildDesiredSize.SetBlockStartAscent(aFrame->GetLogicalBaseline(wm)); - } - } -} - /** * Given the flex container's "logical ascent" (i.e. distance from the * flex container's content-box cross-start edge to its baseline), returns @@ -3360,7 +3351,6 @@ nsFlexContainerFrame::SizeItemInCrossAxis( // needs to be baseline-aligned. (Else, we don't care about baseline/ascent.) if (aItem.Frame() == mFrames.FirstChild() || aItem.GetAlignSelf() == NS_STYLE_ALIGN_ITEMS_BASELINE) { - ResolveReflowedChildAscent(aItem.Frame(), childDesiredSize); aItem.SetAscent(childDesiredSize.BlockStartAscent()); } } @@ -3778,7 +3768,6 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext, // shift *this* clause to a different logic level -- conditional on // whether |item| needs a final reflow -- whereas the subsequent clause // will not be shifted.) - ResolveReflowedChildAscent(item->Frame(), childDesiredSize); item->SetAscent(childDesiredSize.BlockStartAscent()); } @@ -3793,7 +3782,7 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext, flexContainerAscent = item->Frame()->GetLogicalNormalPosition( outerWM, childDesiredSize.Width()).B(outerWM) + - childDesiredSize.BlockStartAscent(); + item->ResolvedAscent(); } } } From afb7d0b7b633088456bb70a8f6814ae48f221a72 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 22 Jan 2015 15:12:11 -0800 Subject: [PATCH 014/106] Bug 1054058 part 3: Use local var to cache flex item's "normal" block offset in container, rather than looking it up. r=mats --- layout/generic/nsFlexContainerFrame.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index e8cb3db286a..4648e9dc4f4 100644 --- a/layout/generic/nsFlexContainerFrame.cpp +++ b/layout/generic/nsFlexContainerFrame.cpp @@ -3679,6 +3679,10 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext, LogicalPoint framePos(outerWM, physicalPosn, containerWidth - item->Frame()->GetRect().width); + // (Intentionally snapshotting this before ApplyRelativePositioning, to + // maybe use for setting the flex container's baseline.) + const nscoord itemNormalBPos = framePos.B(outerWM); + WritingMode wm = item->Frame()->GetWritingMode(); LogicalSize availSize = aReflowState.ComputedSize(wm); availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE; @@ -3776,13 +3780,7 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext, // children), then use this child's baseline as the container's baseline. if (item->Frame() == mFrames.FirstChild() && flexContainerAscent == nscoord_MIN) { - // (We use GetNormalPosition() instead of physicalPosn because we don't - // want relative positioning on the child to affect the baseline that we - // read from it). - flexContainerAscent = item->Frame()->GetLogicalNormalPosition( - outerWM, - childDesiredSize.Width()).B(outerWM) + - item->ResolvedAscent(); + flexContainerAscent = itemNormalBPos + item->ResolvedAscent(); } } } From 34308af4095370c53e9de94b6f06f18de67821e9 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 22 Jan 2015 15:15:35 -0800 Subject: [PATCH 015/106] backout 132eece96f8f for landing with wrong bug number DONTBUILD because just backing out & re-landing to fix bug number --- netwerk/protocol/http/HttpBaseChannel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netwerk/protocol/http/HttpBaseChannel.h b/netwerk/protocol/http/HttpBaseChannel.h index 4c05db762f3..2ad71807cef 100644 --- a/netwerk/protocol/http/HttpBaseChannel.h +++ b/netwerk/protocol/http/HttpBaseChannel.h @@ -190,7 +190,7 @@ public: NS_IMETHOD ForceNoIntercept() MOZ_OVERRIDE; NS_IMETHOD GetTopWindowURI(nsIURI **aTopWindowURI) MOZ_OVERRIDE; NS_IMETHOD ContinueBeginConnect() MOZ_OVERRIDE; - NS_IMETHOD GetProxyURI(nsIURI **proxyURI) MOZ_OVERRIDE; + NS_IMETHOD GetProxyURI(nsIURI **proxyURI); inline void CleanRedirectCacheChainIfNecessary() { From c02a0858cc15ae181386a26497a3f546e50aee22 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 22 Jan 2015 15:15:50 -0800 Subject: [PATCH 016/106] Bug 1124784: Annotate HttpBaseChannel::GetProxyURI as MOZ_OVERRIDE. r=mcmanus DONTBUILD because just backing out & re-landing to fix bug number --- netwerk/protocol/http/HttpBaseChannel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netwerk/protocol/http/HttpBaseChannel.h b/netwerk/protocol/http/HttpBaseChannel.h index 2ad71807cef..4c05db762f3 100644 --- a/netwerk/protocol/http/HttpBaseChannel.h +++ b/netwerk/protocol/http/HttpBaseChannel.h @@ -190,7 +190,7 @@ public: NS_IMETHOD ForceNoIntercept() MOZ_OVERRIDE; NS_IMETHOD GetTopWindowURI(nsIURI **aTopWindowURI) MOZ_OVERRIDE; NS_IMETHOD ContinueBeginConnect() MOZ_OVERRIDE; - NS_IMETHOD GetProxyURI(nsIURI **proxyURI); + NS_IMETHOD GetProxyURI(nsIURI **proxyURI) MOZ_OVERRIDE; inline void CleanRedirectCacheChainIfNecessary() { From 9052a02f04fcadc06bddce402389c6ec7129fb51 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 22 Jan 2015 13:25:08 +1100 Subject: [PATCH 017/106] Bug 1092363 - Disable bug 931668 optimizations for the time being. r=dbaron --- layout/base/RestyleManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index 0688ce43be9..f2c0680931a 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -2968,7 +2968,7 @@ ElementRestyler::RestyleSelf(nsIFrame* aSelf, RestyleResult result; - if (aRestyleHint) { + if (aRestyleHint || true /* XXX bug 1092363 */) { result = eRestyleResult_Continue; } else { result = ComputeRestyleResultFromFrame(aSelf); @@ -3266,7 +3266,9 @@ ElementRestyler::RestyleSelf(nsIFrame* aSelf, // previous continuation, so newContext == oldContext. if (result != eRestyleResult_Stop) { - if (copyFromContinuation) { + if (true) { + // XXX bug 1092363 + } else if (copyFromContinuation) { LOG_RESTYLE("not swapping style structs, since we copied from a " "continuation"); } else if (oldContext->IsShared() && newContext->IsShared()) { From bb5404ea5e9c40c4231b94a3e950fc147d9f5c3d Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Thu, 22 Jan 2015 22:37:56 +0200 Subject: [PATCH 018/106] Bug 1121701, don't let network connections from the previous page to disturb restoration of a page from bfcache, r=bz --HG-- extra : rebase_source : 27669a8962b2c8ed7cc6add444657ee4b3dc5752 --- docshell/base/nsDocShell.cpp | 58 ++++++++++++++++++++++++++++++------ docshell/base/nsDocShell.h | 2 ++ 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 5e472872451..8925b0aa9e7 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -8233,14 +8233,6 @@ nsDocShell::RestorePresentation(nsISHEntry *aSHEntry, bool *aRestoring) SetHistoryEntry(&mLSHE, aSHEntry); - // Add the request to our load group. We do this before swapping out - // the content viewers so that consumers of STATE_START can access - // the old document. We only deal with the toplevel load at this time -- - // to be consistent with normal document loading, subframes cannot start - // loading until after data arrives, which is after STATE_START completes. - - BeginRestore(viewer, true); - // Post an event that will remove the request after we've returned // to the event loop. This mimics the way it is called by nsIChannel // implementations. @@ -8262,10 +8254,40 @@ nsDocShell::RestorePresentation(nsISHEntry *aSHEntry, bool *aRestoring) return rv; } +namespace { +class MOZ_STACK_CLASS PresentationEventForgetter +{ +public: + explicit PresentationEventForgetter( + nsRevocableEventPtr& aRestorePresentationEvent) + : mRestorePresentationEvent(aRestorePresentationEvent) + , mEvent(aRestorePresentationEvent.get()) + { + } + + ~PresentationEventForgetter() + { + Forget(); + } + + void Forget() + { + if (mRestorePresentationEvent.get() == mEvent) { + mRestorePresentationEvent.Forget(); + mEvent = nullptr; + } + } +private: + nsRevocableEventPtr& mRestorePresentationEvent; + nsRefPtr mEvent; +}; +} + nsresult nsDocShell::RestoreFromHistory() { - mRestorePresentationEvent.Forget(); + MOZ_ASSERT(mRestorePresentationEvent.IsPending()); + PresentationEventForgetter forgetter(mRestorePresentationEvent); // This section of code follows the same ordering as CreateContentViewer. if (!mLSHE) @@ -8319,6 +8341,24 @@ nsDocShell::RestoreFromHistory() if (mLSHE != origLSHE) return NS_OK; + // Add the request to our load group. We do this before swapping out + // the content viewers so that consumers of STATE_START can access + // the old document. We only deal with the toplevel load at this time -- + // to be consistent with normal document loading, subframes cannot start + // loading until after data arrives, which is after STATE_START completes. + + nsRefPtr currentPresentationRestoration = + mRestorePresentationEvent.get(); + Stop(); + // Make sure we're still restoring the same presentation. + // If we aren't, docshell is in process doing another load already. + NS_ENSURE_STATE(currentPresentationRestoration == + mRestorePresentationEvent.get()); + BeginRestore(viewer, true); + NS_ENSURE_STATE(currentPresentationRestoration == + mRestorePresentationEvent.get()); + forgetter.Forget(); + // Set mFiredUnloadEvent = false so that the unload handler for the // *new* document will fire. mFiredUnloadEvent = false; diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h index b3f1c219a8e..86e7c1bb1fd 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -693,6 +693,7 @@ protected: */ void MaybeInitTiming(); +public: // Event type dispatched by RestorePresentation class RestorePresentationEvent : public nsRunnable { public: @@ -702,6 +703,7 @@ protected: private: nsRefPtr mDocShell; }; +protected: bool JustStartedNetworkLoad(); From c0edaca514f99a6865a1271513ceecb2d14db230 Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Thu, 22 Jan 2015 22:38:44 +0200 Subject: [PATCH 019/106] Bug 1121701, don't let network connections from the previous page to disturb restoration of a page from bfcache, test, r=bz --HG-- extra : rebase_source : 3eb9b47d274e4aa84a2d522f077112751fd6c148 --- docshell/test/mochitest.ini | 2 + docshell/test/test_bug1121701.html | 71 ++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 docshell/test/test_bug1121701.html diff --git a/docshell/test/mochitest.ini b/docshell/test/mochitest.ini index 8a86a27fa4c..3668c58caf7 100644 --- a/docshell/test/mochitest.ini +++ b/docshell/test/mochitest.ini @@ -105,3 +105,5 @@ support-files = file_framedhistoryframes.html [test_pushState_after_document_open.html] [test_windowedhistoryframes.html] skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage +[test_bug1121701.html] +skip-if = (buildapp == 'b2g' || buildapp == 'mulet') diff --git a/docshell/test/test_bug1121701.html b/docshell/test/test_bug1121701.html new file mode 100644 index 00000000000..8beb2d8d06e --- /dev/null +++ b/docshell/test/test_bug1121701.html @@ -0,0 +1,71 @@ + + + + + + Test for Bug 1121701 + + + + + +Mozilla Bug 1121701 +

+ +
+
+ + From e24bfc7d93870cf56e5a06c569da560c7a5971e2 Mon Sep 17 00:00:00 2001 From: Cykesiopka Date: Wed, 21 Jan 2015 17:20:16 -0800 Subject: [PATCH 020/106] Bug 1077790 - Make mozilla::pkix::CheckPublicKeySize() accept specific elliptic curves only. r=briansmith --HG-- extra : rebase_source : 2eab41b647a78ef3a5ea9cf9710704e35c65803a --- security/pkix/include/pkix/Result.h | 2 + security/pkix/include/pkix/pkixnss.h | 5 ++- security/pkix/include/pkix/pkixtypes.h | 20 +++++++--- security/pkix/lib/pkixder.cpp | 53 ++++++++++++++++++++++++++ security/pkix/lib/pkixder.h | 2 + security/pkix/lib/pkixnss.cpp | 36 ++++++++++++++++- 6 files changed, 109 insertions(+), 9 deletions(-) diff --git a/security/pkix/include/pkix/Result.h b/security/pkix/include/pkix/Result.h index 01a3a824863..818a7f3f0b5 100644 --- a/security/pkix/include/pkix/Result.h +++ b/security/pkix/include/pkix/Result.h @@ -171,6 +171,8 @@ static const unsigned int FATAL_ERROR_FLAG = 0x800; SSL_ERROR_BAD_CERT_DOMAIN) \ MOZILLA_PKIX_MAP(ERROR_NO_RFC822NAME_MATCH, 43, \ MOZILLA_PKIX_ERROR_NO_RFC822NAME_MATCH) \ + MOZILLA_PKIX_MAP(ERROR_UNSUPPORTED_ELLIPTIC_CURVE, 44, \ + SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE) \ MOZILLA_PKIX_MAP(FATAL_ERROR_INVALID_ARGS, FATAL_ERROR_FLAG | 1, \ SEC_ERROR_INVALID_ARGS) \ MOZILLA_PKIX_MAP(FATAL_ERROR_INVALID_STATE, FATAL_ERROR_FLAG | 2, \ diff --git a/security/pkix/include/pkix/pkixnss.h b/security/pkix/include/pkix/pkixnss.h index 20a052d9634..96a8a1615a4 100644 --- a/security/pkix/include/pkix/pkixnss.h +++ b/security/pkix/include/pkix/pkixnss.h @@ -51,8 +51,9 @@ Result VerifySignedDataNSS(const SignedDataWithSignature& sd, Result DigestBufNSS(Input item, /*out*/ uint8_t* digestBuf, size_t digestBufLen); -// Checks, for RSA keys and DSA keys, that the modulus is at least the given -// number of bits. +// Checks, for RSA keys, that the modulus is at least the given number of bits. +// Checks, for ECC keys, that the curve used is one of the NIST P-256, P-384, +// or P-521 curves. Result CheckPublicKeyNSS(Input subjectPublicKeyInfo, unsigned int minimumNonECCBits); diff --git a/security/pkix/include/pkix/pkixtypes.h b/security/pkix/include/pkix/pkixtypes.h index e294ec77f35..00da6d9933f 100644 --- a/security/pkix/include/pkix/pkixtypes.h +++ b/security/pkix/include/pkix/pkixtypes.h @@ -39,10 +39,18 @@ enum class DigestAlgorithm sha1 = 4, }; -// Named ECC Curves: -// * secp521r1 (OID 1.3.132.0.35, RFC 5480) -// * secp384r1 (OID 1.3.132.0.34, RFC 5480) -// * secp256r1 (OID 1.2.840.10045.3.17, RFC 5480) +enum class NamedCurve +{ + // secp521r1 (OID 1.3.132.0.35, RFC 5480) + secp521r1 = 1, + + // secp384r1 (OID 1.3.132.0.34, RFC 5480) + secp384r1 = 2, + + // secp256r1 (OID 1.2.840.10045.3.1.7, RFC 5480) + secp256r1 = 3, +}; + enum class SignatureAlgorithm { // ecdsa-with-SHA512 (OID 1.2.840.10045.4.3.4, RFC 5758 Section 3.2) @@ -294,8 +302,8 @@ public: /*optional*/ const Input* stapledOCSPresponse, /*optional*/ const Input* aiaExtension) = 0; - // Check that the key size, algorithm, and parameters of the given public key - // are acceptable. + // Check that the key size, algorithm, elliptic curve used (if applicable), + // and parameters of the given public key are acceptable. // // VerifySignedData() should do the same checks that this function does, but // mainly for efficiency, some keys are not passed to VerifySignedData(). diff --git a/security/pkix/lib/pkixder.cpp b/security/pkix/lib/pkixder.cpp index 252c08511e3..c380c82c1ba 100644 --- a/security/pkix/lib/pkixder.cpp +++ b/security/pkix/lib/pkixder.cpp @@ -223,6 +223,42 @@ SignatureAlgorithmOIDValue(Reader& algorithmID, return Success; } +static Result +NamedCurveOIDValue(Reader& namedCurveID, /*out*/ NamedCurve& namedCurve) +{ + // RFC 5480 + // python DottedOIDToCode.py secp256r1 1.2.840.10045.3.1.7 + static const uint8_t secp256r1[] = { + 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07 + }; + + // RFC 5480 + // python DottedOIDToCode.py id-secp384r1 1.3.132.0.34 + static const uint8_t secp384r1[] = { + 0x2b, 0x81, 0x04, 0x00, 0x22 + }; + + // RFC 5480 + // python DottedOIDToCode.py id-secp521r1 1.3.132.0.35 + static const uint8_t secp521r1[] = { + 0x2b, 0x81, 0x04, 0x00, 0x23 + }; + + // Matching is attempted based on a rough estimate of the commonality of the + // named curve, to minimize the number of MatchRest calls. + if (namedCurveID.MatchRest(secp256r1)) { + namedCurve = NamedCurve::secp256r1; + } else if (namedCurveID.MatchRest(secp384r1)) { + namedCurve = NamedCurve::secp384r1; + } else if (namedCurveID.MatchRest(secp521r1)) { + namedCurve = NamedCurve::secp521r1; + } else { + return Result::ERROR_UNSUPPORTED_ELLIPTIC_CURVE; + } + + return Success; +} + template Result AlgorithmIdentifier(OidValueParser oidValueParser, Reader& input, @@ -267,6 +303,23 @@ DigestAlgorithmIdentifier(Reader& input, /*out*/ DigestAlgorithm& algorithm) return AlgorithmIdentifier(DigestAlgorithmOIDValue, input, algorithm); } +Result +NamedCurveOID(Reader& input, /*out*/ NamedCurve& namedCurve) +{ + Reader namedCurveID; + Result rv = ExpectTagAndGetValue(input, der::OIDTag, namedCurveID); + if (rv != Success) { + return rv; + } + + rv = NamedCurveOIDValue(namedCurveID, namedCurve); + if (rv != Success) { + return rv; + } + + return Success; +} + Result SignedData(Reader& input, /*out*/ Reader& tbs, /*out*/ SignedDataWithSignature& signedData) diff --git a/security/pkix/lib/pkixder.h b/security/pkix/lib/pkixder.h index 750109bfffc..4ca48559ec0 100644 --- a/security/pkix/lib/pkixder.h +++ b/security/pkix/lib/pkixder.h @@ -608,6 +608,8 @@ Result DigestAlgorithmIdentifier(Reader& input, Result SignatureAlgorithmIdentifier(Reader& input, /*out*/ SignatureAlgorithm& algorithm); +Result NamedCurveOID(Reader& input, /*out*/ NamedCurve& namedCurve); + // Parses a SEQUENCE into tbs and then parses an AlgorithmIdentifier followed // by a BIT STRING into signedData. This handles the commonality between // parsing the signed/signature fields of certificates and OCSP responses. In diff --git a/security/pkix/lib/pkixnss.cpp b/security/pkix/lib/pkixnss.cpp index a3e3553345e..0e407ce4c07 100644 --- a/security/pkix/lib/pkixnss.cpp +++ b/security/pkix/lib/pkixnss.cpp @@ -32,6 +32,7 @@ #include "pk11pub.h" #include "pkix/pkix.h" #include "pkix/ScopedPtr.h" +#include "pkixder.h" #include "secerr.h" #include "sslerr.h" @@ -57,8 +58,41 @@ CheckPublicKeySize(Input subjectPublicKeyInfo, unsigned int minimumNonECCBits, switch (publicKey.get()->keyType) { case ecKey: - // TODO(bug 1077790): We should check which curve. + { + SECKEYECParams* encodedParams = &publicKey.get()->u.ec.DEREncodedParams; + if (!encodedParams) { + return Result::ERROR_UNSUPPORTED_ELLIPTIC_CURVE; + } + + Input input; + Result rv = input.Init(encodedParams->data, encodedParams->len); + if (rv != Success) { + return rv; + } + + Reader reader(input); + NamedCurve namedCurve; + rv = der::NamedCurveOID(reader, namedCurve); + if (rv != Success) { + return rv; + } + + rv = der::End(reader); + if (rv != Success) { + return rv; + } + + switch (namedCurve) { + case NamedCurve::secp256r1: // fall through + case NamedCurve::secp384r1: // fall through + case NamedCurve::secp521r1: + break; + default: + return Result::ERROR_UNSUPPORTED_ELLIPTIC_CURVE; + } + return Success; + } case rsaKey: if (SECKEY_PublicKeyStrengthInBits(publicKey.get()) < minimumNonECCBits) { return Result::ERROR_INADEQUATE_KEY_SIZE; From b7683bacc261d2545157aa2587d50f780fbf0f2b Mon Sep 17 00:00:00 2001 From: Cykesiopka Date: Thu, 22 Jan 2015 13:50:06 -0800 Subject: [PATCH 021/106] Bug 1077790 - Tests. r=keeler --HG-- extra : rebase_source : c1f058a4d235651667b0cb7e84325bbc3d902966 --- security/manager/ssl/tests/unit/head_psm.js | 1 + .../manager/ssl/tests/unit/test_keysize.js | 80 ++++++++++++++ ...-int_prime256v1_256-root_secp224r1_224.der | Bin 0 -> 469 bytes ...-int_prime256v1_256-root_secp256k1_256.der | Bin 0 -> 468 bytes ...1_256-int_rsa_1016-root_prime256v1_256.der | Bin 0 -> 514 bytes ...-int_secp224r1_224-root_prime256v1_256.der | Bin 0 -> 460 bytes ...int_prime256v1_256-root_prime256v1_256.der | Bin 0 -> 458 bytes ...1_224-int_prime256v1_256-root_rsa_2048.der | Bin 0 -> 444 bytes ...int_prime256v1_256-root_prime256v1_256.der | Bin 0 -> 464 bytes ...1_384-int_prime256v1_256-root_rsa_2048.der | Bin 0 -> 486 bytes ...-int_secp384r1_384-root_prime256v1_256.der | Bin 0 -> 565 bytes .../ssl/tests/unit/test_keysize/generate.py | 104 ++++++++++++++++++ ...int_prime256v1_256-root_prime256v1_256.der | Bin 0 -> 466 bytes .../int_prime256v1_256-root_rsa_2048.der | Bin 0 -> 642 bytes .../int_prime256v1_256-root_secp224r1_224.der | Bin 0 -> 456 bytes .../int_prime256v1_256-root_secp256k1_256.der | Bin 0 -> 465 bytes .../int_rsa_1016-root_prime256v1_256.der | Bin 0 -> 525 bytes .../int_secp224r1_224-root_prime256v1_256.der | Bin 0 -> 454 bytes .../int_secp384r1_384-root_prime256v1_256.der | Bin 0 -> 493 bytes .../unit/test_keysize/root_prime256v1_256.der | Bin 0 -> 449 bytes .../tests/unit/test_keysize/root_rsa_2048.der | Bin 0 -> 820 bytes .../unit/test_keysize/root_secp224r1_224.der | Bin 0 -> 424 bytes .../unit/test_keysize/root_secp256k1_256.der | Bin 0 -> 441 bytes 23 files changed, 185 insertions(+) create mode 100644 security/manager/ssl/tests/unit/test_keysize/ee_prime256v1_256-int_prime256v1_256-root_secp224r1_224.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/ee_prime256v1_256-int_prime256v1_256-root_secp256k1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/ee_prime256v1_256-int_rsa_1016-root_prime256v1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/ee_prime256v1_256-int_secp224r1_224-root_prime256v1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/ee_secp224r1_224-int_prime256v1_256-root_prime256v1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/ee_secp224r1_224-int_prime256v1_256-root_rsa_2048.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/ee_secp256k1_256-int_prime256v1_256-root_prime256v1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/ee_secp384r1_384-int_prime256v1_256-root_rsa_2048.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/ee_secp521r1_521-int_secp384r1_384-root_prime256v1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/int_prime256v1_256-root_prime256v1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/int_prime256v1_256-root_rsa_2048.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/int_prime256v1_256-root_secp224r1_224.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/int_prime256v1_256-root_secp256k1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/int_rsa_1016-root_prime256v1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/int_secp224r1_224-root_prime256v1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/int_secp384r1_384-root_prime256v1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/root_prime256v1_256.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/root_rsa_2048.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/root_secp224r1_224.der create mode 100644 security/manager/ssl/tests/unit/test_keysize/root_secp256k1_256.der diff --git a/security/manager/ssl/tests/unit/head_psm.js b/security/manager/ssl/tests/unit/head_psm.js index 64a32ee4081..f57d9866f43 100644 --- a/security/manager/ssl/tests/unit/head_psm.js +++ b/security/manager/ssl/tests/unit/head_psm.js @@ -58,6 +58,7 @@ const SEC_ERROR_OCSP_UNKNOWN_CERT = SEC_ERROR_BASE + 126; const SEC_ERROR_OCSP_MALFORMED_RESPONSE = SEC_ERROR_BASE + 129; const SEC_ERROR_OCSP_UNAUTHORIZED_RESPONSE = SEC_ERROR_BASE + 130; const SEC_ERROR_OCSP_OLD_RESPONSE = SEC_ERROR_BASE + 132; +const SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE = SEC_ERROR_BASE + 141; // -8051 const SEC_ERROR_OCSP_INVALID_SIGNING_CERT = SEC_ERROR_BASE + 144; const SEC_ERROR_POLICY_VALIDATION_FAILED = SEC_ERROR_BASE + 160; // -8032 const SEC_ERROR_OCSP_BAD_SIGNATURE = SEC_ERROR_BASE + 157; diff --git a/security/manager/ssl/tests/unit/test_keysize.js b/security/manager/ssl/tests/unit/test_keysize.js index bc1fcc8d456..48aadd11a97 100644 --- a/security/manager/ssl/tests/unit/test_keysize.js +++ b/security/manager/ssl/tests/unit/test_keysize.js @@ -5,6 +5,8 @@ "use strict"; // Checks that RSA certs with key sizes below 1024 bits are rejected. +// Checks that ECC certs using curves other than the NIST P-256, P-384 or P-521 +// curves are rejected. do_get_profile(); // must be called before getting nsIX509CertDB const certdb = Cc["@mozilla.org/security/x509certdb;1"] @@ -53,6 +55,40 @@ function check_fail_ca(cert) { certificateUsageSSLCA); } +/** + * Tests a cert chain. + * + * @param {String} rootKeyType + * The key type of the root certificate, or the name of an elliptic + * curve, as output by the 'openssl ecparam -list_curves' command. + * @param {Number} rootKeySize + * @param {String} intKeyType + * @param {Number} intKeySize + * @param {String} eeKeyType + * @param {Number} eeKeySize + * @param {Number} eeExpectedError + */ +function checkChain(rootKeyType, rootKeySize, intKeyType, intKeySize, + eeKeyType, eeKeySize, eeExpectedError) { + let rootName = "root_" + rootKeyType + "_" + rootKeySize; + let intName = "int_" + intKeyType + "_" + intKeySize; + let eeName = "ee_" + eeKeyType + "_" + eeKeySize; + + let intFullName = intName + "-" + rootName; + let eeFullName = eeName + "-" + intName + "-" + rootName; + + load_cert(rootName, "CTu,CTu,CTu"); + load_cert(intFullName, ",,"); + let eeCert = certFromFile(eeFullName + ".der") + + do_print("cert cn=" + eeCert.commonName); + do_print("cert o=" + eeCert.organization); + do_print("cert issuer cn=" + eeCert.issuerCommonName); + do_print("cert issuer o=" + eeCert.issuerOrganization); + checkCertErrorGeneric(certdb, eeCert, eeExpectedError, + certificateUsageSSLServer); +} + function checkForKeyType(keyType, inadequateKeySize, adequateKeySize) { let rootOKName = "root_" + keyType + "_" + adequateKeySize; let rootNotOKName = "root_" + keyType + "_" + inadequateKeySize; @@ -86,8 +122,52 @@ function checkForKeyType(keyType, inadequateKeySize, adequateKeySize) { check_fail(certFromFile(eeFullName + ".der")); } +function checkECCChains() { + checkChain("prime256v1", 256, + "secp384r1", 384, + "secp521r1", 521, + 0); + checkChain("prime256v1", 256, + "secp224r1", 224, + "prime256v1", 256, + SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE); + checkChain("prime256v1", 256, + "prime256v1", 256, + "secp224r1", 224, + SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE); + checkChain("secp224r1", 224, + "prime256v1", 256, + "prime256v1", 256, + SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE); + checkChain("prime256v1", 256, + "prime256v1", 256, + "secp256k1", 256, + SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE); + checkChain("secp256k1", 256, + "prime256v1", 256, + "prime256v1", 256, + SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE); +} + +function checkCombinationChains() { + checkChain("rsa", 2048, + "prime256v1", 256, + "secp384r1", 384, + 0); + checkChain("rsa", 2048, + "prime256v1", 256, + "secp224r1", 224, + SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE); + checkChain("prime256v1", 256, + "rsa", 1016, + "prime256v1", 256, + MOZILLA_PKIX_ERROR_INADEQUATE_KEY_SIZE); +} + function run_test() { checkForKeyType("rsa", 1016, 1024); + checkECCChains(); + checkCombinationChains(); run_next_test(); } diff --git a/security/manager/ssl/tests/unit/test_keysize/ee_prime256v1_256-int_prime256v1_256-root_secp224r1_224.der b/security/manager/ssl/tests/unit/test_keysize/ee_prime256v1_256-int_prime256v1_256-root_secp224r1_224.der new file mode 100644 index 0000000000000000000000000000000000000000..03679bac975c8463616da76e676cfc8fffedfcf1 GIT binary patch literal 469 zcmXqLV!UY3#8|d~nTe5!iG|^YpQZs98;4e#$2nUTW+sDlLsJ7|Hs(+kW*(i00O#P0 z)SMgz@6<|#;LNI2g^<+ZlFYnxg@U5Y+*Bh|vob>kAgP;_Sz@SXpaasz#iN>;R}zm< z5D!vNl%HP`U!0m;U}R)cWEc-54dldmfmRtB85$WI8XK8LiSrr(xrP={u0bWa4skHB zgE+)IH5J_*#5pa}K$wjk93o7N(4b*vWM_6_U@`JP{r=6RRi3{uud3oNh!#s~QB6K+ zwCdpT%C9H6SWFsxglFojufOhLs(9M4CrkNY3!lqQ(?xA_E-hqz^(rpJ139RfJsAw# zm=qcQ2VKy#78RA>+*N(O+Hqy`nc0`0q}p7LN_2lOaPQPpMWB+_pYqB#dabWMZsk0| YQJJ+k&aj5fjm7^_`rc~)s+gV=0HQOMZ2$lO literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/ee_prime256v1_256-int_prime256v1_256-root_secp256k1_256.der b/security/manager/ssl/tests/unit/test_keysize/ee_prime256v1_256-int_prime256v1_256-root_secp256k1_256.der new file mode 100644 index 0000000000000000000000000000000000000000..8942a06abe9319f189ea2aeca5dff91087e66c0d GIT binary patch literal 468 zcmXqLV!U9`#8|q3nTe5!iP_7Y%YciGL#xf>oGlA8lR>(nsev&Yb0`Zlk4{8@b8tp# zPL6_iYNbMOW>u;}NNRCOW?s5NK~ZLIs*$N#nV|xZ)J@7PG1N2A0cqpnQO(RNiAN}i z2Pr7Z&o7BDPE9TVaE94)dmI4qNS0Ip literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/ee_prime256v1_256-int_rsa_1016-root_prime256v1_256.der b/security/manager/ssl/tests/unit/test_keysize/ee_prime256v1_256-int_rsa_1016-root_prime256v1_256.der new file mode 100644 index 0000000000000000000000000000000000000000..78abf110f2ef35b4a4f852d79472c8a2b50e4350 GIT binary patch literal 514 zcmXqLV*F>&#F(*wnTe5!iP>5&!+@8KQ>)FR?K>|cBR4C9L5!ikfi4?!C<`->T10?z za7JoQj)He;r9yCKRjNWrYH>+sUb;e2aiW5ufuWghQf7&vrhz(00~e1%W?o4=P%0iQ zRg|A!5?@f1nVV{4YF1_#4~7sIV&cK9?$ zt!mX!+4ekl@oBWsWo~R>sI8i{`S6J^d&4{VXxjAYrPg!GmR^>b6|Wq$Sh+=J=68)n zo6TO!9|-v~rTohdj$`J6@oj~<3%#E|n|9Q2%1+yq3m%e!I@R53L&Y*C7F5Y3dO0(1x7|DMTQDMQa35H#8A&b2c(OOM>R9ABpxmw z50Wp+&o7BDD9X%DH8M3TGmHn426E!OhNcFFMutYlhQ>ywQR2KtK(3($lxt84lr@I9 zLkG7z5QZuM4Fx;I!N3mU5cAYjG)r}fb6TWIe8JwaLw}aUm2<{LzYPAFJYLP!7SrNu%bz&Q!>y||Cx5<|xA^=Nu9^Pv zS7tq3)u+IQ9Ma5=3gvJBf79kz=rtyGL%_&;X7dR=lx)Zgd}3~IGc4k>E@r7smN fzO_~2vFE|Vx70qDUlUimF5|~?w%e!I@R53L&Y*C7F5Y3I#=(xv55`W@Uy7KvFj;v&2x}Ko_Kqi$^UpuOuF! zAReTkC_f)v%s@_@7igEEk)e^Xp|O!^lsK;ukZWiGCT%wKJCB>=91x7|D zML>rbnSdSQU|&>*Fpv}H1=?b0WN2h;Xl!H_CC+OEnXMRD z1U{_)Yjx7H&{0Cg;O!LlSD#E9HypjE?^riygO)<2)t6J3a<#ssUv9Zj`E>64$rlx* zYu%LJ-hX}xIZT<|84O&Q6qql6;COuRm4`puZjnv3;hTd_-)HSP<2pZs?K{_*#llaR n6zs1s?~UwOu&Q9cRob7GeGd-*mEN>cZ-99-W8)=irRg zoE!!3)Jlcm%&Js{kksOm%)E4kf}+gaR3lTfGD8I*shgBpVyJJR3)05Lqn4Rh5|2<2 z4^mK+pN}qPASccXw9C-Q(8$=(*vK?WoYx4*HMD?o4Jr&x42&Qy(Z=nP;?(2z620MdDmxUP!u(5+fgo%-jRlAXefs5IRfu+=D-7D^m)h%i<>!tSJ z-%)qayV!q~#k?;*->z9#uq6r3W=k;F_%!!$a(UzF$sf&5&Te!!F*FDYKkj^fhpFM@ zO5|{6_Fyn@Wm2#^b0^n9sbjH@TKWW5iOUD7p8w)BU|sxg1E;`SH*vv8CPjwds}K1b h{(P|U%VPB|EvLPeMezl_VwDe0v2@GpUQL^(4*-H!l8^uZ literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/ee_secp384r1_384-int_prime256v1_256-root_rsa_2048.der b/security/manager/ssl/tests/unit/test_keysize/ee_secp384r1_384-int_prime256v1_256-root_rsa_2048.der new file mode 100644 index 0000000000000000000000000000000000000000..2187fd1c14b3d65c0a486d1668dc5506e8338387 GIT binary patch literal 486 zcmXqLVti!K#Mr)onTe5!iG|@;%MAlAHV&;ek8`#x%uEJJhNcF_Y|No7%se^~0nWi0 zsW~|c-l>%e!I@R53L&Y*C7F5Y3I#=(xv55`W@Uy7KvFj;v&2x-Kpmuwi$@_duOuF! zAReTkC_ld>zNk1c-pIhj!az=(7if#2k)e^Xp|O!!lsK;ukZWiGC+@Ouy z4aKR+1;!R8MTQDM66^#k0}F@~3{z9%;nMLSX@YJlGZ0{72ZsU^BO9xBBMXBPa}oo~ zlvqK$#D5-J%W;nHL``H-$TbD8T|pvdKqW6vPWolW{p9F- ccFy%emkY&Z-M;J2{a^RrM=)!81MiiI0BNb8RR910 literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/ee_secp521r1_521-int_secp384r1_384-root_prime256v1_256.der b/security/manager/ssl/tests/unit/test_keysize/ee_secp521r1_521-int_secp384r1_384-root_prime256v1_256.der new file mode 100644 index 0000000000000000000000000000000000000000..ba8bd47c62599ce80e8b350ed09a98cb12281620 GIT binary patch literal 565 zcmXqLVlp&nV%)ZXnTe5!iG@iiFvYccrcl?h)qster{@(0c z_~g-=^j#Zd%g=1iab^&IurpF_Ptm2A75nDxa`_+q>=EzRn+H_(xCVd8@~?>DzO}jd zXX%W)?Js3@W(BX^?~-b>OLY-j7K`KupM77x2hIG8997Jj3Ux6kvq&tDUG&H=S7IA|#}SAA|% vpXcYTD_joUEVjz>IA3$;*M#*erA0nJV}079;km)owMo}x`=tAO=V}1}B}&ki literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/generate.py b/security/manager/ssl/tests/unit/test_keysize/generate.py index 01428c80798..b3424e4c0c4 100644 --- a/security/manager/ssl/tests/unit/test_keysize/generate.py +++ b/security/manager/ssl/tests/unit/test_keysize/generate.py @@ -30,12 +30,14 @@ mozilla_testing_ev_policy = ('certificatePolicies = @v3_ca_ev_cp\n\n' + 'CPS.1 = "http://mytestdomain.local/cps"') generated_ev_root_filenames = [] +generated_certs = [] def generate_and_maybe_import_cert(key_type, cert_name_prefix, cert_name_suffix, base_ext_text, signer_key_filename, signer_cert_filename, key_size, generate_ev): """ Generates a certificate and imports it into the NSS DB if appropriate. + If an equivalent certificate has already been generated, it is reused. Arguments: key_type -- the type of key generated: potential values: 'rsa', or any of @@ -78,6 +80,22 @@ def generate_and_maybe_import_cert(key_type, cert_name_prefix, cert_name_suffix, # Use the organization field to store the cert nickname for easier debugging subject_string += '/O=' + cert_name + # Reuse the existing RSA EV root + if (generate_ev and key_type == 'rsa' and signer_key_filename == '' + and signer_cert_filename == '' and key_size == '2048'): + cert_name = 'evroot' + key_filename = '../test_ev_certs/evroot.key' + cert_filename = '../test_ev_certs/evroot.der' + CertUtils.import_cert_and_pkcs12(srcdir, key_filename, + '../test_ev_certs/evroot.p12', + cert_name, ',,') + return [cert_name, key_filename, cert_filename] + + # Don't regenerate a previously generated cert + for cert in generated_certs: + if cert_name == cert[0]: + return cert + [key_filename, cert_filename] = CertUtils.generate_cert_generic( db_dir, srcdir, @@ -89,6 +107,7 @@ def generate_and_maybe_import_cert(key_type, cert_name_prefix, cert_name_suffix, signer_cert_filename, subject_string, key_size) + generated_certs.append([cert_name, key_filename, cert_filename]) if generate_ev: # The dest_dir argument of generate_pkcs12() is also set to db_dir as @@ -104,6 +123,49 @@ def generate_and_maybe_import_cert(key_type, cert_name_prefix, cert_name_suffix, return [cert_name, key_filename, cert_filename] +def generate_cert_chain(root_key_type, root_key_size, int_key_type, int_key_size, + ee_key_type, ee_key_size, generate_ev): + """ + Generates a certificate chain and imports the individual certificates into + the NSS DB if appropriate. + + Arguments: + (root|int|ee)_key_type -- the type of key generated: potential values: 'rsa', + or any of the curves found by + 'openssl ecparam -list_curves' + (root|int|ee)_key_size -- public key size for the relevant cert + generate_ev -- whether EV certs should be generated + """ + [root_nick, root_key_file, root_cert_file] = generate_and_maybe_import_cert( + root_key_type, + 'root', + '', + ca_ext_text, + '', + '', + root_key_size, + generate_ev) + + [int_nick, int_key_file, int_cert_file] = generate_and_maybe_import_cert( + int_key_type, + 'int', + root_nick, + ca_ext_text, + root_key_file, + root_cert_file, + int_key_size, + generate_ev) + + generate_and_maybe_import_cert( + ee_key_type, + 'ee', + int_nick, + ee_ext_text, + int_key_file, + int_cert_file, + ee_key_size, + generate_ev) + def generate_certs(key_type, inadequate_key_size, adequate_key_size, generate_ev): """ Generates the various certificates used by the key size tests. @@ -220,6 +282,46 @@ def generate_certs(key_type, inadequate_key_size, adequate_key_size, generate_ev inadequate_key_size, generate_ev) +def generate_ecc_chains(): + generate_cert_chain('prime256v1', '256', + 'secp384r1', '384', + 'secp521r1', '521', + False) + generate_cert_chain('prime256v1', '256', + 'secp224r1', '224', + 'prime256v1', '256', + False) + generate_cert_chain('prime256v1', '256', + 'prime256v1', '256', + 'secp224r1', '224', + False) + generate_cert_chain('secp224r1', '224', + 'prime256v1', '256', + 'prime256v1', '256', + False) + generate_cert_chain('prime256v1', '256', + 'prime256v1', '256', + 'secp256k1', '256', + False) + generate_cert_chain('secp256k1', '256', + 'prime256v1', '256', + 'prime256v1', '256', + False) + +def generate_combination_chains(): + generate_cert_chain('rsa', '2048', + 'prime256v1', '256', + 'secp384r1', '384', + False) + generate_cert_chain('rsa', '2048', + 'prime256v1', '256', + 'secp224r1', '224', + False) + generate_cert_chain('prime256v1', '256', + 'rsa', '1016', + 'prime256v1', '256', + False) + # Create a NSS DB for use by the OCSP responder. CertUtils.init_nss_db(srcdir) @@ -228,6 +330,8 @@ CertUtils.init_nss_db(srcdir) # that can be tested is 1016, less than 2048 is 2040 and so on. generate_certs('rsa', '1016', '1024', False) generate_certs('rsa', '2040', '2048', True) +generate_ecc_chains() +generate_combination_chains() # Print a blank line and the information needed to enable EV for any roots # generated by this script. diff --git a/security/manager/ssl/tests/unit/test_keysize/int_prime256v1_256-root_prime256v1_256.der b/security/manager/ssl/tests/unit/test_keysize/int_prime256v1_256-root_prime256v1_256.der new file mode 100644 index 0000000000000000000000000000000000000000..70bfcec594ecf2731f9c3ce3a69d48a81c9c8248 GIT binary patch literal 466 zcmXqLVmxQi#8|q3nTe5!iG@k*ij@Hu8;4e#$2nUTW+sDBLsJ7|Hs(+kW*(i00O#P0 z)SMgz@6<|#;LNI2g^<+ZlFYnxg@U5Y+*Bh|vob>kAgP;_Sz;(-AO+IK#UoslpI;J> zP!SJQVIU{Y3pCi!$k52x(AdZ{N}SgS$ThTpat$)bwN~Fi7hO9nEc4Wl>QRe=o(UYe z|CxK{i$joB==3HL}8tjQ?3!4VZzH0XIm1 zp9L7UjBLmu&Fs!#;KHPk=>GHgtt-n{bBa#el3eCywCi7V?b==Zo9@hVV$G_nUdp7v mSy<~Sc;JET0@5qwPB{BO^B}gMp`^zJV?qb0`Zlk6J{4 zb8tp#PL6_iYNbMOW>u;}NNRCOW?s5NQE{Szk%5VYZc=86p_qXPNCOuSZ&7}JNjy+4 z9wcWVC(dhVYG7z&Xk=_?Y-AQC&T9nZ8d^ZP21!6!V~ABcxUDKE%FInQGBqnRQ~;7- z3pEYYAr>lR=9R=F6vTrRpt>Q_K$wjk=)ZHeOpI(CU&ED7$b1B7rtnPwkUN014nxC^C zU-s(7Vg&;^1Ad@8WQ7?S|Ff_fFas$AZjb;!3kxuS+0cTPxrvdHA;0ZJRqT1LcWv{^ z81F`_Tkm5_j*D~H-{86RviqxugY~~9_+B}#%F)Pb+>j)8Wlh{1jR_7L7v*SZpYCn# zb-QWG%EBo8A$@<6+|j^=XFuJ#Vpy6L@1$LOc*aH#k#|084G%v3aAU52&@_|p(~cIH z{#hCwsaH5L!D#QzU3s%^oowc|*E}+PBAZF!+3c+zCu0mGn2sD(nq_`oIj*|1$Hi{C zzstq!>iS1|Witb+l E021@-umAu6 literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/int_prime256v1_256-root_secp224r1_224.der b/security/manager/ssl/tests/unit/test_keysize/int_prime256v1_256-root_secp224r1_224.der new file mode 100644 index 0000000000000000000000000000000000000000..dd2ccdd990109e27cea4a936b4c2f544859041fe GIT binary patch literal 456 zcmXqLVmxBd#8|X|nTe5!iG@jqYm)&N8;4e#$2nUTW+sDRLlXldHs(+kW*+T`0O#P0 z)SMgz@6<|#;LNI2g^<+ZlFYnxh2qrY0wW`nB0~irshgBpVkm7O3DU*IBUF^1UlI>j z5D!#fAScdiXlh_+WN2h;Xl!H}CC+OEdUQv4j1}#0d2?Gb1~*69Y@J``wb&b5fSgHnj`> znSNRBL1L%fynv-Mn?C#17mA%IfsTKHW-gN~!>`z#j_rc+Mcog#9Nf@;;vn}W)pt)+SpNrveR&K3 DG8c%L literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/int_prime256v1_256-root_secp256k1_256.der b/security/manager/ssl/tests/unit/test_keysize/int_prime256v1_256-root_secp256k1_256.der new file mode 100644 index 0000000000000000000000000000000000000000..b17a3e6fb2118bf9147b13d93e08b180a2708f27 GIT binary patch literal 465 zcmXqLVmxcm#8|X|nTe5!iG^{`4^;y$HV&;ek8`#x%uEKsh9(9^Y|No7%sko=0nWi0 zsW~|c-l>%e!I@R53L&Y*C7F5Y3dO0(1xBW3*@g;0Qa35H#8BEm5~PcZN2n-2za$>6 zARef|Ku(<3(A2=t$k52x(AdZ{N}SgS$ThTpat+dfvc?cgb#Pl+P?VXQ3N)?^VXK~j z4#ZZ~%)F9#gaVMQx>y_%X&}tT4)!Y(Bh=H(jO@%#3@o?!;y1CZIebQY$$y5k$3mOF zw@!H6_I7*D^o5gNJo?jLvG72gXP=_(BJ~JI#=}kdi!P@L^Y^RO+*@z2ZFe|w(R0C zp0AP}-M;d*VTFLv0!ekAgP;_Sz;(-AO+IK#UoslpI;J> zP!SJQVIU{Y3pCi!$k52x(AdZbVS%)F9#pj13q3Y+bX^9*>|IDvj_`_9YA$jHjT+}Oil(AdG$*ue1q(|_-+QxaJm zZM3YXeaK2NSde)!QpZ4eacOGQ>BrR!2lQG_2Z?GOdvvpF-pbmRFb9RG(zsmbBiBMt zWxHFK`h}FlNPPRS#O>Ak6>I!IPZ3!yE~)09vaB(~AaSydTf)E7p_XA8t*16fe2~A; zsxfKK@@Y$@lf{KU3*AxSVMG2GS{7z}NE8g7f-@sfJ%v$AxiF_R+0k+1s{ i)QZ`vwutwB{MUVdd%>qSr}ZpdWLaw8UwG0}T>$_uNvOa8 literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/int_secp224r1_224-root_prime256v1_256.der b/security/manager/ssl/tests/unit/test_keysize/int_secp224r1_224-root_prime256v1_256.der new file mode 100644 index 0000000000000000000000000000000000000000..49a70c40e5b532803376c821bd3ac64a7b26fbed GIT binary patch literal 454 zcmXqLVmxHf#F(*wnTe5!iG|_OIuQddHV&;ek8`#x%uEKMhNcF_Y|No7%se^~0nWi0 zsW~|c-l>%e!I@R53L&Y*C7F5Y3I#=(xv55`W@Uy7KvFj;v&2xwKnkRdi$}O9Kffd% zp&}lr!az=(7ih4dk)e^Xp|O!^lsK;ukZWiGCtkuSCZEt=setC^g(SiwNf zfFI}rSz$)T|17Kq%s|S38zjKb0t`+@Hsru%_Fyn@Wm05V&eoGlA8lR>DVsev&Yb0`Zlk4{8@b8tp# zPL6_iYNbMOW>u;}NNRCOW?s5NK~ZLIs*$N#nV|xZ)J@7PF_bZo0%_yo5iZKlFNsH} zhzF`LkQ3(x8f<7}Xk=_?Y-AcG&T9nZ8d^ZP25E*S21XETwQ*ZpoSIx{%v8HdgIM76v8eBnFoGmm8M~M8(gOiaKwi zzVGCnS01Okw>jB8sK58*`ou*^k_wBH4{5l(?&zj3%dF4%j^&TGXgD{ uo^81hw3o@U?mofD(#?03GFZkAgP;_Sz;(-AO+IK#UoslpI;J> zP!SJQVIU{Y3pCi!$k52x(AdZ{N}SgS$ThTpa%p94q=7ISJJ@ebj8IQ9GqN)~F|bq= zi>GQjRp;4qKIm$kw_H_6Ug=Thq6;UC9bf$7`t+ox>a*R{`09rzH@PibR{!a-wC9J; zjLGJ{DUD}}%FQPfMJ`q_kTc*1`dC(&k?}tZs{u2RGT;UY@Us8|l93HLSeZQ;4BVI$ z8K$*PT9x_k$*hC!kKB4^`2YLCd^0ED;1x5eg2^e|TUpNomE4}`dv8hTuZj~L>=(cP X`G3u^--q!;;UV>Ae~sP@fjQCuju4FF literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/root_rsa_2048.der b/security/manager/ssl/tests/unit/test_keysize/root_rsa_2048.der new file mode 100644 index 0000000000000000000000000000000000000000..c7bec96eb9077e820483406c3fe2595715aff026 GIT binary patch literal 820 zcmXqLVm2^nVv<@5qwPB{BO^B}gMp`^zJV?qb0`Zlk6J{4 zb8tp#PL6_iYNbMOW>u;}NNRCOW?s5NQE{Szk%5VYZc=86p_qXPNCOuSZ&7}JNjy+4 z9wcWVC(dhVYG7z&Xk=_?Y-AQC&T9nZ8d^ZP)U>LJQ3=^2jI0dIO^o~u22G4yOihf8 z304Gvtk(TdeoM^ zl}hb)|Hd?bf#Q;vA9&Wuoci|F_nceZRfU2i|488%x1aPxZTV6?hc{!Vt=dJGpo-m} zQ~p@gFq(h8eP*wvp}_t<1`m?>Zd6{{*Ou*{H@`@~if{g-FWR!7A2h1##XU^Xt++X} zA?cN>0ax$rQ$Ow~u2fF?|7yLJ(z$OB_3IwJI<3dJM0njjFMr-Y>`c}oyRIM8uigF8 zS5NBgal_RMQjX-mW@2V!U|g(VAZNf2j4D}SM#ldvtOm?L%77arz|X=0OcHF!VF*kN zz%XQFFg4TsmiuUU$? zQNNDm-KmN_dh79vD9(@#&6Q_PeABRPJk~7Fw4v}?Q0FPOOOtN=xIAS8R|x+sMinpL zNWn!dx$mDXC@TG}!hLe`^kW6`KN-tkEDGS-zvi{qqSI4^EvrAg^^48O`u6gNVu9Ar zh_`}I-cOBO`C`@SyAu9d8**d2z2~fmdlm1?{cdV(tf#C-_6kRl@U@@XZ&WNlQc)eI z_H>7~--D%lSW+}TA88Qy6FJ}ZyEc2|X@i*WZ`-#D9o_g%_pfUKZ*WFK_uQExGxfeM T6gv00Tlq0RZ-Vccu3PE=$yrV7 literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/root_secp224r1_224.der b/security/manager/ssl/tests/unit/test_keysize/root_secp224r1_224.der new file mode 100644 index 0000000000000000000000000000000000000000..36ac715740a72ffacd29772fc858711b969e4e33 GIT binary patch literal 424 zcmXqLVq9X-#2B=InTe5!i8*02uK^buhgO@%Ia?NHCWBx@69XeQ=1>-99_@$#=irRg zoE!!3)Jlcm%&Js{kksOm%)E4k;?(2@OxpHdgIM76wITD+ZSB zlfQcuT+aSJU-;3M51|?vDPN+xxTn279eS9_>cr`NufMiWZj{|OHFw7E7yrL>Ty^EO z`#sM@e6`SG1p_$)exM&^g&7(Dv#=U411SS;kN`gmFyt87ki(JLfx*C*Nk;HoUZB-Y z&!5|SjnmC}qNE%i?C74yZ>*km&hP@0EW@BkTW#E}v)(pC{``fm1uHEk I-}$Qp07QF%-~a#s literal 0 HcmV?d00001 diff --git a/security/manager/ssl/tests/unit/test_keysize/root_secp256k1_256.der b/security/manager/ssl/tests/unit/test_keysize/root_secp256k1_256.der new file mode 100644 index 0000000000000000000000000000000000000000..8581249a4b3e099a0d6de961ff29c256a87dce5d GIT binary patch literal 441 zcmXqLV%%!b#2CGRnTe5!iG^XFlb!(=8;4e#$2nUTW+sDRLlXldHs(+kW*+T`0O#P0 z)SMgz@6<|#;LNI2g^<+ZlFYnxh2qrY0wYtiY(oVgshgBpVkm7O3DU*IBUF^1UlI>j z5D!#fAScdiXlh_+WN2h;Xl!H}CC+OE`H^&pUcZPEgk*c-xjw zTW;|)m%mVV4|{HXh41t0#R>*;2K+$3$_g_w{%2t|UBL zE0ZF_GESC+BRRjfFIf5D`Rf-uY&E|w&Y#r5qg=e=i>d0v(%Vc54!>R-pYeS7*G&GA aKqGV8r)4ah4`!TFaZG Date: Thu, 22 Jan 2015 16:33:25 -0700 Subject: [PATCH 022/106] Bug 934502 - Remove unnecessary pushedArgumentSlots, track argument slots explicitly in safepoints, r=jandem. --- js/src/jit/CodeGenerator.cpp | 25 +---- js/src/jit/Ion.cpp | 4 +- js/src/jit/IonCode.h | 8 +- js/src/jit/JitFrames.cpp | 72 +++++++------- js/src/jit/JitFrames.h | 10 +- js/src/jit/LIR.h | 108 +++++++++++---------- js/src/jit/LinearScan.cpp | 23 ++++- js/src/jit/Safepoints.cpp | 91 ++++++++++------- js/src/jit/Safepoints.h | 15 ++- js/src/jit/shared/CodeGenerator-shared.cpp | 19 +--- js/src/jit/shared/CodeGenerator-shared.h | 6 -- 11 files changed, 196 insertions(+), 185 deletions(-) diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index 0956b80a2bc..e35d90ceaa2 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -2076,10 +2076,6 @@ CodeGenerator::visitStackArgT(LStackArgT *lir) masm.storeValue(ValueTypeFromMIRType(argType), ToRegister(arg), dest); else masm.storeValue(*(arg->toConstant()), dest); - - uint32_t slot = StackOffsetToSlot(stack_offset); - MOZ_ASSERT(slot - 1u < graph.totalSlotCount()); - masm.propagateOOM(pushedArgumentSlots_.append(slot)); } void @@ -2092,10 +2088,6 @@ CodeGenerator::visitStackArgV(LStackArgV *lir) int32_t stack_offset = StackOffsetOfPassedArg(argslot); masm.storeValue(val, Address(StackPointer, stack_offset)); - - uint32_t slot = StackOffsetToSlot(stack_offset); - MOZ_ASSERT(slot - 1u < graph.totalSlotCount()); - masm.propagateOOM(pushedArgumentSlots_.append(slot)); } void @@ -2664,8 +2656,6 @@ CodeGenerator::visitCallNative(LCallNative *call) // Move the StackPointer back to its original location, unwinding the native exit frame. masm.adjustStack(NativeExitFrameLayout::Size() - unusedStack); MOZ_ASSERT(masm.framePushed() == initialStack); - - dropArguments(call->numStackArgs() + 1); } static void @@ -2795,8 +2785,6 @@ CodeGenerator::visitCallDOMNative(LCallDOMNative *call) // Move the StackPointer back to its original location, unwinding the native exit frame. masm.adjustStack(IonDOMMethodExitFrameLayout::Size() - unusedStack); MOZ_ASSERT(masm.framePushed() == initialStack); - - dropArguments(call->numStackArgs() + 1); } typedef bool (*GetIntrinsicValueFn)(JSContext *cx, HandlePropertyName, MutableHandleValue); @@ -2913,8 +2901,6 @@ CodeGenerator::visitCallGeneric(LCallGeneric *call) masm.loadValue(Address(StackPointer, unusedStack), JSReturnOperand); masm.bind(¬Primitive); } - - dropArguments(call->numStackArgs() + 1); } void @@ -2981,8 +2967,6 @@ CodeGenerator::visitCallKnown(LCallKnown *call) masm.loadValue(Address(StackPointer, unusedStack), JSReturnOperand); masm.bind(¬Primitive); } - - dropArguments(call->numStackArgs() + 1); } void @@ -3819,11 +3803,6 @@ CodeGenerator::generateBody() if (counts) blockCounts->visitInstruction(*iter); - if (iter->safepoint() && pushedArgumentSlots_.length()) { - if (!markArgumentSlots(iter->safepoint())) - return false; - } - #ifdef CHECK_OSIPOINT_REGISTERS if (iter->safepoint()) resetOsiPointRegs(iter->safepoint()); @@ -3852,7 +3831,6 @@ CodeGenerator::generateBody() #endif } - MOZ_ASSERT(pushedArgumentSlots_.empty()); return true; } @@ -7131,6 +7109,7 @@ CodeGenerator::link(JSContext *cx, types::CompilerConstraintList *constraints) if (warmUpCount > script->getWarmUpCount()) script->incWarmUpCounter(warmUpCount - script->getWarmUpCount()); + uint32_t argumentSlots = (gen->info().nargs() + 1) * sizeof(Value); uint32_t scriptFrameSize = frameClass_ == FrameSizeClass::None() ? frameDepth_ : FrameSizeClass::FromDepth(frameDepth_).frameSize(); @@ -7142,7 +7121,7 @@ CodeGenerator::link(JSContext *cx, types::CompilerConstraintList *constraints) IonScript *ionScript = IonScript::New(cx, recompileInfo, - graph.totalSlotCount(), scriptFrameSize, + graph.totalSlotCount(), argumentSlots, scriptFrameSize, snapshots_.listSize(), snapshots_.RVATableSize(), recovers_.size(), bailouts_.length(), graph.numConstants(), safepointIndices_.length(), osiIndices_.length(), diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index d0ce623ec8c..bae8336a0e8 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -738,7 +738,7 @@ IonScript::IonScript() IonScript * IonScript::New(JSContext *cx, types::RecompileInfo recompileInfo, - uint32_t frameSlots, uint32_t frameSize, + uint32_t frameSlots, uint32_t argumentSlots, uint32_t frameSize, size_t snapshotsListSize, size_t snapshotsRVATableSize, size_t recoversSize, size_t bailoutEntries, size_t constants, size_t safepointIndices, @@ -827,6 +827,8 @@ IonScript::New(JSContext *cx, types::RecompileInfo recompileInfo, offsetCursor += paddedBackedgeSize; script->frameSlots_ = frameSlots; + script->argumentSlots_ = argumentSlots; + script->frameSize_ = frameSize; script->recompileInfo_ = recompileInfo; diff --git a/js/src/jit/IonCode.h b/js/src/jit/IonCode.h index 848281dfc49..803f87cec42 100644 --- a/js/src/jit/IonCode.h +++ b/js/src/jit/IonCode.h @@ -225,6 +225,9 @@ struct IonScript // Number of bytes this function reserves on the stack. uint32_t frameSlots_; + // Number of bytes used passed in as formal arguments or |this|. + uint32_t argumentSlots_; + // Frame size is the value that can be added to the StackPointer along // with the frame prefix to get a valid JitFrameLayout. uint32_t frameSize_; @@ -326,7 +329,7 @@ struct IonScript IonScript(); static IonScript *New(JSContext *cx, types::RecompileInfo recompileInfo, - uint32_t frameLocals, uint32_t frameSize, + uint32_t frameSlots, uint32_t argumentSlots, uint32_t frameSize, size_t snapshotsListSize, size_t snapshotsRVATableSize, size_t recoversSize, size_t bailoutEntries, size_t constants, size_t safepointIndexEntries, @@ -462,6 +465,9 @@ struct IonScript uint32_t frameSlots() const { return frameSlots_; } + uint32_t argumentSlots() const { + return argumentSlots_; + } uint32_t frameSize() const { return frameSize_; } diff --git a/js/src/jit/JitFrames.cpp b/js/src/jit/JitFrames.cpp index 38d76e0a322..dc587fa732b 100644 --- a/js/src/jit/JitFrames.cpp +++ b/js/src/jit/JitFrames.cpp @@ -939,6 +939,14 @@ MarkCalleeToken(JSTracer *trc, CalleeToken token) } } +uintptr_t * +JitFrameLayout::slotRef(SafepointSlotEntry where) +{ + if (where.stack) + return (uintptr_t *)((uint8_t *)this - where.slot); + return (uintptr_t *)((uint8_t *)argv() + where.slot); +} + #ifdef JS_NUNBOX32 static inline uintptr_t ReadAllocation(const JitFrameIterator &frame, const LAllocation *a) @@ -947,31 +955,29 @@ ReadAllocation(const JitFrameIterator &frame, const LAllocation *a) Register reg = a->toGeneralReg()->reg(); return frame.machineState().read(reg); } - if (a->isStackSlot()) { - uint32_t slot = a->toStackSlot()->slot(); - return *frame.jsFrame()->slotRef(slot); - } - uint32_t index = a->toArgument()->index(); - uint8_t *argv = reinterpret_cast(frame.jsFrame()->argv()); - return *reinterpret_cast(argv + index); + return *frame.jsFrame()->slotRef(SafepointSlotEntry(a)); } #endif static void -MarkFrameAndActualArguments(JSTracer *trc, const JitFrameIterator &frame) +MarkExtraActualArguments(JSTracer *trc, const JitFrameIterator &frame) { - // The trampoline produced by |generateEnterJit| is pushing |this| on the - // stack, as requested by |setEnterJitData|. Thus, this function is also - // used for marking the |this| value of the top-level frame. + // Mark any extra actual arguments for an Ion frame. Marking of |this| and + // the formal arguments is taken care of by the frame's safepoint/snapshot. JitFrameLayout *layout = frame.jsFrame(); - size_t nargs = frame.numActualArgs(); - MOZ_ASSERT_IF(!CalleeTokenIsFunction(layout->calleeToken()), nargs == 0); + if (!CalleeTokenIsFunction(layout->calleeToken())) { + MOZ_ASSERT(frame.numActualArgs() == 0); + return; + } - // Trace function arguments. Note + 1 for thisv. + size_t nargs = frame.numActualArgs(); + size_t nformals = CalleeTokenToFunction(layout->calleeToken())->nargs(); + + // Trace actual arguments. Note + 1 for thisv. Value *argv = layout->argv(); - for (size_t i = 0; i < nargs + 1; i++) + for (size_t i = nformals + 1; i < nargs + 1; i++) gc::MarkValueRoot(trc, &argv[i], "ion-argv"); } @@ -982,16 +988,9 @@ WriteAllocation(const JitFrameIterator &frame, const LAllocation *a, uintptr_t v if (a->isGeneralReg()) { Register reg = a->toGeneralReg()->reg(); frame.machineState().write(reg, value); - return; + } else { + *frame.jsFrame()->slotRef(SafepointSlotEntry(a)) = value; } - if (a->isStackSlot()) { - uint32_t slot = a->toStackSlot()->slot(); - *frame.jsFrame()->slotRef(slot) = value; - return; - } - uint32_t index = a->toArgument()->index(); - uint8_t *argv = reinterpret_cast(frame.jsFrame()->argv()); - *reinterpret_cast(argv + index) = value; } #endif @@ -1012,7 +1011,7 @@ MarkIonJSFrame(JSTracer *trc, const JitFrameIterator &frame) ionScript = frame.ionScriptFromCalleeToken(); } - MarkFrameAndActualArguments(trc, frame); + MarkExtraActualArguments(trc, frame); const SafepointIndex *si = ionScript->getSafepointIndex(frame.returnAddressToFp()); @@ -1020,14 +1019,15 @@ MarkIonJSFrame(JSTracer *trc, const JitFrameIterator &frame) // Scan through slots which contain pointers (or on punboxing systems, // actual values). - uint32_t slot; - while (safepoint.getGcSlot(&slot)) { - uintptr_t *ref = layout->slotRef(slot); + SafepointSlotEntry entry; + + while (safepoint.getGcSlot(&entry)) { + uintptr_t *ref = layout->slotRef(entry); gc::MarkGCThingRoot(trc, reinterpret_cast(ref), "ion-gc-slot"); } - while (safepoint.getValueSlot(&slot)) { - Value *v = (Value *)layout->slotRef(slot); + while (safepoint.getValueSlot(&entry)) { + Value *v = (Value *)layout->slotRef(entry); gc::MarkValueRoot(trc, v, "ion-gc-slot"); } @@ -1070,7 +1070,7 @@ MarkBailoutFrame(JSTracer *trc, const JitFrameIterator &frame) // We have to mark the list of actual arguments, as only formal arguments // are represented in the Snapshot. - MarkFrameAndActualArguments(trc, frame); + MarkExtraActualArguments(trc, frame); // Under a bailout, do not have a Safepoint to only iterate over GC-things. // Thus we use a SnapshotIterator to trace all the locations which would be @@ -1128,16 +1128,16 @@ UpdateIonJSFrameForMinorGC(JSTracer *trc, const JitFrameIterator &frame) } // Skip to the right place in the safepoint - uint32_t slot; - while (safepoint.getGcSlot(&slot)); - while (safepoint.getValueSlot(&slot)); + SafepointSlotEntry entry; + while (safepoint.getGcSlot(&entry)); + while (safepoint.getValueSlot(&entry)); #ifdef JS_NUNBOX32 LAllocation type, payload; while (safepoint.getNunboxSlot(&type, &payload)); #endif - while (safepoint.getSlotsOrElementsSlot(&slot)) { - HeapSlot **slots = reinterpret_cast(layout->slotRef(slot)); + while (safepoint.getSlotsOrElementsSlot(&entry)) { + HeapSlot **slots = reinterpret_cast(layout->slotRef(entry)); nursery.forwardBufferPointer(slots); } } diff --git a/js/src/jit/JitFrames.h b/js/src/jit/JitFrames.h index 9c13dbb0fd2..6f231d8696d 100644 --- a/js/src/jit/JitFrames.h +++ b/js/src/jit/JitFrames.h @@ -13,6 +13,7 @@ #include "jsfun.h" #include "jit/JitFrameIterator.h" +#include "jit/Safepoints.h" namespace js { namespace jit { @@ -400,11 +401,10 @@ class JitFrameLayout : public CommonFrameLayout return numActualArgs_; } - // Computes a reference to a slot, where a slot is a distance from the base - // frame pointer (as would be used for LStackSlot). - uintptr_t *slotRef(uint32_t slot) { - return (uintptr_t *)((uint8_t *)this - slot); - } + // Computes a reference to a stack or argument slot, where a slot is a + // distance from the base frame pointer, as would be used for LStackSlot + // or LArgument. + uintptr_t *slotRef(SafepointSlotEntry where); static inline size_t Size() { return sizeof(JitFrameLayout); diff --git a/js/src/jit/LIR.h b/js/src/jit/LIR.h index 91afe734ce9..7d00a8a1334 100644 --- a/js/src/jit/LIR.h +++ b/js/src/jit/LIR.h @@ -164,6 +164,7 @@ class LAllocation : public TempObject bool isMemory() const { return isStackSlot() || isArgument(); } + inline uint32_t memorySlot() const; inline LUse *toUse(); inline const LUse *toUse() const; inline const LGeneralReg *toGeneralReg() const; @@ -360,15 +361,22 @@ class LStackSlot : public LAllocation class LArgument : public LAllocation { public: - explicit LArgument(int32_t index) + explicit LArgument(uint32_t index) : LAllocation(ARGUMENT_SLOT, index) { } - int32_t index() const { + uint32_t index() const { return data(); } }; +inline uint32_t +LAllocation::memorySlot() const +{ + MOZ_ASSERT(isMemory()); + return isStackSlot() ? toStackSlot()->slot() : toArgument()->index(); +} + // Represents storage for a definition. class LDefinition { @@ -1232,6 +1240,22 @@ class LSnapshot : public TempObject void rewriteRecoveredInput(LUse input); }; +struct SafepointSlotEntry { + // Flag indicating whether this is a slot in the stack or argument space. + uint32_t stack:1; + + // Byte offset of the slot, as in LStackSlot or LArgument. + uint32_t slot:31; + + SafepointSlotEntry() { } + SafepointSlotEntry(bool stack, uint32_t slot) + : stack(stack), slot(slot) + { } + explicit SafepointSlotEntry(const LAllocation *a) + : stack(a->isStackSlot()), slot(a->memorySlot()) + { } +}; + struct SafepointNunboxEntry { uint32_t typeVreg; LAllocation type; @@ -1245,10 +1269,11 @@ struct SafepointNunboxEntry { class LSafepoint : public TempObject { + typedef SafepointSlotEntry SlotEntry; typedef SafepointNunboxEntry NunboxEntry; public: - typedef Vector SlotList; + typedef Vector SlotList; typedef Vector NunboxList; private: @@ -1283,14 +1308,14 @@ class LSafepoint : public TempObject // Assembler buffer displacement to OSI point's call location. uint32_t osiCallPointOffset_; - // List of stack slots which have gcthing pointers. + // List of slots which have gcthing pointers. SlotList gcSlots_; - // List of stack slots which have Values. + // List of slots which have Values. SlotList valueSlots_; #ifdef JS_NUNBOX32 - // List of registers (in liveRegs) and stack slots which contain pieces of Values. + // List of registers (in liveRegs) and slots which contain pieces of Values. NunboxList nunboxParts_; #elif JS_PUNBOX64 // The subset of liveRegs which have Values. @@ -1300,7 +1325,7 @@ class LSafepoint : public TempObject // The subset of liveRegs which contains pointers to slots/elements. GeneralRegisterSet slotsOrElementsRegs_; - // List of stack slots which have slots/elements pointers. + // List of slots which have slots/elements pointers. SlotList slotsOrElementsSlots_; public: @@ -1347,8 +1372,8 @@ class LSafepoint : public TempObject GeneralRegisterSet gcRegs() const { return gcRegs_; } - bool addGcSlot(uint32_t slot) { - bool result = gcSlots_.append(slot); + bool addGcSlot(bool stack, uint32_t slot) { + bool result = gcSlots_.append(SlotEntry(stack, slot)); if (result) assertInvariants(); return result; @@ -1367,15 +1392,15 @@ class LSafepoint : public TempObject slotsOrElementsRegs_.addUnchecked(reg); assertInvariants(); } - bool addSlotsOrElementsSlot(uint32_t slot) { - bool result = slotsOrElementsSlots_.append(slot); + bool addSlotsOrElementsSlot(bool stack, uint32_t slot) { + bool result = slotsOrElementsSlots_.append(SlotEntry(stack, slot)); if (result) assertInvariants(); return result; } bool addSlotsOrElementsPointer(LAllocation alloc) { - if (alloc.isStackSlot()) - return addSlotsOrElementsSlot(alloc.toStackSlot()->slot()); + if (alloc.isMemory()) + return addSlotsOrElementsSlot(alloc.isStackSlot(), alloc.memorySlot()); MOZ_ASSERT(alloc.isRegister()); addSlotsOrElementsRegister(alloc.toRegister().gpr()); assertInvariants(); @@ -1384,19 +1409,17 @@ class LSafepoint : public TempObject bool hasSlotsOrElementsPointer(LAllocation alloc) const { if (alloc.isRegister()) return slotsOrElementsRegs().has(alloc.toRegister().gpr()); - if (alloc.isStackSlot()) { - for (size_t i = 0; i < slotsOrElementsSlots_.length(); i++) { - if (slotsOrElementsSlots_[i] == alloc.toStackSlot()->slot()) - return true; - } - return false; + for (size_t i = 0; i < slotsOrElementsSlots_.length(); i++) { + const SlotEntry &entry = slotsOrElementsSlots_[i]; + if (entry.stack == alloc.isStackSlot() && entry.slot == alloc.memorySlot()) + return true; } return false; } bool addGcPointer(LAllocation alloc) { - if (alloc.isStackSlot()) - return addGcSlot(alloc.toStackSlot()->slot()); + if (alloc.isMemory()) + return addGcSlot(alloc.isStackSlot(), alloc.memorySlot()); if (alloc.isRegister()) addGcRegister(alloc.toRegister().gpr()); assertInvariants(); @@ -1406,19 +1429,16 @@ class LSafepoint : public TempObject bool hasGcPointer(LAllocation alloc) const { if (alloc.isRegister()) return gcRegs().has(alloc.toRegister().gpr()); - if (alloc.isStackSlot()) { - for (size_t i = 0; i < gcSlots_.length(); i++) { - if (gcSlots_[i] == alloc.toStackSlot()->slot()) - return true; - } - return false; + MOZ_ASSERT(alloc.isMemory()); + for (size_t i = 0; i < gcSlots_.length(); i++) { + if (gcSlots_[i].stack == alloc.isStackSlot() && gcSlots_[i].slot == alloc.memorySlot()) + return true; } - MOZ_ASSERT(alloc.isArgument()); - return true; + return false; } - bool addValueSlot(uint32_t slot) { - bool result = valueSlots_.append(slot); + bool addValueSlot(bool stack, uint32_t slot) { + bool result = valueSlots_.append(SlotEntry(stack, slot)); if (result) assertInvariants(); return result; @@ -1427,9 +1447,9 @@ class LSafepoint : public TempObject return valueSlots_; } - bool hasValueSlot(uint32_t slot) const { + bool hasValueSlot(bool stack, uint32_t slot) const { for (size_t i = 0; i < valueSlots_.length(); i++) { - if (valueSlots_[i] == slot) + if (valueSlots_[i].stack == stack && valueSlots_[i].slot == slot) return true; } return false; @@ -1494,9 +1514,7 @@ class LSafepoint : public TempObject #ifdef DEBUG bool hasNunboxPayload(LAllocation payload) const { - if (payload.isArgument()) - return true; - if (payload.isStackSlot() && hasValueSlot(payload.toStackSlot()->slot())) + if (payload.isMemory() && hasValueSlot(payload.isStackSlot(), payload.memorySlot())) return true; for (size_t i = 0; i < nunboxParts_.length(); i++) { if (nunboxParts_[i].payload == payload) @@ -1527,25 +1545,15 @@ class LSafepoint : public TempObject addValueRegister(reg); return true; } - if (alloc.isStackSlot()) { - uint32_t slot = alloc.toStackSlot()->slot(); - for (size_t i = 0; i < valueSlots().length(); i++) { - if (valueSlots()[i] == slot) - return true; - } - return addValueSlot(slot); - } - MOZ_ASSERT(alloc.isArgument()); - return true; + if (hasValueSlot(alloc.isStackSlot(), alloc.memorySlot())) + return true; + return addValueSlot(alloc.isStackSlot(), alloc.memorySlot()); } bool hasBoxedValue(LAllocation alloc) const { if (alloc.isRegister()) return valueRegs().has(alloc.toRegister().gpr()); - if (alloc.isStackSlot()) - return hasValueSlot(alloc.toStackSlot()->slot()); - MOZ_ASSERT(alloc.isArgument()); - return true; + return hasValueSlot(alloc.isStackSlot(), alloc.memorySlot()); } #endif // JS_PUNBOX64 diff --git a/js/src/jit/LinearScan.cpp b/js/src/jit/LinearScan.cpp index e5f4b7aaf1e..154cff9242f 100644 --- a/js/src/jit/LinearScan.cpp +++ b/js/src/jit/LinearScan.cpp @@ -484,6 +484,21 @@ LinearScanAllocator::isSpilledAt(LiveInterval *interval, CodePosition pos) bool LinearScanAllocator::populateSafepoints() { + // Populate all safepoints with this/argument slots. These are never changed + // by the allocator and are not necessarily populated by the code below. + size_t nargs = graph.getBlock(0)->mir()->info().nargs(); + for (size_t i = 0; i < graph.numSafepoints(); i++) { + LSafepoint *safepoint = graph.getSafepoint(i)->safepoint(); + + if (!safepoint->addValueSlot(/* stack = */ false, THIS_FRAME_ARGSLOT * sizeof(Value))) + return false; + + for (size_t j = 0; j < nargs; j++) { + if (!safepoint->addValueSlot(/* stack = */ false, (j + 1) * sizeof(Value))) + return false; + } + } + size_t firstSafepoint = 0; for (uint32_t i = 0; i < vregs.numVirtualRegisters(); i++) { @@ -533,7 +548,7 @@ LinearScanAllocator::populateSafepoints() safepoint->addSlotsOrElementsRegister(a->toGeneralReg()->reg()); if (isSpilledAt(interval, inputOf(ins))) { - if (!safepoint->addSlotsOrElementsSlot(reg->canonicalSpillSlot())) + if (!safepoint->addSlotsOrElementsSlot(true, reg->canonicalSpillSlot())) return false; } } else if (!IsNunbox(reg)) { @@ -558,12 +573,12 @@ LinearScanAllocator::populateSafepoints() if (isSpilledAt(interval, inputOf(ins))) { #ifdef JS_PUNBOX64 if (reg->type() == LDefinition::BOX) { - if (!safepoint->addValueSlot(reg->canonicalSpillSlot())) + if (!safepoint->addValueSlot(true, reg->canonicalSpillSlot())) return false; } else #endif { - if (!safepoint->addGcSlot(reg->canonicalSpillSlot())) + if (!safepoint->addGcSlot(true, reg->canonicalSpillSlot())) return false; } } @@ -598,7 +613,7 @@ LinearScanAllocator::populateSafepoints() // contiguously, so simply keep track of the base slot. uint32_t payloadSlot = payload->canonicalSpillSlot(); uint32_t slot = BaseOfNunboxSlot(LDefinition::PAYLOAD, payloadSlot); - if (!safepoint->addValueSlot(slot)) + if (!safepoint->addValueSlot(true, slot)) return false; } diff --git a/js/src/jit/Safepoints.cpp b/js/src/jit/Safepoints.cpp index 7f3e341e000..71ece3d2c09 100644 --- a/js/src/jit/Safepoints.cpp +++ b/js/src/jit/Safepoints.cpp @@ -17,14 +17,15 @@ using namespace jit; using mozilla::FloorLog2; -SafepointWriter::SafepointWriter(uint32_t slotCount) - : frameSlots_(slotCount / sizeof(intptr_t)) +SafepointWriter::SafepointWriter(uint32_t slotCount, uint32_t argumentCount) + : frameSlots_((slotCount / sizeof(intptr_t)) + 1), // Stack slot counts are inclusive. + argumentSlots_(argumentCount / sizeof(intptr_t)) { } bool SafepointWriter::init(TempAllocator &alloc) { - return frameSlots_.init(alloc); + return frameSlots_.init(alloc) && argumentSlots_.init(alloc); } uint32_t @@ -129,26 +130,34 @@ SafepointWriter::writeGcRegs(LSafepoint *safepoint) } static void -MapSlotsToBitset(BitSet &set, CompactBufferWriter &stream, uint32_t nslots, uint32_t *slots) +WriteBitset(const BitSet &set, CompactBufferWriter &stream) { - set.clear(); - - for (uint32_t i = 0; i < nslots; i++) { - // Slots are represented at a distance from |fp|. We divide by the - // pointer size, since we only care about pointer-sized/aligned slots - // here. Since the stack grows down, this means slots start at index 1, - // so we subtract 1 to pack the bitset. - MOZ_ASSERT(slots[i] % sizeof(intptr_t) == 0); - MOZ_ASSERT(slots[i] / sizeof(intptr_t) > 0); - set.insert(slots[i] / sizeof(intptr_t) - 1); - } - size_t count = set.rawLength(); const uint32_t *words = set.raw(); for (size_t i = 0; i < count; i++) stream.writeUnsigned(words[i]); } +static void +MapSlotsToBitset(BitSet &stackSet, BitSet &argumentSet, + CompactBufferWriter &stream, const LSafepoint::SlotList &slots) +{ + stackSet.clear(); + argumentSet.clear(); + + for (uint32_t i = 0; i < slots.length(); i++) { + // Slots are represented at a distance from |fp|. We divide by the + // pointer size, since we only care about pointer-sized/aligned slots + // here. + MOZ_ASSERT(slots[i].slot % sizeof(intptr_t) == 0); + size_t index = slots[i].slot / sizeof(intptr_t); + (slots[i].stack ? stackSet : argumentSet).insert(index); + } + + WriteBitset(stackSet, stream); + WriteBitset(argumentSet, stream); +} + void SafepointWriter::writeGcSlots(LSafepoint *safepoint) { @@ -159,10 +168,7 @@ SafepointWriter::writeGcSlots(LSafepoint *safepoint) JitSpew(JitSpew_Safepoints, " gc slot: %d", slots[i]); #endif - MapSlotsToBitset(frameSlots_, - stream_, - slots.length(), - slots.begin()); + MapSlotsToBitset(frameSlots_, argumentSlots_, stream_, slots); } void @@ -173,10 +179,12 @@ SafepointWriter::writeSlotsOrElementsSlots(LSafepoint *safepoint) stream_.writeUnsigned(slots.length()); for (uint32_t i = 0; i < slots.length(); i++) { + if (!slots[i].stack) + MOZ_CRASH(); #ifdef DEBUG - JitSpew(JitSpew_Safepoints, " slots/elements slot: %d", slots[i]); + JitSpew(JitSpew_Safepoints, " slots/elements slot: %d", slots[i].slot); #endif - stream_.writeUnsigned(slots[i]); + stream_.writeUnsigned(slots[i].slot); } } @@ -190,7 +198,7 @@ SafepointWriter::writeValueSlots(LSafepoint *safepoint) JitSpew(JitSpew_Safepoints, " gc value: %d", slots[i]); #endif - MapSlotsToBitset(frameSlots_, stream_, slots.length(), slots.begin()); + MapSlotsToBitset(frameSlots_, argumentSlots_, stream_, slots); } #if defined(DEBUG) && defined(JS_NUNBOX32) @@ -384,7 +392,8 @@ SafepointWriter::endEntry() SafepointReader::SafepointReader(IonScript *script, const SafepointIndex *si) : stream_(script->safepoints() + si->safepointOffset(), script->safepoints() + script->safepointsSize()), - frameSlots_(script->frameSlots() / sizeof(intptr_t)) + frameSlots_((script->frameSlots() / sizeof(intptr_t)) + 1), // Stack slot counts are inclusive. + argumentSlots_(script->argumentSlots() / sizeof(intptr_t)) { osiCallPointOffset_ = stream_.readUnsigned(); @@ -425,15 +434,23 @@ SafepointReader::advanceFromGcRegs() { currentSlotChunk_ = 0; nextSlotChunkNumber_ = 0; + currentSlotsAreStack_ = true; } bool -SafepointReader::getSlotFromBitmap(uint32_t *slot) +SafepointReader::getSlotFromBitmap(SafepointSlotEntry *entry) { while (currentSlotChunk_ == 0) { // Are there any more chunks to read? - if (nextSlotChunkNumber_ == BitSet::RawLengthForBits(frameSlots_)) + if (currentSlotsAreStack_) { + if (nextSlotChunkNumber_ == BitSet::RawLengthForBits(frameSlots_)) { + nextSlotChunkNumber_ = 0; + currentSlotsAreStack_ = false; + continue; + } + } else if (nextSlotChunkNumber_ == BitSet::RawLengthForBits(argumentSlots_)) { return false; + } // Yes, read the next chunk. currentSlotChunk_ = stream_.readUnsigned(); @@ -445,17 +462,17 @@ SafepointReader::getSlotFromBitmap(uint32_t *slot) uint32_t bit = FloorLog2(currentSlotChunk_); currentSlotChunk_ &= ~(1 << bit); - // Return the slot, taking care to add 1 back in since it was subtracted - // when added in the original bitset, and re-scale it by the pointer size, - // reversing the transformation in MapSlotsToBitset. - *slot = (((nextSlotChunkNumber_ - 1) * BitSet::BitsPerWord) + bit + 1) * sizeof(intptr_t); + // Return the slot, and re-scale it by the pointer size, reversing the + // transformation in MapSlotsToBitset. + entry->stack = currentSlotsAreStack_; + entry->slot = (((nextSlotChunkNumber_ - 1) * BitSet::BitsPerWord) + bit) * sizeof(intptr_t); return true; } bool -SafepointReader::getGcSlot(uint32_t *slot) +SafepointReader::getGcSlot(SafepointSlotEntry *entry) { - if (getSlotFromBitmap(slot)) + if (getSlotFromBitmap(entry)) return true; advanceFromGcSlots(); return false; @@ -467,12 +484,13 @@ SafepointReader::advanceFromGcSlots() // No, reset the counter. currentSlotChunk_ = 0; nextSlotChunkNumber_ = 0; + currentSlotsAreStack_ = true; } bool -SafepointReader::getValueSlot(uint32_t *slot) +SafepointReader::getValueSlot(SafepointSlotEntry *entry) { - if (getSlotFromBitmap(slot)) + if (getSlotFromBitmap(entry)) return true; advanceFromValueSlots(); return false; @@ -531,10 +549,11 @@ SafepointReader::advanceFromNunboxSlots() } bool -SafepointReader::getSlotsOrElementsSlot(uint32_t *slot) +SafepointReader::getSlotsOrElementsSlot(SafepointSlotEntry *entry) { if (!slotsOrElementsSlotsRemaining_--) return false; - *slot = stream_.readUnsigned(); + entry->stack = true; + entry->slot = stream_.readUnsigned(); return true; } diff --git a/js/src/jit/Safepoints.h b/js/src/jit/Safepoints.h index 46a32aa92cd..e0cb4b6275b 100644 --- a/js/src/jit/Safepoints.h +++ b/js/src/jit/Safepoints.h @@ -14,7 +14,9 @@ namespace js { namespace jit { +struct SafepointSlotEntry; struct SafepointNunboxEntry; + class LAllocation; class LSafepoint; @@ -24,9 +26,10 @@ class SafepointWriter { CompactBufferWriter stream_; BitSet frameSlots_; + BitSet argumentSlots_; public: - explicit SafepointWriter(uint32_t slotCount); + explicit SafepointWriter(uint32_t slotCount, uint32_t argumentCount); bool init(TempAllocator &alloc); private: @@ -61,7 +64,9 @@ class SafepointReader { CompactBufferReader stream_; uint32_t frameSlots_; + uint32_t argumentSlots_; uint32_t currentSlotChunk_; + bool currentSlotsAreStack_; uint32_t nextSlotChunkNumber_; uint32_t osiCallPointOffset_; GeneralRegisterSet gcSpills_; @@ -77,7 +82,7 @@ class SafepointReader void advanceFromGcSlots(); void advanceFromValueSlots(); void advanceFromNunboxSlots(); - bool getSlotFromBitmap(uint32_t *slot); + bool getSlotFromBitmap(SafepointSlotEntry *entry); public: SafepointReader(IonScript *script, const SafepointIndex *si); @@ -105,17 +110,17 @@ class SafepointReader uint32_t osiReturnPointOffset() const; // Returns true if a slot was read, false if there are no more slots. - bool getGcSlot(uint32_t *slot); + bool getGcSlot(SafepointSlotEntry *entry); // Returns true if a slot was read, false if there are no more value slots. - bool getValueSlot(uint32_t *slot); + bool getValueSlot(SafepointSlotEntry *entry); // Returns true if a nunbox slot was read, false if there are no more // nunbox slots. bool getNunboxSlot(LAllocation *type, LAllocation *payload); // Returns true if a slot was read, false if there are no more slots. - bool getSlotsOrElementsSlot(uint32_t *slot); + bool getSlotsOrElementsSlot(SafepointSlotEntry *entry); }; } // namespace jit diff --git a/js/src/jit/shared/CodeGenerator-shared.cpp b/js/src/jit/shared/CodeGenerator-shared.cpp index 68647c8984d..90f920f71fa 100644 --- a/js/src/jit/shared/CodeGenerator-shared.cpp +++ b/js/src/jit/shared/CodeGenerator-shared.cpp @@ -52,7 +52,7 @@ CodeGeneratorShared::CodeGeneratorShared(MIRGenerator *gen, LIRGraph *graph, Mac pushedArgs_(0), #endif lastOsiPointOffset_(0), - safepoints_(graph->totalSlotCount()), + safepoints_(graph->totalSlotCount(), (gen->info().nargs() + 1) * sizeof(Value)), nativeToBytecodeMap_(nullptr), nativeToBytecodeMapSize_(0), nativeToBytecodeTableOffset_(0), @@ -269,7 +269,6 @@ ToStackIndex(LAllocation *a) MOZ_ASSERT(a->toStackSlot()->slot() >= 1); return a->toStackSlot()->slot(); } - MOZ_ASSERT(-int32_t(sizeof(JitFrameLayout)) <= a->toArgument()->index()); return -int32_t(sizeof(JitFrameLayout) + a->toArgument()->index()); } @@ -1206,22 +1205,6 @@ CodeGeneratorShared::emitPreBarrier(Address address) masm.patchableCallPreBarrier(address, MIRType_Value); } -void -CodeGeneratorShared::dropArguments(unsigned argc) -{ - pushedArgumentSlots_.shrinkBy(argc); -} - -bool -CodeGeneratorShared::markArgumentSlots(LSafepoint *safepoint) -{ - for (size_t i = 0; i < pushedArgumentSlots_.length(); i++) { - if (!safepoint->addValueSlot(pushedArgumentSlots_[i])) - return false; - } - return true; -} - Label * CodeGeneratorShared::labelForBackedgeWithImplicitCheck(MBasicBlock *mir) { diff --git a/js/src/jit/shared/CodeGenerator-shared.h b/js/src/jit/shared/CodeGenerator-shared.h index a2255d8cf99..afa21bee00b 100644 --- a/js/src/jit/shared/CodeGenerator-shared.h +++ b/js/src/jit/shared/CodeGenerator-shared.h @@ -85,9 +85,6 @@ class CodeGeneratorShared : public LElementVisitor // Vector of information about generated polymorphic inline caches. js::Vector cacheList_; - // List of stack slots that have been pushed as arguments to an MCall. - js::Vector pushedArgumentSlots_; - // Patchable backedges generated for loops. Vector patchableBackedges_; @@ -148,9 +145,6 @@ class CodeGeneratorShared : public LElementVisitor typedef js::Vector SafepointIndices; - bool markArgumentSlots(LSafepoint *safepoint); - void dropArguments(unsigned argc); - protected: #ifdef CHECK_OSIPOINT_REGISTERS // See js_JitOptions.checkOsiPointRegisters. We set this here to avoid From 7947396f6ee5d6434838c41cd64ef043237c0f2c Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Thu, 22 Jan 2015 15:53:09 -0800 Subject: [PATCH 023/106] Bug 1114040 - Handle redirects and errors correctly in session store (r=ttaubert) --- .../sessionstore/ContentRestore.jsm | 4 ++-- .../components/sessionstore/SessionStore.jsm | 23 ++++++------------- .../content/content-sessionStore.js | 4 ---- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/browser/components/sessionstore/ContentRestore.jsm b/browser/components/sessionstore/ContentRestore.jsm index 7df9496fbca..786f28e01da 100644 --- a/browser/components/sessionstore/ContentRestore.jsm +++ b/browser/components/sessionstore/ContentRestore.jsm @@ -422,8 +422,8 @@ ProgressListener.prototype = { }, onStateChange: function(webProgress, request, stateFlags, status) { - if (stateFlags & Ci.nsIWebProgressListener.STATE_STOP && - stateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK && + if (webProgress.isTopLevel && + stateFlags & Ci.nsIWebProgressListener.STATE_STOP && stateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) { this.callback(); } diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm index c61e677cfd1..b30c4a5441b 100644 --- a/browser/components/sessionstore/SessionStore.jsm +++ b/browser/components/sessionstore/SessionStore.jsm @@ -61,13 +61,11 @@ const FMM_MESSAGES = [ // time; if we did it before, the load would overwrite it. "SessionStore:restoreTabContentStarted", - // All network loads for a restoring tab are done, so we should consider - // restoring another tab in the queue. - "SessionStore:restoreTabContentComplete", - - // The document has been restored, so the restore is done. We trigger + // All network loads for a restoring tab are done, so we should + // consider restoring another tab in the queue. The document has + // been restored, and forms have been filled. We trigger // SSTabRestored at this time. - "SessionStore:restoreDocumentComplete", + "SessionStore:restoreTabContentComplete", // A tab that is being restored was reloaded. We call restoreTabContent to // finish restoring it right away. @@ -690,22 +688,15 @@ let SessionStoreInternal = { Services.obs.notifyObservers(browser, NOTIFY_TAB_RESTORED, null); } - if (tab) { - SessionStoreInternal._resetLocalTabRestoringState(tab); - SessionStoreInternal.restoreNextTab(); - } - } - break; - case "SessionStore:restoreDocumentComplete": - if (this.isCurrentEpoch(browser, aMessage.data.epoch)) { - // Document has been restored. Delete all the state associated - // with it and trigger SSTabRestored. let tab = browser.__SS_restore_tab; delete browser.__SS_restore_data; delete browser.__SS_restore_tab; delete browser.__SS_data; + SessionStoreInternal._resetLocalTabRestoringState(tab); + SessionStoreInternal.restoreNextTab(); + this._sendTabRestoredNotification(tab); } break; diff --git a/browser/components/sessionstore/content/content-sessionStore.js b/browser/components/sessionstore/content/content-sessionStore.js index cb85f876676..f8d3df8e0cd 100644 --- a/browser/components/sessionstore/content/content-sessionStore.js +++ b/browser/components/sessionstore/content/content-sessionStore.js @@ -97,9 +97,6 @@ let EventListener = { // Restore the form data and scroll position. gContentRestore.restoreDocument(); - - // Ask SessionStore.jsm to trigger SSTabRestored. - sendAsyncMessage("SessionStore:restoreDocumentComplete", {epoch: epoch}); } }; @@ -152,7 +149,6 @@ let MessageListener = { if (!didStartLoad) { // Pretend that the load succeeded so that event handlers fire correctly. sendAsyncMessage("SessionStore:restoreTabContentComplete", {epoch: epoch}); - sendAsyncMessage("SessionStore:restoreDocumentComplete", {epoch: epoch}); } break; case "SessionStore:resetRestore": From 941ecedead40112eb9c41b0aab7990d2130c6525 Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Thu, 22 Jan 2015 15:53:49 -0800 Subject: [PATCH 024/106] Bug 1124387 - Don't report process hangs when debugger attached or in a DEBUG build (r=jimm) --- browser/app/profile/firefox.js | 7 +++++++ dom/ipc/ProcessHangMonitor.cpp | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index a39795297dc..ba731ce60c9 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1803,7 +1803,14 @@ pref("dom.ipc.cpow.timeout", 500); // Enable e10s hang monitoring (slow script checking and plugin hang // detection). pref("dom.ipc.processHangMonitor", true); + +#ifdef DEBUG +// Don't report hangs in DEBUG builds. They're too slow and often a +// debugger is attached. +pref("dom.ipc.reportProcessHangs", false); +#else pref("dom.ipc.reportProcessHangs", true); +#endif // Disable reader mode by default. pref("reader.parse-on-load.enabled", false); diff --git a/dom/ipc/ProcessHangMonitor.cpp b/dom/ipc/ProcessHangMonitor.cpp index 75a5df9d3cc..ca3a6de1560 100644 --- a/dom/ipc/ProcessHangMonitor.cpp +++ b/dom/ipc/ProcessHangMonitor.cpp @@ -25,6 +25,11 @@ #include "base/task.h" #include "base/thread.h" +#ifdef XP_WIN +// For IsDebuggerPresent() +#include +#endif + using namespace mozilla; using namespace mozilla::dom; @@ -527,6 +532,14 @@ HangMonitorParent::RecvHangEvidence(const HangData& aHangData) return true; } +#ifdef XP_WIN + // Don't report hangs if we're debugging the process. You can comment this + // line out for testing purposes. + if (IsDebuggerPresent()) { + return true; + } +#endif + mHangMonitor->InitiateCPOWTimeout(); MonitorAutoLock lock(mMonitor); From cd28b1de4c703826851d88f3248c10794ff93a2e Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Thu, 22 Jan 2015 15:55:02 -0800 Subject: [PATCH 025/106] Bug 1124129 - Fix warning about content window passed to PrivateBrowsingUtils.isWindowPrivate (r=ehsan) --- .../privatebrowsing/content/aboutPrivateBrowsing.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js index 3da766b7158..eecb9e9556d 100644 --- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js +++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js @@ -9,7 +9,7 @@ Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); var stringBundle = Cc["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService) .createBundle("chrome://browser/locale/aboutPrivateBrowsing.properties"); -if (!PrivateBrowsingUtils.isWindowPrivate(window)) { +if (!PrivateBrowsingUtils.isContentWindowPrivate(window)) { document.title = stringBundle.GetStringFromName("title.normal"); setFavIcon("chrome://global/skin/icons/question-16.png"); } else { @@ -34,7 +34,7 @@ function setFavIcon(url) { } document.addEventListener("DOMContentLoaded", function () { - if (!PrivateBrowsingUtils.isWindowPrivate(window)) { + if (!PrivateBrowsingUtils.isContentWindowPrivate(window)) { document.body.setAttribute("class", "normal"); } From 11f8900c41bb2fb6255c26f3d8ccbac138c8edc4 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 22 Jan 2015 19:13:39 -0500 Subject: [PATCH 026/106] Bug 1123108 follow-up: Fix the Windows only build bustage on a CLOSED TREE --- js/xpconnect/src/XPCWrappedNative.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index 44665eaf30c..83acdce19db 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -966,8 +966,8 @@ XPCWrappedNative::FlatJSObjectFinalized() MOZ_ASSERT(mIdentity, "bad pointer!"); #ifdef XP_WIN // Try to detect free'd pointer - MOZ_ASSERT(*(int*)mIdentity != 0xdddddddd, "bad pointer!"); - MOZ_ASSERT(*(int*)mIdentity != 0, "bad pointer!"); + MOZ_ASSERT(*(int*)mIdentity.get() != 0xdddddddd, "bad pointer!"); + MOZ_ASSERT(*(int*)mIdentity.get() != 0, "bad pointer!"); #endif if (IsWrapperExpired()) { From 1be640797710a09c6f29e6c90732ad947e784443 Mon Sep 17 00:00:00 2001 From: Matthew Gregan Date: Wed, 21 Jan 2015 20:26:00 +1300 Subject: [PATCH 027/106] Bug 1124542 - WebrtcGmpVideoDecoder shouldn't crash when GMP completion callbacks are received. r=rjesup --- media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h index d219a276f9f..494a8bcfbd0 100644 --- a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h +++ b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h @@ -138,15 +138,12 @@ public: } virtual void InputDataExhausted() MOZ_OVERRIDE { - MOZ_CRASH(); } virtual void DrainComplete() MOZ_OVERRIDE { - MOZ_CRASH(); } virtual void ResetComplete() MOZ_OVERRIDE { - MOZ_CRASH(); } virtual void Error(GMPErr aError) MOZ_OVERRIDE { From 4da17a8570057e3c3ce56cafdbbde4820765eb5a Mon Sep 17 00:00:00 2001 From: Jonathan Griffin Date: Fri, 16 Jan 2015 15:38:25 -0800 Subject: [PATCH 028/106] Bug 1121577 - Only toggle security pref during a session, r=AutomatedTester --- testing/marionette/marionette-server.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/testing/marionette/marionette-server.js b/testing/marionette/marionette-server.js index c9642cf436b..bcbe3399cf3 100644 --- a/testing/marionette/marionette-server.js +++ b/testing/marionette/marionette-server.js @@ -25,9 +25,6 @@ loader.loadSubScript("chrome://marionette/content/ChromeUtils.js", utils); loader.loadSubScript("chrome://marionette/content/atoms.js", utils); loader.loadSubScript("chrome://marionette/content/marionette-sendkeys.js", utils); -// SpecialPowers requires insecure automation-only features that we put behind a pref. -Services.prefs.setBoolPref('security.turn_off_all_security_so_that_viruses_can_take_over_this_computer', - true); let specialpowers = {}; loader.loadSubScript("chrome://specialpowers/content/SpecialPowersObserver.js", specialpowers); @@ -56,6 +53,7 @@ loader.loadSubScript("resource://gre/modules/devtools/transport/transport.js"); let bypassOffline = false; let qemu = "0"; let device = null; +const SECURITY_PREF = 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer'; XPCOMUtils.defineLazyServiceGetter(this, "cookieManager", "@mozilla.org/cookiemanager;1", @@ -163,6 +161,7 @@ function MarionetteServerConnection(aPrefix, aTransport, aServer) this.currentFrameElement = null; this.testName = null; this.mozBrowserClose = null; + this.enabled_security_pref = false; this.sandbox = null; this.oopFrameId = null; // frame ID of current remote frame, used for mozbrowserclose events this.sessionCapabilities = { @@ -584,6 +583,16 @@ MarionetteServerConnection.prototype = { this.command_id = this.getCommandId(); this.newSessionCommandId = this.command_id; + // SpecialPowers requires insecure automation-only features that we put behind a pref + let security_pref_value = false; + try { + security_pref_value = Services.prefs.getBoolPref(SECURITY_PREF); + } catch(e) {} + if (!security_pref_value) { + this.enabled_security_pref = true; + Services.prefs.setBoolPref(SECURITY_PREF, true); + } + this.scriptTimeout = 10000; if (aRequest && aRequest.parameters) { this.sessionId = aRequest.parameters.session_id ? aRequest.parameters.session_id : null; From e6b0eec7f3e9683955db8a4f78359629e1b50690 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Thu, 22 Jan 2015 16:53:56 -0800 Subject: [PATCH 029/106] Bug 1122897 patch 1 - Remove quirk that text-decoration propagates to floats and absolutely positioned elements in quirks mode. r=dholbert --- layout/generic/nsTextFrame.cpp | 21 +++++++++---------- layout/reftests/text-decoration/reftest.list | 2 +- ...t-decoration-propagation-1-quirks-ref.html | 8 +++---- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index f6953c6d32d..cec162551c5 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -4908,17 +4908,16 @@ nsTextFrame::GetTextDecorations( break; } - if (compatMode == eCompatibility_NavQuirks) { - // In quirks mode, if we're on an HTML table element, we're done. - if (f->GetContent()->IsHTML(nsGkAtoms::table)) { - break; - } - } else { - // In standards/almost-standards mode, if we're on an - // absolutely-positioned element or a floating element, we're done. - if (f->IsFloating() || f->IsAbsolutelyPositioned()) { - break; - } + // In quirks mode, if we're on an HTML table element, we're done. + if (compatMode == eCompatibility_NavQuirks && + f->GetContent()->IsHTML(nsGkAtoms::table)) { + break; + } + + // If we're on an absolutely-positioned element or a floating + // element, we're done. + if (f->IsFloating() || f->IsAbsolutelyPositioned()) { + break; } } } diff --git a/layout/reftests/text-decoration/reftest.list b/layout/reftests/text-decoration/reftest.list index a737269a2d7..7509470c742 100644 --- a/layout/reftests/text-decoration/reftest.list +++ b/layout/reftests/text-decoration/reftest.list @@ -76,7 +76,7 @@ fuzzy-if(B2G,255,1) == dynamic-underline-vertical-align-standards-2.html dynamic != underline-table-caption-quirks.html underline-table-caption-quirks-notref.html == underline-table-cell-quirks.html underline-table-cell-quirks-ref.html != underline-table-cell-quirks.html underline-table-cell-quirks-notref.html -fails == underline-block-propagation-quirks.html underline-block-propagation-quirks-ref.html # currently too quirky (bug 403524) +== underline-block-propagation-quirks.html underline-block-propagation-quirks-ref.html fails == underline-block-propagation-2-quirks.html underline-block-propagation-2-quirks-ref.html # same problem as previous line (bug 403524) == underline-block-standards.html underline-block-standards-ref.html != underline-block-standards.html underline-block-standards-notref.html diff --git a/layout/reftests/text-decoration/text-decoration-propagation-1-quirks-ref.html b/layout/reftests/text-decoration/text-decoration-propagation-1-quirks-ref.html index c1ccd27b636..fae4ce658a0 100644 --- a/layout/reftests/text-decoration/text-decoration-propagation-1-quirks-ref.html +++ b/layout/reftests/text-decoration/text-decoration-propagation-1-quirks-ref.html @@ -6,14 +6,14 @@
text in block
-
text in float
+
text in float
text in
inline-block
text in
inline-table
-
text in abs-pos
+
text in abs-pos

text-decoration on an inline

@@ -22,13 +22,13 @@
text in block
-
text in float
+
text in float
text in
inline-block
text in
inline-table
-
text in abs-pos
+
text in abs-pos
From 77fa0f17696333187c1f86258a841853ce511503 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Thu, 22 Jan 2015 16:53:56 -0800 Subject: [PATCH 030/106] Bug 1122897 patch 2 - Fix underline-block-propagation-2-quirks.html to reflect table text-decoration quirk, and to have the -moz-appearance rule that the long-passing underline-block-propagation-1* tests have, so that it passes. r=dholbert Note that the style element additions to test and reference are making a change already made in the -standards version, and the other change is reflecting a quirk that is not removed, and that is interoperable. --- layout/reftests/text-decoration/reftest.list | 2 +- .../underline-block-propagation-2-quirks-ref.html | 14 ++++++++++---- .../underline-block-propagation-2-quirks.html | 11 +++++++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/layout/reftests/text-decoration/reftest.list b/layout/reftests/text-decoration/reftest.list index 7509470c742..60227c8c48b 100644 --- a/layout/reftests/text-decoration/reftest.list +++ b/layout/reftests/text-decoration/reftest.list @@ -77,7 +77,7 @@ fuzzy-if(B2G,255,1) == dynamic-underline-vertical-align-standards-2.html dynamic == underline-table-cell-quirks.html underline-table-cell-quirks-ref.html != underline-table-cell-quirks.html underline-table-cell-quirks-notref.html == underline-block-propagation-quirks.html underline-block-propagation-quirks-ref.html -fails == underline-block-propagation-2-quirks.html underline-block-propagation-2-quirks-ref.html # same problem as previous line (bug 403524) +== underline-block-propagation-2-quirks.html underline-block-propagation-2-quirks-ref.html == underline-block-standards.html underline-block-standards-ref.html != underline-block-standards.html underline-block-standards-notref.html == underline-inline-block-standards.html underline-inline-block-standards-ref.html diff --git a/layout/reftests/text-decoration/underline-block-propagation-2-quirks-ref.html b/layout/reftests/text-decoration/underline-block-propagation-2-quirks-ref.html index 786239ed9ac..6f4bc8ecd2a 100644 --- a/layout/reftests/text-decoration/underline-block-propagation-2-quirks-ref.html +++ b/layout/reftests/text-decoration/underline-block-propagation-2-quirks-ref.html @@ -1,5 +1,9 @@ More tests of propagation of text-decoration + @@ -10,16 +14,18 @@ >This text should be struck out.

This text should also be underlined.

- +
- - underlined, overlined, and struck out - + overlined, and struck out +
diff --git a/layout/reftests/text-decoration/underline-block-propagation-2-quirks.html b/layout/reftests/text-decoration/underline-block-propagation-2-quirks.html index 7d1bf7e1c67..7e32b7581f5 100644 --- a/layout/reftests/text-decoration/underline-block-propagation-2-quirks.html +++ b/layout/reftests/text-decoration/underline-block-propagation-2-quirks.html @@ -1,5 +1,9 @@ More tests of propagation of text-decoration + @@ -10,11 +14,14 @@ This text should be underlined.
>This text should be struck out.

This text should also be underlined.

- +
- +
underlined, overlined, and struck outoverlined, and struck out
From 9216c04170685e846e10437415f62f21aaaf8955 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Thu, 22 Jan 2015 16:53:56 -0800 Subject: [PATCH 031/106] Bug 743392 - Serialize background-color at the beginning of the last item of the background shorthand. r=heycam This matches what Chrome and WebKit do for a single-item background shorthand, per discussion on today's CSS teleconference. (At least Chrome has bugs for multiple-items.) The added test fails without the patch and passes with the patch. --- ...wser_ruleview_colorpicker-and-image-tooltip_01.js | 2 +- .../test/browser_ruleview_pseudo-element_01.js | 6 +++--- ...rowser_ruleview_refresh-on-attribute-change_02.js | 6 +++--- layout/style/Declaration.cpp | 11 +++++++---- .../test/chrome/test_author_specified_style.html | 8 ++++---- .../style/test/test_shorthand_property_getters.html | 12 ++++++++++++ 6 files changed, 30 insertions(+), 15 deletions(-) diff --git a/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js b/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js index 0d28704a934..0d30f024663 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js @@ -23,7 +23,7 @@ add_task(function*() { let {toolbox, inspector, view} = yield openRuleView(); let value = getRuleViewProperty(view, "body", "background").valueSpan; - let swatch = value.querySelector(".ruleview-colorswatch"); + let swatch = value.querySelectorAll(".ruleview-colorswatch")[1]; let url = value.querySelector(".theme-link"); yield testImageTooltipAfterColorChange(swatch, url, view); }); diff --git a/browser/devtools/styleinspector/test/browser_ruleview_pseudo-element_01.js b/browser/devtools/styleinspector/test/browser_ruleview_pseudo-element_01.js index 64ae322ff19..6050f76f10a 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_pseudo-element_01.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_pseudo-element_01.js @@ -167,7 +167,7 @@ function* testParagraph(inspector, view) { is ( convertTextPropsToString(elementFirstLineRule.textProps), - "background: none repeat scroll 0% 0% blue", + "background: blue none repeat scroll 0% 0%", "Paragraph first-line properties are correct" ); @@ -191,7 +191,7 @@ function* testParagraph(inspector, view) { is ( convertTextPropsToString(elementSelectionRule.textProps), - "color: white; background: none repeat scroll 0% 0% black", + "color: white; background: black none repeat scroll 0% 0%", "Paragraph first-letter properties are correct" ); } @@ -244,4 +244,4 @@ function assertGutters(view) { is (gutters[2].textContent, "Inherited from body", "Gutter heading is correct"); return gutters; -} \ No newline at end of file +} diff --git a/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_02.js b/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_02.js index 1b9c1311ea4..26017aac438 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_02.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_02.js @@ -96,14 +96,14 @@ function* testPropertyChange5(inspector, ruleView, testElement) { function* testPropertyChange6(inspector, ruleView, testElement) { info("Add an entirely new property again"); - yield changeElementStyle(testElement, "background: url(\"chrome://branding/content/about-logo.png\") repeat scroll 0% 0% red", inspector); + yield changeElementStyle(testElement, "background: red url(\"chrome://branding/content/about-logo.png\") repeat scroll 0% 0%", inspector); let rule = ruleView._elementStyle.rules[0]; is(rule.editor.element.querySelectorAll(".ruleview-property").length, 5, "Added a property"); validateTextProp(rule.textProps[4], true, "background", - "url(\"chrome://branding/content/about-logo.png\") repeat scroll 0% 0% red", + "red url(\"chrome://branding/content/about-logo.png\") repeat scroll 0% 0%", "shortcut property correctly set", - "url(\"chrome://branding/content/about-logo.png\") repeat scroll 0% 0% #F00"); + "#F00 url(\"chrome://branding/content/about-logo.png\") repeat scroll 0% 0%"); } function* changeElementStyle(testElement, style, inspector) { diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index 16fc8794ae6..c004e29539a 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -423,6 +423,13 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue, data->ValueFor(eCSSProperty_background_size)-> GetPairListValue(); for (;;) { + // Serialize background-color at the beginning of the last item. + if (!image->mNext) { + AppendValueToString(eCSSProperty_background_color, aValue, + aSerialization); + aValue.Append(char16_t(' ')); + } + image->mValue.AppendToString(eCSSProperty_background_image, aValue, aSerialization); aValue.Append(char16_t(' ')); @@ -505,10 +512,6 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue, aValue.Append(char16_t(',')); aValue.Append(char16_t(' ')); } - - aValue.Append(char16_t(' ')); - AppendValueToString(eCSSProperty_background_color, aValue, - aSerialization); break; } case eCSSProperty_font: { diff --git a/layout/style/test/chrome/test_author_specified_style.html b/layout/style/test/chrome/test_author_specified_style.html index 06005df2745..034e2f5e405 100644 --- a/layout/style/test/chrome/test_author_specified_style.html +++ b/layout/style/test/chrome/test_author_specified_style.html @@ -20,22 +20,22 @@ var values = [ ]; var properties = [ - // property to test with // fixed prefix to ignore from getAuthoredPropertyValue() + // property to test with // fixed suffix to ignore from getAuthoredPropertyValue() "color", "", "background-color", "", - "background", "none repeat scroll 0% 0% " + "background", " none repeat scroll 0% 0%" ]; function runTest() { var span = document.createElement("span"); for (var j = 0; j < properties.length; j += 2) { var propertyName = properties[j]; - var expectedPrefix = properties[j + 1]; + var expectedSuffix = properties[j + 1]; for (var i = 0; i < values.length; i += 2) { var value = values[i]; var expected = values[i + 1]; span.setAttribute("style", propertyName + ": " + value); - is(span.style.getAuthoredPropertyValue(propertyName), expectedPrefix + expected, "specified " + value); + is(span.style.getAuthoredPropertyValue(propertyName), expected + expectedSuffix, "specified " + value); } } diff --git a/layout/style/test/test_shorthand_property_getters.html b/layout/style/test/test_shorthand_property_getters.html index 19e6965a3de..31c8e33de2d 100644 --- a/layout/style/test/test_shorthand_property_getters.html +++ b/layout/style/test/test_shorthand_property_getters.html @@ -213,6 +213,18 @@ is(e.style.cssText, 'border: medium solid green;', "border DOES reset -moz-border-left-colors"); +// Test that the color goes at the beginning of the last item of the +// background shorthand. +// FIXME: Really the "repeat scroll 0% 0%" shouldn't be there. +e.setAttribute("style", "background: url(foo.png) blue"); +is(e.style.cssText, + "background: blue url(\"foo.png\") repeat scroll 0% 0%;", + "color should be at start of single-item background"); +e.setAttribute("style", "background: url(bar.png), url(foo.png) blue"); +is(e.style.cssText, + "background: url(\"bar.png\") repeat scroll 0% 0%, blue url(\"foo.png\") repeat scroll 0% 0%;", + "color should be at start of single-item background"); + From cff23a3b2b22419ebb779ed6823e50aef9dbfb3c Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 22 Jan 2015 20:00:24 -0500 Subject: [PATCH 032/106] Backed out changeset 8b3815de49f8 (bug 1123654) for talos xperf permafail. CLOSED TREE --- gfx/thebes/gfxGDIFontList.cpp | 20 +++---- layout/reftests/bugs/reftest.list | 4 +- .../reftests/forms/placeholder/reftest.list | 2 +- widget/windows/nsLookAndFeel.cpp | 60 +++++++++++-------- 4 files changed, 47 insertions(+), 39 deletions(-) diff --git a/gfx/thebes/gfxGDIFontList.cpp b/gfx/thebes/gfxGDIFontList.cpp index 6550ba7718a..cce880b4501 100644 --- a/gfx/thebes/gfxGDIFontList.cpp +++ b/gfx/thebes/gfxGDIFontList.cpp @@ -860,22 +860,22 @@ gfxGDIFontList::GetDefaultFont(const gfxFontStyle* aStyle) gfxFontFamily *ff = nullptr; // this really shouldn't fail to find a font.... + HGDIOBJ hGDI = ::GetStockObject(DEFAULT_GUI_FONT); + LOGFONTW logFont; + if (hGDI && ::GetObjectW(hGDI, sizeof(logFont), &logFont)) { + ff = FindFamily(nsDependentString(logFont.lfFaceName)); + if (ff) { + return ff; + } + } + + // ...but just in case, try another approach as well NONCLIENTMETRICSW ncm; ncm.cbSize = sizeof(ncm); BOOL status = ::SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0); if (status) { ff = FindFamily(nsDependentString(ncm.lfMessageFont.lfFaceName)); - if (ff) { - return ff; - } - } - - // ...but just in case, try another (long-deprecated) approach as well - HGDIOBJ hGDI = ::GetStockObject(DEFAULT_GUI_FONT); - LOGFONTW logFont; - if (hGDI && ::GetObjectW(hGDI, sizeof(logFont), &logFont)) { - ff = FindFamily(nsDependentString(logFont.lfFaceName)); } return ff; diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index a3d96a56c94..0063aa16d5f 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -557,9 +557,9 @@ skip-if(B2G) == 363858-1.html 363858-1-ref.html skip-if(B2G) == 363858-2.html 363858-2-ref.html skip-if(B2G) == 363858-3.html 363858-3-ref.html skip-if(B2G) == 363858-4.html 363858-4-ref.html -fuzzy-if(OSX>=1008,45,2) fuzzy-if(winWidget,37,1) == 363858-5a.html 363858-5-ref.html +fuzzy-if(OSX>=1008,45,2) == 363858-5a.html 363858-5-ref.html == 363858-5b.html 363858-5-ref.html -fuzzy-if(OSX>=1008,45,2) fuzzy-if(winWidget,37,1) == 363858-6a.html 363858-6-ref.html +fuzzy-if(OSX>=1008,45,2) == 363858-6a.html 363858-6-ref.html == 363858-6b.html 363858-6-ref.html == 363874.html 363874-ref.html == 363874-max-width.html 363874-max-width-ref.html diff --git a/layout/reftests/forms/placeholder/reftest.list b/layout/reftests/forms/placeholder/reftest.list index b86773c8f81..75100696095 100644 --- a/layout/reftests/forms/placeholder/reftest.list +++ b/layout/reftests/forms/placeholder/reftest.list @@ -16,7 +16,7 @@ == placeholder-3.html placeholder-overridden-ref.html == placeholder-4.html placeholder-overridden-ref.html == placeholder-5.html placeholder-visible-ref.html -fuzzy-if(winWidget,160,7) == placeholder-6.html placeholder-overflow-ref.html +fuzzy-if(winWidget,160,6) == placeholder-6.html placeholder-overflow-ref.html skip-if(B2G) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html # needs-focus == placeholder-7.html placeholder-focus-ref.html # needs-focus == placeholder-8.html placeholder-focus-ref.html diff --git a/widget/windows/nsLookAndFeel.cpp b/widget/windows/nsLookAndFeel.cpp index d56369fdf3b..1b7d7fc7233 100644 --- a/widget/windows/nsLookAndFeel.cpp +++ b/widget/windows/nsLookAndFeel.cpp @@ -535,10 +535,10 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID, LOGFONTW* ptrLogFont = nullptr; LOGFONTW logFont; NONCLIENTMETRICSW ncm; + HGDIOBJ hGDI; char16_t name[LF_FACESIZE]; - bool useShellDlg = false; - // Depending on which stock font we want, there are a couple of + // Depending on which stock font we want, there are three different // places we might have to look it up. switch (anID) { case LookAndFeel::eFont_Icon: @@ -549,7 +549,11 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID, ptrLogFont = &logFont; break; - default: + case LookAndFeel::eFont_Menu: + case LookAndFeel::eFont_MessageBox: + case LookAndFeel::eFont_SmallCaption: + case LookAndFeel::eFont_StatusBar: + case LookAndFeel::eFont_Tooltips: ncm.cbSize = sizeof(NONCLIENTMETRICSW); if (!::SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), (PVOID)&ncm, 0)) @@ -557,11 +561,10 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID, switch (anID) { case LookAndFeel::eFont_Menu: - case LookAndFeel::eFont_PullDownMenu: ptrLogFont = &ncm.lfMenuFont; break; - case LookAndFeel::eFont_Caption: - ptrLogFont = &ncm.lfCaptionFont; + case LookAndFeel::eFont_MessageBox: + ptrLogFont = &ncm.lfMessageFont; break; case LookAndFeel::eFont_SmallCaption: ptrLogFont = &ncm.lfSmCaptionFont; @@ -570,22 +573,30 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID, case LookAndFeel::eFont_Tooltips: ptrLogFont = &ncm.lfStatusFont; break; - case LookAndFeel::eFont_Widget: - case LookAndFeel::eFont_Dialog: - case LookAndFeel::eFont_Button: - // XXX It's not clear to me whether this is exactly the right - // set of LookAndFeel values to map to the dialog font; we may - // want to add or remove cases here after reviewing the visual - // results under various Windows versions. - useShellDlg = true; - // Fall through so that we can get size from lfMessageFont; - // but later we'll use the (virtual) "MS Shell Dlg 2" font name - // instead of the LOGFONT's. - default: - ptrLogFont = &ncm.lfMessageFont; - break; } break; + + case LookAndFeel::eFont_Widget: + case LookAndFeel::eFont_Window: // css3 + case LookAndFeel::eFont_Document: + case LookAndFeel::eFont_Workspace: + case LookAndFeel::eFont_Desktop: + case LookAndFeel::eFont_Info: + case LookAndFeel::eFont_Dialog: + case LookAndFeel::eFont_Button: + case LookAndFeel::eFont_PullDownMenu: + case LookAndFeel::eFont_List: + case LookAndFeel::eFont_Field: + case LookAndFeel::eFont_Caption: + hGDI = ::GetStockObject(DEFAULT_GUI_FONT); + if (!hGDI) + return false; + + if (::GetObjectW(hGDI, sizeof(logFont), &logFont) <= 0) + return false; + + ptrLogFont = &logFont; + break; } // Get scaling factor from physical to logical pixels @@ -638,12 +649,9 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID, aFontStyle.systemFont = true; - if (useShellDlg) { - aFontName = NS_LITERAL_STRING("MS Shell Dlg 2"); - } else { - memcpy(name, ptrLogFont->lfFaceName, LF_FACESIZE*sizeof(char16_t)); - aFontName = name; - } + name[0] = 0; + memcpy(name, ptrLogFont->lfFaceName, LF_FACESIZE*sizeof(char16_t)); + aFontName = name; return true; } From 12353487717a682cdf6e2a44fe0eea2d7d457ee8 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 22 Jan 2015 20:58:36 -0500 Subject: [PATCH 033/106] Backed out changeset b166a3cda8f6 (bug 1121577) for B2G cpptest startup crashes. CLOSED TREE --- testing/marionette/marionette-server.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/testing/marionette/marionette-server.js b/testing/marionette/marionette-server.js index bcbe3399cf3..c9642cf436b 100644 --- a/testing/marionette/marionette-server.js +++ b/testing/marionette/marionette-server.js @@ -25,6 +25,9 @@ loader.loadSubScript("chrome://marionette/content/ChromeUtils.js", utils); loader.loadSubScript("chrome://marionette/content/atoms.js", utils); loader.loadSubScript("chrome://marionette/content/marionette-sendkeys.js", utils); +// SpecialPowers requires insecure automation-only features that we put behind a pref. +Services.prefs.setBoolPref('security.turn_off_all_security_so_that_viruses_can_take_over_this_computer', + true); let specialpowers = {}; loader.loadSubScript("chrome://specialpowers/content/SpecialPowersObserver.js", specialpowers); @@ -53,7 +56,6 @@ loader.loadSubScript("resource://gre/modules/devtools/transport/transport.js"); let bypassOffline = false; let qemu = "0"; let device = null; -const SECURITY_PREF = 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer'; XPCOMUtils.defineLazyServiceGetter(this, "cookieManager", "@mozilla.org/cookiemanager;1", @@ -161,7 +163,6 @@ function MarionetteServerConnection(aPrefix, aTransport, aServer) this.currentFrameElement = null; this.testName = null; this.mozBrowserClose = null; - this.enabled_security_pref = false; this.sandbox = null; this.oopFrameId = null; // frame ID of current remote frame, used for mozbrowserclose events this.sessionCapabilities = { @@ -583,16 +584,6 @@ MarionetteServerConnection.prototype = { this.command_id = this.getCommandId(); this.newSessionCommandId = this.command_id; - // SpecialPowers requires insecure automation-only features that we put behind a pref - let security_pref_value = false; - try { - security_pref_value = Services.prefs.getBoolPref(SECURITY_PREF); - } catch(e) {} - if (!security_pref_value) { - this.enabled_security_pref = true; - Services.prefs.setBoolPref(SECURITY_PREF, true); - } - this.scriptTimeout = 10000; if (aRequest && aRequest.parameters) { this.sessionId = aRequest.parameters.session_id ? aRequest.parameters.session_id : null; From 1ab3944141be146ea3a77183009029cc1fa103f9 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 22 Jan 2015 22:36:21 -0500 Subject: [PATCH 034/106] Bug 1121475. Drop special handling of HTML in the void tag list and the sanitizer whitelist, since there is no HTML tag. r=smaug --- dom/base/FragmentOrElement.cpp | 2 +- dom/base/nsTreeSanitizer.cpp | 1 - .../syntax/serializing-html-fragments/outerHTML.html.ini | 5 ----- 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 testing/web-platform/meta/html/syntax/serializing-html-fragments/outerHTML.html.ini diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp index 06162b0e3ae..de073444108 100644 --- a/dom/base/FragmentOrElement.cpp +++ b/dom/base/FragmentOrElement.cpp @@ -2553,7 +2553,7 @@ IsVoidTag(nsIAtom* aTag) static const nsIAtom* voidElements[] = { nsGkAtoms::area, nsGkAtoms::base, nsGkAtoms::basefont, nsGkAtoms::bgsound, nsGkAtoms::br, nsGkAtoms::col, - nsGkAtoms::command, nsGkAtoms::embed, nsGkAtoms::frame, + nsGkAtoms::embed, nsGkAtoms::frame, nsGkAtoms::hr, nsGkAtoms::img, nsGkAtoms::input, nsGkAtoms::keygen, nsGkAtoms::link, nsGkAtoms::meta, nsGkAtoms::param, nsGkAtoms::source, nsGkAtoms::track, diff --git a/dom/base/nsTreeSanitizer.cpp b/dom/base/nsTreeSanitizer.cpp index ede76e9f654..88f038da099 100644 --- a/dom/base/nsTreeSanitizer.cpp +++ b/dom/base/nsTreeSanitizer.cpp @@ -53,7 +53,6 @@ nsIAtom** const kElementsHTML[] = { &nsGkAtoms::code, &nsGkAtoms::col, &nsGkAtoms::colgroup, - &nsGkAtoms::command, &nsGkAtoms::datalist, &nsGkAtoms::dd, &nsGkAtoms::del, diff --git a/testing/web-platform/meta/html/syntax/serializing-html-fragments/outerHTML.html.ini b/testing/web-platform/meta/html/syntax/serializing-html-fragments/outerHTML.html.ini deleted file mode 100644 index 30e64650581..00000000000 --- a/testing/web-platform/meta/html/syntax/serializing-html-fragments/outerHTML.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[outerHTML.html] - type: testharness - [Node for command] - expected: FAIL - From 52cb29a93d27b00c765b81d3fe54f7ab7de12b71 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 22 Jan 2015 22:36:21 -0500 Subject: [PATCH 035/106] Bug 1121099. Make be an HTMLElement to match my reading of the spec and Chrome. r=sicking --- parser/htmlparser/nsHTMLTagList.h | 2 +- testing/web-platform/meta/html/dom/interfaces.html.ini | 6 ------ .../web-platform/meta/html/semantics/interfaces.html.ini | 3 --- testing/web-platform/tests/html/dom/interfaces.html | 2 +- testing/web-platform/tests/html/semantics/interfaces.js | 2 +- 5 files changed, 3 insertions(+), 12 deletions(-) diff --git a/parser/htmlparser/nsHTMLTagList.h b/parser/htmlparser/nsHTMLTagList.h index 88be0453126..26110979d31 100644 --- a/parser/htmlparser/nsHTMLTagList.h +++ b/parser/htmlparser/nsHTMLTagList.h @@ -46,7 +46,7 @@ HTML_HTMLELEMENT_TAG(aside) HTML_TAG(audio, Audio) HTML_HTMLELEMENT_TAG(b) HTML_TAG(base, Shared) -HTML_TAG(basefont, Span) +HTML_HTMLELEMENT_TAG(basefont) HTML_HTMLELEMENT_TAG(bdo) HTML_TAG(bgsound, Unknown) HTML_HTMLELEMENT_TAG(big) diff --git a/testing/web-platform/meta/html/dom/interfaces.html.ini b/testing/web-platform/meta/html/dom/interfaces.html.ini index 80207c2d49b..13574452fd8 100644 --- a/testing/web-platform/meta/html/dom/interfaces.html.ini +++ b/testing/web-platform/meta/html/dom/interfaces.html.ini @@ -744,12 +744,6 @@ [Stringification of document.createElement("rb")] expected: FAIL - [HTMLUnknownElement must be primary interface of document.createElement("basefont")] - expected: FAIL - - [Stringification of document.createElement("basefont")] - expected: FAIL - [HTMLHtmlElement interface: existence and properties of interface object] expected: FAIL diff --git a/testing/web-platform/meta/html/semantics/interfaces.html.ini b/testing/web-platform/meta/html/semantics/interfaces.html.ini index edd654a6047..e02af87bfdc 100644 --- a/testing/web-platform/meta/html/semantics/interfaces.html.ini +++ b/testing/web-platform/meta/html/semantics/interfaces.html.ini @@ -1,8 +1,5 @@ [interfaces.html] type: testharness - [Interfaces for basefont] - expected: FAIL - [Interfaces for image] expected: FAIL diff --git a/testing/web-platform/tests/html/dom/interfaces.html b/testing/web-platform/tests/html/dom/interfaces.html index 80cb446ce15..c92782923cc 100644 --- a/testing/web-platform/tests/html/dom/interfaces.html +++ b/testing/web-platform/tests/html/dom/interfaces.html @@ -3239,6 +3239,7 @@ window.onload = function() { 'document.createElement("wbr")', 'document.createElement("summary")', 'document.createElement("acronym")', + 'document.createElement("basefont")', ], HTMLUnknownElement: [ 'document.createElement("quasit")', @@ -3248,7 +3249,6 @@ window.onload = function() { 'document.createElement("nextid")', 'document.createElement("rb")', 'document.createElement("spacer")', - 'document.createElement("basefont")', 'document.createElement("directory")', 'document.createElement("mod")', ], diff --git a/testing/web-platform/tests/html/semantics/interfaces.js b/testing/web-platform/tests/html/semantics/interfaces.js index 5f5d2d908fa..8240607e466 100644 --- a/testing/web-platform/tests/html/semantics/interfaces.js +++ b/testing/web-platform/tests/html/semantics/interfaces.js @@ -6,7 +6,7 @@ var elements = [ ["audio", "Audio"], ["b", ""], ["base", "Base"], - ["basefont", "Unknown"], + ["basefont", ""], ["bdo", ""], ["bgsound", "Unknown"], ["big", ""], From c9e32517d00ad7a063c2b0d4280a73cb33bd8839 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 22 Jan 2015 22:36:21 -0500 Subject: [PATCH 036/106] Bug 1122361. Deal with populateUncaughtExceptionReport failing. r=waldo --- js/src/jsexn.cpp | 16 +++++++++++----- js/src/jsfriendapi.h | 7 +++++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/js/src/jsexn.cpp b/js/src/jsexn.cpp index b7afc77d8e5..a22148a6ff0 100644 --- a/js/src/jsexn.cpp +++ b/js/src/jsexn.cpp @@ -854,7 +854,11 @@ ErrorReport::init(JSContext *cx, HandleValue exn) // // but without the reporting bits. Instead it just puts all // the stuff we care about in our ownedReport and message_. - populateUncaughtExceptionReport(cx, message_); + if (!populateUncaughtExceptionReport(cx, message_)) { + // Just give up. We're out of memory or something; not much we can + // do here. + return false; + } } else { /* Flag the error as an exception. */ reportp->flags |= JSREPORT_EXCEPTION; @@ -863,16 +867,17 @@ ErrorReport::init(JSContext *cx, HandleValue exn) return true; } -void +bool ErrorReport::populateUncaughtExceptionReport(JSContext *cx, ...) { va_list ap; va_start(ap, cx); - populateUncaughtExceptionReportVA(cx, ap); + bool ok = populateUncaughtExceptionReportVA(cx, ap); va_end(ap); + return ok; } -void +bool ErrorReport::populateUncaughtExceptionReportVA(JSContext *cx, va_list ap) { new (&ownedReport) JSErrorReport(); @@ -891,12 +896,13 @@ ErrorReport::populateUncaughtExceptionReportVA(JSContext *cx, va_list ap) if (!js_ExpandErrorArguments(cx, js_GetErrorMessage, nullptr, JSMSG_UNCAUGHT_EXCEPTION, &ownedMessage, &ownedReport, ArgumentsAreASCII, ap)) { - return; + return false; } reportp = &ownedReport; message_ = ownedMessage; ownsMessageAndReport = true; + return true; } JSObject * diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h index 5f33604c23e..128a5656bc8 100644 --- a/js/src/jsfriendapi.h +++ b/js/src/jsfriendapi.h @@ -1367,8 +1367,11 @@ struct MOZ_STACK_CLASS JS_FRIEND_API(ErrorReport) // More or less an equivalent of JS_ReportErrorNumber/js_ReportErrorNumberVA // but fills in an ErrorReport instead of reporting it. Uses varargs to // make it simpler to call js_ExpandErrorArguments. - void populateUncaughtExceptionReport(JSContext *cx, ...); - void populateUncaughtExceptionReportVA(JSContext *cx, va_list ap); + // + // Returns false if we fail to actually populate the ErrorReport + // for some reason (probably out of memory). + bool populateUncaughtExceptionReport(JSContext *cx, ...); + bool populateUncaughtExceptionReportVA(JSContext *cx, va_list ap); // We may have a provided JSErrorReport, so need a way to represent that. JSErrorReport *reportp; From 07f200ca261a59c9b80f9ef85f45fb1649c8fe42 Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Fri, 23 Jan 2015 03:41:20 +0000 Subject: [PATCH 037/106] Bug 1097699 - Part 1: Remove usage of LayerManagerD3D9. r=jrmuizel --- widget/windows/moz.build | 2 +- widget/windows/nsToolkit.cpp | 27 ------------ widget/windows/nsToolkit.h | 2 - widget/windows/nsWindow.cpp | 79 +--------------------------------- widget/windows/nsWindow.h | 13 ------ widget/windows/nsWindowGfx.cpp | 21 --------- 6 files changed, 2 insertions(+), 142 deletions(-) diff --git a/widget/windows/moz.build b/widget/windows/moz.build index 88f53ebb892..d0a27313619 100644 --- a/widget/windows/moz.build +++ b/widget/windows/moz.build @@ -101,7 +101,7 @@ LOCAL_INCLUDES += [ DEFINES['MOZ_UNICODE'] = True -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/widget/windows/nsToolkit.cpp b/widget/windows/nsToolkit.cpp index 5a3449be9ee..e40a26e4021 100644 --- a/widget/windows/nsToolkit.cpp +++ b/widget/windows/nsToolkit.cpp @@ -23,16 +23,6 @@ using namespace mozilla::widget; nsToolkit* nsToolkit::gToolkit = nullptr; HINSTANCE nsToolkit::mDllInstance = 0; -static const unsigned long kD3DUsageDelay = 5000; - -static void -StartAllowingD3D9(nsITimer *aTimer, void *aClosure) -{ - if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop) { - nsWindow::StartAllowingD3D9(true); - } -} - MouseTrailer* nsToolkit::gMouseTrailer; //------------------------------------------------------------------------- @@ -49,14 +39,6 @@ nsToolkit::nsToolkit() #endif gMouseTrailer = &mMouseTrailer; - - if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop) { - mD3D9Timer = do_CreateInstance("@mozilla.org/timer;1"); - mD3D9Timer->InitWithFuncCallback(::StartAllowingD3D9, - nullptr, - kD3DUsageDelay, - nsITimer::TYPE_ONE_SHOT); - } } @@ -86,15 +68,6 @@ nsToolkit::Shutdown() gToolkit = nullptr; } -void -nsToolkit::StartAllowingD3D9() -{ - if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop) { - nsToolkit::GetToolkit()->mD3D9Timer->Cancel(); - nsWindow::StartAllowingD3D9(false); - } -} - //------------------------------------------------------------------------- // // Return the nsToolkit for the current thread. If a toolkit does not diff --git a/widget/windows/nsToolkit.h b/widget/windows/nsToolkit.h index 5a983bd5316..2b4f5767c97 100644 --- a/widget/windows/nsToolkit.h +++ b/widget/windows/nsToolkit.h @@ -77,12 +77,10 @@ public: static void Startup(HMODULE hModule); static void Shutdown(); - static void StartAllowingD3D9(); protected: static nsToolkit* gToolkit; - nsCOMPtr mD3D9Timer; MouseTrailer mMouseTrailer; }; diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 258f15acf27..b1f549f211b 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -133,10 +133,6 @@ #include "mozilla/WindowsVersion.h" #include "nsThemeConstants.h" -#ifdef MOZ_ENABLE_D3D9_LAYER -#include "LayerManagerD3D9.h" -#endif - #ifdef MOZ_ENABLE_D3D10_LAYER #include "LayerManagerD3D10.h" #endif @@ -256,9 +252,6 @@ int nsWindow::sTrimOnMinimize = 2; // Default value for general window class (used when the pref is the empty string). const char* nsWindow::sDefaultMainWindowClass = kClassNameGeneral; -// If we're using D3D9, this will not be allowed during initial 5 seconds. -bool nsWindow::sAllowD3D9 = false; - TriStateBool nsWindow::sHasBogusPopupsDropShadowOnMultiMonitor = TRI_UNKNOWN; // Used in OOPP plugin focus processing. @@ -3349,10 +3342,7 @@ nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager, CreateCompositor(); } - if (!mLayerManager || - (!sAllowD3D9 && aPersistence == LAYER_MANAGER_PERSISTENT && - mLayerManager->GetBackendType() == LayersBackend::LAYERS_BASIC && - !ShouldUseOffMainThreadCompositing())) { + if (!mLayerManager) { // If D3D9 is not currently allowed but the permanent manager is required, // -and- we're currently using basic layers, run through this check. LayerManagerPrefs prefs; @@ -3370,14 +3360,6 @@ nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager, mUseLayersAcceleration = true; if (mUseLayersAcceleration) { - if (aPersistence == LAYER_MANAGER_PERSISTENT && !sAllowD3D9) { - MOZ_ASSERT(!mLayerManager || !mLayerManager->IsInTransaction()); - - // This will clear out our existing layer manager if we have one since - // if we hit this with a LayerManager we're always using BasicLayers. - nsToolkit::StartAllowingD3D9(); - } - #ifdef MOZ_ENABLE_D3D10_LAYER if (!prefs.mPreferD3D9 && !prefs.mPreferOpenGL) { nsRefPtr layerManager = @@ -3386,15 +3368,6 @@ nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager, mLayerManager = layerManager; } } -#endif -#ifdef MOZ_ENABLE_D3D9_LAYER - if (!prefs.mPreferOpenGL && !mLayerManager && sAllowD3D9) { - nsRefPtr layerManager = - new LayerManagerD3D9(this); - if (layerManager->Initialize(prefs.mForceAcceleration)) { - mLayerManager = layerManager; - } - } #endif } @@ -6672,56 +6645,6 @@ bool nsWindow::AutoErase(HDC dc) return false; } -void -nsWindow::AllowD3D9Callback(nsWindow *aWindow) -{ - if (aWindow->mLayerManager && !aWindow->ShouldUseOffMainThreadCompositing()) { - aWindow->mLayerManager->Destroy(); - aWindow->mLayerManager = nullptr; - } -} - -void -nsWindow::AllowD3D9WithReinitializeCallback(nsWindow *aWindow) -{ - if (aWindow->mLayerManager && !aWindow->ShouldUseOffMainThreadCompositing()) { - aWindow->mLayerManager->Destroy(); - aWindow->mLayerManager = nullptr; - (void) aWindow->GetLayerManager(); - } -} - -void -nsWindow::StartAllowingD3D9(bool aReinitialize) -{ - sAllowD3D9 = true; - - LayerManagerPrefs prefs; - GetLayerManagerPrefs(&prefs); - if (prefs.mDisableAcceleration) { - // The guarantee here is, if there's *any* chance that after we - // throw out our layer managers we'd create at least one new, - // accelerated one, we *will* throw out all the current layer - // managers. We early-return here because currently, if - // |disableAcceleration|, we will always use basic managers and - // it's a waste to recreate them. If we're using OMTC we don't want to - // recreate out layer manager and its compositor either. This is even - // more wasteful. - // - // NB: the above implies that it's eminently possible for us to - // skip this early return but still recreate basic managers. - // That's OK. It's *not* OK to take this early return when we - // *might* have created an accelerated manager. - return; - } - - if (aReinitialize) { - EnumAllWindows(AllowD3D9WithReinitializeCallback); - } else { - EnumAllWindows(AllowD3D9Callback); - } -} - bool nsWindow::ShouldUseOffMainThreadCompositing() { diff --git a/widget/windows/nsWindow.h b/widget/windows/nsWindow.h index 31c760e7e89..c071cd01c13 100644 --- a/widget/windows/nsWindow.h +++ b/widget/windows/nsWindow.h @@ -238,16 +238,6 @@ public: */ virtual bool AutoErase(HDC dc); - /** - * Start allowing Direct3D9 to be used by widgets when GetLayerManager is - * called. - * - * @param aReinitialize Call GetLayerManager on widgets to ensure D3D9 is - * initialized, this is usually called when this function - * is triggered by timeout and not user/web interaction. - */ - static void StartAllowingD3D9(bool aReinitialize); - /** * AssociateDefaultIMC() associates or disassociates the default IMC for * the window. @@ -314,8 +304,6 @@ protected: static BOOL CALLBACK ClearResourcesCallback(HWND aChild, LPARAM aParam); static BOOL CALLBACK EnumAllChildWindProc(HWND aWnd, LPARAM aParam); static BOOL CALLBACK EnumAllThreadWindowProc(HWND aWnd, LPARAM aParam); - static void AllowD3D9Callback(nsWindow *aWindow); - static void AllowD3D9WithReinitializeCallback(nsWindow *aWindow); /** * Window utilities @@ -498,7 +486,6 @@ protected: static bool sIsInMouseCapture; static int sTrimOnMinimize; static const char* sDefaultMainWindowClass; - static bool sAllowD3D9; // Always use the helper method to read this property. See bug 603793. static TriStateBool sHasBogusPopupsDropShadowOnMultiMonitor; diff --git a/widget/windows/nsWindowGfx.cpp b/widget/windows/nsWindowGfx.cpp index 328fbbebb37..4feff50a789 100644 --- a/widget/windows/nsWindowGfx.cpp +++ b/widget/windows/nsWindowGfx.cpp @@ -44,9 +44,6 @@ using mozilla::plugins::PluginInstanceParent; #include "nsDebug.h" #include "nsIXULRuntime.h" -#ifdef MOZ_ENABLE_D3D9_LAYER -#include "LayerManagerD3D9.h" -#endif #ifdef MOZ_ENABLE_D3D10_LAYER #include "LayerManagerD3D10.h" #endif @@ -521,24 +518,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel) } } break; -#ifdef MOZ_ENABLE_D3D9_LAYER - case LayersBackend::LAYERS_D3D9: - { - nsRefPtr layerManagerD3D9 = - static_cast(GetLayerManager()); - layerManagerD3D9->SetClippingRegion(region); - result = listener->PaintWindow(this, region); - if (layerManagerD3D9->DeviceWasRemoved()) { - mLayerManager->Destroy(); - mLayerManager = nullptr; - // When our device was removed, we should have gfxWindowsPlatform - // check if its render mode is up to date! - gfxWindowsPlatform::GetPlatform()->UpdateRenderMode(); - Invalidate(); - } - } - break; -#endif #ifdef MOZ_ENABLE_D3D10_LAYER case LayersBackend::LAYERS_D3D10: { From dea47282dbbffdd642847e49c01b95f155725f5a Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Fri, 23 Jan 2015 03:41:20 +0000 Subject: [PATCH 038/106] Bug 1097699 - Part 2: Remove LayerManagerD3D9 code. r=jrmuizel --- gfx/layers/d3d9/CanvasLayerD3D9.cpp | 215 -------- gfx/layers/d3d9/CanvasLayerD3D9.h | 69 --- gfx/layers/d3d9/ColorLayerD3D9.cpp | 64 --- gfx/layers/d3d9/ColorLayerD3D9.h | 34 -- gfx/layers/d3d9/ContainerLayerD3D9.cpp | 218 -------- gfx/layers/d3d9/ContainerLayerD3D9.h | 44 -- gfx/layers/d3d9/DeviceManagerD3D9.cpp | 60 --- gfx/layers/d3d9/DeviceManagerD3D9.h | 7 - gfx/layers/d3d9/ImageLayerD3D9.cpp | 561 --------------------- gfx/layers/d3d9/ImageLayerD3D9.h | 54 -- gfx/layers/d3d9/LayerManagerD3D9.cpp | 375 -------------- gfx/layers/d3d9/LayerManagerD3D9.h | 289 ----------- gfx/layers/d3d9/PaintedLayerD3D9.cpp | 656 ------------------------- gfx/layers/d3d9/PaintedLayerD3D9.h | 84 ---- gfx/layers/moz.build | 7 - 15 files changed, 2737 deletions(-) delete mode 100644 gfx/layers/d3d9/CanvasLayerD3D9.cpp delete mode 100644 gfx/layers/d3d9/CanvasLayerD3D9.h delete mode 100644 gfx/layers/d3d9/ColorLayerD3D9.cpp delete mode 100644 gfx/layers/d3d9/ColorLayerD3D9.h delete mode 100644 gfx/layers/d3d9/ContainerLayerD3D9.cpp delete mode 100644 gfx/layers/d3d9/ContainerLayerD3D9.h delete mode 100644 gfx/layers/d3d9/ImageLayerD3D9.cpp delete mode 100644 gfx/layers/d3d9/ImageLayerD3D9.h delete mode 100644 gfx/layers/d3d9/LayerManagerD3D9.cpp delete mode 100644 gfx/layers/d3d9/LayerManagerD3D9.h delete mode 100644 gfx/layers/d3d9/PaintedLayerD3D9.cpp delete mode 100644 gfx/layers/d3d9/PaintedLayerD3D9.h diff --git a/gfx/layers/d3d9/CanvasLayerD3D9.cpp b/gfx/layers/d3d9/CanvasLayerD3D9.cpp deleted file mode 100644 index f8ce2e67df1..00000000000 --- a/gfx/layers/d3d9/CanvasLayerD3D9.cpp +++ /dev/null @@ -1,215 +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 "mozilla/layers/PLayerTransaction.h" - -#include "gfxWindowsSurface.h" -#include "gfxWindowsPlatform.h" -#include "SharedSurface.h" -#include "SharedSurfaceGL.h" -#include "GLContext.h" -#include "CanvasLayerD3D9.h" - -using namespace mozilla::gfx; -using namespace mozilla::gl; - -namespace mozilla { -namespace layers { - -CanvasLayerD3D9::CanvasLayerD3D9(LayerManagerD3D9 *aManager) - : CanvasLayer(aManager, nullptr) - , LayerD3D9(aManager) - , mDataIsPremultiplied(true) - , mOriginPos(gl::OriginPos::TopLeft) - , mHasAlpha(true) -{ - mImplData = static_cast(this); - aManager->deviceManager()->mLayersWithResources.AppendElement(this); -} - -CanvasLayerD3D9::~CanvasLayerD3D9() -{ - if (mD3DManager) { - mD3DManager->deviceManager()->mLayersWithResources.RemoveElement(this); - } -} - -void -CanvasLayerD3D9::Initialize(const Data& aData) -{ - NS_ASSERTION(mDrawTarget == nullptr, "BasicCanvasLayer::Initialize called twice!"); - - if (aData.mDrawTarget) { - mDrawTarget = aData.mDrawTarget; - } else if (aData.mGLContext) { - mGLContext = aData.mGLContext; - NS_ASSERTION(mGLContext->IsOffscreen(), "Canvas GLContext must be offscreen."); - mDataIsPremultiplied = aData.mIsGLAlphaPremult; - mOriginPos = gl::OriginPos::BottomLeft; - } else { - NS_ERROR("CanvasLayer created without mGLContext or mDrawTarget?"); - } - - mBounds.SetRect(0, 0, aData.mSize.width, aData.mSize.height); - - CreateTexture(); -} - -void -CanvasLayerD3D9::UpdateSurface() -{ - if (!IsDirty() && mTexture) - return; - Painted(); - - if (!mTexture) { - CreateTexture(); - - if (!mTexture) { - NS_WARNING("CanvasLayerD3D9::Updated called but no texture present and creation failed!"); - return; - } - } - - // WebGL reads entire surface. - LockTextureRectD3D9 textureLock(mTexture); - if (!textureLock.HasLock()) { - NS_WARNING("Failed to lock CanvasLayer texture."); - return; - } - - D3DLOCKED_RECT rect = textureLock.GetLockRect(); - IntSize boundsSize(mBounds.width, mBounds.height); - RefPtr rectDt = Factory::CreateDrawTargetForData(BackendType::CAIRO, - (uint8_t*)rect.pBits, - boundsSize, - rect.Pitch, - SurfaceFormat::B8G8R8A8); - - if (mGLContext) { - auto screen = mGLContext->Screen(); - MOZ_ASSERT(screen); - - SharedSurface* surf = screen->Front()->Surf(); - if (!surf) - return; - surf->WaitSync(); - - if (!ReadbackSharedSurface(surf, rectDt)) { - NS_WARNING("Failed to readback into texture."); - } - } else { - RefPtr surface = mDrawTarget->Snapshot(); - - Rect drawRect(0, 0, surface->GetSize().width, surface->GetSize().height); - rectDt->DrawSurface(surface, drawRect, drawRect, - DrawSurfaceOptions(), DrawOptions(1.0F, CompositionOp::OP_SOURCE)); - - rectDt->Flush(); - } -} - -Layer* -CanvasLayerD3D9::GetLayer() -{ - return this; -} - -void -CanvasLayerD3D9::RenderLayer() -{ - FirePreTransactionCallback(); - UpdateSurface(); - if (mD3DManager->CompositingDisabled()) { - return; - } - FireDidTransactionCallback(); - - if (!mTexture) - return; - - /* - * We flip the Y axis here, note we can only do this because we are in - * CULL_NONE mode! - */ - ShaderConstantRect quad(0, 0, mBounds.width, mBounds.height); - - const bool needsYFlip = (mOriginPos == gl::OriginPos::BottomLeft); - if (needsYFlip) { - quad.mHeight = (float)-mBounds.height; - quad.mY = (float)mBounds.height; - } - - device()->SetVertexShaderConstantF(CBvLayerQuad, quad, 1); - - SetShaderTransformAndOpacity(); - - if (mHasAlpha) { - mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER, GetMaskLayer()); - } else { - mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBLAYER, GetMaskLayer()); - } - - if (mFilter == GraphicsFilter::FILTER_NEAREST) { - device()->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT); - device()->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT); - } - if (!mDataIsPremultiplied) { - device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); - device()->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, TRUE); - } - device()->SetTexture(0, mTexture); - device()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); - if (!mDataIsPremultiplied) { - device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); - device()->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, FALSE); - } - if (mFilter == GraphicsFilter::FILTER_NEAREST) { - device()->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); - device()->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); - } -} - -void -CanvasLayerD3D9::CleanResources() -{ - if (mD3DManager->deviceManager()->HasDynamicTextures()) { - // In this case we have a texture in POOL_DEFAULT - mTexture = nullptr; - } -} - -void -CanvasLayerD3D9::LayerManagerDestroyed() -{ - mD3DManager->deviceManager()->mLayersWithResources.RemoveElement(this); - mD3DManager = nullptr; -} - -void -CanvasLayerD3D9::CreateTexture() -{ - HRESULT hr; - if (mD3DManager->deviceManager()->HasDynamicTextures()) { - hr = device()->CreateTexture(mBounds.width, mBounds.height, 1, D3DUSAGE_DYNAMIC, - D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, - getter_AddRefs(mTexture), nullptr); - } else { - // D3DPOOL_MANAGED is fine here since we require Dynamic Textures for D3D9Ex - // devices. - hr = device()->CreateTexture(mBounds.width, mBounds.height, 1, 0, - D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, - getter_AddRefs(mTexture), nullptr); - } - if (FAILED(hr)) { - mD3DManager->ReportFailure(NS_LITERAL_CSTRING("CanvasLayerD3D9::CreateTexture() failed"), - hr); - return; - } -} - -} /* namespace layers */ -} /* namespace mozilla */ diff --git a/gfx/layers/d3d9/CanvasLayerD3D9.h b/gfx/layers/d3d9/CanvasLayerD3D9.h deleted file mode 100644 index 3a4234ea043..00000000000 --- a/gfx/layers/d3d9/CanvasLayerD3D9.h +++ /dev/null @@ -1,69 +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_CANVASLAYERD3D9_H -#define GFX_CANVASLAYERD3D9_H - -#include "GLContextTypes.h" -#include "LayerManagerD3D9.h" - -namespace mozilla { -namespace layers { - - -class CanvasLayerD3D9 : - public CanvasLayer, - public LayerD3D9 -{ -public: - CanvasLayerD3D9(LayerManagerD3D9 *aManager); - ~CanvasLayerD3D9(); - - // CanvasLayer implementation - virtual void Initialize(const Data& aData); - - // LayerD3D9 implementation - virtual Layer* GetLayer(); - virtual void RenderLayer(); - virtual void CleanResources(); - virtual void LayerManagerDestroyed(); - - void CreateTexture(); - -protected: - typedef mozilla::gl::GLContext GLContext; - - void UpdateSurface(); - - nsRefPtr mGLContext; - nsRefPtr mTexture; - RefPtr mDrawTarget; - - bool mDataIsPremultiplied; - gl::OriginPos mOriginPos; - bool mHasAlpha; - - nsAutoArrayPtr mCachedTempBlob; - uint32_t mCachedTempBlob_Size; - - uint8_t* GetTempBlob(const uint32_t aSize) - { - if (!mCachedTempBlob || aSize != mCachedTempBlob_Size) { - mCachedTempBlob = new uint8_t[aSize]; - mCachedTempBlob_Size = aSize; - } - - return mCachedTempBlob; - } - - void DiscardTempBlob() - { - mCachedTempBlob = nullptr; - } -}; - -} /* layers */ -} /* mozilla */ -#endif /* GFX_CANVASLAYERD3D9_H */ diff --git a/gfx/layers/d3d9/ColorLayerD3D9.cpp b/gfx/layers/d3d9/ColorLayerD3D9.cpp deleted file mode 100644 index 3f287fed7f8..00000000000 --- a/gfx/layers/d3d9/ColorLayerD3D9.cpp +++ /dev/null @@ -1,64 +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 "ColorLayerD3D9.h" - -namespace mozilla { -namespace layers { - -Layer* -ColorLayerD3D9::GetLayer() -{ - return this; -} - -static void -RenderColorLayerD3D9(ColorLayer* aLayer, LayerManagerD3D9 *aManager) -{ - // XXX we might be able to improve performance by using - // IDirect3DDevice9::Clear - if (aManager->CompositingDisabled()) { - return; - } - - nsIntRect bounds = aLayer->GetBounds(); - - aManager->device()->SetVertexShaderConstantF( - CBvLayerQuad, - ShaderConstantRect(bounds.x, - bounds.y, - bounds.width, - bounds.height), - 1); - - const gfx::Matrix4x4& transform = aLayer->GetEffectiveTransform(); - aManager->device()->SetVertexShaderConstantF(CBmLayerTransform, &transform._11, 4); - - gfxRGBA layerColor(aLayer->GetColor()); - float color[4]; - float opacity = aLayer->GetEffectiveOpacity() * layerColor.a; - // output color is premultiplied, so we need to adjust all channels. - // mColor is not premultiplied. - color[0] = (float)(layerColor.r * opacity); - color[1] = (float)(layerColor.g * opacity); - color[2] = (float)(layerColor.b * opacity); - color[3] = (float)(opacity); - - aManager->device()->SetPixelShaderConstantF(CBvColor, color, 1); - - aManager->SetShaderMode(DeviceManagerD3D9::SOLIDCOLORLAYER, - aLayer->GetMaskLayer()); - - aManager->device()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); -} - -void -ColorLayerD3D9::RenderLayer() -{ - return RenderColorLayerD3D9(this, mD3DManager); -} - -} /* layers */ -} /* mozilla */ diff --git a/gfx/layers/d3d9/ColorLayerD3D9.h b/gfx/layers/d3d9/ColorLayerD3D9.h deleted file mode 100644 index 80b7cf69c6e..00000000000 --- a/gfx/layers/d3d9/ColorLayerD3D9.h +++ /dev/null @@ -1,34 +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_COLORLAYERD3D9_H -#define GFX_COLORLAYERD3D9_H - -#include "LayerManagerD3D9.h" - -namespace mozilla { -namespace layers { - -class ColorLayerD3D9 : public ColorLayer, - public LayerD3D9 -{ -public: - ColorLayerD3D9(LayerManagerD3D9 *aManager) - : ColorLayer(aManager, nullptr) - , LayerD3D9(aManager) - { - mImplData = static_cast(this); - } - - // LayerD3D9 Implementation - virtual Layer* GetLayer(); - - virtual void RenderLayer(); -}; - -} /* layers */ -} /* mozilla */ - -#endif /* GFX_COLORLAYERD3D9_H */ diff --git a/gfx/layers/d3d9/ContainerLayerD3D9.cpp b/gfx/layers/d3d9/ContainerLayerD3D9.cpp deleted file mode 100644 index a9e486ce971..00000000000 --- a/gfx/layers/d3d9/ContainerLayerD3D9.cpp +++ /dev/null @@ -1,218 +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 "ContainerLayerD3D9.h" - -#include "PaintedLayerD3D9.h" -#include "ReadbackProcessor.h" - -using namespace mozilla::gfx; - -namespace mozilla { -namespace layers { - -ContainerLayerD3D9::ContainerLayerD3D9(LayerManagerD3D9 *aManager) - : ContainerLayer(aManager, nullptr) - , LayerD3D9(aManager) -{ - mImplData = static_cast(this); -} - -ContainerLayerD3D9::~ContainerLayerD3D9() -{ - while (mFirstChild) { - RemoveChild(mFirstChild); - } -} - -Layer* -ContainerLayerD3D9::GetLayer() -{ - return this; -} - -LayerD3D9* -ContainerLayerD3D9::GetFirstChildD3D9() -{ - if (!mFirstChild) { - return nullptr; - } - return static_cast(mFirstChild->ImplData()); -} - -void -ContainerLayerD3D9::RenderLayer() -{ - nsRefPtr previousRenderTarget; - nsRefPtr renderTexture; - float previousRenderTargetOffset[4]; - float renderTargetOffset[] = { 0, 0, 0, 0 }; - float oldViewMatrix[4][4]; - - RECT containerD3D9ClipRect; - device()->GetScissorRect(&containerD3D9ClipRect); - // Convert scissor to an nsIntRect. RECT's are exclusive on the bottom and - // right values. - nsIntRect oldScissor(containerD3D9ClipRect.left, - containerD3D9ClipRect.top, - containerD3D9ClipRect.right - containerD3D9ClipRect.left, - containerD3D9ClipRect.bottom - containerD3D9ClipRect.top); - - ReadbackProcessor readback; - readback.BuildUpdates(this); - - nsIntRect visibleRect = GetEffectiveVisibleRegion().GetBounds(); - bool useIntermediate = UseIntermediateSurface(); - - mSupportsComponentAlphaChildren = false; - if (useIntermediate) { - nsRefPtr renderSurface; - if (!mD3DManager->CompositingDisabled()) { - device()->GetRenderTarget(0, getter_AddRefs(previousRenderTarget)); - HRESULT hr = device()->CreateTexture(visibleRect.width, visibleRect.height, 1, - D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, - D3DPOOL_DEFAULT, getter_AddRefs(renderTexture), - nullptr); - if (FAILED(hr)) { - ReportFailure(NS_LITERAL_CSTRING("ContainerLayerD3D9::ContainerRender(): Failed to create texture"), - hr); - return; - } - - nsRefPtr renderSurface; - renderTexture->GetSurfaceLevel(0, getter_AddRefs(renderSurface)); - device()->SetRenderTarget(0, renderSurface); - } - - if (mVisibleRegion.GetNumRects() == 1 && - (GetContentFlags() & CONTENT_OPAQUE)) { - // don't need a background, we're going to paint all opaque stuff - mSupportsComponentAlphaChildren = true; - } else { - Matrix4x4 transform3D = GetEffectiveTransform(); - Matrix transform; - // If we have an opaque ancestor layer, then we can be sure that - // all the pixels we draw into are either opaque already or will be - // covered by something opaque. Otherwise copying up the background is - // not safe. - HRESULT hr = E_FAIL; - if (HasOpaqueAncestorLayer(this) && - transform3D.Is2D(&transform) && !ThebesMatrix(transform).HasNonIntegerTranslation()) { - // Copy background up from below - RECT dest = { 0, 0, visibleRect.width, visibleRect.height }; - RECT src = dest; - ::OffsetRect(&src, - visibleRect.x + int32_t(transform._31), - visibleRect.y + int32_t(transform._32)); - if (!mD3DManager->CompositingDisabled()) { - hr = device()-> - StretchRect(previousRenderTarget, &src, renderSurface, &dest, D3DTEXF_NONE); - } - } - if (hr == S_OK) { - mSupportsComponentAlphaChildren = true; - } else if (!mD3DManager->CompositingDisabled()) { - device()-> - Clear(0, 0, D3DCLEAR_TARGET, D3DCOLOR_RGBA(0, 0, 0, 0), 0, 0); - } - } - - device()-> - GetVertexShaderConstantF(CBvRenderTargetOffset, previousRenderTargetOffset, 1); - renderTargetOffset[0] = (float)visibleRect.x; - renderTargetOffset[1] = (float)visibleRect.y; - device()-> - SetVertexShaderConstantF(CBvRenderTargetOffset, renderTargetOffset, 1); - - gfx3DMatrix viewMatrix; - /* - * Matrix to transform to viewport space ( <-1.0, 1.0> topleft, - * <1.0, -1.0> bottomright) - */ - viewMatrix._11 = 2.0f / visibleRect.width; - viewMatrix._22 = -2.0f / visibleRect.height; - viewMatrix._41 = -1.0f; - viewMatrix._42 = 1.0f; - - device()-> - GetVertexShaderConstantF(CBmProjection, &oldViewMatrix[0][0], 4); - device()-> - SetVertexShaderConstantF(CBmProjection, &viewMatrix._11, 4); - } else { - mSupportsComponentAlphaChildren = - (GetContentFlags() & CONTENT_OPAQUE) || - (mParent && - mParent->SupportsComponentAlphaChildren()); - } - - nsAutoTArray children; - SortChildrenBy3DZOrder(children); - - /* - * Render this container's contents. - */ - for (uint32_t i = 0; i < children.Length(); i++) { - LayerD3D9* layerToRender = static_cast(children.ElementAt(i)->ImplData()); - - if (layerToRender->GetLayer()->GetEffectiveVisibleRegion().IsEmpty()) { - continue; - } - - nsIntRect scissorRect = - RenderTargetPixel::ToUntyped(layerToRender->GetLayer()->CalculateScissorRect(RenderTargetPixel::FromUntyped(oldScissor))); - if (scissorRect.IsEmpty()) { - continue; - } - - RECT d3drect; - d3drect.left = scissorRect.x; - d3drect.top = scissorRect.y; - d3drect.right = scissorRect.x + scissorRect.width; - d3drect.bottom = scissorRect.y + scissorRect.height; - device()->SetScissorRect(&d3drect); - - if (layerToRender->GetLayer()->GetType() == TYPE_PAINTED) { - static_cast(layerToRender)->RenderPaintedLayer(&readback); - } else { - layerToRender->RenderLayer(); - } - } - - if (useIntermediate && !mD3DManager->CompositingDisabled()) { - device()->SetRenderTarget(0, previousRenderTarget); - device()->SetVertexShaderConstantF(CBvRenderTargetOffset, previousRenderTargetOffset, 1); - device()->SetVertexShaderConstantF(CBmProjection, &oldViewMatrix[0][0], 4); - - device()->SetVertexShaderConstantF(CBvLayerQuad, - ShaderConstantRect(visibleRect.x, - visibleRect.y, - visibleRect.width, - visibleRect.height), - 1); - - SetShaderTransformAndOpacity(); - mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER, - GetMaskLayer(), - GetTransform().CanDraw2D()); - - device()->SetTexture(0, renderTexture); - device()->SetScissorRect(&containerD3D9ClipRect); - device()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); - } else { - device()->SetScissorRect(&containerD3D9ClipRect); - } -} - -void -ContainerLayerD3D9::LayerManagerDestroyed() -{ - while (mFirstChild) { - GetFirstChildD3D9()->LayerManagerDestroyed(); - RemoveChild(mFirstChild); - } -} - -} /* layers */ -} /* mozilla */ diff --git a/gfx/layers/d3d9/ContainerLayerD3D9.h b/gfx/layers/d3d9/ContainerLayerD3D9.h deleted file mode 100644 index bd8519f6c95..00000000000 --- a/gfx/layers/d3d9/ContainerLayerD3D9.h +++ /dev/null @@ -1,44 +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_CONTAINERLAYERD3D9_H -#define GFX_CONTAINERLAYERD3D9_H - -#include "Layers.h" -#include "LayerManagerD3D9.h" - -namespace mozilla { -namespace layers { - -class ContainerLayerD3D9 : public ContainerLayer, - public LayerD3D9 -{ -public: - ContainerLayerD3D9(LayerManagerD3D9 *aManager); - ~ContainerLayerD3D9(); - - nsIntRect GetVisibleRect() { return mVisibleRegion.GetBounds(); } - - /* LayerD3D9 implementation */ - Layer* GetLayer(); - - LayerD3D9* GetFirstChildD3D9(); - - bool IsEmpty(); - - void RenderLayer(); - - virtual void LayerManagerDestroyed(); - - virtual void ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface) - { - DefaultComputeEffectiveTransforms(aTransformToSurface); - } -}; - -} /* layers */ -} /* mozilla */ - -#endif /* GFX_CONTAINERLAYERD3D9_H */ diff --git a/gfx/layers/d3d9/DeviceManagerD3D9.cpp b/gfx/layers/d3d9/DeviceManagerD3D9.cpp index d7de95f7093..2581c8eb691 100644 --- a/gfx/layers/d3d9/DeviceManagerD3D9.cpp +++ b/gfx/layers/d3d9/DeviceManagerD3D9.cpp @@ -5,7 +5,6 @@ #include "DeviceManagerD3D9.h" #include "LayerManagerD3D9Shaders.h" -#include "PaintedLayerD3D9.h" #include "nsIServiceManager.h" #include "nsIConsoleService.h" #include "nsPrintfCString.h" @@ -557,42 +556,6 @@ DeviceManagerD3D9::CreateSwapChain(HWND hWnd) return swapChain.forget(); } -/* - * Finds a texture for the mask layer and sets it as an - * input to the shaders. - * Returns true if a texture is loaded, false if - * a texture for the mask layer could not be loaded. - */ -bool -LoadMaskTexture(Layer* aMask, IDirect3DDevice9* aDevice, - uint32_t aMaskTexRegister) -{ - IntSize size; - nsRefPtr texture = - static_cast(aMask->ImplData())->GetAsTexture(&size); - - if (!texture) { - return false; - } - - Matrix maskTransform; - Matrix4x4 effectiveTransform = aMask->GetEffectiveTransform(); - bool maskIs2D = effectiveTransform.CanDraw2D(&maskTransform); - NS_ASSERTION(maskIs2D, "How did we end up with a 3D transform here?!"); - Rect bounds = Rect(Point(), Size(size)); - bounds = maskTransform.TransformBounds(bounds); - - aDevice->SetVertexShaderConstantF(DeviceManagerD3D9::sMaskQuadRegister, - ShaderConstantRect((float)bounds.x, - (float)bounds.y, - (float)bounds.width, - (float)bounds.height), - 1); - - aDevice->SetTexture(aMaskTexRegister, texture); - return true; -} - uint32_t DeviceManagerD3D9::SetShaderMode(ShaderMode aMode, MaskType aMaskType) { @@ -667,25 +630,6 @@ DeviceManagerD3D9::SetShaderMode(ShaderMode aMode, MaskType aMaskType) return maskTexRegister; } -void -DeviceManagerD3D9::SetShaderMode(ShaderMode aMode, Layer* aMask, bool aIs2D) -{ - MaskType maskType = MaskType::MaskNone; - if (aMask) { - maskType = aIs2D ? MaskType::Mask2d : MaskType::Mask3d; - } - uint32_t maskTexRegister = SetShaderMode(aMode, maskType); - if (aMask) { - // register allocations are taken from LayerManagerD3D9Shaders.h after - // the shaders are compiled (genshaders.sh) - if (!LoadMaskTexture(aMask, mDevice, maskTexRegister)) { - // if we can't load the mask, fall back to unmasked rendering - NS_WARNING("Could not load texture for mask layer."); - SetShaderMode(aMode, MaskType::MaskNone); - } - } -} - void DeviceManagerD3D9::DestroyDevice() { @@ -718,10 +662,6 @@ DeviceManagerD3D9::VerifyReadyForRendering() return DeviceOK; } - // We need to release all texture resources and swap chains before resetting. - for (unsigned int i = 0; i < mLayersWithResources.Length(); i++) { - mLayersWithResources[i]->CleanResources(); - } ReleaseTextureResources(); for (unsigned int i = 0; i < mSwapChains.Length(); i++) { mSwapChains[i]->Reset(); diff --git a/gfx/layers/d3d9/DeviceManagerD3D9.h b/gfx/layers/d3d9/DeviceManagerD3D9.h index d841fe6338b..835ecf70aea 100644 --- a/gfx/layers/d3d9/DeviceManagerD3D9.h +++ b/gfx/layers/d3d9/DeviceManagerD3D9.h @@ -171,7 +171,6 @@ public: SOLIDCOLORLAYER }; - void SetShaderMode(ShaderMode aMode, Layer* aMask, bool aIs2D); // returns the register to be used for the mask texture, if appropriate uint32_t SetShaderMode(ShaderMode aMode, MaskType aMaskType); @@ -187,12 +186,6 @@ public: uint32_t GetDeviceResetCount() { return mDeviceResetCount; } - /** - * We keep a list of all layers here that may have hardware resource allocated - * so we can clean their resources on reset. - */ - nsTArray mLayersWithResources; - int32_t GetMaxTextureSize() { return mMaxTextureSize; } // Removes aHost from our list of texture hosts if it is the head. diff --git a/gfx/layers/d3d9/ImageLayerD3D9.cpp b/gfx/layers/d3d9/ImageLayerD3D9.cpp deleted file mode 100644 index b4b705046cb..00000000000 --- a/gfx/layers/d3d9/ImageLayerD3D9.cpp +++ /dev/null @@ -1,561 +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 "mozilla/gfx/2D.h" -#include "mozilla/gfx/Point.h" -#include "mozilla/RefPtr.h" -#include "mozilla/layers/PLayerTransaction.h" -#include "gfxSharedImageSurface.h" - -#include "ImageLayerD3D9.h" -#include "PaintedLayerD3D9.h" -#include "gfxPlatform.h" -#include "gfx2DGlue.h" -#include "yuv_convert.h" -#include "nsIServiceManager.h" -#include "nsIConsoleService.h" -#include "Nv3DVUtils.h" -#include "D3D9SurfaceImage.h" - -namespace mozilla { -namespace layers { - -using namespace mozilla::gfx; - -static inline _D3DFORMAT -D3dFormatForSurfaceFormat(SurfaceFormat aFormat) -{ - if (aFormat == SurfaceFormat::A8) { - return D3DFMT_A8; - } - - return D3DFMT_A8R8G8B8; -} - -static already_AddRefed -DataToTexture(IDirect3DDevice9 *aDevice, - unsigned char *aData, - int aStride, - const IntSize &aSize, - _D3DFORMAT aFormat) -{ - nsRefPtr texture; - nsRefPtr deviceEx; - aDevice->QueryInterface(IID_IDirect3DDevice9Ex, - (void**)getter_AddRefs(deviceEx)); - - nsRefPtr surface; - D3DLOCKED_RECT lockedRect; - if (deviceEx) { - // D3D9Ex doesn't support managed textures. We could use dynamic textures - // here but since Images are immutable that probably isn't such a great - // idea. - if (FAILED(aDevice-> - CreateTexture(aSize.width, aSize.height, - 1, 0, aFormat, D3DPOOL_DEFAULT, - getter_AddRefs(texture), nullptr))) - { - return nullptr; - } - - nsRefPtr tmpTexture; - if (FAILED(aDevice-> - CreateTexture(aSize.width, aSize.height, - 1, 0, aFormat, D3DPOOL_SYSTEMMEM, - getter_AddRefs(tmpTexture), nullptr))) - { - return nullptr; - } - - tmpTexture->GetSurfaceLevel(0, getter_AddRefs(surface)); - surface->LockRect(&lockedRect, nullptr, 0); - NS_ASSERTION(lockedRect.pBits, "Could not lock surface"); - } else { - if (FAILED(aDevice-> - CreateTexture(aSize.width, aSize.height, - 1, 0, aFormat, D3DPOOL_MANAGED, - getter_AddRefs(texture), nullptr))) - { - return nullptr; - } - - /* lock the entire texture */ - texture->LockRect(0, &lockedRect, nullptr, 0); - } - - uint32_t width = aSize.width; - if (aFormat == D3DFMT_A8R8G8B8) { - width *= 4; - } - for (int y = 0; y < aSize.height; y++) { - memcpy((char*)lockedRect.pBits + lockedRect.Pitch * y, - aData + aStride * y, - width); - } - - if (deviceEx) { - surface->UnlockRect(); - nsRefPtr dstSurface; - texture->GetSurfaceLevel(0, getter_AddRefs(dstSurface)); - aDevice->UpdateSurface(surface, nullptr, dstSurface, nullptr); - } else { - texture->UnlockRect(0); - } - - return texture.forget(); -} - -static already_AddRefed -OpenSharedTexture(const D3DSURFACE_DESC& aDesc, - HANDLE aShareHandle, - IDirect3DDevice9 *aDevice) -{ - MOZ_ASSERT(aDesc.Format == D3DFMT_X8R8G8B8); - - // Open the frame from DXVA's device in our device using the resource - // sharing handle. - nsRefPtr sharedTexture; - HRESULT hr = aDevice->CreateTexture(aDesc.Width, - aDesc.Height, - 1, - D3DUSAGE_RENDERTARGET, - D3DFMT_X8R8G8B8, - D3DPOOL_DEFAULT, - getter_AddRefs(sharedTexture), - &aShareHandle); - if (FAILED(hr)) { - NS_WARNING("Failed to open shared texture on our device"); - } - return sharedTexture.forget(); -} - -static already_AddRefed -SurfaceToTexture(IDirect3DDevice9 *aDevice, - SourceSurface *aSurface, - const IntSize &aSize) -{ - RefPtr dataSurface = aSurface->GetDataSurface(); - if (!dataSurface) { - return nullptr; - } - DataSourceSurface::MappedSurface map; - if (!dataSurface->Map(DataSourceSurface::MapType::READ, &map)) { - return nullptr; - } - nsRefPtr texture = - DataToTexture(aDevice, map.mData, map.mStride, aSize, - D3dFormatForSurfaceFormat(dataSurface->GetFormat())); - dataSurface->Unmap(); - return texture.forget(); -} - -static void AllocateTexturesYCbCr(PlanarYCbCrImage *aImage, - IDirect3DDevice9 *aDevice, - LayerManagerD3D9 *aManager) -{ - nsAutoPtr backendData( - new PlanarYCbCrD3D9BackendData); - - const PlanarYCbCrData *data = aImage->GetData(); - - D3DLOCKED_RECT lockrectY; - D3DLOCKED_RECT lockrectCb; - D3DLOCKED_RECT lockrectCr; - uint8_t* src; - uint8_t* dest; - - nsRefPtr tmpSurfaceY; - nsRefPtr tmpSurfaceCb; - nsRefPtr tmpSurfaceCr; - - nsRefPtr deviceEx; - aDevice->QueryInterface(IID_IDirect3DDevice9Ex, - getter_AddRefs(deviceEx)); - - bool isD3D9Ex = deviceEx; - - if (isD3D9Ex) { - nsRefPtr tmpYTexture; - nsRefPtr tmpCbTexture; - nsRefPtr tmpCrTexture; - // D3D9Ex does not support the managed pool, could use dynamic textures - // here. But since an Image is immutable static textures are probably a - // better idea. - - HRESULT hr; - hr = aDevice->CreateTexture(data->mYSize.width, data->mYSize.height, - 1, 0, D3DFMT_A8, D3DPOOL_DEFAULT, - getter_AddRefs(backendData->mYTexture), nullptr); - if (!FAILED(hr)) { - hr = aDevice->CreateTexture(data->mCbCrSize.width, data->mCbCrSize.height, - 1, 0, D3DFMT_A8, D3DPOOL_DEFAULT, - getter_AddRefs(backendData->mCbTexture), nullptr); - } - if (!FAILED(hr)) { - hr = aDevice->CreateTexture(data->mCbCrSize.width, data->mCbCrSize.height, - 1, 0, D3DFMT_A8, D3DPOOL_DEFAULT, - getter_AddRefs(backendData->mCrTexture), nullptr); - } - if (!FAILED(hr)) { - hr = aDevice->CreateTexture(data->mYSize.width, data->mYSize.height, - 1, 0, D3DFMT_A8, D3DPOOL_SYSTEMMEM, - getter_AddRefs(tmpYTexture), nullptr); - } - if (!FAILED(hr)) { - hr = aDevice->CreateTexture(data->mCbCrSize.width, data->mCbCrSize.height, - 1, 0, D3DFMT_A8, D3DPOOL_SYSTEMMEM, - getter_AddRefs(tmpCbTexture), nullptr); - } - if (!FAILED(hr)) { - hr = aDevice->CreateTexture(data->mCbCrSize.width, data->mCbCrSize.height, - 1, 0, D3DFMT_A8, D3DPOOL_SYSTEMMEM, - getter_AddRefs(tmpCrTexture), nullptr); - } - - if (FAILED(hr)) { - aManager->ReportFailure(NS_LITERAL_CSTRING("PlanarYCbCrImageD3D9::AllocateTextures(): Failed to create texture (isD3D9Ex)"), - hr); - return; - } - - tmpYTexture->GetSurfaceLevel(0, getter_AddRefs(tmpSurfaceY)); - tmpCbTexture->GetSurfaceLevel(0, getter_AddRefs(tmpSurfaceCb)); - tmpCrTexture->GetSurfaceLevel(0, getter_AddRefs(tmpSurfaceCr)); - tmpSurfaceY->LockRect(&lockrectY, nullptr, 0); - tmpSurfaceCb->LockRect(&lockrectCb, nullptr, 0); - tmpSurfaceCr->LockRect(&lockrectCr, nullptr, 0); - } else { - HRESULT hr; - hr = aDevice->CreateTexture(data->mYSize.width, data->mYSize.height, - 1, 0, D3DFMT_A8, D3DPOOL_MANAGED, - getter_AddRefs(backendData->mYTexture), nullptr); - if (!FAILED(hr)) { - aDevice->CreateTexture(data->mCbCrSize.width, data->mCbCrSize.height, - 1, 0, D3DFMT_A8, D3DPOOL_MANAGED, - getter_AddRefs(backendData->mCbTexture), nullptr); - } - if (!FAILED(hr)) { - aDevice->CreateTexture(data->mCbCrSize.width, data->mCbCrSize.height, - 1, 0, D3DFMT_A8, D3DPOOL_MANAGED, - getter_AddRefs(backendData->mCrTexture), nullptr); - } - - if (FAILED(hr)) { - aManager->ReportFailure(NS_LITERAL_CSTRING("PlanarYCbCrImageD3D9::AllocateTextures(): Failed to create texture (!isD3D9Ex)"), - hr); - return; - } - - /* lock the entire texture */ - backendData->mYTexture->LockRect(0, &lockrectY, nullptr, 0); - backendData->mCbTexture->LockRect(0, &lockrectCb, nullptr, 0); - backendData->mCrTexture->LockRect(0, &lockrectCr, nullptr, 0); - } - - src = data->mYChannel; - //FIX cast - dest = (uint8_t*)lockrectY.pBits; - - // copy over data - for (int h=0; hmYSize.height; h++) { - memcpy(dest, src, data->mYSize.width); - dest += lockrectY.Pitch; - src += data->mYStride; - } - - src = data->mCbChannel; - //FIX cast - dest = (uint8_t*)lockrectCb.pBits; - - // copy over data - for (int h=0; hmCbCrSize.height; h++) { - memcpy(dest, src, data->mCbCrSize.width); - dest += lockrectCb.Pitch; - src += data->mCbCrStride; - } - - src = data->mCrChannel; - //FIX cast - dest = (uint8_t*)lockrectCr.pBits; - - // copy over data - for (int h=0; hmCbCrSize.height; h++) { - memcpy(dest, src, data->mCbCrSize.width); - dest += lockrectCr.Pitch; - src += data->mCbCrStride; - } - - if (isD3D9Ex) { - tmpSurfaceY->UnlockRect(); - tmpSurfaceCb->UnlockRect(); - tmpSurfaceCr->UnlockRect(); - nsRefPtr dstSurface; - backendData->mYTexture->GetSurfaceLevel(0, getter_AddRefs(dstSurface)); - aDevice->UpdateSurface(tmpSurfaceY, nullptr, dstSurface, nullptr); - backendData->mCbTexture->GetSurfaceLevel(0, getter_AddRefs(dstSurface)); - aDevice->UpdateSurface(tmpSurfaceCb, nullptr, dstSurface, nullptr); - backendData->mCrTexture->GetSurfaceLevel(0, getter_AddRefs(dstSurface)); - aDevice->UpdateSurface(tmpSurfaceCr, nullptr, dstSurface, nullptr); - } else { - backendData->mYTexture->UnlockRect(0); - backendData->mCbTexture->UnlockRect(0); - backendData->mCrTexture->UnlockRect(0); - } - - aImage->SetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D9, backendData.forget()); -} - -Layer* -ImageLayerD3D9::GetLayer() -{ - return this; -} - -/* - * Returns a texture which backs aImage - * Will only work if aImage is a cairo image. - * Returns nullptr if unsuccessful. - * If successful, aHasAlpha will be set to true if the texture has an - * alpha component, false otherwise. - */ -IDirect3DTexture9* -ImageLayerD3D9::GetTexture(Image *aImage, bool& aHasAlpha) -{ - NS_ASSERTION(aImage, "Null image."); - - if (aImage->GetFormat() == ImageFormat::CAIRO_SURFACE) { - CairoImage *cairoImage = - static_cast(aImage); - - RefPtr surf = cairoImage->GetAsSourceSurface(); - if (!surf) { - return nullptr; - } - - if (!aImage->GetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D9)) { - nsAutoPtr dat(new TextureD3D9BackendData()); - dat->mTexture = SurfaceToTexture(device(), surf, cairoImage->GetSize()); - if (dat->mTexture) { - aImage->SetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D9, dat.forget()); - } - } - - aHasAlpha = surf->GetFormat() == SurfaceFormat::B8G8R8A8; - } else if (aImage->GetFormat() == ImageFormat::D3D9_RGB32_TEXTURE) { - if (!aImage->GetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D9)) { - // The texture in which the frame is stored belongs to DXVA's D3D9 device. - // We need to open it on our device before we can use it. - nsAutoPtr backendData(new TextureD3D9BackendData()); - D3D9SurfaceImage* image = static_cast(aImage); - backendData->mTexture = OpenSharedTexture(image->GetDesc(), image->GetShareHandle(), device()); - if (backendData->mTexture) { - aImage->SetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D9, backendData.forget()); - } - } - aHasAlpha = false; - } else { - NS_WARNING("Inappropriate image type."); - return nullptr; - } - - TextureD3D9BackendData *data = - static_cast(aImage->GetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D9)); - - if (!data) { - return nullptr; - } - - nsRefPtr dev; - data->mTexture->GetDevice(getter_AddRefs(dev)); - if (dev != device()) { - return nullptr; - } - - return data->mTexture; -} - -void -ImageLayerD3D9::RenderLayer() -{ - ImageContainer *container = GetContainer(); - if (!container || mD3DManager->CompositingDisabled()) { - return; - } - - AutoLockImage autoLock(container); - - Image *image = autoLock.GetImage(); - if (!image) { - return; - } - - SetShaderTransformAndOpacity(); - - gfx::IntSize size = image->GetSize(); - - if (image->GetFormat() == ImageFormat::CAIRO_SURFACE || - image->GetFormat() == ImageFormat::D3D9_RGB32_TEXTURE) - { - NS_ASSERTION(image->GetFormat() != ImageFormat::CAIRO_SURFACE || - !static_cast(image)->mSourceSurface || - static_cast(image)->mSourceSurface->GetFormat() != SurfaceFormat::A8, - "Image layer has alpha image"); - - bool hasAlpha = false; - nsRefPtr texture = GetTexture(image, hasAlpha); - - device()->SetVertexShaderConstantF(CBvLayerQuad, - ShaderConstantRect(0, - 0, - size.width, - size.height), - 1); - - if (hasAlpha) { - mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER, GetMaskLayer()); - } else { - mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBLAYER, GetMaskLayer()); - } - - if (mFilter == GraphicsFilter::FILTER_NEAREST) { - device()->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT); - device()->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT); - } - device()->SetTexture(0, texture); - - image = nullptr; - autoLock.Unlock(); - - device()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); - if (mFilter == GraphicsFilter::FILTER_NEAREST) { - device()->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); - device()->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); - } - } else { - PlanarYCbCrImage *yuvImage = - static_cast(image); - - if (!yuvImage->IsValid()) { - return; - } - - if (!yuvImage->GetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D9)) { - AllocateTexturesYCbCr(yuvImage, device(), mD3DManager); - } - - PlanarYCbCrD3D9BackendData *data = - static_cast(yuvImage->GetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D9)); - - if (!data) { - return; - } - - nsRefPtr dev; - data->mYTexture->GetDevice(getter_AddRefs(dev)); - if (dev != device()) { - return; - } - - device()->SetVertexShaderConstantF(CBvLayerQuad, - ShaderConstantRect(0, - 0, - size.width, - size.height), - 1); - - device()->SetVertexShaderConstantF(CBvTextureCoords, - ShaderConstantRect( - (float)yuvImage->GetData()->mPicX / yuvImage->GetData()->mYSize.width, - (float)yuvImage->GetData()->mPicY / yuvImage->GetData()->mYSize.height, - (float)yuvImage->GetData()->mPicSize.width / yuvImage->GetData()->mYSize.width, - (float)yuvImage->GetData()->mPicSize.height / yuvImage->GetData()->mYSize.height - ), - 1); - - mD3DManager->SetShaderMode(DeviceManagerD3D9::YCBCRLAYER, GetMaskLayer()); - - /* - * Send 3d control data and metadata - */ - if (mD3DManager->GetNv3DVUtils()) { - Nv_Stereo_Mode mode; - switch (yuvImage->GetData()->mStereoMode) { - 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. - mD3DManager->GetNv3DVUtils()->SendNv3DVControl(mode, true, FIREFOX_3DV_APP_HANDLE); - - if (yuvImage->GetData()->mStereoMode != StereoMode::MONO) { - mD3DManager->GetNv3DVUtils()->SendNv3DVControl(mode, true, FIREFOX_3DV_APP_HANDLE); - - nsRefPtr renderTarget; - device()->GetRenderTarget(0, getter_AddRefs(renderTarget)); - mD3DManager->GetNv3DVUtils()->SendNv3DVMetaData((unsigned int)yuvImage->GetSize().width, - (unsigned int)yuvImage->GetSize().height, (HANDLE)(data->mYTexture), (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(0, data->mYTexture); - device()->SetTexture(1, data->mCbTexture); - device()->SetTexture(2, data->mCrTexture); - - image = nullptr; - data = nullptr; - autoLock.Unlock(); - - device()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); - - device()->SetVertexShaderConstantF(CBvTextureCoords, - ShaderConstantRect(0, 0, 1.0f, 1.0f), 1); - } - - GetContainer()->NotifyPaintedImage(image); -} - -already_AddRefed -ImageLayerD3D9::GetAsTexture(gfx::IntSize* aSize) -{ - if (!GetContainer()) { - return nullptr; - } - - AutoLockImage autoLock(GetContainer()); - - Image *image = autoLock.GetImage(); - - if (!image) { - return nullptr; - } - - if (image->GetFormat() != ImageFormat::CAIRO_SURFACE) { - return nullptr; - } - - bool dontCare; - *aSize = image->GetSize(); - nsRefPtr result = GetTexture(image, dontCare); - return result.forget(); -} - -} /* layers */ -} /* mozilla */ diff --git a/gfx/layers/d3d9/ImageLayerD3D9.h b/gfx/layers/d3d9/ImageLayerD3D9.h deleted file mode 100644 index af69af5c263..00000000000 --- a/gfx/layers/d3d9/ImageLayerD3D9.h +++ /dev/null @@ -1,54 +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_IMAGELAYERD3D9_H -#define GFX_IMAGELAYERD3D9_H - -#include "LayerManagerD3D9.h" -#include "ImageLayers.h" -#include "ImageContainer.h" -#include "yuv_convert.h" - -namespace mozilla { -namespace layers { - -class ImageLayerD3D9 : public ImageLayer, - public LayerD3D9 -{ -public: - ImageLayerD3D9(LayerManagerD3D9 *aManager) - : ImageLayer(aManager, nullptr) - , LayerD3D9(aManager) - { - mImplData = static_cast(this); - } - - // LayerD3D9 Implementation - virtual Layer* GetLayer(); - - virtual void RenderLayer(); - - virtual already_AddRefed GetAsTexture(gfx::IntSize* aSize); - -private: - IDirect3DTexture9* GetTexture(Image *aImage, bool& aHasAlpha); -}; - - -struct TextureD3D9BackendData : public ImageBackendData -{ - nsRefPtr mTexture; -}; - -struct PlanarYCbCrD3D9BackendData : public ImageBackendData -{ - nsRefPtr mYTexture; - nsRefPtr mCrTexture; - nsRefPtr mCbTexture; -}; - -} /* layers */ -} /* mozilla */ -#endif /* GFX_IMAGELAYERD3D9_H */ diff --git a/gfx/layers/d3d9/LayerManagerD3D9.cpp b/gfx/layers/d3d9/LayerManagerD3D9.cpp deleted file mode 100644 index 770c724499c..00000000000 --- a/gfx/layers/d3d9/LayerManagerD3D9.cpp +++ /dev/null @@ -1,375 +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 "LayerManagerD3D9.h" - -#include "PaintedLayerD3D9.h" -#include "ContainerLayerD3D9.h" -#include "ImageLayerD3D9.h" -#include "ColorLayerD3D9.h" -#include "CanvasLayerD3D9.h" -#include "ReadbackLayerD3D9.h" -#include "gfxWindowsPlatform.h" -#include "nsIGfxInfo.h" -#include "nsServiceManagerUtils.h" -#include "gfxFailure.h" -#include "gfxPrefs.h" - -#include "gfxCrashReporterUtils.h" - -namespace mozilla { -namespace layers { - -LayerManagerD3D9::LayerManagerD3D9(nsIWidget *aWidget) - : mWidget(aWidget) - , mDeviceResetCount(0) -{ - mCurrentCallbackInfo.Callback = nullptr; - mCurrentCallbackInfo.CallbackData = nullptr; -} - -LayerManagerD3D9::~LayerManagerD3D9() -{ - Destroy(); -} - -bool -LayerManagerD3D9::Initialize(bool force) -{ - ScopedGfxFeatureReporter reporter("D3D9 Layers", force); - - /* XXX: this preference and blacklist code should move out of the layer manager */ - bool forceAccelerate = gfxPrefs::LayersAccelerationForceEnabled(); - - nsCOMPtr gfxInfo = do_GetService("@mozilla.org/gfx/info;1"); - if (gfxInfo) { - int32_t status; - if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, &status))) { - if (status != nsIGfxInfo::FEATURE_STATUS_OK && !forceAccelerate) - { - NS_WARNING("Direct3D 9-accelerated layers are not supported on this system."); - return false; - } - } - } - - mDeviceManager = gfxWindowsPlatform::GetPlatform()->GetD3D9DeviceManager(); - if (!mDeviceManager) { - return false; - } - - mSwapChain = mDeviceManager-> - CreateSwapChain((HWND)mWidget->GetNativeData(NS_NATIVE_WINDOW)); - - if (!mSwapChain) { - return false; - } - - reporter.SetSuccessful(); - return true; -} - -void -LayerManagerD3D9::SetClippingRegion(const nsIntRegion &aClippingRegion) -{ - mClippingRegion = aClippingRegion; -} - -void -LayerManagerD3D9::Destroy() -{ - if (!IsDestroyed()) { - if (mRoot) { - static_cast(mRoot->ImplData())->LayerManagerDestroyed(); - } - /* Important to release this first since it also holds a reference to the - * device manager - */ - mSwapChain = nullptr; - mDeviceManager = nullptr; - } - LayerManager::Destroy(); -} - -void -LayerManagerD3D9::BeginTransaction() -{ - mInTransaction = true; -} - -void -LayerManagerD3D9::BeginTransactionWithTarget(gfxContext *aTarget) -{ - mInTransaction = true; - mTarget = aTarget; -} - -void -LayerManagerD3D9::EndConstruction() -{ -} - -bool -LayerManagerD3D9::EndEmptyTransaction(EndTransactionFlags aFlags) -{ - mInTransaction = false; - - // If the device reset count from our last EndTransaction doesn't match - // the current device reset count, the device must have been reset one or - // more times since our last transaction. In that case, an empty transaction - // is not possible, because layers may need to be rerendered. - if (!mRoot || mDeviceResetCount != mDeviceManager->GetDeviceResetCount()) - return false; - - EndTransaction(nullptr, nullptr, aFlags); - return true; -} - -void -LayerManagerD3D9::EndTransaction(DrawPaintedLayerCallback aCallback, - void* aCallbackData, - EndTransactionFlags aFlags) -{ - mInTransaction = false; - - mDeviceResetCount = mDeviceManager->GetDeviceResetCount(); - - if (mRoot && !(aFlags & END_NO_IMMEDIATE_REDRAW)) { - mCurrentCallbackInfo.Callback = aCallback; - mCurrentCallbackInfo.CallbackData = aCallbackData; - - if (aFlags & END_NO_COMPOSITE) { - // Apply pending tree updates before recomputing effective - // properties. - mRoot->ApplyPendingUpdatesToSubtree(); - } - - // The results of our drawing always go directly into a pixel buffer, - // so we don't need to pass any global transform here. - mRoot->ComputeEffectiveTransforms(gfx::Matrix4x4()); - - SetCompositingDisabled(aFlags & END_NO_COMPOSITE); - Render(); - /* Clean this out for sanity */ - mCurrentCallbackInfo.Callback = nullptr; - mCurrentCallbackInfo.CallbackData = nullptr; - } - - // Clear mTarget, next transaction could have no target - mTarget = nullptr; -} - -void -LayerManagerD3D9::SetRoot(Layer *aLayer) -{ - mRoot = aLayer; -} - -already_AddRefed -LayerManagerD3D9::CreatePaintedLayer() -{ - nsRefPtr layer = new PaintedLayerD3D9(this); - return layer.forget(); -} - -already_AddRefed -LayerManagerD3D9::CreateContainerLayer() -{ - nsRefPtr layer = new ContainerLayerD3D9(this); - return layer.forget(); -} - -already_AddRefed -LayerManagerD3D9::CreateImageLayer() -{ - nsRefPtr layer = new ImageLayerD3D9(this); - return layer.forget(); -} - -already_AddRefed -LayerManagerD3D9::CreateColorLayer() -{ - nsRefPtr layer = new ColorLayerD3D9(this); - return layer.forget(); -} - -already_AddRefed -LayerManagerD3D9::CreateCanvasLayer() -{ - nsRefPtr layer = new CanvasLayerD3D9(this); - return layer.forget(); -} - -already_AddRefed -LayerManagerD3D9::CreateReadbackLayer() -{ - nsRefPtr layer = new ReadbackLayerD3D9(this); - return layer.forget(); -} - -void -LayerManagerD3D9::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); -} - -void -LayerManagerD3D9::Render() -{ - if (mSwapChain->PrepareForRendering() != DeviceOK) { - return; - } - - deviceManager()->SetupRenderState(); - - SetupPipeline(); - - if (CompositingDisabled()) { - static_cast(mRoot->ImplData())->RenderLayer(); - return; - } - - nsIntRect rect; - mWidget->GetClientBounds(rect); - - device()->Clear(0, nullptr, D3DCLEAR_TARGET, 0x00000000, 0, 0); - - device()->BeginScene(); - - const nsIntRect *clipRect = mRoot->GetClipRect(); - RECT r; - if (clipRect) { - r.left = (LONG)clipRect->x; - r.top = (LONG)clipRect->y; - r.right = (LONG)(clipRect->x + clipRect->width); - r.bottom = (LONG)(clipRect->y + clipRect->height); - } else { - r.left = r.top = 0; - r.right = rect.width; - r.bottom = rect.height; - } - device()->SetScissorRect(&r); - - static_cast(mRoot->ImplData())->RenderLayer(); - - if (!mRegionToClear.IsEmpty()) { - D3DRECT* rects = new D3DRECT[mRegionToClear.GetNumRects()]; - nsIntRegionRectIterator iter(mRegionToClear); - const nsIntRect *r; - size_t i = 0; - while ((r = iter.Next())) { - rects[i].x1 = r->x; - rects[i].y1 = r->y; - rects[i].x2 = r->x + r->width; - rects[i].y2 = r->y + r->height; - i++; - } - - device()->Clear(i, rects, D3DCLEAR_TARGET, - 0x00000000, 0, 0); - - delete [] rects; - } - - device()->EndScene(); - - if (!mTarget) { - const nsIntRect *r; - for (nsIntRegionRectIterator iter(mClippingRegion); - (r = iter.Next()) != nullptr;) { - mSwapChain->Present(*r); - } - RecordFrame(); - PostPresent(); - } else { - PaintToTarget(); - } -} - -void -LayerManagerD3D9::SetupPipeline() -{ - nsIntRect rect; - mWidget->GetClientBounds(rect); - - gfx3DMatrix viewMatrix; - /* - * Matrix to transform to viewport space ( <-1.0, 1.0> topleft, - * <1.0, -1.0> bottomright) - */ - viewMatrix._11 = 2.0f / rect.width; - viewMatrix._22 = -2.0f / rect.height; - viewMatrix._33 = 0.0f; - viewMatrix._41 = -1.0f; - viewMatrix._42 = 1.0f; - - HRESULT hr = device()->SetVertexShaderConstantF(CBmProjection, - &viewMatrix._11, 4); - - if (FAILED(hr)) { - NS_WARNING("Failed to set projection shader constant!"); - } - - hr = device()->SetVertexShaderConstantF(CBvTextureCoords, - ShaderConstantRect(0, 0, 1.0f, 1.0f), - 1); - - if (FAILED(hr)) { - NS_WARNING("Failed to set texCoords shader constant!"); - } - - float offset[] = { 0, 0, 0, 0 }; - hr = device()->SetVertexShaderConstantF(CBvRenderTargetOffset, offset, 1); - - if (FAILED(hr)) { - NS_WARNING("Failed to set RenderTargetOffset shader constant!"); - } -} - -void -LayerManagerD3D9::PaintToTarget() -{ - nsRefPtr backBuff; - nsRefPtr 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; - destSurf->LockRect(&rect, nullptr, D3DLOCK_READONLY); - - nsRefPtr imageSurface = - new gfxImageSurface((unsigned char*)rect.pBits, - gfxIntSize(desc.Width, desc.Height), - rect.Pitch, - gfxImageFormat::ARGB32); - - mTarget->SetSource(imageSurface); - mTarget->SetOperator(gfxContext::OPERATOR_OVER); - mTarget->Paint(); - destSurf->UnlockRect(); -} - -LayerD3D9::LayerD3D9(LayerManagerD3D9 *aManager) - : mD3DManager(aManager) -{ -} - -} /* namespace layers */ -} /* namespace mozilla */ diff --git a/gfx/layers/d3d9/LayerManagerD3D9.h b/gfx/layers/d3d9/LayerManagerD3D9.h deleted file mode 100644 index 5f6ec52439d..00000000000 --- a/gfx/layers/d3d9/LayerManagerD3D9.h +++ /dev/null @@ -1,289 +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_LAYERMANAGERD3D9_H -#define GFX_LAYERMANAGERD3D9_H - -#include "Layers.h" - -#include -#include - -#include "gfxContext.h" -#include "nsIWidget.h" - -#include "DeviceManagerD3D9.h" - -namespace mozilla { -namespace layers { - -class LayerD3D9; -class PaintedLayerD3D9; - -/* - * This is the LayerManager used for Direct3D 9. For now this will render on - * the main thread. - */ -class LayerManagerD3D9 : public LayerManager { -public: - LayerManagerD3D9(nsIWidget *aWidget); - virtual ~LayerManagerD3D9(); - - /* - * Initializes the layer manager, this is when the layer manager will - * actually access the device and attempt to create the swap chain used - * to draw to the window. If this method fails the device cannot be used. - * This function is not threadsafe. - * - * \return True is initialization was succesful, false when it was not. - */ - bool Initialize(bool force = false); - - /* - * Sets the clipping region for this layer manager. This is important on - * windows because using OGL we no longer have GDI's native clipping. Therefor - * widget must tell us what part of the screen is being invalidated, - * and we should clip to this. - * - * \param aClippingRegion Region to clip to. Setting an empty region - * will disable clipping. - */ - void SetClippingRegion(const nsIntRegion& aClippingRegion); - - /* - * LayerManager implementation. - */ - virtual void Destroy(); - - virtual void BeginTransaction(); - - virtual void BeginTransactionWithTarget(gfxContext* aTarget); - - void EndConstruction(); - - virtual bool EndEmptyTransaction(EndTransactionFlags aFlags = END_DEFAULT); - - struct CallbackInfo { - DrawPaintedLayerCallback Callback; - void *CallbackData; - }; - - virtual void EndTransaction(DrawPaintedLayerCallback aCallback, - void* aCallbackData, - EndTransactionFlags aFlags = END_DEFAULT); - - const CallbackInfo &GetCallbackInfo() { return mCurrentCallbackInfo; } - - void SetRoot(Layer* aLayer); - - virtual bool CanUseCanvasLayerForSize(const gfx::IntSize &aSize) - { - if (!mDeviceManager) - return false; - int32_t maxSize = mDeviceManager->GetMaxTextureSize(); - return aSize <= gfx::IntSize(maxSize, maxSize); - } - - virtual int32_t GetMaxTextureSize() const - { - return mDeviceManager->GetMaxTextureSize(); - } - - virtual already_AddRefed CreatePaintedLayer(); - - virtual already_AddRefed CreateContainerLayer(); - - virtual already_AddRefed CreateImageLayer(); - - virtual already_AddRefed CreateColorLayer(); - - virtual already_AddRefed CreateCanvasLayer(); - - virtual already_AddRefed CreateReadbackLayer(); - - virtual LayersBackend GetBackendType() { return LayersBackend::LAYERS_D3D9; } - virtual void GetBackendName(nsAString& name) { name.AssignLiteral("Direct3D 9"); } - bool DeviceWasRemoved() { return deviceManager()->DeviceWasRemoved(); } - - /* - * Helper methods. - */ - void SetClippingEnabled(bool aEnabled); - - void SetShaderMode(DeviceManagerD3D9::ShaderMode aMode, - Layer* aMask, bool aIs2D = true) - { mDeviceManager->SetShaderMode(aMode, aMask, aIs2D); } - - IDirect3DDevice9 *device() const { return mDeviceManager->device(); } - DeviceManagerD3D9 *deviceManager() const { return mDeviceManager; } - - /** - * Return pointer to the Nv3DVUtils instance. Re-direct to mDeviceManager. - */ - Nv3DVUtils *GetNv3DVUtils() { return mDeviceManager ? mDeviceManager->GetNv3DVUtils() : nullptr; } - - virtual const char* Name() const { return "D3D9"; } - - void ReportFailure(const nsACString &aMsg, HRESULT aCode); - - bool CompositingDisabled() { return mCompositingDisabled; } - void SetCompositingDisabled(bool aCompositingDisabled) { mCompositingDisabled = aCompositingDisabled; } - -private: - /* Device manager instance for this layer manager */ - nsRefPtr mDeviceManager; - - /* Swap chain associated with this layer manager */ - nsRefPtr mSwapChain; - - /* Widget associated with this layer manager */ - nsIWidget *mWidget; - - /* - * Context target, nullptr when drawing directly to our swap chain. - */ - nsRefPtr mTarget; - - /* Callback info for current transaction */ - CallbackInfo mCurrentCallbackInfo; - - /* - * Region we're clipping our current drawing to. - */ - nsIntRegion mClippingRegion; - - /* - * Device reset count at last paint. Whenever this changes, we need to - * do a full layer tree update. - */ - uint32_t mDeviceResetCount; - - /* - * True if we should only be drawing layer contents, not - * compositing them to the target. - */ - bool mCompositingDisabled; - - /* - * Render the current layer tree to the active target. - */ - void Render(); - - /* - * Setup the pipeline. - */ - void SetupPipeline(); - - /* - * Copies the content of our backbuffer to the set transaction target. - */ - void PaintToTarget(); - -}; - -/* - * General information and tree management for OGL layers. - */ -class LayerD3D9 -{ -public: - LayerD3D9(LayerManagerD3D9 *aManager); - - virtual LayerD3D9 *GetFirstChildD3D9() { return nullptr; } - - void SetFirstChild(LayerD3D9 *aParent); - - virtual Layer* GetLayer() = 0; - - virtual void RenderLayer() = 0; - - /** - /* This function may be used on device resets to clear all VRAM resources - * that a layer might be using. - */ - virtual void CleanResources() {} - - IDirect3DDevice9 *device() const { return mD3DManager->device(); } - - /* Called by the layer manager when it's destroyed */ - virtual void LayerManagerDestroyed() {} - - void ReportFailure(const nsACString &aMsg, HRESULT aCode) { - return mD3DManager->ReportFailure(aMsg, aCode); - } - - void SetShaderTransformAndOpacity() - { - Layer* layer = GetLayer(); - const gfx::Matrix4x4& transform = layer->GetEffectiveTransform(); - device()->SetVertexShaderConstantF(CBmLayerTransform, &transform._11, 4); - - 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] = layer->GetEffectiveOpacity(); - device()->SetPixelShaderConstantF(CBfLayerOpacity, opacity, 1); - } - - /* - * Returns a texture containing the contents of this - * layer. Will try to return an existing texture if possible, or a temporary - * one if not. It is the callee's responsibility to release the shader - * resource view. Will return null if a texture could not be constructed. - * The texture will not be transformed, i.e., it will be in the same coord - * space as this. - * Any layer that can be used as a mask layer should override this method. - * If aSize is non-null and a texture is successfully returned, aSize will - * contain the size of the texture. - */ - virtual already_AddRefed GetAsTexture(gfx::IntSize* aSize) - { - return nullptr; - } - -protected: - LayerManagerD3D9 *mD3DManager; -}; - -/* - * RAII helper for locking D3D9 textures. - */ -class LockTextureRectD3D9 -{ -public: - LockTextureRectD3D9(IDirect3DTexture9* aTexture) - : mTexture(aTexture) - { - mLockResult = mTexture->LockRect(0, &mR, nullptr, 0); - } - - ~LockTextureRectD3D9() - { - mTexture->UnlockRect(0); - } - - bool HasLock() { - return SUCCEEDED(mLockResult); - } - - D3DLOCKED_RECT GetLockRect() - { - return mR; - } -private: - LockTextureRectD3D9 (const LockTextureRectD3D9&); - LockTextureRectD3D9& operator= (const LockTextureRectD3D9&); - - IDirect3DTexture9* mTexture; - D3DLOCKED_RECT mR; - HRESULT mLockResult; -}; - -} /* layers */ -} /* mozilla */ - -#endif /* GFX_LAYERMANAGERD3D9_H */ diff --git a/gfx/layers/d3d9/PaintedLayerD3D9.cpp b/gfx/layers/d3d9/PaintedLayerD3D9.cpp deleted file mode 100644 index b49a59a9c0b..00000000000 --- a/gfx/layers/d3d9/PaintedLayerD3D9.cpp +++ /dev/null @@ -1,656 +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/layers/PLayerTransaction.h" - -// This must occur *after* layers/PLayerTransaction.h to avoid -// typedefs conflicts. -#include "mozilla/ArrayUtils.h" - -#include "PaintedLayerD3D9.h" -#include "gfxPlatform.h" - -#include "gfxWindowsPlatform.h" -#include "gfxTeeSurface.h" -#include "gfxUtils.h" -#include "ReadbackProcessor.h" -#include "ReadbackLayer.h" -#include "mozilla/gfx/2D.h" - -namespace mozilla { -namespace layers { - -using namespace gfx; - -PaintedLayerD3D9::PaintedLayerD3D9(LayerManagerD3D9 *aManager) - : PaintedLayer(aManager, nullptr) - , LayerD3D9(aManager) -{ - mImplData = static_cast(this); - aManager->deviceManager()->mLayersWithResources.AppendElement(this); -} - -PaintedLayerD3D9::~PaintedLayerD3D9() -{ - if (mD3DManager) { - mD3DManager->deviceManager()->mLayersWithResources.RemoveElement(this); - } -} - -/** - * Retention threshold - amount of pixels intersection required to enable - * layer content retention. This is a guesstimate. Profiling could be done to - * figure out the optimal threshold. - */ -#define RETENTION_THRESHOLD 16384 - -void -PaintedLayerD3D9::InvalidateRegion(const nsIntRegion &aRegion) -{ - mInvalidRegion.Or(mInvalidRegion, aRegion); - mInvalidRegion.SimplifyOutward(20); - mValidRegion.Sub(mValidRegion, mInvalidRegion); -} - -void -PaintedLayerD3D9::CopyRegion(IDirect3DTexture9* aSrc, const nsIntPoint &aSrcOffset, - IDirect3DTexture9* aDest, const nsIntPoint &aDestOffset, - const nsIntRegion &aCopyRegion, nsIntRegion* aValidRegion) -{ - nsRefPtr srcSurface, dstSurface; - aSrc->GetSurfaceLevel(0, getter_AddRefs(srcSurface)); - aDest->GetSurfaceLevel(0, getter_AddRefs(dstSurface)); - - nsIntRegion retainedRegion; - nsIntRegionRectIterator iter(aCopyRegion); - const nsIntRect *r; - while ((r = iter.Next())) { - if (r->width * r->height > RETENTION_THRESHOLD) { - RECT oldRect, newRect; - - // Calculate the retained rectangle's position on the old and the new - // surface. - oldRect.left = r->x - aSrcOffset.x; - oldRect.top = r->y - aSrcOffset.y; - oldRect.right = oldRect.left + r->width; - oldRect.bottom = oldRect.top + r->height; - - newRect.left = r->x - aDestOffset.x; - newRect.top = r->y - aDestOffset.y; - newRect.right = newRect.left + r->width; - newRect.bottom = newRect.top + r->height; - - // Copy data from our old texture to the new one - HRESULT hr = device()-> - StretchRect(srcSurface, &oldRect, dstSurface, &newRect, D3DTEXF_NONE); - - if (SUCCEEDED(hr)) { - retainedRegion.Or(retainedRegion, *r); - } - } - } - - // Areas which were valid and were retained are still valid - aValidRegion->And(*aValidRegion, retainedRegion); -} - -void -PaintedLayerD3D9::UpdateTextures(SurfaceMode aMode) -{ - nsIntRect visibleRect = mVisibleRegion.GetBounds(); - - if (HaveTextures(aMode)) { - if (!mTextureRect.IsEqualInterior(visibleRect)) { - nsRefPtr oldTexture = mTexture; - nsRefPtr oldTextureOnWhite = mTextureOnWhite; - - NS_ASSERTION(mTextureRect.Contains(mValidRegion.GetBounds()), - "How can we have valid data outside the texture?"); - nsIntRegion retainRegion; - // The region we want to retain is the valid data that is inside - // the new visible region - retainRegion.And(mValidRegion, mVisibleRegion); - - CreateNewTextures(gfx::IntSize(visibleRect.width, visibleRect.height), aMode); - - // If our texture creation failed this can mean a device reset is pending and we - // should silently ignore the failure. In the future when device failures - // are properly handled we should test for the type of failure and gracefully - // handle different failures. See bug 569081. - if (!HaveTextures(aMode)) { - mValidRegion.SetEmpty(); - } else { - CopyRegion(oldTexture, mTextureRect.TopLeft(), mTexture, visibleRect.TopLeft(), - retainRegion, &mValidRegion); - if (aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA) { - CopyRegion(oldTextureOnWhite, mTextureRect.TopLeft(), mTextureOnWhite, visibleRect.TopLeft(), - retainRegion, &mValidRegion); - } - } - - mTextureRect = visibleRect; - } - } else { - CreateNewTextures(gfx::IntSize(visibleRect.width, visibleRect.height), aMode); - mTextureRect = visibleRect; - - NS_ASSERTION(mValidRegion.IsEmpty(), "Someone forgot to empty the region"); - } -} - -void -PaintedLayerD3D9::RenderRegion(const nsIntRegion& aRegion) -{ - nsIntRegionRectIterator iter(aRegion); - - const nsIntRect *iterRect; - while ((iterRect = iter.Next())) { - device()->SetVertexShaderConstantF(CBvLayerQuad, - ShaderConstantRect(iterRect->x, - iterRect->y, - iterRect->width, - iterRect->height), - 1); - - device()->SetVertexShaderConstantF(CBvTextureCoords, - ShaderConstantRect( - (float)(iterRect->x - mTextureRect.x) / (float)mTextureRect.width, - (float)(iterRect->y - mTextureRect.y) / (float)mTextureRect.height, - (float)iterRect->width / (float)mTextureRect.width, - (float)iterRect->height / (float)mTextureRect.height), 1); - - device()->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); - } -} - -void -PaintedLayerD3D9::RenderPaintedLayer(ReadbackProcessor* aReadback) -{ - if (mVisibleRegion.IsEmpty()) { - return; - } - - nsIntRect newTextureRect = mVisibleRegion.GetBounds(); - - SurfaceMode mode = GetSurfaceMode(); - if (mode == SurfaceMode::SURFACE_COMPONENT_ALPHA && - (!mParent || !mParent->SupportsComponentAlphaChildren())) { - mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA; - } - // If we have a transform that requires resampling of our texture, then - // we need to make sure we don't sample pixels that haven't been drawn. - // We clamp sample coordinates to the texture rect, but when the visible region - // doesn't fill the entire texture rect we need to make sure we draw all the - // pixels in the texture rect anyway in case they get sampled. - nsIntRegion neededRegion = mVisibleRegion; - if (!neededRegion.GetBounds().IsEqualInterior(newTextureRect) || - neededRegion.GetNumRects() > 1) { - if (MayResample()) { - neededRegion = newTextureRect; - if (mode == SurfaceMode::SURFACE_OPAQUE) { - // We're going to paint outside the visible region, but layout hasn't - // promised that it will paint opaquely there, so we'll have to - // treat this layer as transparent. - mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA; - } - } - } - - VerifyContentType(mode); - UpdateTextures(mode); - if (!HaveTextures(mode)) { - NS_WARNING("Texture creation failed"); - return; - } - - nsTArray readbackUpdates; - nsIntRegion readbackRegion; - if (aReadback && UsedForReadback()) { - aReadback->GetPaintedLayerUpdates(this, &readbackUpdates, &readbackRegion); - } - - // Because updates to D3D9 PaintedLayers are rendered with the CPU, we don't - // have to do readback from D3D9 surfaces. Instead we make sure that any area - // needed for readback is included in the drawRegion we ask layout to render. - // Then the readback areas we need can be copied out of the temporary - // destinationSurface in DrawRegion. - nsIntRegion drawRegion; - drawRegion.Sub(neededRegion, mValidRegion); - drawRegion.Or(drawRegion, readbackRegion); - // NS_ASSERTION(mVisibleRegion.Contains(region), "Bad readback region!"); - - if (!drawRegion.IsEmpty()) { - LayerManagerD3D9::CallbackInfo cbInfo = mD3DManager->GetCallbackInfo(); - if (!cbInfo.Callback) { - NS_ERROR("D3D9 should never need to update PaintedLayers in an empty transaction"); - return; - } - - DrawRegion(drawRegion, mode, readbackUpdates); - - mValidRegion = neededRegion; - } - - if (mD3DManager->CompositingDisabled()) { - return; - } - - SetShaderTransformAndOpacity(); - - if (mode == SurfaceMode::SURFACE_COMPONENT_ALPHA) { - mD3DManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS1, - GetMaskLayer()); - device()->SetTexture(0, mTexture); - device()->SetTexture(1, mTextureOnWhite); - device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO); - device()->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR); - RenderRegion(neededRegion); - - mD3DManager->SetShaderMode(DeviceManagerD3D9::COMPONENTLAYERPASS2, - GetMaskLayer()); - device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); - device()->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE); - RenderRegion(neededRegion); - - // Restore defaults - device()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE); - device()->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); - device()->SetTexture(1, nullptr); - } else { - mD3DManager->SetShaderMode(DeviceManagerD3D9::RGBALAYER, - GetMaskLayer()); - device()->SetTexture(0, mTexture); - RenderRegion(neededRegion); - } - - // Set back to default. - device()->SetVertexShaderConstantF(CBvTextureCoords, - ShaderConstantRect(0, 0, 1.0f, 1.0f), - 1); -} - -void -PaintedLayerD3D9::CleanResources() -{ - mTexture = nullptr; - mTextureOnWhite = nullptr; - mValidRegion.SetEmpty(); -} - -void -PaintedLayerD3D9::LayerManagerDestroyed() -{ - mD3DManager->deviceManager()->mLayersWithResources.RemoveElement(this); - mD3DManager = nullptr; -} - -Layer* -PaintedLayerD3D9::GetLayer() -{ - return this; -} - -bool -PaintedLayerD3D9::IsEmpty() -{ - return !mTexture; -} - -void -PaintedLayerD3D9::VerifyContentType(SurfaceMode aMode) -{ - if (!mTexture) - return; - - D3DSURFACE_DESC desc; - mTexture->GetLevelDesc(0, &desc); - - switch (aMode) { - case SurfaceMode::SURFACE_OPAQUE: - if (desc.Format == D3DFMT_X8R8G8B8 && !mTextureOnWhite) - return; - break; - - case SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA: - if (desc.Format == D3DFMT_A8R8G8B8 && !mTextureOnWhite) - return; - break; - - case SurfaceMode::SURFACE_COMPONENT_ALPHA: - if (mTextureOnWhite) { - NS_ASSERTION(desc.Format == D3DFMT_X8R8G8B8, "Wrong format for component alpha texture"); - return; - } - break; - } - - // The new format isn't compatible with the old texture(s), toss out the old - // texture(s). - mTexture = nullptr; - mTextureOnWhite = nullptr; - mValidRegion.SetEmpty(); -} - -class OpaqueRenderer { -public: - OpaqueRenderer(const nsIntRegion& aUpdateRegion) : - mUpdateRegion(aUpdateRegion) {} - ~OpaqueRenderer() { End(); } - already_AddRefed Begin(LayerD3D9* aLayer); - void End(); - IDirect3DTexture9* GetTexture() { return mTmpTexture; } - -private: - const nsIntRegion& mUpdateRegion; - nsRefPtr mTmpTexture; - nsRefPtr mSurface; - nsRefPtr mD3D9ThebesSurface; -}; - -already_AddRefed -OpaqueRenderer::Begin(LayerD3D9* aLayer) -{ - nsIntRect bounds = mUpdateRegion.GetBounds(); - - HRESULT hr = aLayer->device()-> - CreateTexture(bounds.width, bounds.height, 1, 0, D3DFMT_X8R8G8B8, - D3DPOOL_SYSTEMMEM, getter_AddRefs(mTmpTexture), nullptr); - - if (FAILED(hr)) { - aLayer->ReportFailure(NS_LITERAL_CSTRING("Failed to create temporary texture in system memory."), hr); - return nullptr; - } - - hr = mTmpTexture->GetSurfaceLevel(0, getter_AddRefs(mSurface)); - - if (FAILED(hr)) { - // Uh-oh, bail. - NS_WARNING("Failed to get texture surface level."); - return nullptr; - } - - nsRefPtr result = new gfxWindowsSurface(mSurface); - if (!result || result->CairoStatus()) { - NS_WARNING("Failed to d3d9 cairo surface."); - return nullptr; - } - mD3D9ThebesSurface = result; - - return result.forget(); -} - -void -OpaqueRenderer::End() -{ - mSurface = nullptr; - // gfxWindowsSurface returned from ::Begin() should be released before the - // texture is used. This will assert that this is the case -#if 1 - if (mD3D9ThebesSurface) { - mD3D9ThebesSurface->AddRef(); - nsrefcnt c = mD3D9ThebesSurface->Release(); - if (c != 1) - NS_RUNTIMEABORT("Reference mD3D9ThebesSurface must be released by caller of Begin() before calling End()"); - } -#endif - mD3D9ThebesSurface = nullptr; - -} -class TransparentRenderer { -public: - TransparentRenderer(const nsIntRegion& aUpdateRegion) : - mUpdateRegion(aUpdateRegion) {} - ~TransparentRenderer() { End(); } - already_AddRefed Begin(LayerD3D9* aLayer); - void End(); - IDirect3DTexture9* GetTexture() { return mTmpTexture; } - -private: - const nsIntRegion& mUpdateRegion; - nsRefPtr mTmpTexture; - nsRefPtr mD3D9ThebesSurface; -}; - -already_AddRefed -TransparentRenderer::Begin(LayerD3D9* aLayer) -{ - nsIntRect bounds = mUpdateRegion.GetBounds(); - - HRESULT hr = aLayer->device()-> - CreateTexture(bounds.width, bounds.height, 1, 0, D3DFMT_A8R8G8B8, - D3DPOOL_SYSTEMMEM, getter_AddRefs(mTmpTexture), nullptr); - - if (FAILED(hr)) { - aLayer->ReportFailure(NS_LITERAL_CSTRING("Failed to create temporary texture in system memory."), hr); - return nullptr; - } - - D3DLOCKED_RECT r; - hr = mTmpTexture->LockRect(0, &r, nullptr, 0); - if (FAILED(hr)) { - // Uh-oh, bail. - NS_WARNING("Failed to lock the texture"); - return nullptr; - } - nsRefPtr result = - new gfxImageSurface((unsigned char *)r.pBits, - bounds.Size(), - r.Pitch, - gfxImageFormat::ARGB32); - - if (!result || result->CairoStatus()) { - NS_WARNING("Failed to d3d9 cairo surface."); - return nullptr; - } - mD3D9ThebesSurface = result; - - return result.forget(); -} - -void -TransparentRenderer::End() -{ - // gfxImageSurface returned from ::Begin() should be released before the - // texture is used. This will assert that this is the case -#if 1 - if (mD3D9ThebesSurface) { - mD3D9ThebesSurface->AddRef(); - nsrefcnt c = mD3D9ThebesSurface->Release(); - if (c != 1) - NS_RUNTIMEABORT("Reference mD3D9ThebesSurface must be released by caller of Begin() before calling End()"); - } -#endif - mD3D9ThebesSurface = nullptr; - if (mTmpTexture) - mTmpTexture->UnlockRect(0); -} - -static void -FillSurface(gfxASurface* aSurface, const nsIntRegion& aRegion, - const nsIntPoint& aOffset, const gfxRGBA& aColor) -{ - nsIntRegionRectIterator iter(aRegion); - const nsIntRect* r; - while ((r = iter.Next()) != nullptr) { - nsIntRect rect = *r + aOffset; - gfxUtils::ClearThebesSurface(aSurface, &rect, aColor); - } -} - -void -PaintedLayerD3D9::DrawRegion(nsIntRegion &aRegion, SurfaceMode aMode, - const nsTArray& aReadbackUpdates) -{ - nsIntRect visibleRect = mVisibleRegion.GetBounds(); - - nsRefPtr destinationSurface; - nsIntRect bounds = aRegion.GetBounds(); - nsRefPtr tmpTexture; - OpaqueRenderer opaqueRenderer(aRegion); - TransparentRenderer transparentRenderer(aRegion); - OpaqueRenderer opaqueRendererOnWhite(aRegion); - - switch (aMode) - { - case SurfaceMode::SURFACE_OPAQUE: - destinationSurface = opaqueRenderer.Begin(this); - break; - - case SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA: { - destinationSurface = transparentRenderer.Begin(this); - // If the contents of this layer don't require component alpha in the - // end of rendering, it's safe to enable Cleartype since all the Cleartype - // glyphs must be over (or under) opaque pixels. - destinationSurface->SetSubpixelAntialiasingEnabled(!(mContentFlags & CONTENT_COMPONENT_ALPHA)); - break; - } - - case SurfaceMode::SURFACE_COMPONENT_ALPHA: { - nsRefPtr onBlack = opaqueRenderer.Begin(this); - nsRefPtr onWhite = opaqueRendererOnWhite.Begin(this); - if (onBlack && onWhite) { - FillSurface(onBlack, aRegion, bounds.TopLeft(), gfxRGBA(0.0, 0.0, 0.0, 1.0)); - FillSurface(onWhite, aRegion, bounds.TopLeft(), gfxRGBA(1.0, 1.0, 1.0, 1.0)); - gfxASurface* surfaces[2] = { onBlack.get(), onWhite.get() }; - destinationSurface = new gfxTeeSurface(surfaces, ArrayLength(surfaces)); - // Using this surface as a source will likely go horribly wrong, since - // only the onBlack surface will really be used, so alpha information will - // be incorrect. - destinationSurface->SetAllowUseAsSource(false); - } - break; - } - } - - if (!destinationSurface) - return; - - MOZ_ASSERT(gfxPlatform::GetPlatform()->SupportsAzureContentForType(BackendType::CAIRO)); - RefPtr dt = - gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(destinationSurface, - IntSize(destinationSurface->GetSize().width, - destinationSurface->GetSize().height)); - - nsRefPtr context = new gfxContext(dt); - - context->SetMatrix(context->CurrentMatrix().Translate(-bounds.x, -bounds.y)); - LayerManagerD3D9::CallbackInfo cbInfo = mD3DManager->GetCallbackInfo(); - cbInfo.Callback(this, context, aRegion, DrawRegionClip::NONE, nsIntRegion(), cbInfo.CallbackData); - - for (uint32_t i = 0; i < aReadbackUpdates.Length(); ++i) { - NS_ASSERTION(aMode == SurfaceMode::SURFACE_OPAQUE, - "Transparent surfaces should not be used for readback"); - const ReadbackProcessor::Update& update = aReadbackUpdates[i]; - nsIntPoint offset = update.mLayer->GetBackgroundLayerOffset(); - nsRefPtr ctx = - update.mLayer->GetSink()->BeginUpdate(update.mUpdateRect + offset, - update.mSequenceCounter); - if (ctx) { - ctx->SetMatrix(ctx->CurrentMatrix().Translate(offset.x, offset.y)); - ctx->SetSource(destinationSurface, gfxPoint(bounds.x, bounds.y)); - ctx->Paint(); - update.mLayer->GetSink()->EndUpdate(ctx, update.mUpdateRect + offset); - } - } - - // Release the cairo d3d9 surface before we try to composite it - context = nullptr; - - nsAutoTArray srcTextures; - nsAutoTArray destTextures; - switch (aMode) - { - case SurfaceMode::SURFACE_OPAQUE: - // Must release reference to dest surface before ending drawing - destinationSurface = nullptr; - opaqueRenderer.End(); - srcTextures.AppendElement(opaqueRenderer.GetTexture()); - destTextures.AppendElement(mTexture); - break; - - case SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA: - // Must release reference to dest surface before ending drawing - destinationSurface = nullptr; - transparentRenderer.End(); - srcTextures.AppendElement(transparentRenderer.GetTexture()); - destTextures.AppendElement(mTexture); - break; - - case SurfaceMode::SURFACE_COMPONENT_ALPHA: { - // Must release reference to dest surface before ending drawing - destinationSurface = nullptr; - opaqueRenderer.End(); - opaqueRendererOnWhite.End(); - srcTextures.AppendElement(opaqueRenderer.GetTexture()); - destTextures.AppendElement(mTexture); - srcTextures.AppendElement(opaqueRendererOnWhite.GetTexture()); - destTextures.AppendElement(mTextureOnWhite); - break; - } - } - NS_ASSERTION(srcTextures.Length() == destTextures.Length(), "Mismatched lengths"); - - - // Copy to the texture. - for (uint32_t i = 0; i < srcTextures.Length(); ++i) { - nsRefPtr srcSurface; - nsRefPtr dstSurface; - - destTextures[i]->GetSurfaceLevel(0, getter_AddRefs(dstSurface)); - srcTextures[i]->GetSurfaceLevel(0, getter_AddRefs(srcSurface)); - - nsIntRegionRectIterator iter(aRegion); - const nsIntRect *iterRect; - while ((iterRect = iter.Next())) { - RECT rect; - rect.left = iterRect->x - bounds.x; - rect.top = iterRect->y - bounds.y; - rect.right = iterRect->XMost() - bounds.x; - rect.bottom = iterRect->YMost() - bounds.y; - - POINT point; - point.x = iterRect->x - visibleRect.x; - point.y = iterRect->y - visibleRect.y; - device()->UpdateSurface(srcSurface, &rect, dstSurface, &point); - } - } -} - -void -PaintedLayerD3D9::CreateNewTextures(const gfx::IntSize &aSize, - SurfaceMode aMode) -{ - if (aSize.width == 0 || aSize.height == 0) { - // Nothing to do. - return; - } - - mTexture = nullptr; - mTextureOnWhite = nullptr; - HRESULT hr = device()->CreateTexture(aSize.width, aSize.height, 1, - D3DUSAGE_RENDERTARGET, - aMode != SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA ? D3DFMT_X8R8G8B8 : D3DFMT_A8R8G8B8, - D3DPOOL_DEFAULT, getter_AddRefs(mTexture), nullptr); - if (FAILED(hr)) { - ReportFailure(NS_LITERAL_CSTRING("PaintedLayerD3D9::CreateNewTextures(): Failed to create texture"), - hr); - return; - } - - if (aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA) { - hr = device()->CreateTexture(aSize.width, aSize.height, 1, - D3DUSAGE_RENDERTARGET, - D3DFMT_X8R8G8B8, - D3DPOOL_DEFAULT, getter_AddRefs(mTextureOnWhite), nullptr); - if (FAILED(hr)) { - ReportFailure(NS_LITERAL_CSTRING("PaintedLayerD3D9::CreateNewTextures(): Failed to create texture (2)"), - hr); - return; - } - } -} - -} /* namespace layers */ -} /* namespace mozilla */ diff --git a/gfx/layers/d3d9/PaintedLayerD3D9.h b/gfx/layers/d3d9/PaintedLayerD3D9.h deleted file mode 100644 index 4c6b3b3f142..00000000000 --- a/gfx/layers/d3d9/PaintedLayerD3D9.h +++ /dev/null @@ -1,84 +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_PAINTEDLAYERD3D9_H -#define GFX_PAINTEDLAYERD3D9_H - -#include "Layers.h" -#include "LayerManagerD3D9.h" -#include "ReadbackProcessor.h" - -namespace mozilla { -namespace layers { - -class ReadbackProcessor; - -class PaintedLayerD3D9 : public PaintedLayer, - public LayerD3D9 -{ -public: - PaintedLayerD3D9(LayerManagerD3D9 *aManager); - virtual ~PaintedLayerD3D9(); - - /* PaintedLayer implementation */ - void InvalidateRegion(const nsIntRegion& aRegion); - - /* LayerD3D9 implementation */ - Layer* GetLayer(); - virtual bool IsEmpty(); - virtual void RenderLayer() { RenderPaintedLayer(nullptr); } - virtual void CleanResources(); - virtual void LayerManagerDestroyed(); - - void RenderPaintedLayer(ReadbackProcessor* aReadback); - -private: - /* - * D3D9 texture - */ - nsRefPtr mTexture; - /* - * D3D9 texture for render-on-white when doing component alpha - */ - nsRefPtr mTextureOnWhite; - /** - * Visible region bounds used when we drew the contents of the textures - */ - nsIntRect mTextureRect; - - bool HaveTextures(SurfaceMode aMode) - { - return mTexture && (aMode != SurfaceMode::SURFACE_COMPONENT_ALPHA || mTextureOnWhite); - } - - /* Checks if our surface has the right content type */ - void VerifyContentType(SurfaceMode aMode); - - /* Ensures we have the necessary texture object(s) and that they correspond - * to mVisibleRegion.GetBounds(). This creates new texture objects as - * necessary and also copies existing valid texture data if necessary. - */ - void UpdateTextures(SurfaceMode aMode); - - /* Render the rectangles of mVisibleRegion with D3D9 using the currently - * bound textures, target, shaders, etc. - */ - void RenderRegion(const nsIntRegion& aRegion); - - /* Have a region of our layer drawn */ - void DrawRegion(nsIntRegion &aRegion, SurfaceMode aMode, - const nsTArray& aReadbackUpdates); - - /* Create a new texture */ - void CreateNewTextures(const gfx::IntSize &aSize, SurfaceMode aMode); - - void CopyRegion(IDirect3DTexture9* aSrc, const nsIntPoint &aSrcOffset, - IDirect3DTexture9* aDest, const nsIntPoint &aDestOffset, - const nsIntRegion &aCopyRegion, nsIntRegion* aValidRegion); -}; - -} /* layers */ -} /* mozilla */ -#endif /* GFX_PAINTEDLAYERD3D9_H */ diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index bfb6829cdba..a494834525d 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -52,19 +52,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': if CONFIG['MOZ_ENABLE_D3D9_LAYER']: EXPORTS += [ 'd3d9/DeviceManagerD3D9.h', - 'd3d9/LayerManagerD3D9.h', ] EXPORTS.mozilla.layers += [ 'd3d9/CompositorD3D9.h', 'd3d9/TextureD3D9.h', ] UNIFIED_SOURCES += [ - 'd3d9/CanvasLayerD3D9.cpp', - 'd3d9/ColorLayerD3D9.cpp', - 'd3d9/ContainerLayerD3D9.cpp', - 'd3d9/ImageLayerD3D9.cpp', - 'd3d9/LayerManagerD3D9.cpp', - 'd3d9/PaintedLayerD3D9.cpp', 'd3d9/TextureD3D9.cpp', ] SOURCES += [ From f3f0dcbca1ed235bfe8d74dc627e3f68890b8d32 Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Fri, 23 Jan 2015 03:41:20 +0000 Subject: [PATCH 039/106] Bug 1097699 - Part 3: Remove usage of LayerManagerD3D10. r=jrmuizel --- widget/windows/nsWindow.cpp | 55 +--------------------------- widget/windows/nsWindowGfx.cpp | 16 -------- widget/windows/winrt/MetroWidget.cpp | 36 +----------------- widget/windows/winrt/MetroWidget.h | 1 - 4 files changed, 2 insertions(+), 106 deletions(-) diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index b1f549f211b..00be1b370fe 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -133,10 +133,6 @@ #include "mozilla/WindowsVersion.h" #include "nsThemeConstants.h" -#ifdef MOZ_ENABLE_D3D10_LAYER -#include "LayerManagerD3D10.h" -#endif - #include "nsIGfxInfo.h" #include "nsUXThemeConstants.h" #include "KeyboardLayout.h" @@ -3311,24 +3307,6 @@ nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager, *aAllowRetaining = true; } -#ifdef MOZ_ENABLE_D3D10_LAYER - if (mLayerManager) { - if (mLayerManager->GetBackendType() == LayersBackend::LAYERS_D3D10) - { - LayerManagerD3D10 *layerManagerD3D10 = - static_cast(mLayerManager.get()); - if (layerManagerD3D10->device() != - gfxWindowsPlatform::GetPlatform()->GetD3D10Device()) - { - MOZ_ASSERT(!mLayerManager->IsInTransaction()); - - mLayerManager->Destroy(); - mLayerManager = nullptr; - } - } - } -#endif - RECT windowRect; ::GetClientRect(mWnd, &windowRect); @@ -3343,38 +3321,7 @@ nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager, } if (!mLayerManager) { - // If D3D9 is not currently allowed but the permanent manager is required, - // -and- we're currently using basic layers, run through this check. - LayerManagerPrefs prefs; - GetLayerManagerPrefs(&prefs); - - /* We don't currently support using an accelerated layer manager with - * transparent windows so don't even try. I'm also not sure if we even - * want to support this case. See bug #593471 */ - if (eTransparencyTransparent == mTransparencyMode || - prefs.mDisableAcceleration || - windowRect.right - windowRect.left > MAX_ACCELERATED_DIMENSION || - windowRect.bottom - windowRect.top > MAX_ACCELERATED_DIMENSION) - mUseLayersAcceleration = false; - else if (prefs.mAccelerateByDefault) - mUseLayersAcceleration = true; - - if (mUseLayersAcceleration) { -#ifdef MOZ_ENABLE_D3D10_LAYER - if (!prefs.mPreferD3D9 && !prefs.mPreferOpenGL) { - nsRefPtr layerManager = - new LayerManagerD3D10(this); - if (layerManager->Initialize(prefs.mForceAcceleration)) { - mLayerManager = layerManager; - } - } -#endif - } - - // Fall back to software if we couldn't use any hardware backends. - if (!mLayerManager) { - mLayerManager = CreateBasicLayerManager(); - } + mLayerManager = CreateBasicLayerManager(); } NS_ASSERTION(mLayerManager, "Couldn't provide a valid layer manager."); diff --git a/widget/windows/nsWindowGfx.cpp b/widget/windows/nsWindowGfx.cpp index 4feff50a789..0513112c78f 100644 --- a/widget/windows/nsWindowGfx.cpp +++ b/widget/windows/nsWindowGfx.cpp @@ -44,9 +44,6 @@ using mozilla::plugins::PluginInstanceParent; #include "nsDebug.h" #include "nsIXULRuntime.h" -#ifdef MOZ_ENABLE_D3D10_LAYER -#include "LayerManagerD3D10.h" -#endif #include "mozilla/layers/CompositorParent.h" #include "ClientLayerManager.h" @@ -518,19 +515,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel) } } break; -#ifdef MOZ_ENABLE_D3D10_LAYER - case LayersBackend::LAYERS_D3D10: - { - gfxWindowsPlatform::GetPlatform()->UpdateRenderMode(); - LayerManagerD3D10 *layerManagerD3D10 = static_cast(GetLayerManager()); - if (layerManagerD3D10->device() != gfxWindowsPlatform::GetPlatform()->GetD3D10Device()) { - Invalidate(); - } else { - result = listener->PaintWindow(this, region); - } - } - break; -#endif case LayersBackend::LAYERS_CLIENT: result = listener->PaintWindow(this, region); break; diff --git a/widget/windows/winrt/MetroWidget.cpp b/widget/windows/winrt/MetroWidget.cpp index 3c1d74cbcc3..23e66225bc9 100644 --- a/widget/windows/winrt/MetroWidget.cpp +++ b/widget/windows/winrt/MetroWidget.cpp @@ -5,7 +5,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ContentHelper.h" -#include "LayerManagerD3D10.h" #include "MetroWidget.h" #include "MetroApp.h" #include "mozilla/Preferences.h" @@ -1005,17 +1004,6 @@ MetroWidget::ShouldUseOffMainThreadCompositing() mWindowType == eWindowType_toplevel; } -bool -MetroWidget::ShouldUseMainThreadD3D10Manager() -{ - // Either we're not initialized yet, or this is the toolkit widget - if (!mView) { - return false; - } - return !gfxPlatform::UsesOffMainThreadCompositing() && - mWindowType == eWindowType_toplevel; -} - bool MetroWidget::ShouldUseBasicManager() { @@ -1158,22 +1146,6 @@ MetroWidget::GetLayerManager(PLayerTransactionChild* aShadowManager, retaining = false; } - // If the backend device has changed, create a new manager (pulled from nswindow) - if (mLayerManager) { - if (mLayerManager->GetBackendType() == LayersBackend::LAYERS_D3D10) { - LayerManagerD3D10 *layerManagerD3D10 = - static_cast(mLayerManager.get()); - if (layerManagerD3D10->device() != - gfxWindowsPlatform::GetPlatform()->GetD3D10Device()) { - MOZ_ASSERT(!mLayerManager->IsInTransaction()); - - mLayerManager->Destroy(); - mLayerManager = nullptr; - retaining = false; - } - } - } - HRESULT hr = S_OK; // Create a layer manager: try to use an async compositor first, if enabled. @@ -1182,13 +1154,7 @@ MetroWidget::GetLayerManager(PLayerTransactionChild* aShadowManager, if (ShouldUseOffMainThreadCompositing()) { NS_ASSERTION(aShadowManager == nullptr, "Async Compositor not supported with e10s"); CreateCompositor(); - } else if (ShouldUseMainThreadD3D10Manager()) { - nsRefPtr layerManager = - new mozilla::layers::LayerManagerD3D10(this); - if (layerManager->Initialize(true, &hr)) { - mLayerManager = layerManager; - } - } else if (ShouldUseBasicManager()) { + } else { mLayerManager = CreateBasicLayerManager(); } // Either we're not ready to initialize yet due to a missing view pointer, diff --git a/widget/windows/winrt/MetroWidget.h b/widget/windows/winrt/MetroWidget.h index 5ce0dc3ade6..d0bc8c8f435 100644 --- a/widget/windows/winrt/MetroWidget.h +++ b/widget/windows/winrt/MetroWidget.h @@ -148,7 +148,6 @@ public: virtual bool IsEnabled() const; // ShouldUseOffMainThreadCompositing is defined in base widget virtual bool ShouldUseOffMainThreadCompositing(); - bool ShouldUseMainThreadD3D10Manager(); bool ShouldUseBasicManager(); bool ShouldUseAPZC(); virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr, From bf7969ed0ef9d03fb56b1dca04aead92adfc2d1a Mon Sep 17 00:00:00 2001 From: Bas Schouten Date: Fri, 23 Jan 2015 03:41:21 +0000 Subject: [PATCH 040/106] Bug 1097699 - Part 4: Remove LayerManagerD3D10 code. r=jrmuizel --- gfx/layers/ImageContainer.cpp | 1 - gfx/layers/d3d10/CanvasLayerD3D10.cpp | 241 - gfx/layers/d3d10/CanvasLayerD3D10.h | 73 - gfx/layers/d3d10/ColorLayerD3D10.cpp | 60 - gfx/layers/d3d10/ColorLayerD3D10.h | 27 - gfx/layers/d3d10/ContainerLayerD3D10.cpp | 268 - gfx/layers/d3d10/ContainerLayerD3D10.h | 42 - gfx/layers/d3d10/ImageLayerD3D10.cpp | 400 - gfx/layers/d3d10/ImageLayerD3D10.h | 60 - gfx/layers/d3d10/LayerManagerD3D10.cpp | 888 - gfx/layers/d3d10/LayerManagerD3D10.fx | 605 - gfx/layers/d3d10/LayerManagerD3D10.h | 288 - gfx/layers/d3d10/LayerManagerD3D10Effect.h | 17658 ------------------- gfx/layers/d3d10/PaintedLayerD3D10.cpp | 478 - gfx/layers/d3d10/PaintedLayerD3D10.h | 73 - gfx/layers/d3d10/ReadbackLayerD3D10.h | 33 - gfx/layers/d3d10/ReadbackManagerD3D10.cpp | 225 - gfx/layers/d3d10/ReadbackManagerD3D10.h | 75 - gfx/layers/d3d10/genshaders.sh | 5 - gfx/layers/ipc/ShadowLayerUtils.h | 4 - gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp | 68 - gfx/layers/ipc/ShadowLayerUtilsD3D10.h | 34 - gfx/layers/moz.build | 13 - 23 files changed, 21619 deletions(-) delete mode 100644 gfx/layers/d3d10/CanvasLayerD3D10.cpp delete mode 100644 gfx/layers/d3d10/CanvasLayerD3D10.h delete mode 100644 gfx/layers/d3d10/ColorLayerD3D10.cpp delete mode 100644 gfx/layers/d3d10/ColorLayerD3D10.h delete mode 100644 gfx/layers/d3d10/ContainerLayerD3D10.cpp delete mode 100644 gfx/layers/d3d10/ContainerLayerD3D10.h delete mode 100644 gfx/layers/d3d10/ImageLayerD3D10.cpp delete mode 100644 gfx/layers/d3d10/ImageLayerD3D10.h delete mode 100644 gfx/layers/d3d10/LayerManagerD3D10.cpp delete mode 100644 gfx/layers/d3d10/LayerManagerD3D10.fx delete mode 100644 gfx/layers/d3d10/LayerManagerD3D10.h delete mode 100644 gfx/layers/d3d10/LayerManagerD3D10Effect.h delete mode 100644 gfx/layers/d3d10/PaintedLayerD3D10.cpp delete mode 100644 gfx/layers/d3d10/PaintedLayerD3D10.h delete mode 100644 gfx/layers/d3d10/ReadbackLayerD3D10.h delete mode 100644 gfx/layers/d3d10/ReadbackManagerD3D10.cpp delete mode 100644 gfx/layers/d3d10/ReadbackManagerD3D10.h delete mode 100644 gfx/layers/d3d10/genshaders.sh delete mode 100644 gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp delete mode 100644 gfx/layers/ipc/ShadowLayerUtilsD3D10.h diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index cf57987199a..3b4e9b5620d 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -35,7 +35,6 @@ #include "gfxD2DSurface.h" #include "gfxWindowsPlatform.h" #include -#include "d3d10/ImageLayerD3D10.h" #include "D3D9SurfaceImage.h" #endif diff --git a/gfx/layers/d3d10/CanvasLayerD3D10.cpp b/gfx/layers/d3d10/CanvasLayerD3D10.cpp deleted file mode 100644 index 52b62cd4086..00000000000 --- a/gfx/layers/d3d10/CanvasLayerD3D10.cpp +++ /dev/null @@ -1,241 +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 "CanvasLayerD3D10.h" - -#include "../d3d9/Nv3DVUtils.h" -#include "gfxWindowsSurface.h" -#include "gfxWindowsPlatform.h" -#include "SharedSurfaceANGLE.h" -#include "SharedSurfaceGL.h" -#include "gfxContext.h" -#include "GLContext.h" -#include "gfxPrefs.h" - -namespace mozilla { -namespace layers { - -using namespace mozilla::gl; -using namespace mozilla::gfx; - -CanvasLayerD3D10::CanvasLayerD3D10(LayerManagerD3D10 *aManager) - : CanvasLayer(aManager, nullptr) - , LayerD3D10(aManager) - , mDataIsPremultiplied(true) - , mOriginPos(gl::OriginPos::TopLeft) - , mHasAlpha(true) -{ - mImplData = static_cast(this); -} - -CanvasLayerD3D10::~CanvasLayerD3D10() -{ -} - -void -CanvasLayerD3D10::Initialize(const Data& aData) -{ - NS_ASSERTION(mSurface == nullptr, "BasicCanvasLayer::Initialize called twice!"); - - if (aData.mGLContext) { - mGLContext = aData.mGLContext; - NS_ASSERTION(mGLContext->IsOffscreen(), "Canvas GLContext must be offscreen."); - mDataIsPremultiplied = aData.mIsGLAlphaPremult; - mOriginPos = gl::OriginPos::TopLeft; - - GLScreenBuffer* screen = mGLContext->Screen(); - - UniquePtr factory = nullptr; - if (!gfxPrefs::WebGLForceLayersReadback()) { - if (mGLContext->IsANGLE()) { - factory = SurfaceFactory_ANGLEShareHandle::Create(mGLContext, - screen->mCaps); - } - } - - if (factory) { - screen->Morph(Move(factory)); - } - } else if (aData.mDrawTarget) { - mDrawTarget = aData.mDrawTarget; - void *texture = mDrawTarget->GetNativeSurface(NativeSurfaceType::D3D10_TEXTURE); - - if (texture) { - mTexture = static_cast(texture); - - NS_ASSERTION(!aData.mGLContext, - "CanvasLayer can't have both DrawTarget and WebGLContext/Surface"); - - mBounds.SetRect(0, 0, aData.mSize.width, aData.mSize.height); - device()->CreateShaderResourceView(mTexture, nullptr, getter_AddRefs(mSRView)); - return; - } - - // XXX we should store mDrawTarget and use it directly in UpdateSurface, - // bypassing Thebes - mSurface = mDrawTarget->Snapshot(); - } else { - MOZ_CRASH("CanvasLayer created without mSurface, mDrawTarget or mGLContext?"); - } - - mBounds.SetRect(0, 0, aData.mSize.width, aData.mSize.height); - mIsD2DTexture = false; - - // Create a texture in case we need to readback. - CD3D10_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM, mBounds.width, mBounds.height, 1, 1); - desc.Usage = D3D10_USAGE_DYNAMIC; - desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE; - - HRESULT hr = device()->CreateTexture2D(&desc, nullptr, getter_AddRefs(mTexture)); - if (FAILED(hr)) { - NS_WARNING("Failed to create texture for CanvasLayer!"); - return; - } - - device()->CreateShaderResourceView(mTexture, nullptr, getter_AddRefs(mUploadSRView)); -} - -void -CanvasLayerD3D10::UpdateSurface() -{ - if (!IsDirty()) - return; - Painted(); - - if (mDrawTarget) { - mDrawTarget->Flush(); - } else if (mIsD2DTexture) { - return; - } - - if (!mTexture) { - return; - } - - SharedSurface* surf = nullptr; - if (mGLContext) { - auto screen = mGLContext->Screen(); - MOZ_ASSERT(screen); - - surf = screen->Front()->Surf(); - if (!surf) - return; - surf->WaitSync(); - - if (surf->mType == SharedSurfaceType::EGLSurfaceANGLE) { - SharedSurface_ANGLEShareHandle* shareSurf = SharedSurface_ANGLEShareHandle::Cast(surf); - HANDLE shareHandle = shareSurf->GetShareHandle(); - - HRESULT hr = device()->OpenSharedResource(shareHandle, - __uuidof(ID3D10Texture2D), - getter_AddRefs(mTexture)); - if (FAILED(hr)) - return; - - hr = device()->CreateShaderResourceView(mTexture, - nullptr, - getter_AddRefs(mSRView)); - if (FAILED(hr)) - return; - - return; - } - } - - D3D10_MAPPED_TEXTURE2D map; - HRESULT hr = mTexture->Map(0, D3D10_MAP_WRITE_DISCARD, 0, &map); - - if (FAILED(hr)) { - gfxWarning() << "Failed to lock CanvasLayer texture."; - return; - } - - RefPtr destTarget = - Factory::CreateDrawTargetForD3D10Texture(mTexture, - SurfaceFormat::R8G8B8A8); - - if (!destTarget) { - gfxWarning() << "Invalid D3D10 texture target R8G8B8A8"; - return; - } - - if (surf) { - if (!ReadbackSharedSurface(surf, destTarget)) { - gfxWarning() << "Failed to readback into texture."; - } - } else if (mSurface) { - Rect r(Point(0, 0), ToRect(mBounds).Size()); - destTarget->DrawSurface(mSurface, r, r, DrawSurfaceOptions(), - DrawOptions(1.0F, CompositionOp::OP_SOURCE)); - } - - mTexture->Unmap(0); - mSRView = mUploadSRView; -} - -Layer* -CanvasLayerD3D10::GetLayer() -{ - return this; -} - -void -CanvasLayerD3D10::RenderLayer() -{ - FirePreTransactionCallback(); - UpdateSurface(); - FireDidTransactionCallback(); - - if (!mTexture) - return; - - nsIntRect visibleRect = mVisibleRegion.GetBounds(); - - SetEffectTransformAndOpacity(); - - uint8_t shaderFlags = 0; - shaderFlags |= LoadMaskTexture(); - shaderFlags |= mDataIsPremultiplied - ? SHADER_PREMUL : SHADER_NON_PREMUL | SHADER_RGBA; - shaderFlags |= mHasAlpha ? SHADER_RGBA : SHADER_RGB; - shaderFlags |= mFilter == GraphicsFilter::FILTER_NEAREST - ? SHADER_POINT : SHADER_LINEAR; - ID3D10EffectTechnique* technique = SelectShader(shaderFlags); - - if (mSRView) { - effect()->GetVariableByName("tRGB")->AsShaderResource()->SetResource(mSRView); - } - - effect()->GetVariableByName("vLayerQuad")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)mBounds.x, - (float)mBounds.y, - (float)mBounds.width, - (float)mBounds.height) - ); - - const bool needsYFlip = (mOriginPos == gl::OriginPos::BottomLeft); - - if (needsYFlip) { - effect()->GetVariableByName("vTextureCoords")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - 0, - 1.0f, - 1.0f, - -1.0f) - ); - } - - technique->GetPassByIndex(0)->Apply(0); - device()->Draw(4, 0); - - if (needsYFlip) { - effect()->GetVariableByName("vTextureCoords")->AsVector()-> - SetFloatVector(ShaderConstantRectD3D10(0, 0, 1.0f, 1.0f)); - } -} - -} /* namespace layers */ -} /* namespace mozilla */ diff --git a/gfx/layers/d3d10/CanvasLayerD3D10.h b/gfx/layers/d3d10/CanvasLayerD3D10.h deleted file mode 100644 index 34733f0d37b..00000000000 --- a/gfx/layers/d3d10/CanvasLayerD3D10.h +++ /dev/null @@ -1,73 +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_CANVASLAYERD3D10_H -#define GFX_CANVASLAYERD3D10_H - -#include "GLContextTypes.h" -#include "LayerManagerD3D10.h" -#include "mozilla/Preferences.h" - -namespace mozilla { - -namespace gl { -class GLContext; -} - -namespace layers { - -class CanvasLayerD3D10 : public CanvasLayer, - public LayerD3D10 -{ -public: - CanvasLayerD3D10(LayerManagerD3D10 *aManager); - ~CanvasLayerD3D10(); - - // CanvasLayer implementation - virtual void Initialize(const Data& aData); - - // LayerD3D10 implementation - virtual Layer* GetLayer(); - virtual void RenderLayer(); - -private: - typedef mozilla::gl::GLContext GLContext; - - void UpdateSurface(); - - RefPtr mSurface; - mozilla::RefPtr mDrawTarget; - nsRefPtr mGLContext; - nsRefPtr mTexture; - nsRefPtr mUploadSRView; - nsRefPtr mSRView; - - bool mDataIsPremultiplied; - gl::OriginPos mOriginPos; - bool mIsD2DTexture; - bool mHasAlpha; - - nsAutoArrayPtr mCachedTempBlob; - uint32_t mCachedTempBlob_Size; - - uint8_t* GetTempBlob(const uint32_t aSize) - { - if (!mCachedTempBlob || aSize != mCachedTempBlob_Size) { - mCachedTempBlob = new uint8_t[aSize]; - mCachedTempBlob_Size = aSize; - } - - return mCachedTempBlob; - } - - void DiscardTempBlob() - { - mCachedTempBlob = nullptr; - } -}; - -} /* layers */ -} /* mozilla */ -#endif /* GFX_CANVASLAYERD3D10_H */ diff --git a/gfx/layers/d3d10/ColorLayerD3D10.cpp b/gfx/layers/d3d10/ColorLayerD3D10.cpp deleted file mode 100644 index 0b06c9079d2..00000000000 --- a/gfx/layers/d3d10/ColorLayerD3D10.cpp +++ /dev/null @@ -1,60 +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 "ColorLayerD3D10.h" - -#include "../d3d9/Nv3DVUtils.h" - -namespace mozilla { -namespace layers { - -ColorLayerD3D10::ColorLayerD3D10(LayerManagerD3D10 *aManager) - : ColorLayer(aManager, nullptr) - , LayerD3D10(aManager) -{ - mImplData = static_cast(this); -} - -Layer* -ColorLayerD3D10::GetLayer() -{ - return this; -} - -void -ColorLayerD3D10::RenderLayer() -{ - float color[4]; - // output color is premultiplied, so we need to adjust all channels. - // mColor is not premultiplied. - float opacity = GetEffectiveOpacity() * mColor.a; - color[0] = (float)(mColor.r * opacity); - color[1] = (float)(mColor.g * opacity); - color[2] = (float)(mColor.b * opacity); - color[3] = opacity; - - const gfx::Matrix4x4& transform = GetEffectiveTransform(); - void* raw = &const_cast(transform)._11; - effect()->GetVariableByName("mLayerTransform")->SetRawValue(raw, 0, 64); - effect()->GetVariableByName("fLayerColor")->AsVector()->SetFloatVector(color); - - ID3D10EffectTechnique *technique = SelectShader(SHADER_SOLID | LoadMaskTexture()); - - nsIntRect bounds = GetBounds(); - - effect()->GetVariableByName("vLayerQuad")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)bounds.x, - (float)bounds.y, - (float)bounds.width, - (float)bounds.height) - ); - - technique->GetPassByIndex(0)->Apply(0); - device()->Draw(4, 0); -} - -} /* layers */ -} /* mozilla */ diff --git a/gfx/layers/d3d10/ColorLayerD3D10.h b/gfx/layers/d3d10/ColorLayerD3D10.h deleted file mode 100644 index cdd085912ec..00000000000 --- a/gfx/layers/d3d10/ColorLayerD3D10.h +++ /dev/null @@ -1,27 +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_COLORLAYERD3D10_H -#define GFX_COLORLAYERD3D10_H - -#include "LayerManagerD3D10.h" - -namespace mozilla { -namespace layers { - -class ColorLayerD3D10 : public ColorLayer, - public LayerD3D10 -{ -public: - ColorLayerD3D10(LayerManagerD3D10 *aManager); - - /* LayerD3D10 implementation */ - virtual Layer* GetLayer(); - virtual void RenderLayer(); -}; - -} /* layers */ -} /* mozilla */ -#endif /* GFX_PAINTEDLAYERD3D10_H */ diff --git a/gfx/layers/d3d10/ContainerLayerD3D10.cpp b/gfx/layers/d3d10/ContainerLayerD3D10.cpp deleted file mode 100644 index 116ae2f264b..00000000000 --- a/gfx/layers/d3d10/ContainerLayerD3D10.cpp +++ /dev/null @@ -1,268 +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 "ContainerLayerD3D10.h" - -#include "PaintedLayerD3D10.h" -#include "ReadbackProcessor.h" - -using namespace mozilla::gfx; - -namespace mozilla { -namespace layers { - -ContainerLayerD3D10::ContainerLayerD3D10(LayerManagerD3D10 *aManager) - : ContainerLayer(aManager, nullptr) - , LayerD3D10(aManager) -{ - mImplData = static_cast(this); -} - -ContainerLayerD3D10::~ContainerLayerD3D10() -{ - while (mFirstChild) { - RemoveChild(mFirstChild); - } -} - -Layer* -ContainerLayerD3D10::GetLayer() -{ - return this; -} - -LayerD3D10* -ContainerLayerD3D10::GetFirstChildD3D10() -{ - if (!mFirstChild) { - return nullptr; - } - return static_cast(mFirstChild->ImplData()); -} - -void -ContainerLayerD3D10::RenderLayer() -{ - float renderTargetOffset[] = { 0, 0 }; - - nsIntRect visibleRect = mVisibleRegion.GetBounds(); - float opacity = GetEffectiveOpacity(); - bool useIntermediate = UseIntermediateSurface(); - - nsRefPtr previousRTView; - nsRefPtr renderTexture; - nsRefPtr rtView; - float previousRenderTargetOffset[2]; - nsIntSize previousViewportSize; - - gfx3DMatrix oldViewMatrix; - - if (useIntermediate) { - device()->OMGetRenderTargets(1, getter_AddRefs(previousRTView), nullptr); - - D3D10_TEXTURE2D_DESC desc; - memset(&desc, 0, sizeof(D3D10_TEXTURE2D_DESC)); - desc.ArraySize = 1; - desc.MipLevels = 1; - desc.Width = visibleRect.width; - desc.Height = visibleRect.height; - desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE; - desc.SampleDesc.Count = 1; - desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; - HRESULT hr; - hr = device()->CreateTexture2D(&desc, nullptr, getter_AddRefs(renderTexture)); - - if (FAILED(hr)) { - LayerManagerD3D10::ReportFailure(NS_LITERAL_CSTRING("Failed to create new texture for ContainerLayerD3D10!"), - hr); - return; - } - - hr = device()->CreateRenderTargetView(renderTexture, nullptr, getter_AddRefs(rtView)); - NS_ASSERTION(SUCCEEDED(hr), "Failed to create render target view for ContainerLayerD3D10!"); - - effect()->GetVariableByName("vRenderTargetOffset")-> - GetRawValue(previousRenderTargetOffset, 0, 8); - - previousViewportSize = mD3DManager->GetViewport(); - - if (mVisibleRegion.GetNumRects() != 1 || !(GetContentFlags() & CONTENT_OPAQUE)) { - Matrix4x4 transform3D = GetEffectiveTransform(); - Matrix transform; - // If we have an opaque ancestor layer, then we can be sure that - // all the pixels we draw into are either opaque already or will be - // covered by something opaque. Otherwise copying up the background is - // not safe. - if (mSupportsComponentAlphaChildren) { - bool is2d = transform3D.Is2D(&transform); - NS_ASSERTION(is2d, "Transform should be 2d when mSupportsComponentAlphaChildren."); - - // Copy background up from below. This applies any 2D transform that is - // applied to use relative to our parent, and compensates for the offset - // that was applied on our parent's rendering. - D3D10_BOX srcBox; - srcBox.left = std::max(visibleRect.x + int32_t(transform._31) - int32_t(previousRenderTargetOffset[0]), 0); - srcBox.top = std::max(visibleRect.y + int32_t(transform._32) - int32_t(previousRenderTargetOffset[1]), 0); - srcBox.right = std::min(srcBox.left + visibleRect.width, previousViewportSize.width); - srcBox.bottom = std::min(srcBox.top + visibleRect.height, previousViewportSize.height); - srcBox.back = 1; - srcBox.front = 0; - - nsRefPtr srcResource; - previousRTView->GetResource(getter_AddRefs(srcResource)); - - device()->CopySubresourceRegion(renderTexture, 0, - 0, 0, 0, - srcResource, 0, - &srcBox); - } else { - float black[] = { 0, 0, 0, 0}; - device()->ClearRenderTargetView(rtView, black); - } - } - - ID3D10RenderTargetView *rtViewPtr = rtView; - device()->OMSetRenderTargets(1, &rtViewPtr, nullptr); - - renderTargetOffset[0] = (float)visibleRect.x; - renderTargetOffset[1] = (float)visibleRect.y; - effect()->GetVariableByName("vRenderTargetOffset")-> - SetRawValue(renderTargetOffset, 0, 8); - - mD3DManager->SetViewport(nsIntSize(visibleRect.Size())); - } - - D3D10_RECT oldD3D10Scissor; - UINT numRects = 1; - device()->RSGetScissorRects(&numRects, &oldD3D10Scissor); - // Convert scissor to an nsIntRect. D3D10_RECT's are exclusive - // on the bottom and right values. - nsIntRect oldScissor(oldD3D10Scissor.left, - oldD3D10Scissor.top, - oldD3D10Scissor.right - oldD3D10Scissor.left, - oldD3D10Scissor.bottom - oldD3D10Scissor.top); - - nsAutoTArray children; - SortChildrenBy3DZOrder(children); - - /* - * Render this container's contents. - */ - for (uint32_t i = 0; i < children.Length(); i++) { - LayerD3D10* layerToRender = static_cast(children.ElementAt(i)->ImplData()); - - if (layerToRender->GetLayer()->GetEffectiveVisibleRegion().IsEmpty()) { - continue; - } - - nsIntRect scissorRect = - RenderTargetPixel::ToUntyped(layerToRender->GetLayer()->CalculateScissorRect(RenderTargetPixel::FromUntyped(oldScissor))); - if (scissorRect.IsEmpty()) { - continue; - } - - D3D10_RECT d3drect; - d3drect.left = scissorRect.x; - d3drect.top = scissorRect.y; - d3drect.right = scissorRect.x + scissorRect.width; - d3drect.bottom = scissorRect.y + scissorRect.height; - device()->RSSetScissorRects(1, &d3drect); - - layerToRender->RenderLayer(); - } - - device()->RSSetScissorRects(1, &oldD3D10Scissor); - - if (useIntermediate) { - mD3DManager->SetViewport(previousViewportSize); - ID3D10RenderTargetView *rtView = previousRTView; - device()->OMSetRenderTargets(1, &rtView, nullptr); - effect()->GetVariableByName("vRenderTargetOffset")-> - SetRawValue(previousRenderTargetOffset, 0, 8); - - SetEffectTransformAndOpacity(); - - ID3D10EffectTechnique *technique; - if (LoadMaskTexture()) { - if (GetTransform().CanDraw2D()) { - technique = SelectShader(SHADER_RGBA | SHADER_PREMUL | SHADER_MASK); - } else { - technique = SelectShader(SHADER_RGBA | SHADER_PREMUL | SHADER_MASK_3D); - } - } else { - technique = SelectShader(SHADER_RGBA | SHADER_PREMUL | SHADER_NO_MASK); - } - - effect()->GetVariableByName("vLayerQuad")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)visibleRect.x, - (float)visibleRect.y, - (float)visibleRect.width, - (float)visibleRect.height) - ); - - technique->GetPassByIndex(0)->Apply(0); - - ID3D10ShaderResourceView *view; - device()->CreateShaderResourceView(renderTexture, nullptr, &view); - device()->PSSetShaderResources(0, 1, &view); - device()->Draw(4, 0); - view->Release(); - } -} - -void -ContainerLayerD3D10::LayerManagerDestroyed() -{ - while (mFirstChild) { - GetFirstChildD3D10()->LayerManagerDestroyed(); - RemoveChild(mFirstChild); - } -} - -void -ContainerLayerD3D10::Validate() -{ - nsIntRect visibleRect = mVisibleRegion.GetBounds(); - - mSupportsComponentAlphaChildren = false; - - if (UseIntermediateSurface()) { - Matrix4x4 transform3D = GetEffectiveTransform(); - Matrix transform; - - if (mVisibleRegion.GetNumRects() == 1 && (GetContentFlags() & CONTENT_OPAQUE)) { - // don't need a background, we're going to paint all opaque stuff - mSupportsComponentAlphaChildren = true; - } else { - if (HasOpaqueAncestorLayer(this) && - transform3D.Is2D(&transform) && !ThebesMatrix(transform).HasNonIntegerTranslation() && - GetParent()->GetEffectiveVisibleRegion().GetBounds().Contains(visibleRect)) - { - // In this case we can copy up the background. See RenderLayer. - mSupportsComponentAlphaChildren = true; - } - } - } else { - mSupportsComponentAlphaChildren = (GetContentFlags() & CONTENT_OPAQUE) || - (mParent && mParent->SupportsComponentAlphaChildren()); - } - - ReadbackProcessor readback; - readback.BuildUpdates(this); - - Layer *layer = GetFirstChild(); - while (layer) { - if (layer->GetType() == TYPE_PAINTED) { - static_cast(layer)->Validate(&readback); - } else { - static_cast(layer->ImplData())->Validate(); - } - layer = layer->GetNextSibling(); - } -} - -} /* layers */ -} /* mozilla */ diff --git a/gfx/layers/d3d10/ContainerLayerD3D10.h b/gfx/layers/d3d10/ContainerLayerD3D10.h deleted file mode 100644 index 572d01cd35e..00000000000 --- a/gfx/layers/d3d10/ContainerLayerD3D10.h +++ /dev/null @@ -1,42 +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_CONTAINERLAYERD3D10_H -#define GFX_CONTAINERLAYERD3D10_H - -#include "LayerManagerD3D10.h" - -namespace mozilla { -namespace layers { - -class ContainerLayerD3D10 : public ContainerLayer, - public LayerD3D10 -{ -public: - ContainerLayerD3D10(LayerManagerD3D10 *aManager); - ~ContainerLayerD3D10(); - - nsIntRect GetVisibleRect() { return mVisibleRegion.GetBounds(); } - - /* LayerD3D10 implementation */ - virtual Layer* GetLayer(); - - virtual LayerD3D10* GetFirstChildD3D10(); - - virtual void RenderLayer(); - virtual void Validate(); - - virtual void LayerManagerDestroyed(); - - virtual void ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface) - { - DefaultComputeEffectiveTransforms(aTransformToSurface); - } -}; - -} /* layers */ -} /* mozilla */ - -#endif /* GFX_CONTAINERLAYERD3D10_H */ diff --git a/gfx/layers/d3d10/ImageLayerD3D10.cpp b/gfx/layers/d3d10/ImageLayerD3D10.cpp deleted file mode 100644 index 805ba49bba9..00000000000 --- a/gfx/layers/d3d10/ImageLayerD3D10.cpp +++ /dev/null @@ -1,400 +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 "ImageLayerD3D10.h" -#include "gfxD2DSurface.h" -#include "gfxWindowsSurface.h" -#include "yuv_convert.h" -#include "../d3d9/Nv3DVUtils.h" -#include "D3D9SurfaceImage.h" -#include "mozilla/gfx/Point.h" -#include "gfx2DGlue.h" - -#include "gfxWindowsPlatform.h" - -namespace mozilla { -namespace layers { - -using namespace mozilla::gfx; - -static already_AddRefed -DataToTexture(ID3D10Device *aDevice, - unsigned char *data, - int stride, - const IntSize &aSize) -{ - D3D10_SUBRESOURCE_DATA srdata; - - CD3D10_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM, - aSize.width, - aSize.height, - 1, 1); - desc.Usage = D3D10_USAGE_IMMUTABLE; - - srdata.pSysMem = data; - srdata.SysMemPitch = stride; - - nsRefPtr texture; - HRESULT hr = aDevice->CreateTexture2D(&desc, &srdata, getter_AddRefs(texture)); - - if (FAILED(hr)) { - LayerManagerD3D10::ReportFailure(NS_LITERAL_CSTRING("Failed to create texture for data"), - hr); - } - - return texture.forget(); -} - -static already_AddRefed -SurfaceToTexture(ID3D10Device *aDevice, - SourceSurface *aSurface, - const IntSize &aSize) -{ - if (!aSurface) { - return nullptr; - } - - void *nativeSurf = - aSurface->GetNativeSurface(NativeSurfaceType::D3D10_TEXTURE); - if (nativeSurf) { - nsRefPtr texture = - static_cast(nativeSurf); - ID3D10Device *dev; - texture->GetDevice(&dev); - if (dev == aDevice) { - return texture.forget(); - } - } - RefPtr dataSurface = aSurface->GetDataSurface(); - if (!dataSurface) { - return nullptr; - } - DataSourceSurface::MappedSurface map; - if (!dataSurface->Map(DataSourceSurface::MapType::READ, &map)) { - return nullptr; - } - nsRefPtr texture = - DataToTexture(aDevice, map.mData, map.mStride, aSize); - dataSurface->Unmap(); - return texture.forget(); -} - -Layer* -ImageLayerD3D10::GetLayer() -{ - return this; -} - -/** - * Returns a shader resource view for an image. - * Returns nullptr if unsuccessful. - * If successful, aHasAlpha will be true iff the resulting texture - * has an alpha component. - */ -ID3D10ShaderResourceView* -ImageLayerD3D10::GetImageSRView(Image* aImage, bool& aHasAlpha, IDXGIKeyedMutex **aMutex) -{ - NS_ASSERTION(aImage, "Null image."); - - if (aImage->GetFormat() == ImageFormat::CAIRO_SURFACE) { - CairoImage *cairoImage = - static_cast(aImage); - - RefPtr surf = cairoImage->GetAsSourceSurface(); - if (!surf) { - return nullptr; - } - - if (!aImage->GetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D10)) { - nsAutoPtr dat(new TextureD3D10BackendData()); - dat->mTexture = SurfaceToTexture(device(), surf, cairoImage->GetSize()); - - if (dat->mTexture) { - device()->CreateShaderResourceView(dat->mTexture, nullptr, getter_AddRefs(dat->mSRView)); - aImage->SetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D10, dat.forget()); - } - } - - aHasAlpha = surf->GetFormat() == SurfaceFormat::B8G8R8A8; - } else if (aImage->GetFormat() == ImageFormat::D3D9_RGB32_TEXTURE) { - if (!aImage->GetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D10)) { - // Use resource sharing to open the D3D9 texture as a D3D10 texture, - HRESULT hr; - D3D9SurfaceImage* d3dImage = reinterpret_cast(aImage); - nsRefPtr texture; - hr = device()->OpenSharedResource(d3dImage->GetShareHandle(), - IID_ID3D10Texture2D, - (void**)getter_AddRefs(texture)); - NS_ENSURE_TRUE(SUCCEEDED(hr), nullptr); - - nsAutoPtr dat(new TextureD3D10BackendData()); - dat->mTexture = texture; - - hr = device()->CreateShaderResourceView(dat->mTexture, nullptr, getter_AddRefs(dat->mSRView)); - NS_ENSURE_TRUE(SUCCEEDED(hr) && dat->mSRView, nullptr); - - aImage->SetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D10, dat.forget()); - } - aHasAlpha = false; - } else { - NS_WARNING("Incorrect image type."); - return nullptr; - } - - TextureD3D10BackendData *data = - static_cast(aImage->GetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D10)); - - if (!data) { - return nullptr; - } - - if (aMutex && - SUCCEEDED(data->mTexture->QueryInterface(IID_IDXGIKeyedMutex, (void**)aMutex))) { - if (FAILED((*aMutex)->AcquireSync(0, 0))) { - NS_WARNING("Failed to acquire sync on keyed mutex, plugin forgot to release?"); - return nullptr; - } - } - - nsRefPtr dev; - data->mTexture->GetDevice(getter_AddRefs(dev)); - if (dev != device()) { - return nullptr; - } - - return data->mSRView; -} - -void -ImageLayerD3D10::RenderLayer() -{ - ImageContainer *container = GetContainer(); - if (!container) { - return; - } - - AutoLockImage autoLock(container); - - Image *image = autoLock.GetImage(); - if (!image) { - return; - } - - IntSize size = image->GetSize(); - - SetEffectTransformAndOpacity(); - - ID3D10EffectTechnique *technique; - nsRefPtr keyedMutex; - - if (image->GetFormat() == ImageFormat::CAIRO_SURFACE || - image->GetFormat() == ImageFormat::D3D9_RGB32_TEXTURE) { - NS_ASSERTION(image->GetFormat() != ImageFormat::CAIRO_SURFACE || - !static_cast(image)->mSourceSurface || - static_cast(image)->mSourceSurface->GetFormat() != SurfaceFormat::A8, - "Image layer has alpha image"); - bool hasAlpha = false; - - nsRefPtr srView = GetImageSRView(image, hasAlpha, getter_AddRefs(keyedMutex)); - if (!srView) { - return; - } - - uint8_t shaderFlags = SHADER_PREMUL; - shaderFlags |= LoadMaskTexture(); - shaderFlags |= hasAlpha - ? SHADER_RGBA : SHADER_RGB; - shaderFlags |= mFilter == GraphicsFilter::FILTER_NEAREST - ? SHADER_POINT : SHADER_LINEAR; - technique = SelectShader(shaderFlags); - - - effect()->GetVariableByName("tRGB")->AsShaderResource()->SetResource(srView); - - effect()->GetVariableByName("vLayerQuad")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)0, - (float)0, - (float)size.width, - (float)size.height) - ); - } else if (image->GetFormat() == ImageFormat::PLANAR_YCBCR) { - PlanarYCbCrImage *yuvImage = - static_cast(image); - - if (!yuvImage->IsValid()) { - return; - } - - if (!yuvImage->GetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D10)) { - AllocateTexturesYCbCr(yuvImage); - } - - PlanarYCbCrD3D10BackendData *data = - static_cast(yuvImage->GetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D10)); - - if (!data) { - return; - } - - nsRefPtr dev; - data->mYTexture->GetDevice(getter_AddRefs(dev)); - if (dev != device()) { - return; - } - - // TODO: At some point we should try to deal with mFilter here, you don't - // really want to use point filtering in the case of NEAREST, since that - // would also use point filtering for Chroma upsampling. Where most likely - // the user would only want point filtering for final RGB image upsampling. - - technique = SelectShader(SHADER_YCBCR | LoadMaskTexture()); - - effect()->GetVariableByName("tY")->AsShaderResource()->SetResource(data->mYView); - effect()->GetVariableByName("tCb")->AsShaderResource()->SetResource(data->mCbView); - effect()->GetVariableByName("tCr")->AsShaderResource()->SetResource(data->mCrView); - - /* - * Send 3d control data and metadata to NV3DVUtils - */ - if (GetNv3DVUtils()) { - Nv_Stereo_Mode mode; - switch (yuvImage->GetData()->mStereoMode) { - 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. - GetNv3DVUtils()->SendNv3DVControl(mode, true, FIREFOX_3DV_APP_HANDLE); - - if (yuvImage->GetData()->mStereoMode != StereoMode::MONO) { - // Dst resource is optional - GetNv3DVUtils()->SendNv3DVMetaData((unsigned int)yuvImage->GetData()->mYSize.width, - (unsigned int)yuvImage->GetData()->mYSize.height, (HANDLE)(data->mYTexture), (HANDLE)(nullptr)); - } - } - - effect()->GetVariableByName("vLayerQuad")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)0, - (float)0, - (float)size.width, - (float)size.height) - ); - - effect()->GetVariableByName("vTextureCoords")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)yuvImage->GetData()->mPicX / yuvImage->GetData()->mYSize.width, - (float)yuvImage->GetData()->mPicY / yuvImage->GetData()->mYSize.height, - (float)yuvImage->GetData()->mPicSize.width / yuvImage->GetData()->mYSize.width, - (float)yuvImage->GetData()->mPicSize.height / yuvImage->GetData()->mYSize.height) - ); - } else { - MOZ_CRASH("unexpected image format"); - } - - bool resetTexCoords = image->GetFormat() == ImageFormat::PLANAR_YCBCR; - image = nullptr; - autoLock.Unlock(); - - technique->GetPassByIndex(0)->Apply(0); - device()->Draw(4, 0); - - if (keyedMutex) { - keyedMutex->ReleaseSync(0); - } - - if (resetTexCoords) { - effect()->GetVariableByName("vTextureCoords")->AsVector()-> - SetFloatVector(ShaderConstantRectD3D10(0, 0, 1.0f, 1.0f)); - } - - GetContainer()->NotifyPaintedImage(image); -} - -void ImageLayerD3D10::AllocateTexturesYCbCr(PlanarYCbCrImage *aImage) -{ - nsAutoPtr backendData( - new PlanarYCbCrD3D10BackendData); - - const PlanarYCbCrData *data = aImage->GetData(); - - D3D10_SUBRESOURCE_DATA dataY; - D3D10_SUBRESOURCE_DATA dataCb; - D3D10_SUBRESOURCE_DATA dataCr; - CD3D10_TEXTURE2D_DESC descY(DXGI_FORMAT_A8_UNORM, - data->mYSize.width, - data->mYSize.height, 1, 1); - CD3D10_TEXTURE2D_DESC descCbCr(DXGI_FORMAT_A8_UNORM, - data->mCbCrSize.width, - data->mCbCrSize.height, 1, 1); - - descY.Usage = descCbCr.Usage = D3D10_USAGE_IMMUTABLE; - - dataY.pSysMem = data->mYChannel; - dataY.SysMemPitch = data->mYStride; - dataCb.pSysMem = data->mCbChannel; - dataCb.SysMemPitch = data->mCbCrStride; - dataCr.pSysMem = data->mCrChannel; - dataCr.SysMemPitch = data->mCbCrStride; - - HRESULT hr = device()->CreateTexture2D(&descY, &dataY, getter_AddRefs(backendData->mYTexture)); - if (!FAILED(hr)) { - hr = device()->CreateTexture2D(&descCbCr, &dataCb, getter_AddRefs(backendData->mCbTexture)); - } - if (!FAILED(hr)) { - hr = device()->CreateTexture2D(&descCbCr, &dataCr, getter_AddRefs(backendData->mCrTexture)); - } - if (FAILED(hr)) { - LayerManagerD3D10::ReportFailure(NS_LITERAL_CSTRING("PlanarYCbCrImageD3D10::AllocateTextures(): Failed to create texture"), - hr); - return; - } - device()->CreateShaderResourceView(backendData->mYTexture, nullptr, getter_AddRefs(backendData->mYView)); - device()->CreateShaderResourceView(backendData->mCbTexture, nullptr, getter_AddRefs(backendData->mCbView)); - device()->CreateShaderResourceView(backendData->mCrTexture, nullptr, getter_AddRefs(backendData->mCrView)); - - aImage->SetBackendData(mozilla::layers::LayersBackend::LAYERS_D3D10, backendData.forget()); -} - -already_AddRefed -ImageLayerD3D10::GetAsTexture(gfx::IntSize* aSize) -{ - if (!GetContainer()) { - return nullptr; - } - - AutoLockImage autoLock(GetContainer()); - - Image *image = autoLock.GetImage(); - if (!image) { - return nullptr; - } - - if (image->GetFormat() != ImageFormat::CAIRO_SURFACE) { - return nullptr; - } - - *aSize = image->GetSize(); - bool dontCare; - nsRefPtr result = GetImageSRView(image, dontCare); - return result.forget(); -} - -} /* layers */ -} /* mozilla */ diff --git a/gfx/layers/d3d10/ImageLayerD3D10.h b/gfx/layers/d3d10/ImageLayerD3D10.h deleted file mode 100644 index e9371f5c119..00000000000 --- a/gfx/layers/d3d10/ImageLayerD3D10.h +++ /dev/null @@ -1,60 +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_IMAGELAYERD3D10_H -#define GFX_IMAGELAYERD3D10_H - -#include "LayerManagerD3D10.h" -#include "ImageLayers.h" -#include "ImageContainer.h" -#include "yuv_convert.h" - -namespace mozilla { -namespace layers { - -class ImageLayerD3D10 : public ImageLayer, - public LayerD3D10 -{ -public: - ImageLayerD3D10(LayerManagerD3D10 *aManager) - : ImageLayer(aManager, nullptr) - , LayerD3D10(aManager) - { - mImplData = static_cast(this); - } - - // LayerD3D10 Implementation - virtual Layer* GetLayer(); - - virtual void RenderLayer(); - - void AllocateTexturesYCbCr(PlanarYCbCrImage *aImage); - - virtual already_AddRefed GetAsTexture(gfx::IntSize* aSize); - -private: - ID3D10ShaderResourceView* GetImageSRView(Image* aImage, bool& aHasAlpha, - IDXGIKeyedMutex **aMutex = nullptr); -}; - -struct PlanarYCbCrD3D10BackendData : public ImageBackendData -{ - nsRefPtr mYTexture; - nsRefPtr mCrTexture; - nsRefPtr mCbTexture; - nsRefPtr mYView; - nsRefPtr mCbView; - nsRefPtr mCrView; -}; - -struct TextureD3D10BackendData : public ImageBackendData -{ - nsRefPtr mTexture; - nsRefPtr mSRView; -}; - -} /* layers */ -} /* mozilla */ -#endif /* GFX_IMAGELAYERD3D10_H */ diff --git a/gfx/layers/d3d10/LayerManagerD3D10.cpp b/gfx/layers/d3d10/LayerManagerD3D10.cpp deleted file mode 100644 index 781fa7656d2..00000000000 --- a/gfx/layers/d3d10/LayerManagerD3D10.cpp +++ /dev/null @@ -1,888 +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 - -#include "LayerManagerD3D10.h" -#include "LayerManagerD3D10Effect.h" -#include "gfxWindowsPlatform.h" -#include "gfx2DGlue.h" -#include "gfxD2DSurface.h" -#include "gfxFailure.h" -#include "cairo-win32.h" -#include "dxgi.h" - -#include "ContainerLayerD3D10.h" -#include "PaintedLayerD3D10.h" -#include "ColorLayerD3D10.h" -#include "CanvasLayerD3D10.h" -#include "ReadbackLayerD3D10.h" -#include "ImageLayerD3D10.h" -#include "mozilla/layers/PLayerChild.h" -#include "mozilla/WidgetUtils.h" - -#include "../d3d9/Nv3DVUtils.h" - -#include "gfxCrashReporterUtils.h" -#include "nsWindowsHelpers.h" -#ifdef MOZ_METRO -#include "DXGI1_2.h" -#endif - -namespace mozilla { -namespace layers { - -using namespace std; -using namespace mozilla::gfx; - -struct Vertex -{ - float position[2]; -}; - -// {592BF306-0EED-4F76-9D03-A0846450F472} -static const GUID sDeviceAttachments = -{ 0x592bf306, 0xeed, 0x4f76, { 0x9d, 0x3, 0xa0, 0x84, 0x64, 0x50, 0xf4, 0x72 } }; -// {716AEDB1-C9C3-4B4D-8332-6F65D44AF6A8} -static const GUID sLayerManagerCount = -{ 0x716aedb1, 0xc9c3, 0x4b4d, { 0x83, 0x32, 0x6f, 0x65, 0xd4, 0x4a, 0xf6, 0xa8 } }; - -LayerManagerD3D10::LayerManagerD3D10(nsIWidget *aWidget) - : mWidget(aWidget) - , mDisableSequenceForNextFrame(false) -{ -} - -struct DeviceAttachments -{ - nsRefPtr mEffect; - nsRefPtr mInputLayout; - nsRefPtr mVertexBuffer; - nsRefPtr mReadbackManager; -}; - -LayerManagerD3D10::~LayerManagerD3D10() -{ - if (mDevice) { - int referenceCount = 0; - UINT size = sizeof(referenceCount); - HRESULT hr = mDevice->GetPrivateData(sLayerManagerCount, &size, &referenceCount); - NS_ASSERTION(SUCCEEDED(hr), "Reference count not found on device."); - referenceCount--; - mDevice->SetPrivateData(sLayerManagerCount, sizeof(referenceCount), &referenceCount); - - if (!referenceCount) { - DeviceAttachments *attachments; - size = sizeof(attachments); - mDevice->GetPrivateData(sDeviceAttachments, &size, &attachments); - // No LayerManagers left for this device. Clear out interfaces stored which - // hold a reference to the device. - mDevice->SetPrivateData(sDeviceAttachments, 0, nullptr); - - delete attachments; - } - } - - Destroy(); -} - -static inline void -SetHRESULT(HRESULT* aHresultPtr, HRESULT aHresult) -{ - if (aHresultPtr) { - *aHresultPtr = aHresult; - } -} - -bool -LayerManagerD3D10::Initialize(bool force, HRESULT* aHresultPtr) -{ - ScopedGfxFeatureReporter reporter("D3D10 Layers", force); - - HRESULT hr = E_UNEXPECTED; - - /* Create an Nv3DVUtils instance */ - if (!mNv3DVUtils) { - mNv3DVUtils = new Nv3DVUtils(); - if (!mNv3DVUtils) { - NS_WARNING("Could not create a new instance of Nv3DVUtils.\n"); - } - } - - /* Initialize the Nv3DVUtils object */ - if (mNv3DVUtils) { - mNv3DVUtils->Initialize(); - } - - mDevice = gfxWindowsPlatform::GetPlatform()->GetD3D10Device(); - if (!mDevice) { - SetHRESULT(aHresultPtr, hr); - return false; - } - - /* - * Do some post device creation setup - */ - if (mNv3DVUtils) { - IUnknown* devUnknown = nullptr; - if (mDevice) { - mDevice->QueryInterface(IID_IUnknown, (void **)&devUnknown); - } - mNv3DVUtils->SetDeviceInfo(devUnknown); - } - - int referenceCount = 0; - UINT size = sizeof(referenceCount); - // If this isn't there yet it'll fail, count will remain 0, which is correct. - mDevice->GetPrivateData(sLayerManagerCount, &size, &referenceCount); - referenceCount++; - mDevice->SetPrivateData(sLayerManagerCount, sizeof(referenceCount), &referenceCount); - - DeviceAttachments *attachments; - size = sizeof(DeviceAttachments*); - if (FAILED(mDevice->GetPrivateData(sDeviceAttachments, &size, &attachments))) { - attachments = new DeviceAttachments; - mDevice->SetPrivateData(sDeviceAttachments, sizeof(attachments), &attachments); - - SetLastError(0); - decltype(D3D10CreateEffectFromMemory)* createEffect = - (decltype(D3D10CreateEffectFromMemory)*) - GetProcAddress(LoadLibraryA("d3d10_1.dll"), "D3D10CreateEffectFromMemory"); - if (!createEffect) { - SetHRESULT(aHresultPtr, HRESULT_FROM_WIN32(GetLastError())); - return false; - } - - hr = createEffect((void*)g_main, - sizeof(g_main), - D3D10_EFFECT_SINGLE_THREADED, - mDevice, - nullptr, - getter_AddRefs(mEffect)); - - if (FAILED(hr)) { - SetHRESULT(aHresultPtr, hr); - return false; - } - - attachments->mEffect = mEffect; - - D3D10_INPUT_ELEMENT_DESC layout[] = - { - { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 }, - }; - D3D10_PASS_DESC passDesc; - mEffect->GetTechniqueByName("RenderRGBLayerPremul")->GetPassByIndex(0)-> - GetDesc(&passDesc); - - hr = mDevice->CreateInputLayout(layout, - sizeof(layout) / sizeof(D3D10_INPUT_ELEMENT_DESC), - passDesc.pIAInputSignature, - passDesc.IAInputSignatureSize, - getter_AddRefs(mInputLayout)); - - if (FAILED(hr)) { - SetHRESULT(aHresultPtr, hr); - return false; - } - - attachments->mInputLayout = mInputLayout; - - Vertex vertices[] = { {{0.0, 0.0}}, {{1.0, 0.0}}, {{0.0, 1.0}}, {{1.0, 1.0}} }; - CD3D10_BUFFER_DESC bufferDesc(sizeof(vertices), D3D10_BIND_VERTEX_BUFFER); - D3D10_SUBRESOURCE_DATA data; - data.pSysMem = (void*)vertices; - - hr = mDevice->CreateBuffer(&bufferDesc, &data, getter_AddRefs(mVertexBuffer)); - - if (FAILED(hr)) { - SetHRESULT(aHresultPtr, hr); - return false; - } - - attachments->mVertexBuffer = mVertexBuffer; - } else { - mEffect = attachments->mEffect; - mVertexBuffer = attachments->mVertexBuffer; - mInputLayout = attachments->mInputLayout; - } - - nsRefPtr dxgiDevice; - nsRefPtr dxgiAdapter; - - mDevice->QueryInterface(dxgiDevice.StartAssignment()); - dxgiDevice->GetAdapter(getter_AddRefs(dxgiAdapter)); - -#ifdef MOZ_METRO - if (IsRunningInWindowsMetro()) { - nsRefPtr dxgiFactory; - dxgiAdapter->GetParent(IID_PPV_ARGS(dxgiFactory.StartAssignment())); - - nsIntRect rect; - mWidget->GetClientBounds(rect); - - DXGI_SWAP_CHAIN_DESC1 swapDesc = { 0 }; - // Automatically detect the width and the height from the winrt CoreWindow - swapDesc.Width = rect.width; - swapDesc.Height = rect.height; - // This is the most common swapchain format - swapDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; - swapDesc.Stereo = false; - // Don't use multi-sampling - swapDesc.SampleDesc.Count = 1; - swapDesc.SampleDesc.Quality = 0; - swapDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - // Use double buffering to enable flip - swapDesc.BufferCount = 2; - swapDesc.Scaling = DXGI_SCALING_NONE; - // All Metro style apps must use this SwapEffect - swapDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; - swapDesc.Flags = 0; - - /** - * Create a swap chain, this swap chain will contain the backbuffer for - * the window we draw to. The front buffer is the full screen front - * buffer. - */ - nsRefPtr swapChain1; - hr = dxgiFactory->CreateSwapChainForCoreWindow( - dxgiDevice, (IUnknown *)mWidget->GetNativeData(NS_NATIVE_ICOREWINDOW), - &swapDesc, nullptr, getter_AddRefs(swapChain1)); - if (FAILED(hr)) { - SetHRESULT(aHresultPtr, hr); - return false; - } - mSwapChain = swapChain1; - } else -#endif - { - nsRefPtr dxgiFactory; - dxgiAdapter->GetParent(IID_PPV_ARGS(dxgiFactory.StartAssignment())); - - DXGI_SWAP_CHAIN_DESC swapDesc; - ::ZeroMemory(&swapDesc, sizeof(swapDesc)); - swapDesc.BufferDesc.Width = 0; - swapDesc.BufferDesc.Height = 0; - swapDesc.BufferDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; - swapDesc.BufferDesc.RefreshRate.Numerator = 60; - swapDesc.BufferDesc.RefreshRate.Denominator = 1; - swapDesc.SampleDesc.Count = 1; - swapDesc.SampleDesc.Quality = 0; - swapDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - swapDesc.BufferCount = 1; - swapDesc.OutputWindow = (HWND)mWidget->GetNativeData(NS_NATIVE_WINDOW); - swapDesc.Windowed = TRUE; - // We don't really need this flag, however it seems on some NVidia hardware - // smaller area windows do not present properly without this flag. This flag - // should have no negative consequences by itself. See bug 613790. This flag - // is broken on optimus devices. As a temporary solution we don't set it - // there, the only way of reliably detecting we're on optimus is looking for - // the DLL. See Bug 623807. - if (gfxWindowsPlatform::IsOptimus()) { - swapDesc.Flags = 0; - } else { - swapDesc.Flags = DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE; - } - - /** - * Create a swap chain, this swap chain will contain the backbuffer for - * the window we draw to. The front buffer is the full screen front - * buffer. - */ - hr = dxgiFactory->CreateSwapChain(dxgiDevice, &swapDesc, getter_AddRefs(mSwapChain)); - if (FAILED(hr)) { - return false; - } - - // We need this because we don't want DXGI to respond to Alt+Enter. - dxgiFactory->MakeWindowAssociation(swapDesc.OutputWindow, DXGI_MWA_NO_WINDOW_CHANGES); - } - - reporter.SetSuccessful(); - return true; -} - -void -LayerManagerD3D10::Destroy() -{ - if (!IsDestroyed()) { - if (mRoot) { - static_cast(mRoot->ImplData())->LayerManagerDestroyed(); - } - // XXX need to be careful here about surface destruction - // racing with share-to-chrome message - } - LayerManager::Destroy(); -} - -void -LayerManagerD3D10::SetRoot(Layer *aRoot) -{ - mRoot = aRoot; -} - -void -LayerManagerD3D10::BeginTransaction() -{ - mInTransaction = true; - -#ifdef MOZ_LAYERS_HAVE_LOG - MOZ_LAYERS_LOG(("[----- BeginTransaction")); - Log(); -#endif -} - -void -LayerManagerD3D10::BeginTransactionWithTarget(gfxContext* aTarget) -{ - mInTransaction = true; - mTarget = aTarget; -} - -bool -LayerManagerD3D10::EndEmptyTransaction(EndTransactionFlags aFlags) -{ - mInTransaction = false; - - if (!mRoot) - return false; - - EndTransaction(nullptr, nullptr, aFlags); - return true; -} - -void -LayerManagerD3D10::EndTransaction(DrawPaintedLayerCallback aCallback, - void* aCallbackData, - EndTransactionFlags aFlags) -{ - mInTransaction = false; - - if (mRoot && !(aFlags & END_NO_IMMEDIATE_REDRAW)) { - mCurrentCallbackInfo.Callback = aCallback; - mCurrentCallbackInfo.CallbackData = aCallbackData; - - if (aFlags & END_NO_COMPOSITE) { - // Apply pending tree updates before recomputing effective - // properties. - mRoot->ApplyPendingUpdatesToSubtree(); - } - - // The results of our drawing always go directly into a pixel buffer, - // so we don't need to pass any global transform here. - mRoot->ComputeEffectiveTransforms(Matrix4x4()); - -#ifdef MOZ_LAYERS_HAVE_LOG - MOZ_LAYERS_LOG((" ----- (beginning paint)")); - Log(); -#endif - - Render(aFlags); - mCurrentCallbackInfo.Callback = nullptr; - mCurrentCallbackInfo.CallbackData = nullptr; - } - -#ifdef MOZ_LAYERS_HAVE_LOG - Log(); - MOZ_LAYERS_LOG(("]----- EndTransaction")); -#endif - - mTarget = nullptr; -} - -already_AddRefed -LayerManagerD3D10::CreatePaintedLayer() -{ - nsRefPtr layer = new PaintedLayerD3D10(this); - return layer.forget(); -} - -already_AddRefed -LayerManagerD3D10::CreateContainerLayer() -{ - nsRefPtr layer = new ContainerLayerD3D10(this); - return layer.forget(); -} - -already_AddRefed -LayerManagerD3D10::CreateImageLayer() -{ - nsRefPtr layer = new ImageLayerD3D10(this); - return layer.forget(); -} - -already_AddRefed -LayerManagerD3D10::CreateColorLayer() -{ - nsRefPtr layer = new ColorLayerD3D10(this); - return layer.forget(); -} - -already_AddRefed -LayerManagerD3D10::CreateCanvasLayer() -{ - nsRefPtr layer = new CanvasLayerD3D10(this); - return layer.forget(); -} - -already_AddRefed -LayerManagerD3D10::CreateReadbackLayer() -{ - nsRefPtr layer = new ReadbackLayerD3D10(this); - return layer.forget(); -} - -TemporaryRef -LayerManagerD3D10::CreateOptimalDrawTarget(const IntSize &aSize, - SurfaceFormat aFormat) -{ - if ((aFormat != SurfaceFormat::B8G8R8X8 && - aFormat != SurfaceFormat::B8G8R8A8)) { - return LayerManager::CreateOptimalDrawTarget(aSize, aFormat); - } - - nsRefPtr texture; - - CD3D10_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM, aSize.width, aSize.height, 1, 1); - desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE; - desc.MiscFlags = D3D10_RESOURCE_MISC_GDI_COMPATIBLE; - - HRESULT hr = device()->CreateTexture2D(&desc, nullptr, getter_AddRefs(texture)); - - if (FAILED(hr)) { - NS_WARNING("Failed to create new texture for CreateOptimalDrawTarget!"); - return LayerManager::CreateOptimalDrawTarget(aSize, aFormat); - } - - RefPtr dt = - Factory::CreateDrawTargetForD3D10Texture(texture, aFormat); - - if (!dt) { - return LayerManager::CreateOptimalDrawTarget(aSize, aFormat); - } - - return dt; -} - - -TemporaryRef -LayerManagerD3D10::CreateOptimalMaskDrawTarget(const IntSize &aSize) -{ - return CreateOptimalDrawTarget(aSize, SurfaceFormat::B8G8R8A8); -} - - -TemporaryRef -LayerManagerD3D10::CreateDrawTarget(const IntSize &aSize, - SurfaceFormat aFormat) -{ - if ((aFormat != SurfaceFormat::B8G8R8A8 && - aFormat != SurfaceFormat::B8G8R8X8) || - gfxPlatform::GetPlatform()->GetPreferredCanvasBackend() != BackendType::DIRECT2D) { - return LayerManager::CreateDrawTarget(aSize, aFormat); - } - - nsRefPtr texture; - - CD3D10_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM, aSize.width, aSize.height, 1, 1); - desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE; - - HRESULT hr = device()->CreateTexture2D(&desc, nullptr, getter_AddRefs(texture)); - - if (FAILED(hr)) { - NS_WARNING("Failed to create new texture for CreateOptimalDrawTarget!"); - return LayerManager::CreateDrawTarget(aSize, aFormat); - } - - RefPtr surface = - Factory::CreateDrawTargetForD3D10Texture(texture, aFormat); - - if (!surface) { - return LayerManager::CreateDrawTarget(aSize, aFormat); - } - - return surface; -} - -ReadbackManagerD3D10* -LayerManagerD3D10::readbackManager() -{ - EnsureReadbackManager(); - return mReadbackManager; -} - -void -LayerManagerD3D10::SetViewport(const nsIntSize &aViewport) -{ - mViewport = aViewport; - - D3D10_VIEWPORT viewport; - viewport.MaxDepth = 1.0f; - viewport.MinDepth = 0; - viewport.Width = aViewport.width; - viewport.Height = aViewport.height; - viewport.TopLeftX = 0; - viewport.TopLeftY = 0; - - mDevice->RSSetViewports(1, &viewport); - - gfx3DMatrix projection; - /* - * Matrix to transform to viewport space ( <-1.0, 1.0> topleft, - * <1.0, -1.0> bottomright) - */ - projection._11 = 2.0f / aViewport.width; - projection._22 = -2.0f / aViewport.height; - projection._33 = 0.0f; - projection._41 = -1.0f; - projection._42 = 1.0f; - projection._44 = 1.0f; - - HRESULT hr = mEffect->GetVariableByName("mProjection")-> - SetRawValue(&projection._11, 0, 64); - - if (FAILED(hr)) { - NS_WARNING("Failed to set projection matrix."); - } -} - -void -LayerManagerD3D10::SetupInputAssembler() -{ - mDevice->IASetInputLayout(mInputLayout); - - UINT stride = sizeof(Vertex); - UINT offset = 0; - ID3D10Buffer *buffer = mVertexBuffer; - mDevice->IASetVertexBuffers(0, 1, &buffer, &stride, &offset); - mDevice->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); -} - -void -LayerManagerD3D10::SetupPipeline() -{ - VerifyBufferSize(); - UpdateRenderTarget(); - - nsIntRect rect; - mWidget->GetClientBounds(rect); - - HRESULT hr; - - hr = mEffect->GetVariableByName("vTextureCoords")->AsVector()-> - SetFloatVector(ShaderConstantRectD3D10(0, 0, 1.0f, 1.0f)); - - if (FAILED(hr)) { - NS_WARNING("Failed to set Texture Coordinates."); - return; - } - - ID3D10RenderTargetView *view = mRTView; - mDevice->OMSetRenderTargets(1, &view, nullptr); - - SetupInputAssembler(); - - SetViewport(nsIntSize(rect.width, rect.height)); -} - -void -LayerManagerD3D10::UpdateRenderTarget() -{ - if (mRTView || !mSwapChain) { - return; - } - - HRESULT hr; - - nsRefPtr backBuf; - hr = mSwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (void**)backBuf.StartAssignment()); - if (FAILED(hr)) { - return; - } - mDevice->CreateRenderTargetView(backBuf, nullptr, getter_AddRefs(mRTView)); -} - -void -LayerManagerD3D10::VerifyBufferSize() -{ - nsIntRect rect; - mWidget->GetClientBounds(rect); - - if (mSwapChain) { - DXGI_SWAP_CHAIN_DESC swapDesc; - mSwapChain->GetDesc(&swapDesc); - - if (swapDesc.BufferDesc.Width == rect.width && - swapDesc.BufferDesc.Height == rect.height) { - return; - } - - mRTView = nullptr; - if (IsRunningInWindowsMetro()) { - mSwapChain->ResizeBuffers(2, rect.width, rect.height, - DXGI_FORMAT_B8G8R8A8_UNORM, - 0); - mDisableSequenceForNextFrame = true; - } else if (gfxWindowsPlatform::IsOptimus()) { - mSwapChain->ResizeBuffers(1, rect.width, rect.height, - DXGI_FORMAT_B8G8R8A8_UNORM, - 0); - } else { - mSwapChain->ResizeBuffers(1, rect.width, rect.height, - DXGI_FORMAT_B8G8R8A8_UNORM, - DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE); - } - } -} - -void -LayerManagerD3D10::EnsureReadbackManager() -{ - if (mReadbackManager) { - return; - } - - DeviceAttachments *attachments; - UINT size = sizeof(DeviceAttachments*); - if (FAILED(mDevice->GetPrivateData(sDeviceAttachments, &size, &attachments))) { - // Strange! This shouldn't happen ... return a readback manager for this - // layer manager only. - mReadbackManager = new ReadbackManagerD3D10(); - gfx::LogFailure(NS_LITERAL_CSTRING("Couldn't get device attachments for device.")); - return; - } - - if (attachments->mReadbackManager) { - mReadbackManager = attachments->mReadbackManager; - return; - } - - mReadbackManager = new ReadbackManagerD3D10(); - attachments->mReadbackManager = mReadbackManager; -} - -void -LayerManagerD3D10::Render(EndTransactionFlags aFlags) -{ - static_cast(mRoot->ImplData())->Validate(); - - if (aFlags & END_NO_COMPOSITE) { - return; - } - - SetupPipeline(); - - float black[] = { 0, 0, 0, 0 }; - device()->ClearRenderTargetView(mRTView, black); - - nsIntRect rect; - mWidget->GetClientBounds(rect); - - const nsIntRect *clipRect = mRoot->GetClipRect(); - D3D10_RECT r; - if (clipRect) { - r.left = (LONG)clipRect->x; - r.top = (LONG)clipRect->y; - r.right = (LONG)(clipRect->x + clipRect->width); - r.bottom = (LONG)(clipRect->y + clipRect->height); - } else { - r.left = r.top = 0; - r.right = rect.width; - r.bottom = rect.height; - } - device()->RSSetScissorRects(1, &r); - - static_cast(mRoot->ImplData())->RenderLayer(); - - if (!mRegionToClear.IsEmpty()) { - float color[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; - gfx::Matrix4x4 transform; - effect()->GetVariableByName("mLayerTransform")->SetRawValue(&transform, 0, 64); - effect()->GetVariableByName("fLayerColor")->AsVector()->SetFloatVector(color); - - ID3D10EffectTechnique *technique = effect()->GetTechniqueByName("RenderClearLayer"); - - nsIntRegionRectIterator iter(mRegionToClear); - const nsIntRect *r; - while ((r = iter.Next())) { - effect()->GetVariableByName("vLayerQuad")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)r->x, - (float)r->y, - (float)r->width, - (float)r->height) - ); - - technique->GetPassByIndex(0)->Apply(0); - device()->Draw(4, 0); - } - } - - // See bug 630197 - we have some reasons to believe if an earlier call - // returned an error, the upcoming present call may raise an exception. - // This will check if any of the calls done recently has returned an error - // and bails on composition. On the -next- frame we will then abandon - // hardware acceleration from gfxWindowsPlatform::VerifyD2DDevice. - // This might not be the 'optimal' solution but it will help us assert - // whether our thoughts of the causes of the issues are correct. - if (FAILED(mDevice->GetDeviceRemovedReason())) { - return; - } - - if (mTarget) { - PaintToTarget(); - } else { - mSwapChain->Present(0, mDisableSequenceForNextFrame ? DXGI_PRESENT_DO_NOT_SEQUENCE : 0); - mDisableSequenceForNextFrame = false; - } - RecordFrame(); - PostPresent(); -} - -void -LayerManagerD3D10::PaintToTarget() -{ - nsRefPtr backBuf; - - mSwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (void**)backBuf.StartAssignment()); - - D3D10_TEXTURE2D_DESC bbDesc; - backBuf->GetDesc(&bbDesc); - - CD3D10_TEXTURE2D_DESC softDesc(bbDesc.Format, bbDesc.Width, bbDesc.Height); - softDesc.MipLevels = 1; - softDesc.CPUAccessFlags = D3D10_CPU_ACCESS_READ; - softDesc.Usage = D3D10_USAGE_STAGING; - softDesc.BindFlags = 0; - - nsRefPtr readTexture; - - HRESULT hr = device()->CreateTexture2D(&softDesc, nullptr, getter_AddRefs(readTexture)); - if (FAILED(hr)) { - ReportFailure(NS_LITERAL_CSTRING("LayerManagerD3D10::PaintToTarget(): Failed to create texture"), - hr); - return; - } - - device()->CopyResource(readTexture, backBuf); - - D3D10_MAPPED_TEXTURE2D map; - readTexture->Map(0, D3D10_MAP_READ, 0, &map); - - nsRefPtr tmpSurface = - new gfxImageSurface((unsigned char*)map.pData, - gfxIntSize(bbDesc.Width, bbDesc.Height), - map.RowPitch, - gfxImageFormat::ARGB32); - - mTarget->SetSource(tmpSurface); - mTarget->SetOperator(gfxContext::OPERATOR_OVER); - mTarget->Paint(); - - readTexture->Unmap(0); -} - -void -LayerManagerD3D10::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); -} - -LayerD3D10::LayerD3D10(LayerManagerD3D10 *aManager) - : mD3DManager(aManager) -{ -} - -ID3D10EffectTechnique* -LayerD3D10::SelectShader(uint8_t aFlags) -{ - switch (aFlags) { - case (SHADER_RGBA | SHADER_NON_PREMUL | SHADER_LINEAR | SHADER_MASK): - return effect()->GetTechniqueByName("RenderRGBALayerNonPremulMask"); - case (SHADER_RGBA | SHADER_NON_PREMUL | SHADER_LINEAR | SHADER_NO_MASK): - return effect()->GetTechniqueByName("RenderRGBALayerNonPremul"); - case (SHADER_RGBA | SHADER_NON_PREMUL | SHADER_POINT | SHADER_NO_MASK): - return effect()->GetTechniqueByName("RenderRGBALayerNonPremulPoint"); - case (SHADER_RGBA | SHADER_NON_PREMUL | SHADER_POINT | SHADER_MASK): - return effect()->GetTechniqueByName("RenderRGBALayerNonPremulPointMask"); - case (SHADER_RGBA | SHADER_PREMUL | SHADER_LINEAR | SHADER_MASK_3D): - return effect()->GetTechniqueByName("RenderRGBALayerPremulMask3D"); - case (SHADER_RGBA | SHADER_PREMUL | SHADER_LINEAR | SHADER_MASK): - return effect()->GetTechniqueByName("RenderRGBALayerPremulMask"); - case (SHADER_RGBA | SHADER_PREMUL | SHADER_LINEAR | SHADER_NO_MASK): - return effect()->GetTechniqueByName("RenderRGBALayerPremul"); - case (SHADER_RGBA | SHADER_PREMUL | SHADER_POINT | SHADER_MASK): - return effect()->GetTechniqueByName("RenderRGBALayerPremulPointMask"); - case (SHADER_RGBA | SHADER_PREMUL | SHADER_POINT | SHADER_NO_MASK): - return effect()->GetTechniqueByName("RenderRGBALayerPremulPoint"); - case (SHADER_RGB | SHADER_PREMUL | SHADER_POINT | SHADER_MASK): - return effect()->GetTechniqueByName("RenderRGBLayerPremulPointMask"); - case (SHADER_RGB | SHADER_PREMUL | SHADER_POINT | SHADER_NO_MASK): - return effect()->GetTechniqueByName("RenderRGBLayerPremulPoint"); - case (SHADER_RGB | SHADER_PREMUL | SHADER_LINEAR | SHADER_MASK): - return effect()->GetTechniqueByName("RenderRGBLayerPremulMask"); - case (SHADER_RGB | SHADER_PREMUL | SHADER_LINEAR | SHADER_NO_MASK): - return effect()->GetTechniqueByName("RenderRGBLayerPremul"); - case (SHADER_SOLID | SHADER_MASK): - return effect()->GetTechniqueByName("RenderSolidColorLayerMask"); - case (SHADER_SOLID | SHADER_NO_MASK): - return effect()->GetTechniqueByName("RenderSolidColorLayer"); - case (SHADER_COMPONENT_ALPHA | SHADER_MASK): - return effect()->GetTechniqueByName("RenderComponentAlphaLayerMask"); - case (SHADER_COMPONENT_ALPHA | SHADER_NO_MASK): - return effect()->GetTechniqueByName("RenderComponentAlphaLayer"); - case (SHADER_YCBCR | SHADER_MASK): - return effect()->GetTechniqueByName("RenderYCbCrLayerMask"); - case (SHADER_YCBCR | SHADER_NO_MASK): - return effect()->GetTechniqueByName("RenderYCbCrLayer"); - default: - NS_ERROR("Invalid shader."); - return nullptr; - } -} - -uint8_t -LayerD3D10::LoadMaskTexture() -{ - if (Layer* maskLayer = GetLayer()->GetMaskLayer()) { - IntSize size; - nsRefPtr maskSRV = - static_cast(maskLayer->ImplData())->GetAsTexture(&size); - - if (!maskSRV) { - return SHADER_NO_MASK; - } - - Matrix maskTransform; - Matrix4x4 effectiveTransform = maskLayer->GetEffectiveTransform(); - bool maskIs2D = effectiveTransform.CanDraw2D(&maskTransform); - NS_ASSERTION(maskIs2D, "How did we end up with a 3D transform here?!"); - Rect bounds = Rect(Point(), Size(size)); - bounds = maskTransform.TransformBounds(bounds); - - effect()->GetVariableByName("vMaskQuad")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)bounds.x, - (float)bounds.y, - (float)bounds.width, - (float)bounds.height) - ); - - effect()->GetVariableByName("tMask")->AsShaderResource()->SetResource(maskSRV); - return SHADER_MASK; - } - - return SHADER_NO_MASK; -} - -} -} diff --git a/gfx/layers/d3d10/LayerManagerD3D10.fx b/gfx/layers/d3d10/LayerManagerD3D10.fx deleted file mode 100644 index e051a4c6038..00000000000 --- a/gfx/layers/d3d10/LayerManagerD3D10.fx +++ /dev/null @@ -1,605 +0,0 @@ -typedef float4 rect; -cbuffer PerLayer { - rect vTextureCoords; - rect vLayerQuad; - rect vMaskQuad; - float fLayerOpacity; - float4x4 mLayerTransform; -} - -cbuffer PerOccasionalLayer { - float4 vRenderTargetOffset; - float4 fLayerColor; -} - -cbuffer PerLayerManager { - float4x4 mProjection; -} - -BlendState Premul -{ - AlphaToCoverageEnable = FALSE; - BlendEnable[0] = TRUE; - SrcBlend = One; - DestBlend = Inv_Src_Alpha; - BlendOp = Add; - SrcBlendAlpha = One; - DestBlendAlpha = Inv_Src_Alpha; - BlendOpAlpha = Add; - RenderTargetWriteMask[0] = 0x0F; // All -}; - -BlendState NonPremul -{ - AlphaToCoverageEnable = FALSE; - BlendEnable[0] = TRUE; - SrcBlend = Src_Alpha; - DestBlend = Inv_Src_Alpha; - BlendOp = Add; - SrcBlendAlpha = One; - DestBlendAlpha = Inv_Src_Alpha; - BlendOpAlpha = Add; - RenderTargetWriteMask[0] = 0x0F; // All -}; - -BlendState NoBlendDual -{ - AlphaToCoverageEnable = FALSE; - BlendEnable[0] = FALSE; - BlendEnable[1] = FALSE; - RenderTargetWriteMask[0] = 0x0F; // All - RenderTargetWriteMask[1] = 0x0F; // All -}; - -BlendState ComponentAlphaBlend -{ - AlphaToCoverageEnable = FALSE; - BlendEnable[0] = TRUE; - SrcBlend = One; - DestBlend = Inv_Src1_Color; - BlendOp = Add; - SrcBlendAlpha = One; - DestBlendAlpha = Inv_Src_Alpha; - BlendOpAlpha = Add; - RenderTargetWriteMask[0] = 0x0F; // All -}; - -RasterizerState LayerRast -{ - ScissorEnable = True; - CullMode = None; -}; - -Texture2D tRGB; -Texture2D tY; -Texture2D tCb; -Texture2D tCr; -Texture2D tRGBWhite; -Texture2D tMask; - -SamplerState LayerTextureSamplerLinear -{ - Filter = MIN_MAG_MIP_LINEAR; - AddressU = Clamp; - AddressV = Clamp; -}; - -SamplerState LayerTextureSamplerPoint -{ - Filter = MIN_MAG_MIP_POINT; - AddressU = Clamp; - AddressV = Clamp; -}; - -struct VS_INPUT { - float2 vPosition : POSITION; -}; - -struct VS_OUTPUT { - float4 vPosition : SV_Position; - float2 vTexCoords : TEXCOORD0; -}; - -struct VS_MASK_OUTPUT { - float4 vPosition : SV_Position; - float2 vTexCoords : TEXCOORD0; - float2 vMaskCoords : TEXCOORD1; -}; - -struct VS_MASK_3D_OUTPUT { - float4 vPosition : SV_Position; - float2 vTexCoords : TEXCOORD0; - float3 vMaskCoords : TEXCOORD1; -}; - -struct PS_OUTPUT { - float4 vSrc; - float4 vAlpha; -}; - -struct PS_DUAL_OUTPUT { - float4 vOutput1 : SV_Target0; - float4 vOutput2 : SV_Target1; -}; - -float2 TexCoords(const float2 aPosition) -{ - float2 result; - const float2 size = vTextureCoords.zw; - result.x = vTextureCoords.x + aPosition.x * size.x; - result.y = vTextureCoords.y + aPosition.y * size.y; - - return result; -} - -float4 TransformedPostion(float2 aInPosition) -{ - // the current vertex's position on the quad - 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 + aInPosition.x * size.x; - position.y = vLayerQuad.y + aInPosition.y * size.y; - - position = mul(mLayerTransform, position); - - return position; -} - -float4 VertexPosition(float4 aTransformedPosition) -{ - float4 result; - result.w = aTransformedPosition.w; - result.xyz = aTransformedPosition.xyz / aTransformedPosition.w; - result -= vRenderTargetOffset; - result.xyz *= result.w; - - result = mul(mProjection, result); - - return result; -} - -VS_OUTPUT LayerQuadVS(const VS_INPUT aVertex) -{ - VS_OUTPUT outp; - float4 position = TransformedPostion(aVertex.vPosition); - - outp.vPosition = VertexPosition(position); - outp.vTexCoords = TexCoords(aVertex.vPosition.xy); - - return outp; -} - -VS_MASK_OUTPUT LayerQuadMaskVS(const VS_INPUT aVertex) -{ - VS_MASK_OUTPUT outp; - float4 position = TransformedPostion(aVertex.vPosition); - - outp.vPosition = VertexPosition(position); - - // 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; - - outp.vTexCoords = TexCoords(aVertex.vPosition.xy); - - return outp; -} - -VS_MASK_3D_OUTPUT LayerQuadMask3DVS(const VS_INPUT aVertex) -{ - VS_MASK_3D_OUTPUT outp; - float4 position = TransformedPostion(aVertex.vPosition); - - outp.vPosition = VertexPosition(position); - - // calculate the position on the mask texture - position.xyz /= position.w; - outp.vMaskCoords.x = (position.x - vMaskQuad.x) / vMaskQuad.z; - outp.vMaskCoords.y = (position.y - vMaskQuad.y) / vMaskQuad.w; - // We use the w coord to do non-perspective correct interpolation: - // the quad might be transformed in 3D, in which case it will have some - // perspective. The graphics card will do perspective-correct interpolation - // of the texture, but our mask is already transformed and so we require - // linear interpolation. Therefore, we must correct the interpolation - // ourselves, we do this by multiplying all coords by w here, and dividing by - // w in the pixel shader (post-interpolation), we pass w in outp.vMaskCoords.z. - // See http://en.wikipedia.org/wiki/Texture_mapping#Perspective_correctness - outp.vMaskCoords.z = 1; - outp.vMaskCoords *= position.w; - - outp.vTexCoords = TexCoords(aVertex.vPosition.xy); - - return outp; -} - -float4 RGBAShaderMask(const VS_MASK_OUTPUT aVertex, uniform sampler aSampler) : SV_Target -{ - float2 maskCoords = aVertex.vMaskCoords; - float mask = tMask.Sample(LayerTextureSamplerLinear, maskCoords).a; - return tRGB.Sample(aSampler, aVertex.vTexCoords) * fLayerOpacity * mask; -} - -float4 RGBAShaderLinearMask3D(const VS_MASK_3D_OUTPUT aVertex) : SV_Target -{ - float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z; - float mask = tMask.Sample(LayerTextureSamplerLinear, maskCoords).a; - return tRGB.Sample(LayerTextureSamplerLinear, aVertex.vTexCoords) * fLayerOpacity * mask; -} - -float4 RGBShaderMask(const VS_MASK_OUTPUT aVertex, uniform sampler aSampler) : SV_Target -{ - float4 result; - result = tRGB.Sample(aSampler, aVertex.vTexCoords) * fLayerOpacity; - result.a = fLayerOpacity; - - float2 maskCoords = aVertex.vMaskCoords; - float mask = tMask.Sample(LayerTextureSamplerLinear, maskCoords).a; - return result * mask; -} - -/* 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] -*/ - -float4 CalculateYCbCrColor(const float2 aTexCoords) -{ - float4 yuv; - float4 color; - - yuv.r = tCr.Sample(LayerTextureSamplerLinear, aTexCoords).a - 0.50196; - yuv.g = tY.Sample(LayerTextureSamplerLinear, aTexCoords).a - 0.06275; - yuv.b = tCb.Sample(LayerTextureSamplerLinear, aTexCoords).a - 0.50196; - - color.r = yuv.g * 1.16438 + yuv.r * 1.59603; - color.g = yuv.g * 1.16438 - 0.81297 * yuv.r - 0.39176 * yuv.b; - color.b = yuv.g * 1.16438 + yuv.b * 2.01723; - color.a = 1.0f; - - return color; -} - -float4 YCbCrShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target -{ - float2 maskCoords = aVertex.vMaskCoords; - float mask = tMask.Sample(LayerTextureSamplerLinear, maskCoords).a; - - return CalculateYCbCrColor(aVertex.vTexCoords) * fLayerOpacity * mask; -} - -PS_OUTPUT ComponentAlphaShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target -{ - PS_OUTPUT result; - - result.vSrc = tRGB.Sample(LayerTextureSamplerLinear, aVertex.vTexCoords); - result.vAlpha = 1.0 - tRGBWhite.Sample(LayerTextureSamplerLinear, aVertex.vTexCoords) + result.vSrc; - result.vSrc.a = result.vAlpha.g; - - float2 maskCoords = aVertex.vMaskCoords; - float mask = tMask.Sample(LayerTextureSamplerLinear, maskCoords).a; - result.vSrc *= fLayerOpacity * mask; - result.vAlpha *= fLayerOpacity * mask; - - return result; -} - -float4 SolidColorShaderMask(const VS_MASK_OUTPUT aVertex) : SV_Target -{ - float2 maskCoords = aVertex.vMaskCoords; - float mask = tMask.Sample(LayerTextureSamplerLinear, maskCoords).a; - return fLayerColor * mask; -} - -/* - * Un-masked versions - ************************************************************* - */ -float4 RGBAShader(const VS_OUTPUT aVertex, uniform sampler aSampler) : SV_Target -{ - return tRGB.Sample(aSampler, aVertex.vTexCoords) * fLayerOpacity; -} - -float4 RGBShader(const VS_OUTPUT aVertex, uniform sampler aSampler) : SV_Target -{ - float4 result; - result = tRGB.Sample(aSampler, aVertex.vTexCoords) * fLayerOpacity; - result.a = fLayerOpacity; - return result; -} - -float4 YCbCrShader(const VS_OUTPUT aVertex) : SV_Target -{ - return CalculateYCbCrColor(aVertex.vTexCoords) * fLayerOpacity; -} - -PS_OUTPUT ComponentAlphaShader(const VS_OUTPUT aVertex) : SV_Target -{ - PS_OUTPUT result; - - result.vSrc = tRGB.Sample(LayerTextureSamplerLinear, aVertex.vTexCoords); - result.vAlpha = 1.0 - tRGBWhite.Sample(LayerTextureSamplerLinear, aVertex.vTexCoords) + result.vSrc; - result.vSrc.a = result.vAlpha.g; - result.vSrc *= fLayerOpacity; - result.vAlpha *= fLayerOpacity; - return result; -} - -float4 SolidColorShader(const VS_OUTPUT aVertex) : SV_Target -{ - return fLayerColor; -} - -PS_DUAL_OUTPUT AlphaExtractionPrepareShader(const VS_OUTPUT aVertex) -{ - PS_DUAL_OUTPUT result; - result.vOutput1 = float4(0, 0, 0, 1); - result.vOutput2 = float4(1, 1, 1, 1); - return result; -} - -technique10 RenderRGBLayerPremul -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBShader(LayerTextureSamplerLinear) ) ); - } -} - -technique10 RenderRGBLayerPremulPoint -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBShader(LayerTextureSamplerPoint) ) ); - } -} - -technique10 RenderRGBALayerPremul -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBAShader(LayerTextureSamplerLinear) ) ); - } -} - -technique10 RenderRGBALayerNonPremul -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( NonPremul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBAShader(LayerTextureSamplerLinear) ) ); - } -} - -technique10 RenderRGBALayerPremulPoint -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBAShader(LayerTextureSamplerPoint) ) ); - } -} - -technique10 RenderRGBALayerNonPremulPoint -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( NonPremul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBAShader(LayerTextureSamplerPoint) ) ); - } -} - -technique10 RenderYCbCrLayer -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, YCbCrShader() ) ); - } -} - -technique10 RenderComponentAlphaLayer -{ - Pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( ComponentAlphaBlend, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, ComponentAlphaShader() ) ); - } - -} - -technique10 RenderSolidColorLayer -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, SolidColorShader() ) ); - } -} - -technique10 RenderClearLayer -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( NoBlendDual, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, SolidColorShader() ) ); - } -} - -technique10 PrepareAlphaExtractionTextures -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( NoBlendDual, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, AlphaExtractionPrepareShader() ) ); - } -} - -technique10 RenderRGBLayerPremulMask -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadMaskVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBShaderMask(LayerTextureSamplerLinear) ) ); - } -} - -technique10 RenderRGBLayerPremulPointMask -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadMaskVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBShaderMask(LayerTextureSamplerPoint) ) ); - } -} - -technique10 RenderRGBALayerPremulMask -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadMaskVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBAShaderMask(LayerTextureSamplerLinear) ) ); - } -} - -technique10 RenderRGBALayerPremulMask3D -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadMask3DVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBAShaderLinearMask3D() ) ); - } -} - -technique10 RenderRGBALayerNonPremulMask -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( NonPremul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadMaskVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBAShaderMask(LayerTextureSamplerLinear) ) ); - } -} - -technique10 RenderRGBALayerPremulPointMask -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadMaskVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBAShaderMask(LayerTextureSamplerPoint) ) ); - } -} - -technique10 RenderRGBALayerNonPremulPointMask -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( NonPremul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadMaskVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, RGBAShaderMask(LayerTextureSamplerPoint) ) ); - } -} - -technique10 RenderYCbCrLayerMask -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadMaskVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, YCbCrShaderMask() ) ); - } -} - -technique10 RenderComponentAlphaLayerMask -{ - Pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( ComponentAlphaBlend, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadMaskVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, ComponentAlphaShaderMask() ) ); - } -} - -technique10 RenderSolidColorLayerMask -{ - pass P0 - { - SetRasterizerState( LayerRast ); - SetBlendState( Premul, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF ); - SetVertexShader( CompileShader( vs_4_0_level_9_3, LayerQuadMaskVS() ) ); - SetGeometryShader( NULL ); - SetPixelShader( CompileShader( ps_4_0_level_9_3, SolidColorShaderMask() ) ); - } -} - diff --git a/gfx/layers/d3d10/LayerManagerD3D10.h b/gfx/layers/d3d10/LayerManagerD3D10.h deleted file mode 100644 index e7b27118c79..00000000000 --- a/gfx/layers/d3d10/LayerManagerD3D10.h +++ /dev/null @@ -1,288 +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_LAYERMANAGERD3D10_H -#define GFX_LAYERMANAGERD3D10_H - -#include "Layers.h" - -#include -#include - -#include "gfxContext.h" -#include "mozilla/gfx/UserData.h" -#include "nsIWidget.h" - -#include "ReadbackManagerD3D10.h" - -namespace mozilla { -namespace layers { - -class DummyRoot; -class Nv3DVUtils; - -/** - * 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 ShaderConstantRectD3D10 -{ - float mX, mY, mWidth, mHeight; - ShaderConstantRectD3D10(float aX, float aY, float aWidth, float aHeight) - : mX(aX), mY(aY), mWidth(aWidth), mHeight(aHeight) - { } - - // For easy passing to SetVertexShaderConstantF. - operator float* () { return &mX; } -}; - -/* - * This is the LayerManager used for Direct3D 10. For now this will - * render on the main thread. - * - * For the time being, LayerManagerD3D10 forwards layers - * transactions. - */ -class LayerManagerD3D10 : public LayerManager { - typedef mozilla::gfx::DrawTarget DrawTarget; - typedef mozilla::gfx::IntSize IntSize; - typedef mozilla::gfx::SurfaceFormat SurfaceFormat; - -public: - LayerManagerD3D10(nsIWidget *aWidget); - virtual ~LayerManagerD3D10(); - - /* - * Initializes the layer manager, this is when the layer manager will - * actually access the device and attempt to create the swap chain used - * to draw to the window. If this method fails the device cannot be used. - * This function is not threadsafe. - * - * return True is initialization was succesful, false when it was not. - */ - bool Initialize(bool force = false, HRESULT* aHresultPtr = nullptr); - - /* - * LayerManager implementation. - */ - virtual void Destroy(); - - virtual void SetRoot(Layer *aLayer); - - virtual void BeginTransaction(); - - virtual void BeginTransactionWithTarget(gfxContext* aTarget); - - virtual bool EndEmptyTransaction(EndTransactionFlags aFlags = END_DEFAULT); - - struct CallbackInfo { - DrawPaintedLayerCallback Callback; - void *CallbackData; - }; - - virtual void EndTransaction(DrawPaintedLayerCallback aCallback, - void* aCallbackData, - EndTransactionFlags aFlags = END_DEFAULT); - - const CallbackInfo &GetCallbackInfo() { return mCurrentCallbackInfo; } - - // D3D10 guarantees textures can be at least this size - enum { - MAX_TEXTURE_SIZE = 8192 - }; - virtual bool CanUseCanvasLayerForSize(const gfx::IntSize &aSize) - { - return aSize <= gfx::IntSize(MAX_TEXTURE_SIZE, MAX_TEXTURE_SIZE); - } - - virtual int32_t GetMaxTextureSize() const - { - return MAX_TEXTURE_SIZE; - } - - virtual already_AddRefed CreatePaintedLayer(); - virtual already_AddRefed CreateContainerLayer(); - virtual already_AddRefed CreateImageLayer(); - virtual already_AddRefed CreateColorLayer(); - virtual already_AddRefed CreateCanvasLayer(); - virtual already_AddRefed CreateReadbackLayer(); - - virtual TemporaryRef - CreateOptimalDrawTarget(const IntSize &aSize, - SurfaceFormat aSurfaceFormat); - - virtual TemporaryRef - CreateOptimalMaskDrawTarget(const IntSize &aSize); - - virtual TemporaryRef - CreateDrawTarget(const gfx::IntSize &aSize, - mozilla::gfx::SurfaceFormat aFormat); - - virtual LayersBackend GetBackendType() { return LayersBackend::LAYERS_D3D10; } - virtual void GetBackendName(nsAString& name) { name.AssignLiteral("Direct3D 10"); } - - virtual const char* Name() const { return "D3D10"; } - - // Public helpers - - ID3D10Device1 *device() const { return mDevice; } - - ID3D10Effect *effect() const { return mEffect; } - IDXGISwapChain *SwapChain() const - { - return mSwapChain; - } - ReadbackManagerD3D10 *readbackManager(); - - void SetupInputAssembler(); - void SetViewport(const nsIntSize &aViewport); - const nsIntSize &GetViewport() { return mViewport; } - - /** - * Return pointer to the Nv3DVUtils instance - */ - Nv3DVUtils *GetNv3DVUtils() { return mNv3DVUtils; } - - static void ReportFailure(const nsACString &aMsg, HRESULT aCode); - -private: - void SetupPipeline(); - void UpdateRenderTarget(); - void VerifyBufferSize(); - void EnsureReadbackManager(); - - void Render(EndTransactionFlags aFlags); - - nsRefPtr mDevice; - - nsRefPtr mEffect; - nsRefPtr mInputLayout; - nsRefPtr mVertexBuffer; - nsRefPtr mReadbackManager; - - nsRefPtr mRTView; - - nsRefPtr mSwapChain; - - nsIWidget *mWidget; - - bool mDisableSequenceForNextFrame; - - CallbackInfo mCurrentCallbackInfo; - - nsIntSize mViewport; - - /* Nv3DVUtils instance */ - nsAutoPtr mNv3DVUtils; - - /* - * Context target, nullptr when drawing directly to our swap chain. - */ - nsRefPtr mTarget; - - /* - * Copies the content of our backbuffer to the set transaction target. - */ - void PaintToTarget(); -}; - -/* - * General information and tree management for OGL layers. - */ -class LayerD3D10 -{ -public: - LayerD3D10(LayerManagerD3D10 *aManager); - - virtual LayerD3D10 *GetFirstChildD3D10() { return nullptr; } - - void SetFirstChild(LayerD3D10 *aParent); - - virtual Layer* GetLayer() = 0; - - /** - * This will render a child layer to whatever render target is currently - * active. - */ - virtual void RenderLayer() = 0; - virtual void Validate() {} - - ID3D10Device1 *device() const { return mD3DManager->device(); } - ID3D10Effect *effect() const { return mD3DManager->effect(); } - - /* Called by the layer manager when it's destroyed */ - virtual void LayerManagerDestroyed() {} - - /** - * Return pointer to the Nv3DVUtils instance. Calls equivalent method in LayerManager. - */ - Nv3DVUtils *GetNv3DVUtils() { return mD3DManager->GetNv3DVUtils(); } - - /* - * Returns a shader resource view of a texture containing the contents of this - * layer. Will try to return an existing texture if possible, or a temporary - * one if not. It is the callee's responsibility to release the shader - * resource view. Will return null if a texture could not be constructed. - * The texture will not be transformed, i.e., it will be in the same coord - * space as this. - * Any layer that can be used as a mask layer should override this method. - * If aSize is non-null, it will contain the size of the texture. - */ - virtual already_AddRefed GetAsTexture(gfx::IntSize* aSize) - { - return nullptr; - } - - void SetEffectTransformAndOpacity() - { - Layer* layer = GetLayer(); - const gfx::Matrix4x4& transform = layer->GetEffectiveTransform(); - void* raw = &const_cast(transform)._11; - effect()->GetVariableByName("mLayerTransform")->SetRawValue(raw, 0, 64); - effect()->GetVariableByName("fLayerOpacity")->AsScalar()->SetFloat(layer->GetEffectiveOpacity()); - } - -protected: - /* - * Finds a texture for this layer's mask layer (if it has one) and sets it - * as an input to the shaders. - * Returns SHADER_MASK if a texture is loaded, SHADER_NO_MASK if there was no - * mask layer, or a texture for the mask layer could not be loaded. - */ - uint8_t LoadMaskTexture(); - - /** - * Select a shader technique using a combination of the following flags. - * Not all combinations of flags are supported, and might cause an error, - * check the fx file to see which shaders exist. In particular, aFlags should - * include any combination of the 0x20 bit = 0 flags OR one of the 0x20 bit = 1 - * flags. Mask flags can be used in either case. - */ - ID3D10EffectTechnique* SelectShader(uint8_t aFlags); - const static uint8_t SHADER_NO_MASK = 0; - const static uint8_t SHADER_MASK = 0x1; - const static uint8_t SHADER_MASK_3D = 0x2; - // 0x20 bit = 0 - const static uint8_t SHADER_RGB = 0; - const static uint8_t SHADER_RGBA = 0x4; - const static uint8_t SHADER_NON_PREMUL = 0; - const static uint8_t SHADER_PREMUL = 0x8; - const static uint8_t SHADER_LINEAR = 0; - const static uint8_t SHADER_POINT = 0x10; - // 0x20 bit = 1 - const static uint8_t SHADER_YCBCR = 0x20; - const static uint8_t SHADER_COMPONENT_ALPHA = 0x24; - const static uint8_t SHADER_SOLID = 0x28; - - LayerManagerD3D10 *mD3DManager; -}; - -} /* layers */ -} /* mozilla */ - -#endif /* GFX_LAYERMANAGERD3D9_H */ diff --git a/gfx/layers/d3d10/LayerManagerD3D10Effect.h b/gfx/layers/d3d10/LayerManagerD3D10Effect.h deleted file mode 100644 index fa8de1cb7ad..00000000000 --- a/gfx/layers/d3d10/LayerManagerD3D10Effect.h +++ /dev/null @@ -1,17658 +0,0 @@ -#if 0 -// -// FX Version: fx_4_0 -// Child effect (requires effect pool): false -// -// 3 local buffer(s) -// -cbuffer PerLayer -{ - float4 vTextureCoords; // Offset: 0, size: 16 - float4 vLayerQuad; // Offset: 16, size: 16 - float4 vMaskQuad; // Offset: 32, size: 16 - float fLayerOpacity; // Offset: 48, size: 4 - float4x4 mLayerTransform; // Offset: 64, size: 64 -} - -cbuffer PerOccasionalLayer -{ - float4 vRenderTargetOffset; // Offset: 0, size: 16 - float4 fLayerColor; // Offset: 16, size: 16 -} - -cbuffer PerLayerManager -{ - float4x4 mProjection; // Offset: 0, size: 64 -} - -// -// 13 local object(s) -// -BlendState Premul -{ - AlphaToCoverageEnable = bool(FALSE /* 0 */); - BlendEnable[0] = bool(TRUE /* 1 */); - SrcBlend[0] = uint(ONE /* 2 */); - DestBlend[0] = uint(INV_SRC_ALPHA /* 6 */); - BlendOp[0] = uint(ADD /* 1 */); - SrcBlendAlpha[0] = uint(ONE /* 2 */); - DestBlendAlpha[0] = uint(INV_SRC_ALPHA /* 6 */); - BlendOpAlpha[0] = uint(ADD /* 1 */); - RenderTargetWriteMask[0] = byte(0x0f); -}; -BlendState NonPremul -{ - AlphaToCoverageEnable = bool(FALSE /* 0 */); - BlendEnable[0] = bool(TRUE /* 1 */); - SrcBlend[0] = uint(SRC_ALPHA /* 5 */); - DestBlend[0] = uint(INV_SRC_ALPHA /* 6 */); - BlendOp[0] = uint(ADD /* 1 */); - SrcBlendAlpha[0] = uint(ONE /* 2 */); - DestBlendAlpha[0] = uint(INV_SRC_ALPHA /* 6 */); - BlendOpAlpha[0] = uint(ADD /* 1 */); - RenderTargetWriteMask[0] = byte(0x0f); -}; -BlendState NoBlendDual -{ - AlphaToCoverageEnable = bool(FALSE /* 0 */); - BlendEnable[0] = bool(FALSE /* 0 */); - BlendEnable[1] = bool(FALSE /* 0 */); - RenderTargetWriteMask[0] = byte(0x0f); - RenderTargetWriteMask[1] = byte(0x0f); -}; -BlendState ComponentAlphaBlend -{ - AlphaToCoverageEnable = bool(FALSE /* 0 */); - BlendEnable[0] = bool(TRUE /* 1 */); - SrcBlend[0] = uint(ONE /* 2 */); - DestBlend[0] = uint(INV_SRC1_COLOR /* 17 */); - BlendOp[0] = uint(ADD /* 1 */); - SrcBlendAlpha[0] = uint(ONE /* 2 */); - DestBlendAlpha[0] = uint(INV_SRC_ALPHA /* 6 */); - BlendOpAlpha[0] = uint(ADD /* 1 */); - RenderTargetWriteMask[0] = byte(0x0f); -}; -RasterizerState LayerRast -{ - ScissorEnable = bool(TRUE /* 1 */); - CullMode = uint(NONE /* 1 */); -}; -Texture2D tRGB; -Texture2D tY; -Texture2D tCb; -Texture2D tCr; -Texture2D tRGBWhite; -Texture2D tMask; -SamplerState LayerTextureSamplerLinear -{ - Filter = uint(MIN_MAG_MIP_LINEAR /* 21 */); - AddressU = uint(CLAMP /* 3 */); - AddressV = uint(CLAMP /* 3 */); -}; -SamplerState LayerTextureSamplerPoint -{ - Filter = uint(MIN_MAG_MIP_POINT /* 0 */); - AddressU = uint(CLAMP /* 3 */); - AddressV = uint(CLAMP /* 3 */); -}; - -// -// 21 technique(s) -// -technique10 RenderRGBLayerPremul -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // PerLayer 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 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0.xy - dcl_2d s0 - texld r0, t0, s0 - mul r0.xyz, r0, c0.x - mov r0.w, c0.x - mov oC0, r0 - - // approximately 4 instruction slots used (1 texture, 3 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_input_ps linear v1.xy - dcl_output o0.xyzw - dcl_temps 1 - sample r0.xyzw, v1.xyxx, t0.xyzw, s0 - mul o0.xyz, r0.xyzx, cb0[3].xxxx - mov o0.w, cb0[3].x - ret - // Approximately 4 instruction slots used - - }; - } - -} - -technique10 RenderRGBLayerPremulPoint -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerPoint sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // PerLayer 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 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0.xy - dcl_2d s0 - texld r0, t0, s0 - mul r0.xyz, r0, c0.x - mov r0.w, c0.x - mov oC0, r0 - - // approximately 4 instruction slots used (1 texture, 3 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_input_ps linear v1.xy - dcl_output o0.xyzw - dcl_temps 1 - sample r0.xyzw, v1.xyxx, t0.xyzw, s0 - mul o0.xyz, r0.xyzx, cb0[3].xxxx - mov o0.w, cb0[3].x - ret - // Approximately 4 instruction slots used - - }; - } - -} - -technique10 RenderRGBALayerPremul -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // PerLayer 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 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0.xy - dcl_2d s0 - texld r0, t0, s0 - mul r0, r0, c0.x - mov oC0, r0 - - // approximately 3 instruction slots used (1 texture, 2 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_input_ps linear v1.xy - dcl_output o0.xyzw - dcl_temps 1 - sample r0.xyzw, v1.xyxx, t0.xyzw, s0 - mul o0.xyzw, r0.xyzw, cb0[3].xxxx - ret - // Approximately 3 instruction slots used - - }; - } - -} - -technique10 RenderRGBALayerNonPremul -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = NonPremul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // PerLayer 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 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0.xy - dcl_2d s0 - texld r0, t0, s0 - mul r0, r0, c0.x - mov oC0, r0 - - // approximately 3 instruction slots used (1 texture, 2 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_input_ps linear v1.xy - dcl_output o0.xyzw - dcl_temps 1 - sample r0.xyzw, v1.xyxx, t0.xyzw, s0 - mul o0.xyzw, r0.xyzw, cb0[3].xxxx - ret - // Approximately 3 instruction slots used - - }; - } - -} - -technique10 RenderRGBALayerPremulPoint -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerPoint sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // PerLayer 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 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0.xy - dcl_2d s0 - texld r0, t0, s0 - mul r0, r0, c0.x - mov oC0, r0 - - // approximately 3 instruction slots used (1 texture, 2 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_input_ps linear v1.xy - dcl_output o0.xyzw - dcl_temps 1 - sample r0.xyzw, v1.xyxx, t0.xyzw, s0 - mul o0.xyzw, r0.xyzw, cb0[3].xxxx - ret - // Approximately 3 instruction slots used - - }; - } - -} - -technique10 RenderRGBALayerNonPremulPoint -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = NonPremul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerPoint sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // PerLayer 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 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0.xy - dcl_2d s0 - texld r0, t0, s0 - mul r0, r0, c0.x - mov oC0, r0 - - // approximately 3 instruction slots used (1 texture, 2 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_input_ps linear v1.xy - dcl_output o0.xyzw - dcl_temps 1 - sample r0.xyzw, v1.xyxx, t0.xyzw, s0 - mul o0.xyzw, r0.xyzw, cb0[3].xxxx - ret - // Approximately 3 instruction slots used - - }; - } - -} - -technique10 RenderYCbCrLayer -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tY texture float4 2d 0 1 - // tCb texture float4 2d 1 1 - // tCr texture float4 2d 2 1 - // PerLayer 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 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // s1 s0 t1 - // s2 s0 t2 - // - // - // Level9 shader bytecode: - // - ps_2_x - def c1, -0.50195998, -0.0627499968, 1.59603, 0.812969983 - def c2, 1.16437995, 2.01723003, 0.391759992, 1 - dcl t0.xy - dcl_2d s0 - dcl_2d s1 - dcl_2d s2 - texld r0, t0, s0 - texld r1, t0, s2 - add r0.x, r1.w, c1.x - mul r0.xy, r0.x, c1.zwzw - add r0.z, r0.w, c1.y - mad r0.y, r0.z, c2.x, -r0.y - mad r1.x, r0.z, c2.x, r0.x - texld r2, t0, s1 - add r0.x, r2.w, c1.x - mad r1.y, r0.x, -c2.z, r0.y - mul r0.x, r0.x, c2.y - mad r1.z, r0.z, c2.x, r0.x - mov r1.w, c2.w - mul r0, r1, c0.x - mov oC0, r0 - - // approximately 15 instruction slots used (3 texture, 12 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_resource_texture2d (float,float,float,float) t2 - dcl_input_ps linear v1.xy - dcl_output o0.xyzw - dcl_temps 3 - sample r0.xyzw, v1.xyxx, t2.xyzw, s0 - add r0.x, r0.w, l(-0.501960) - mul r0.xy, r0.xxxx, l(1.596030, 0.812970, 0.000000, 0.000000) - sample r1.xyzw, v1.xyxx, t0.xyzw, s0 - add r0.z, r1.w, l(-0.062750) - mad r0.y, r0.z, l(1.164380), -r0.y - mad r1.x, r0.z, l(1.164380), r0.x - sample r2.xyzw, v1.xyxx, t1.xyzw, s0 - add r0.x, r2.w, l(-0.501960) - mad r1.y, -r0.x, l(0.391760), r0.y - mul r0.x, r0.x, l(2.017230) - mad r1.z, r0.z, l(1.164380), r0.x - mov r1.w, l(1.000000) - mul o0.xyzw, r1.xyzw, cb0[3].xxxx - ret - // Approximately 15 instruction slots used - - }; - } - -} - -technique10 RenderComponentAlphaLayer -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = ComponentAlphaBlend; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // tRGBWhite texture float4 2d 1 1 - // PerLayer 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 - // SV_Target 1 xyzw 1 TARGET float xyzw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c0 cb0 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // s1 s0 t1 - // - // - // Level9 shader bytecode: - // - ps_2_x - def c1, 1, 0, 0, 0 - dcl t0.xy - dcl_2d s0 - dcl_2d s1 - texld r0, t0, s0 - texld r1, t0, s1 - add r1, r0, -r1 - add r1, r1, c1.x - mov r0.w, r1.y - mul r1, r1, c0.x - mov oC1, r1 - mul r0, r0, c0.x - mov oC0, r0 - - // approximately 9 instruction slots used (2 texture, 7 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_input_ps linear v1.xy - dcl_output o0.xyzw - dcl_output o1.xyzw - dcl_temps 2 - sample r0.xyzw, v1.xyxx, t1.xyzw, s0 - sample r1.xyzw, v1.xyxx, t0.xyzw, s0 - add r0.xyzw, -r0.xyzw, r1.xyzw - add r0.xyzw, r0.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000) - mov r1.w, r0.y - mul o1.xyzw, r0.xyzw, cb0[3].xxxx - mul o0.xyzw, r1.xyzw, cb0[3].xxxx - ret - // Approximately 8 instruction slots used - - }; - } - -} - -technique10 RenderSolidColorLayer -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 [unused] - // float4 fLayerColor; // Offset: 16 Size: 16 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerOccasionalLayer 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 - // - // - // 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) - // - // - // Level9 shader bytecode: - // - ps_2_x - mov oC0, c0 - - // approximately 1 instruction slot used - ps_4_0 - dcl_constantbuffer cb0[2], immediateIndexed - dcl_output o0.xyzw - mov o0.xyzw, cb0[1].xyzw - ret - // Approximately 2 instruction slots used - - }; - } - -} - -technique10 RenderClearLayer -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = NoBlendDual; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 [unused] - // float4 fLayerColor; // Offset: 16 Size: 16 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerOccasionalLayer 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 - // - // - // 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) - // - // - // Level9 shader bytecode: - // - ps_2_x - mov oC0, c0 - - // approximately 1 instruction slot used - ps_4_0 - dcl_constantbuffer cb0[2], immediateIndexed - dcl_output o0.xyzw - mov o0.xyzw, cb0[1].xyzw - ret - // Approximately 2 instruction slots used - - }; - } - -} - -technique10 PrepareAlphaExtractionTextures -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = NoBlendDual; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 2 ( FLT, FLT, FLT, FLT) - // c3 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c5 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c6 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c7 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - mad oT0.xy, v0, c1.zwzw, c1 - mad r0.xy, v0, c2.zwzw, c2 - mul r1, r0.y, c4 - mad r0, c3, r0.x, r1 - add r0, r0, c5 - rcp r1.x, r0.w - mul r0.xyz, r0, r1.x - add r0, r0, -c6 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c8 - mad r1, c7, r0.x, r1 - mad r1, c9, r0.z, r1 - mad r0, c10, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 15 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r0.xyzw, r0.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 13 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float - // TEXCOORD 0 xy 1 NONE float - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Target 0 xyzw 0 TARGET float xyzw - // SV_Target 1 xyzw 1 TARGET float xyzw - // - // - // Level9 shader bytecode: - // - ps_2_x - def c0, 0, 0, 0, 1 - mov oC0, c0 - mov r0, c0.w - mov oC1, r0 - - // approximately 3 instruction slots used - ps_4_0 - dcl_output o0.xyzw - dcl_output o1.xyzw - mov o0.xyzw, l(0,0,0,1.000000) - mov o1.xyzw, l(1.000000,1.000000,1.000000,1.000000) - ret - // Approximately 3 instruction slots used - - }; - } - -} - -technique10 RenderRGBLayerPremulMask -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 3 ( FLT, FLT, FLT, FLT) - // c4 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c6 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c7 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c8 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - rcp r0.x, c3.z - mad r0.yz, v0.xxyw, c2.xzww, c2.xxyw - mul r1, r0.z, c5 - mad r1, c4, r0.y, r1 - add r1, r1, c6 - add r0.yz, r1.xxyw, -c3.xxyw - mul oT0.w, r0.x, r0.y - rcp r0.x, c3.w - mul oT0.z, r0.x, r0.z - mad oT0.xy, v0, c1.zwzw, c1 - rcp r0.x, r1.w - mul r1.xyz, r0.x, r1 - add r0, r1, -c7 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c9 - mad r1, c8, r0.x, r1 - mad r1, c10, r0.z, r1 - mad r0, c11, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 20 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_output o1.zw - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r1.xyz, r0.xyzx, r0.wwww - mov r1.w, r0.w - add r0.xy, r0.xyxx, -cb0[2].xyxx - div o1.zw, r0.xxxy, cb0[2].zzzw - add r0.xyzw, r1.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 16 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // tMask texture float4 2d 1 1 - // PerLayer cbuffer NA NA 0 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Target 0 xyzw 0 TARGET float xyzw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c0 cb0 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // s1 s0 t1 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0 - dcl_2d s0 - dcl_2d s1 - mov r0.xy, t0.wzzw - texld r1, t0, s0 - texld r0, r0, s1 - mul r1.xyz, r1, c0.x - mov r1.w, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - - // approximately 7 instruction slots used (2 texture, 5 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_input_ps linear v1.xy - dcl_input_ps linear v1.zw - dcl_output o0.xyzw - dcl_temps 2 - sample r0.xyzw, v1.xyxx, t0.xyzw, s0 - mul r0.xyz, r0.xyzx, cb0[3].xxxx - sample r1.xyzw, v1.zwzz, t1.xyzw, s0 - mov r0.w, cb0[3].x - mul o0.xyzw, r0.xyzw, r1.wwww - ret - // Approximately 6 instruction slots used - - }; - } - -} - -technique10 RenderRGBLayerPremulPointMask -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 3 ( FLT, FLT, FLT, FLT) - // c4 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c6 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c7 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c8 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - rcp r0.x, c3.z - mad r0.yz, v0.xxyw, c2.xzww, c2.xxyw - mul r1, r0.z, c5 - mad r1, c4, r0.y, r1 - add r1, r1, c6 - add r0.yz, r1.xxyw, -c3.xxyw - mul oT0.w, r0.x, r0.y - rcp r0.x, c3.w - mul oT0.z, r0.x, r0.z - mad oT0.xy, v0, c1.zwzw, c1 - rcp r0.x, r1.w - mul r1.xyz, r0.x, r1 - add r0, r1, -c7 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c9 - mad r1, c8, r0.x, r1 - mad r1, c10, r0.z, r1 - mad r0, c11, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 20 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_output o1.zw - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r1.xyz, r0.xyzx, r0.wwww - mov r1.w, r0.w - add r0.xy, r0.xyxx, -cb0[2].xyxx - div o1.zw, r0.xxxy, cb0[2].zzzw - add r0.xyzw, r1.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 16 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // LayerTextureSamplerPoint sampler NA NA 1 1 - // tRGB texture float4 2d 0 1 - // tMask texture float4 2d 1 1 - // PerLayer cbuffer NA NA 0 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Target 0 xyzw 0 TARGET float xyzw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c0 cb0 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t1 - // s1 s1 t0 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0 - dcl_2d s0 - dcl_2d s1 - mov r0.xy, t0.wzzw - texld r1, t0, s1 - texld r0, r0, s0 - mul r1.xyz, r1, c0.x - mov r1.w, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - - // approximately 7 instruction slots used (2 texture, 5 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_sampler s1, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_input_ps linear v1.xy - dcl_input_ps linear v1.zw - dcl_output o0.xyzw - dcl_temps 2 - sample r0.xyzw, v1.xyxx, t0.xyzw, s1 - mul r0.xyz, r0.xyzx, cb0[3].xxxx - sample r1.xyzw, v1.zwzz, t1.xyzw, s0 - mov r0.w, cb0[3].x - mul o0.xyzw, r0.xyzw, r1.wwww - ret - // Approximately 6 instruction slots used - - }; - } - -} - -technique10 RenderRGBALayerPremulMask -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 3 ( FLT, FLT, FLT, FLT) - // c4 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c6 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c7 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c8 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - rcp r0.x, c3.z - mad r0.yz, v0.xxyw, c2.xzww, c2.xxyw - mul r1, r0.z, c5 - mad r1, c4, r0.y, r1 - add r1, r1, c6 - add r0.yz, r1.xxyw, -c3.xxyw - mul oT0.w, r0.x, r0.y - rcp r0.x, c3.w - mul oT0.z, r0.x, r0.z - mad oT0.xy, v0, c1.zwzw, c1 - rcp r0.x, r1.w - mul r1.xyz, r0.x, r1 - add r0, r1, -c7 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c9 - mad r1, c8, r0.x, r1 - mad r1, c10, r0.z, r1 - mad r0, c11, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 20 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_output o1.zw - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r1.xyz, r0.xyzx, r0.wwww - mov r1.w, r0.w - add r0.xy, r0.xyxx, -cb0[2].xyxx - div o1.zw, r0.xxxy, cb0[2].zzzw - add r0.xyzw, r1.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 16 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // tMask texture float4 2d 1 1 - // PerLayer cbuffer NA NA 0 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Target 0 xyzw 0 TARGET float xyzw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c0 cb0 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // s1 s0 t1 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0 - dcl_2d s0 - dcl_2d s1 - mov r0.xy, t0.wzzw - texld r1, t0, s0 - texld r0, r0, s1 - mul r1, r1, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - - // approximately 6 instruction slots used (2 texture, 4 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_input_ps linear v1.xy - dcl_input_ps linear v1.zw - dcl_output o0.xyzw - dcl_temps 2 - sample r0.xyzw, v1.xyxx, t0.xyzw, s0 - mul r0.xyzw, r0.xyzw, cb0[3].xxxx - sample r1.xyzw, v1.zwzz, t1.xyzw, s0 - mul o0.xyzw, r0.xyzw, r1.wwww - ret - // Approximately 5 instruction slots used - - }; - } - -} - -technique10 RenderRGBALayerPremulMask3D -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 xyz 2 NONE float xyz - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 3 ( FLT, FLT, FLT, FLT) - // c4 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c6 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c7 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c8 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - def c12, 1, 0, 0, 0 - dcl_texcoord v0 - mov r0.z, c12.x - rcp r0.w, c3.z - mad r1.xy, v0, c2.zwzw, c2 - mul r2, r1.y, c5 - mad r1, c4, r1.x, r2 - add r1, r1, c6 - rcp r2.x, r1.w - mad r2.yz, r1.xxyw, r2.x, -c3.xxyw - mul r1.xyz, r1, r2.x - mul r0.x, r0.w, r2.y - rcp r0.w, c3.w - mul r0.y, r0.w, r2.z - mul oT1.xyz, r0, r1.w - add r0, r1, -c7 - mad oT0.xy, v0, c1.zwzw, c1 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c9 - mad r1, c8, r0.x, r1 - mad r1, c10, r0.z, r1 - mad r0, c11, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 22 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_output o2.xyz - dcl_temps 3 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r0.xyz, r0.xyzx, r0.wwww - add r1.xyzw, r0.xyzw, -cb1[0].xyzw - add r0.xy, r0.xyxx, -cb0[2].xyxx - div r0.xy, r0.xyxx, cb0[2].zwzz - mul r1.xyz, r1.wwww, r1.xyzx - mul r2.xyzw, r1.yyyy, cb2[1].xyzw - mad r2.xyzw, cb2[0].xyzw, r1.xxxx, r2.xyzw - mad r2.xyzw, cb2[2].xyzw, r1.zzzz, r2.xyzw - mad o0.xyzw, cb2[3].xyzw, r1.wwww, r2.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - mov r0.z, l(1.000000) - mul o2.xyz, r0.wwww, r0.xyzx - ret - // Approximately 17 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // tMask texture float4 2d 1 1 - // PerLayer 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 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // s1 s0 t1 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0.xy - dcl t1.xyz - dcl_2d s0 - dcl_2d s1 - rcp r0.w, t1.z - mul r0.xy, r0.w, t1 - texld r1, t0, s0 - texld r0, r0, s1 - mul r1, r1, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - - // approximately 7 instruction slots used (2 texture, 5 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_input_ps linear v1.xy - dcl_input_ps linear v2.xyz - dcl_output o0.xyzw - dcl_temps 2 - div r0.xy, v2.xyxx, v2.zzzz - sample r0.xyzw, r0.xyxx, t1.xyzw, s0 - sample r1.xyzw, v1.xyxx, t0.xyzw, s0 - mul r1.xyzw, r1.xyzw, cb0[3].xxxx - mul o0.xyzw, r0.wwww, r1.xyzw - ret - // Approximately 6 instruction slots used - - }; - } - -} - -technique10 RenderRGBALayerNonPremulMask -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = NonPremul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 3 ( FLT, FLT, FLT, FLT) - // c4 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c6 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c7 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c8 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - rcp r0.x, c3.z - mad r0.yz, v0.xxyw, c2.xzww, c2.xxyw - mul r1, r0.z, c5 - mad r1, c4, r0.y, r1 - add r1, r1, c6 - add r0.yz, r1.xxyw, -c3.xxyw - mul oT0.w, r0.x, r0.y - rcp r0.x, c3.w - mul oT0.z, r0.x, r0.z - mad oT0.xy, v0, c1.zwzw, c1 - rcp r0.x, r1.w - mul r1.xyz, r0.x, r1 - add r0, r1, -c7 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c9 - mad r1, c8, r0.x, r1 - mad r1, c10, r0.z, r1 - mad r0, c11, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 20 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_output o1.zw - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r1.xyz, r0.xyzx, r0.wwww - mov r1.w, r0.w - add r0.xy, r0.xyxx, -cb0[2].xyxx - div o1.zw, r0.xxxy, cb0[2].zzzw - add r0.xyzw, r1.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 16 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // tMask texture float4 2d 1 1 - // PerLayer cbuffer NA NA 0 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Target 0 xyzw 0 TARGET float xyzw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c0 cb0 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // s1 s0 t1 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0 - dcl_2d s0 - dcl_2d s1 - mov r0.xy, t0.wzzw - texld r1, t0, s0 - texld r0, r0, s1 - mul r1, r1, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - - // approximately 6 instruction slots used (2 texture, 4 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_input_ps linear v1.xy - dcl_input_ps linear v1.zw - dcl_output o0.xyzw - dcl_temps 2 - sample r0.xyzw, v1.xyxx, t0.xyzw, s0 - mul r0.xyzw, r0.xyzw, cb0[3].xxxx - sample r1.xyzw, v1.zwzz, t1.xyzw, s0 - mul o0.xyzw, r0.xyzw, r1.wwww - ret - // Approximately 5 instruction slots used - - }; - } - -} - -technique10 RenderRGBALayerPremulPointMask -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 3 ( FLT, FLT, FLT, FLT) - // c4 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c6 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c7 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c8 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - rcp r0.x, c3.z - mad r0.yz, v0.xxyw, c2.xzww, c2.xxyw - mul r1, r0.z, c5 - mad r1, c4, r0.y, r1 - add r1, r1, c6 - add r0.yz, r1.xxyw, -c3.xxyw - mul oT0.w, r0.x, r0.y - rcp r0.x, c3.w - mul oT0.z, r0.x, r0.z - mad oT0.xy, v0, c1.zwzw, c1 - rcp r0.x, r1.w - mul r1.xyz, r0.x, r1 - add r0, r1, -c7 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c9 - mad r1, c8, r0.x, r1 - mad r1, c10, r0.z, r1 - mad r0, c11, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 20 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_output o1.zw - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r1.xyz, r0.xyzx, r0.wwww - mov r1.w, r0.w - add r0.xy, r0.xyxx, -cb0[2].xyxx - div o1.zw, r0.xxxy, cb0[2].zzzw - add r0.xyzw, r1.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 16 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // LayerTextureSamplerPoint sampler NA NA 1 1 - // tRGB texture float4 2d 0 1 - // tMask texture float4 2d 1 1 - // PerLayer cbuffer NA NA 0 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Target 0 xyzw 0 TARGET float xyzw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c0 cb0 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t1 - // s1 s1 t0 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0 - dcl_2d s0 - dcl_2d s1 - mov r0.xy, t0.wzzw - texld r1, t0, s1 - texld r0, r0, s0 - mul r1, r1, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - - // approximately 6 instruction slots used (2 texture, 4 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_sampler s1, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_input_ps linear v1.xy - dcl_input_ps linear v1.zw - dcl_output o0.xyzw - dcl_temps 2 - sample r0.xyzw, v1.xyxx, t0.xyzw, s1 - mul r0.xyzw, r0.xyzw, cb0[3].xxxx - sample r1.xyzw, v1.zwzz, t1.xyzw, s0 - mul o0.xyzw, r0.xyzw, r1.wwww - ret - // Approximately 5 instruction slots used - - }; - } - -} - -technique10 RenderRGBALayerNonPremulPointMask -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = NonPremul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 3 ( FLT, FLT, FLT, FLT) - // c4 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c6 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c7 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c8 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - rcp r0.x, c3.z - mad r0.yz, v0.xxyw, c2.xzww, c2.xxyw - mul r1, r0.z, c5 - mad r1, c4, r0.y, r1 - add r1, r1, c6 - add r0.yz, r1.xxyw, -c3.xxyw - mul oT0.w, r0.x, r0.y - rcp r0.x, c3.w - mul oT0.z, r0.x, r0.z - mad oT0.xy, v0, c1.zwzw, c1 - rcp r0.x, r1.w - mul r1.xyz, r0.x, r1 - add r0, r1, -c7 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c9 - mad r1, c8, r0.x, r1 - mad r1, c10, r0.z, r1 - mad r0, c11, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 20 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_output o1.zw - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r1.xyz, r0.xyzx, r0.wwww - mov r1.w, r0.w - add r0.xy, r0.xyxx, -cb0[2].xyxx - div o1.zw, r0.xxxy, cb0[2].zzzw - add r0.xyzw, r1.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 16 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // LayerTextureSamplerPoint sampler NA NA 1 1 - // tRGB texture float4 2d 0 1 - // tMask texture float4 2d 1 1 - // PerLayer cbuffer NA NA 0 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Target 0 xyzw 0 TARGET float xyzw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c0 cb0 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t1 - // s1 s1 t0 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0 - dcl_2d s0 - dcl_2d s1 - mov r0.xy, t0.wzzw - texld r1, t0, s1 - texld r0, r0, s0 - mul r1, r1, c0.x - mul r0, r0.w, r1 - mov oC0, r0 - - // approximately 6 instruction slots used (2 texture, 4 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_sampler s1, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_input_ps linear v1.xy - dcl_input_ps linear v1.zw - dcl_output o0.xyzw - dcl_temps 2 - sample r0.xyzw, v1.xyxx, t0.xyzw, s1 - mul r0.xyzw, r0.xyzw, cb0[3].xxxx - sample r1.xyzw, v1.zwzz, t1.xyzw, s0 - mul o0.xyzw, r0.xyzw, r1.wwww - ret - // Approximately 5 instruction slots used - - }; - } - -} - -technique10 RenderYCbCrLayerMask -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 3 ( FLT, FLT, FLT, FLT) - // c4 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c6 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c7 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c8 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - rcp r0.x, c3.z - mad r0.yz, v0.xxyw, c2.xzww, c2.xxyw - mul r1, r0.z, c5 - mad r1, c4, r0.y, r1 - add r1, r1, c6 - add r0.yz, r1.xxyw, -c3.xxyw - mul oT0.w, r0.x, r0.y - rcp r0.x, c3.w - mul oT0.z, r0.x, r0.z - mad oT0.xy, v0, c1.zwzw, c1 - rcp r0.x, r1.w - mul r1.xyz, r0.x, r1 - add r0, r1, -c7 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c9 - mad r1, c8, r0.x, r1 - mad r1, c10, r0.z, r1 - mad r0, c11, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 20 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_output o1.zw - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r1.xyz, r0.xyzx, r0.wwww - mov r1.w, r0.w - add r0.xy, r0.xyxx, -cb0[2].xyxx - div o1.zw, r0.xxxy, cb0[2].zzzw - add r0.xyzw, r1.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 16 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tY texture float4 2d 0 1 - // tCb texture float4 2d 1 1 - // tCr texture float4 2d 2 1 - // tMask texture float4 2d 3 1 - // PerLayer cbuffer NA NA 0 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Target 0 xyzw 0 TARGET float xyzw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c0 cb0 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // s1 s0 t1 - // s2 s0 t2 - // s3 s0 t3 - // - // - // Level9 shader bytecode: - // - ps_2_x - def c1, -0.50195998, -0.0627499968, 1.59603, 0.812969983 - def c2, 1.16437995, 2.01723003, 0.391759992, 1 - dcl t0 - dcl_2d s0 - dcl_2d s1 - dcl_2d s2 - dcl_2d s3 - texld r0, t0, s0 - texld r1, t0, s2 - add r0.x, r1.w, c1.x - mul r0.xy, r0.x, c1.zwzw - add r0.z, r0.w, c1.y - mad r0.y, r0.z, c2.x, -r0.y - mad r1.x, r0.z, c2.x, r0.x - mov r2.xy, t0.wzzw - texld r3, t0, s1 - texld r2, r2, s3 - add r0.x, r3.w, c1.x - mad r1.y, r0.x, -c2.z, r0.y - mul r0.x, r0.x, c2.y - mad r1.z, r0.z, c2.x, r0.x - mov r1.w, c2.w - mul r0, r1, c0.x - mul r0, r2.w, r0 - mov oC0, r0 - - // approximately 18 instruction slots used (4 texture, 14 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_resource_texture2d (float,float,float,float) t2 - dcl_resource_texture2d (float,float,float,float) t3 - dcl_input_ps linear v1.xy - dcl_input_ps linear v1.zw - dcl_output o0.xyzw - dcl_temps 3 - sample r0.xyzw, v1.xyxx, t2.xyzw, s0 - add r0.x, r0.w, l(-0.501960) - mul r0.xy, r0.xxxx, l(1.596030, 0.812970, 0.000000, 0.000000) - sample r1.xyzw, v1.xyxx, t0.xyzw, s0 - add r0.z, r1.w, l(-0.062750) - mad r0.y, r0.z, l(1.164380), -r0.y - mad r1.x, r0.z, l(1.164380), r0.x - sample r2.xyzw, v1.xyxx, t1.xyzw, s0 - add r0.x, r2.w, l(-0.501960) - mad r1.y, -r0.x, l(0.391760), r0.y - mul r0.x, r0.x, l(2.017230) - mad r1.z, r0.z, l(1.164380), r0.x - mov r1.w, l(1.000000) - mul r0.xyzw, r1.xyzw, cb0[3].xxxx - sample r1.xyzw, v1.zwzz, t3.xyzw, s0 - mul o0.xyzw, r0.xyzw, r1.wwww - ret - // Approximately 17 instruction slots used - - }; - } - -} - -technique10 RenderComponentAlphaLayerMask -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = ComponentAlphaBlend; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 3 ( FLT, FLT, FLT, FLT) - // c4 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c6 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c7 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c8 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - rcp r0.x, c3.z - mad r0.yz, v0.xxyw, c2.xzww, c2.xxyw - mul r1, r0.z, c5 - mad r1, c4, r0.y, r1 - add r1, r1, c6 - add r0.yz, r1.xxyw, -c3.xxyw - mul oT0.w, r0.x, r0.y - rcp r0.x, c3.w - mul oT0.z, r0.x, r0.z - mad oT0.xy, v0, c1.zwzw, c1 - rcp r0.x, r1.w - mul r1.xyz, r0.x, r1 - add r0, r1, -c7 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c9 - mad r1, c8, r0.x, r1 - mad r1, c10, r0.z, r1 - mad r0, c11, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 20 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_output o1.zw - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r1.xyz, r0.xyzx, r0.wwww - mov r1.w, r0.w - add r0.xy, r0.xyxx, -cb0[2].xyxx - div o1.zw, r0.xxxy, cb0[2].zzzw - add r0.xyzw, r1.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 16 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 [unused] - // float4 vLayerQuad; // Offset: 16 Size: 16 [unused] - // float4 vMaskQuad; // Offset: 32 Size: 16 [unused] - // float fLayerOpacity; // Offset: 48 Size: 4 - // float4x4 mLayerTransform; // Offset: 64 Size: 64 [unused] - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tRGB texture float4 2d 0 1 - // tRGBWhite texture float4 2d 1 1 - // tMask texture float4 2d 2 1 - // PerLayer cbuffer NA NA 0 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Target 0 xyzw 0 TARGET float xyzw - // SV_Target 1 xyzw 1 TARGET float xyzw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c0 cb0 3 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // s1 s0 t1 - // s2 s0 t2 - // - // - // Level9 shader bytecode: - // - ps_2_x - def c1, 1, 0, 0, 0 - dcl t0 - dcl_2d s0 - dcl_2d s1 - dcl_2d s2 - mov r0.xy, t0.wzzw - texld r0, r0, s2 - mul r0.x, r0.w, c0.x - texld r1, t0, s0 - texld r2, t0, s1 - add r2, r1, -r2 - add r2, r2, c1.x - mov r1.w, r2.y - mul r2, r0.x, r2 - mul r0, r0.x, r1 - mov oC0, r0 - mov oC1, r2 - - // approximately 12 instruction slots used (3 texture, 9 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[4], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_resource_texture2d (float,float,float,float) t1 - dcl_resource_texture2d (float,float,float,float) t2 - dcl_input_ps linear v1.xy - dcl_input_ps linear v1.zw - dcl_output o0.xyzw - dcl_output o1.xyzw - dcl_temps 3 - sample r0.xyzw, v1.xyxx, t1.xyzw, s0 - sample r1.xyzw, v1.xyxx, t0.xyzw, s0 - add r0.xyzw, -r0.xyzw, r1.xyzw - add r0.xyzw, r0.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000) - mov r1.w, r0.y - sample r2.xyzw, v1.zwzz, t2.xyzw, s0 - mul r2.x, r2.w, cb0[3].x - mul o0.xyzw, r1.xyzw, r2.xxxx - mul o1.xyzw, r0.xyzw, r2.xxxx - ret - // Approximately 10 instruction slots used - - }; - } - -} - -technique10 RenderSolidColorLayerMask -{ - pass P0 - { - RasterizerState = LayerRast; - AB_BlendFactor = float4(0, 0, 0, 0); - AB_SampleMask = uint(0xffffffff); - BlendState = Premul; - VertexShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerLayer - // { - // - // float4 vTextureCoords; // Offset: 0 Size: 16 - // float4 vLayerQuad; // Offset: 16 Size: 16 - // float4 vMaskQuad; // Offset: 32 Size: 16 - // float fLayerOpacity; // Offset: 48 Size: 4 [unused] - // float4x4 mLayerTransform; // Offset: 64 Size: 64 - // - // } - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 - // float4 fLayerColor; // Offset: 16 Size: 16 [unused] - // - // } - // - // cbuffer PerLayerManager - // { - // - // float4x4 mProjection; // Offset: 0 Size: 64 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // PerLayer cbuffer NA NA 0 1 - // PerOccasionalLayer cbuffer NA NA 1 1 - // PerLayerManager cbuffer NA NA 2 1 - // - // - // - // Input signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // POSITION 0 xy 0 NONE float xy - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Position 0 xyzw 0 POS float xyzw - // TEXCOORD 0 xy 1 NONE float xy - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c1 cb0 0 3 ( FLT, FLT, FLT, FLT) - // c4 cb0 4 2 ( FLT, FLT, FLT, FLT) - // c6 cb0 7 1 ( FLT, FLT, FLT, FLT) - // c7 cb1 0 1 ( FLT, FLT, FLT, FLT) - // c8 cb2 0 4 ( FLT, FLT, FLT, FLT) - // - // - // Runtime generated constant mappings: - // - // Target Reg Constant Description - // ---------- -------------------------------------------------- - // c0 Vertex Shader position offset - // - // - // Level9 shader bytecode: - // - vs_2_x - dcl_texcoord v0 - rcp r0.x, c3.z - mad r0.yz, v0.xxyw, c2.xzww, c2.xxyw - mul r1, r0.z, c5 - mad r1, c4, r0.y, r1 - add r1, r1, c6 - add r0.yz, r1.xxyw, -c3.xxyw - mul oT0.w, r0.x, r0.y - rcp r0.x, c3.w - mul oT0.z, r0.x, r0.z - mad oT0.xy, v0, c1.zwzw, c1 - rcp r0.x, r1.w - mul r1.xyz, r0.x, r1 - add r0, r1, -c7 - mul r0.xyz, r0.w, r0 - mul r1, r0.y, c9 - mad r1, c8, r0.x, r1 - mad r1, c10, r0.z, r1 - mad r0, c11, r0.w, r1 - mad oPos.xy, r0.w, c0, r0 - mov oPos.zw, r0 - - // approximately 20 instruction slots used - vs_4_0 - dcl_constantbuffer cb0[8], immediateIndexed - dcl_constantbuffer cb1[1], immediateIndexed - dcl_constantbuffer cb2[4], immediateIndexed - dcl_input v0.xy - dcl_output_siv o0.xyzw, position - dcl_output o1.xy - dcl_output o1.zw - dcl_temps 2 - mad r0.xy, v0.xyxx, cb0[1].zwzz, cb0[1].xyxx - mul r1.xyzw, r0.yyyy, cb0[5].xyzw - mad r0.xyzw, cb0[4].xyzw, r0.xxxx, r1.xyzw - add r0.xyzw, r0.xyzw, cb0[7].xyzw - div r1.xyz, r0.xyzx, r0.wwww - mov r1.w, r0.w - add r0.xy, r0.xyxx, -cb0[2].xyxx - div o1.zw, r0.xxxy, cb0[2].zzzw - add r0.xyzw, r1.xyzw, -cb1[0].xyzw - mul r0.xyz, r0.wwww, r0.xyzx - mul r1.xyzw, r0.yyyy, cb2[1].xyzw - mad r1.xyzw, cb2[0].xyzw, r0.xxxx, r1.xyzw - mad r1.xyzw, cb2[2].xyzw, r0.zzzz, r1.xyzw - mad o0.xyzw, cb2[3].xyzw, r0.wwww, r1.xyzw - mad o1.xy, v0.xyxx, cb0[0].zwzz, cb0[0].xyxx - ret - // Approximately 16 instruction slots used - - }; - GeometryShader = NULL; - PixelShader = asm { - // - // Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384 - // - // - // Buffer Definitions: - // - // cbuffer PerOccasionalLayer - // { - // - // float4 vRenderTargetOffset; // Offset: 0 Size: 16 [unused] - // float4 fLayerColor; // Offset: 16 Size: 16 - // - // } - // - // - // Resource Bindings: - // - // Name Type Format Dim Slot Elements - // ------------------------------ ---------- ------- ----------- ---- -------- - // LayerTextureSamplerLinear sampler NA NA 0 1 - // tMask texture float4 2d 0 1 - // PerOccasionalLayer 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 - // TEXCOORD 1 zw 1 NONE float zw - // - // - // Output signature: - // - // Name Index Mask Register SysValue Format Used - // -------------------- ----- ------ -------- -------- ------- ------ - // SV_Target 0 xyzw 0 TARGET float xyzw - // - // - // Constant buffer to DX9 shader constant mappings: - // - // Target Reg Buffer Start Reg # of Regs Data Conversion - // ---------- ------- --------- --------- ---------------------- - // c0 cb0 1 1 ( FLT, FLT, FLT, FLT) - // - // - // Sampler/Resource to DX9 shader sampler mappings: - // - // Target Sampler Source Sampler Source Resource - // -------------- --------------- ---------------- - // s0 s0 t0 - // - // - // Level9 shader bytecode: - // - ps_2_x - dcl t0 - dcl_2d s0 - mov r0.xy, t0.wzzw - texld r0, r0, s0 - mul r0, r0.w, c0 - mov oC0, r0 - - // approximately 4 instruction slots used (1 texture, 3 arithmetic) - ps_4_0 - dcl_constantbuffer cb0[2], immediateIndexed - dcl_sampler s0, mode_default - dcl_resource_texture2d (float,float,float,float) t0 - dcl_input_ps linear v1.zw - dcl_output o0.xyzw - dcl_temps 1 - sample r0.xyzw, v1.zwzz, t0.xyzw, s0 - mul o0.xyzw, r0.wwww, cb0[1].xyzw - ret - // Approximately 3 instruction slots used - - }; - } - -} - -#endif - -const BYTE g_main[] = -{ - 68, 88, 66, 67, 173, 229, - 104, 135, 246, 30, 133, 190, - 80, 1, 18, 239, 172, 11, - 34, 194, 1, 0, 0, 0, - 107, 43, 1, 0, 1, 0, - 0, 0, 36, 0, 0, 0, - 70, 88, 49, 48, 63, 43, - 1, 0, 1, 16, 255, 254, - 3, 0, 0, 0, 8, 0, - 0, 0, 13, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 21, 0, 0, 0, 3, 27, - 1, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 1, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 42, 0, - 0, 0, 42, 0, 0, 0, - 0, 0, 0, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 0, 102, 108, 111, 97, 116, - 52, 0, 13, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 10, 33, 0, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 118, 76, 97, - 121, 101, 114, 81, 117, 97, - 100, 0, 118, 77, 97, 115, - 107, 81, 117, 97, 100, 0, - 102, 108, 111, 97, 116, 0, - 84, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 16, 0, - 0, 0, 4, 0, 0, 0, - 9, 9, 0, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 102, 108, 111, 97, 116, 52, - 120, 52, 0, 132, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 64, 0, 0, - 0, 64, 0, 0, 0, 64, - 0, 0, 0, 11, 100, 0, - 0, 109, 76, 97, 121, 101, - 114, 84, 114, 97, 110, 115, - 102, 111, 114, 109, 0, 80, - 101, 114, 79, 99, 99, 97, - 115, 105, 111, 110, 97, 108, - 76, 97, 121, 101, 114, 0, - 118, 82, 101, 110, 100, 101, - 114, 84, 97, 114, 103, 101, - 116, 79, 102, 102, 115, 101, - 116, 0, 102, 76, 97, 121, - 101, 114, 67, 111, 108, 111, - 114, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 77, 97, - 110, 97, 103, 101, 114, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 66, 108, 101, 110, 100, 83, - 116, 97, 116, 101, 0, 8, - 1, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 80, 114, 101, - 109, 117, 108, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 6, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 6, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 15, 0, 0, 0, 78, 111, - 110, 80, 114, 101, 109, 117, - 108, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 6, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 6, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 15, 0, - 0, 0, 78, 111, 66, 108, - 101, 110, 100, 68, 117, 97, - 108, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 15, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 15, 0, - 0, 0, 67, 111, 109, 112, - 111, 110, 101, 110, 116, 65, - 108, 112, 104, 97, 66, 108, - 101, 110, 100, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 17, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 6, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 15, 0, 0, 0, 82, 97, - 115, 116, 101, 114, 105, 122, - 101, 114, 83, 116, 97, 116, - 101, 0, 224, 2, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 76, 97, 121, 101, 114, 82, - 97, 115, 116, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 84, 101, - 120, 116, 117, 114, 101, 50, - 68, 0, 46, 3, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 12, 0, 0, 0, - 116, 82, 71, 66, 0, 116, - 89, 0, 116, 67, 98, 0, - 116, 67, 114, 0, 116, 82, - 71, 66, 87, 104, 105, 116, - 101, 0, 116, 77, 97, 115, - 107, 0, 83, 97, 109, 112, - 108, 101, 114, 83, 116, 97, - 116, 101, 0, 116, 3, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 21, 0, 0, - 0, 76, 97, 121, 101, 114, - 84, 101, 120, 116, 117, 114, - 101, 83, 97, 109, 112, 108, - 101, 114, 76, 105, 110, 101, - 97, 114, 0, 1, 0, 0, - 0, 2, 0, 0, 0, 21, - 0, 0, 0, 1, 0, 0, - 0, 2, 0, 0, 0, 3, - 0, 0, 0, 1, 0, 0, - 0, 2, 0, 0, 0, 3, - 0, 0, 0, 76, 97, 121, - 101, 114, 84, 101, 120, 116, - 117, 114, 101, 83, 97, 109, - 112, 108, 101, 114, 80, 111, - 105, 110, 116, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 82, 101, - 110, 100, 101, 114, 82, 71, - 66, 76, 97, 121, 101, 114, - 80, 114, 101, 109, 117, 108, - 0, 80, 48, 0, 4, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 255, 255, 255, 255, 136, 7, - 0, 0, 68, 88, 66, 67, - 134, 58, 181, 81, 234, 180, - 23, 54, 140, 98, 159, 162, - 74, 150, 11, 172, 1, 0, - 0, 0, 136, 7, 0, 0, - 6, 0, 0, 0, 56, 0, - 0, 0, 188, 1, 0, 0, - 228, 3, 0, 0, 96, 4, - 0, 0, 252, 6, 0, 0, - 48, 7, 0, 0, 65, 111, - 110, 57, 124, 1, 0, 0, - 124, 1, 0, 0, 0, 2, - 254, 255, 24, 1, 0, 0, - 100, 0, 0, 0, 5, 0, - 36, 0, 0, 0, 96, 0, - 0, 0, 96, 0, 0, 0, - 36, 0, 1, 0, 96, 0, - 0, 0, 0, 0, 2, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 2, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 7, 0, 1, 0, - 5, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 6, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 4, 0, - 7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, - 254, 255, 31, 0, 0, 2, - 5, 0, 0, 128, 0, 0, - 15, 144, 4, 0, 0, 4, - 0, 0, 3, 224, 0, 0, - 228, 144, 1, 0, 238, 160, - 1, 0, 228, 160, 4, 0, - 0, 4, 0, 0, 3, 128, - 0, 0, 228, 144, 2, 0, - 238, 160, 2, 0, 228, 160, - 5, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 85, 128, - 4, 0, 228, 160, 4, 0, - 0, 4, 0, 0, 15, 128, - 3, 0, 228, 160, 0, 0, - 0, 128, 1, 0, 228, 128, - 2, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 5, 0, 228, 160, 6, 0, - 0, 2, 1, 0, 1, 128, - 0, 0, 255, 128, 5, 0, - 0, 3, 0, 0, 7, 128, - 0, 0, 228, 128, 1, 0, - 0, 128, 2, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 6, 0, 228, 161, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 255, 128, - 0, 0, 228, 128, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 85, 128, 8, 0, - 228, 160, 4, 0, 0, 4, - 1, 0, 15, 128, 7, 0, - 228, 160, 0, 0, 0, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 1, 0, 15, 128, - 9, 0, 228, 160, 0, 0, - 170, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 15, 128, 10, 0, 228, 160, - 0, 0, 255, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 3, 192, 0, 0, - 255, 128, 0, 0, 228, 160, - 0, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 12, 192, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 32, 2, 0, 0, 64, 0, - 1, 0, 136, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 8, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 2, 0, - 0, 0, 4, 0, 0, 0, - 95, 0, 0, 3, 50, 16, - 16, 0, 0, 0, 0, 0, - 103, 0, 0, 4, 242, 32, - 16, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 50, 32, 16, 0, - 1, 0, 0, 0, 104, 0, - 0, 2, 2, 0, 0, 0, - 50, 0, 0, 11, 50, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 1, 0, - 0, 0, 86, 5, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 6, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 8, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 14, 0, - 0, 7, 114, 0, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 0, 0, 0, 9, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 128, 65, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 56, 0, 0, 7, - 114, 0, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 1, 0, 0, 0, - 86, 5, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 0, 16, 0, 1, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 2, 0, 0, 0, - 166, 10, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 32, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 11, - 50, 32, 16, 0, 1, 0, - 0, 0, 70, 16, 16, 0, - 0, 0, 0, 0, 230, 138, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 70, 128, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, - 116, 0, 0, 0, 13, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 12, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 148, 2, - 0, 0, 3, 0, 0, 0, - 168, 0, 0, 0, 3, 0, - 0, 0, 28, 0, 0, 0, - 0, 4, 254, 255, 0, 1, - 0, 0, 96, 2, 0, 0, - 124, 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, 133, 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, - 0, 0, 0, 0, 152, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 0, 80, 101, 114, - 79, 99, 99, 97, 115, 105, - 111, 110, 97, 108, 76, 97, - 121, 101, 114, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 77, 97, 110, 97, 103, 101, - 114, 0, 124, 0, 0, 0, - 5, 0, 0, 0, 240, 0, - 0, 0, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 133, 0, 0, 0, - 2, 0, 0, 0, 220, 1, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 152, 0, 0, 0, - 1, 0, 0, 0, 60, 2, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 104, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 136, 1, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 147, 1, 0, 0, - 32, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 157, 1, 0, 0, - 48, 0, 0, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 172, 1, 0, 0, 0, 0, - 0, 0, 188, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 204, 1, 0, 0, 0, 0, - 0, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 102, 76, 97, 121, 101, - 114, 79, 112, 97, 99, 105, - 116, 121, 0, 171, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 12, 2, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 32, 2, 0, 0, - 0, 0, 0, 0, 48, 2, - 0, 0, 16, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 32, 2, 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, 0, 0, 0, 0, - 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 67, 111, - 108, 111, 114, 0, 84, 2, - 0, 0, 0, 0, 0, 0, - 64, 0, 0, 0, 2, 0, - 0, 0, 204, 1, 0, 0, - 0, 0, 0, 0, 109, 80, - 114, 111, 106, 101, 99, 116, - 105, 111, 110, 0, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 0, 0, - 80, 79, 83, 73, 84, 73, - 79, 78, 0, 171, 171, 171, - 79, 83, 71, 78, 80, 0, - 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 68, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 96, 4, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 116, 4, 0, 0, 68, 88, - 66, 67, 139, 125, 209, 68, - 164, 105, 119, 76, 10, 245, - 168, 227, 98, 190, 98, 86, - 1, 0, 0, 0, 116, 4, - 0, 0, 6, 0, 0, 0, - 56, 0, 0, 0, 204, 0, - 0, 0, 136, 1, 0, 0, - 4, 2, 0, 0, 232, 3, - 0, 0, 64, 4, 0, 0, - 65, 111, 110, 57, 140, 0, - 0, 0, 140, 0, 0, 0, - 0, 2, 255, 255, 88, 0, - 0, 0, 52, 0, 0, 0, - 1, 0, 40, 0, 0, 0, - 52, 0, 0, 0, 52, 0, - 1, 0, 36, 0, 0, 0, - 52, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, - 0, 0, 3, 176, 31, 0, - 0, 2, 0, 0, 0, 144, - 0, 8, 15, 160, 66, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 176, 0, 8, - 228, 160, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 228, 128, 0, 0, 0, 160, - 1, 0, 0, 2, 0, 0, - 8, 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, 180, 0, 0, 0, - 64, 0, 0, 0, 45, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 90, 0, 0, 3, 0, 96, - 16, 0, 0, 0, 0, 0, - 88, 24, 0, 4, 0, 112, - 16, 0, 0, 0, 0, 0, - 85, 85, 0, 0, 98, 16, - 0, 3, 50, 16, 16, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, - 0, 0, 0, 0, 104, 0, - 0, 2, 1, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 114, 32, - 16, 0, 0, 0, 0, 0, - 70, 2, 16, 0, 0, 0, - 0, 0, 6, 128, 32, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 54, 0, 0, 6, - 130, 32, 16, 0, 0, 0, - 0, 0, 10, 128, 32, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 4, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, - 69, 70, 220, 1, 0, 0, - 1, 0, 0, 0, 164, 0, - 0, 0, 3, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 255, 255, 0, 1, 0, 0, - 168, 1, 0, 0, 124, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 150, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, - 0, 0, 155, 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, 76, 97, - 121, 101, 114, 84, 101, 120, - 116, 117, 114, 101, 83, 97, - 109, 112, 108, 101, 114, 76, - 105, 110, 101, 97, 114, 0, - 116, 82, 71, 66, 0, 80, - 101, 114, 76, 97, 121, 101, - 114, 0, 155, 0, 0, 0, - 5, 0, 0, 0, 188, 0, - 0, 0, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 52, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 68, 1, 0, 0, 0, 0, - 0, 0, 84, 1, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 68, 1, 0, 0, 0, 0, - 0, 0, 95, 1, 0, 0, - 32, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 68, 1, 0, 0, 0, 0, - 0, 0, 105, 1, 0, 0, - 48, 0, 0, 0, 4, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 136, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 152, 1, 0, 0, 0, 0, - 0, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 102, 76, 97, 121, 101, - 114, 79, 112, 97, 99, 105, - 116, 121, 0, 171, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 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, 0, 12, - 0, 0, 0, 0, 0, 0, - 82, 101, 110, 100, 101, 114, - 82, 71, 66, 76, 97, 121, - 101, 114, 80, 114, 101, 109, - 117, 108, 80, 111, 105, 110, - 116, 0, 4, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 255, 255, - 255, 255, 136, 7, 0, 0, - 68, 88, 66, 67, 134, 58, - 181, 81, 234, 180, 23, 54, - 140, 98, 159, 162, 74, 150, - 11, 172, 1, 0, 0, 0, - 136, 7, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 188, 1, 0, 0, 228, 3, - 0, 0, 96, 4, 0, 0, - 252, 6, 0, 0, 48, 7, - 0, 0, 65, 111, 110, 57, - 124, 1, 0, 0, 124, 1, - 0, 0, 0, 2, 254, 255, - 24, 1, 0, 0, 100, 0, - 0, 0, 5, 0, 36, 0, - 0, 0, 96, 0, 0, 0, - 96, 0, 0, 0, 36, 0, - 1, 0, 96, 0, 0, 0, - 0, 0, 2, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 4, 0, 2, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 7, 0, 1, 0, 5, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 6, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 4, 0, 7, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 254, 255, - 31, 0, 0, 2, 5, 0, - 0, 128, 0, 0, 15, 144, - 4, 0, 0, 4, 0, 0, - 3, 224, 0, 0, 228, 144, - 1, 0, 238, 160, 1, 0, - 228, 160, 4, 0, 0, 4, - 0, 0, 3, 128, 0, 0, - 228, 144, 2, 0, 238, 160, - 2, 0, 228, 160, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 85, 128, 4, 0, - 228, 160, 4, 0, 0, 4, - 0, 0, 15, 128, 3, 0, - 228, 160, 0, 0, 0, 128, - 1, 0, 228, 128, 2, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 5, 0, - 228, 160, 6, 0, 0, 2, - 1, 0, 1, 128, 0, 0, - 255, 128, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 228, 128, 1, 0, 0, 128, - 2, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 6, 0, 228, 161, 5, 0, - 0, 3, 0, 0, 7, 128, - 0, 0, 255, 128, 0, 0, - 228, 128, 5, 0, 0, 3, - 1, 0, 15, 128, 0, 0, - 85, 128, 8, 0, 228, 160, - 4, 0, 0, 4, 1, 0, - 15, 128, 7, 0, 228, 160, - 0, 0, 0, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 1, 0, 15, 128, 9, 0, - 228, 160, 0, 0, 170, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 0, 0, 15, 128, - 10, 0, 228, 160, 0, 0, - 255, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 3, 192, 0, 0, 255, 128, - 0, 0, 228, 160, 0, 0, - 228, 128, 1, 0, 0, 2, - 0, 0, 12, 192, 0, 0, - 228, 128, 255, 255, 0, 0, - 83, 72, 68, 82, 32, 2, - 0, 0, 64, 0, 1, 0, - 136, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 8, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 1, 0, - 0, 0, 1, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 2, 0, 0, 0, - 4, 0, 0, 0, 95, 0, - 0, 3, 50, 16, 16, 0, - 0, 0, 0, 0, 103, 0, - 0, 4, 242, 32, 16, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 101, 0, 0, 3, - 50, 32, 16, 0, 1, 0, - 0, 0, 104, 0, 0, 2, - 2, 0, 0, 0, 50, 0, - 0, 11, 50, 0, 16, 0, - 0, 0, 0, 0, 70, 16, - 16, 0, 0, 0, 0, 0, - 230, 138, 32, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 70, 128, 32, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 1, 0, 0, 0, - 86, 5, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 5, 0, - 0, 0, 50, 0, 0, 10, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 4, 0, - 0, 0, 6, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 0, 0, 0, 8, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 7, 0, - 0, 0, 14, 0, 0, 7, - 114, 0, 16, 0, 0, 0, - 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 0, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 128, - 65, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 114, 0, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 1, 0, 0, 0, 86, 5, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 6, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 1, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 166, 10, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 32, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 3, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 11, 50, 32, - 16, 0, 1, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 13, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 12, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, 148, 2, 0, 0, - 3, 0, 0, 0, 168, 0, - 0, 0, 3, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 254, 255, 0, 1, 0, 0, - 96, 2, 0, 0, 124, 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, - 133, 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, 0, 0, - 0, 0, 152, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 0, 80, 101, 114, 79, 99, - 99, 97, 115, 105, 111, 110, - 97, 108, 76, 97, 121, 101, - 114, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 77, 97, - 110, 97, 103, 101, 114, 0, - 124, 0, 0, 0, 5, 0, - 0, 0, 240, 0, 0, 0, - 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 133, 0, 0, 0, 2, 0, - 0, 0, 220, 1, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 152, 0, 0, 0, 1, 0, - 0, 0, 60, 2, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 104, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 147, 1, 0, 0, 32, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 157, 1, 0, 0, 48, 0, - 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 172, 1, - 0, 0, 0, 0, 0, 0, - 188, 1, 0, 0, 64, 0, - 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 204, 1, - 0, 0, 0, 0, 0, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 12, 2, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 32, 2, 0, 0, 0, 0, - 0, 0, 48, 2, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 32, 2, 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, - 0, 0, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 67, 111, 108, 111, - 114, 0, 84, 2, 0, 0, - 0, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 204, 1, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 77, 105, 99, 114, - 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, - 100, 101, 114, 32, 67, 111, - 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, - 51, 56, 52, 0, 171, 171, - 73, 83, 71, 78, 44, 0, - 0, 0, 1, 0, 0, 0, - 8, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 3, 3, 0, 0, 80, 79, - 83, 73, 84, 73, 79, 78, - 0, 171, 171, 171, 79, 83, - 71, 78, 80, 0, 0, 0, - 2, 0, 0, 0, 8, 0, - 0, 0, 56, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 68, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 12, - 0, 0, 83, 86, 95, 80, - 111, 115, 105, 116, 105, 111, - 110, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, - 171, 171, 202, 16, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 116, 4, - 0, 0, 68, 88, 66, 67, - 168, 126, 222, 160, 23, 76, - 232, 98, 152, 133, 227, 163, - 37, 248, 175, 170, 1, 0, - 0, 0, 116, 4, 0, 0, - 6, 0, 0, 0, 56, 0, - 0, 0, 204, 0, 0, 0, - 136, 1, 0, 0, 4, 2, - 0, 0, 232, 3, 0, 0, - 64, 4, 0, 0, 65, 111, - 110, 57, 140, 0, 0, 0, - 140, 0, 0, 0, 0, 2, - 255, 255, 88, 0, 0, 0, - 52, 0, 0, 0, 1, 0, - 40, 0, 0, 0, 52, 0, - 0, 0, 52, 0, 1, 0, - 36, 0, 0, 0, 52, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 2, - 255, 255, 31, 0, 0, 2, - 0, 0, 0, 128, 0, 0, - 3, 176, 31, 0, 0, 2, - 0, 0, 0, 144, 0, 8, - 15, 160, 66, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 176, 0, 8, 228, 160, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 228, 128, - 0, 0, 0, 160, 1, 0, - 0, 2, 0, 0, 8, 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, - 180, 0, 0, 0, 64, 0, - 0, 0, 45, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, - 0, 0, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, - 0, 0, 98, 16, 0, 3, - 50, 16, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, - 242, 32, 16, 0, 0, 0, - 0, 0, 104, 0, 0, 2, - 1, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 16, - 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 0, 0, - 0, 0, 0, 96, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 8, 114, 32, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 6, 128, 32, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 54, 0, 0, 6, 130, 32, - 16, 0, 0, 0, 0, 0, - 10, 128, 32, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, - 4, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, - 220, 1, 0, 0, 1, 0, - 0, 0, 164, 0, 0, 0, - 3, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 255, 255, - 0, 1, 0, 0, 168, 1, - 0, 0, 124, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 149, 0, - 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, - 154, 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, 76, 97, 121, 101, - 114, 84, 101, 120, 116, 117, - 114, 101, 83, 97, 109, 112, - 108, 101, 114, 80, 111, 105, - 110, 116, 0, 116, 82, 71, - 66, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 0, 171, - 154, 0, 0, 0, 5, 0, - 0, 0, 188, 0, 0, 0, - 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 52, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 68, 1, - 0, 0, 0, 0, 0, 0, - 84, 1, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 68, 1, - 0, 0, 0, 0, 0, 0, - 95, 1, 0, 0, 32, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 68, 1, - 0, 0, 0, 0, 0, 0, - 105, 1, 0, 0, 48, 0, - 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 64, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 152, 1, - 0, 0, 0, 0, 0, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 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, 106, 24, 0, 0, - 0, 0, 0, 0, 82, 101, - 110, 100, 101, 114, 82, 71, - 66, 65, 76, 97, 121, 101, - 114, 80, 114, 101, 109, 117, - 108, 0, 4, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 255, 255, - 255, 255, 136, 7, 0, 0, - 68, 88, 66, 67, 134, 58, - 181, 81, 234, 180, 23, 54, - 140, 98, 159, 162, 74, 150, - 11, 172, 1, 0, 0, 0, - 136, 7, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 188, 1, 0, 0, 228, 3, - 0, 0, 96, 4, 0, 0, - 252, 6, 0, 0, 48, 7, - 0, 0, 65, 111, 110, 57, - 124, 1, 0, 0, 124, 1, - 0, 0, 0, 2, 254, 255, - 24, 1, 0, 0, 100, 0, - 0, 0, 5, 0, 36, 0, - 0, 0, 96, 0, 0, 0, - 96, 0, 0, 0, 36, 0, - 1, 0, 96, 0, 0, 0, - 0, 0, 2, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 4, 0, 2, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 7, 0, 1, 0, 5, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 6, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 4, 0, 7, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 254, 255, - 31, 0, 0, 2, 5, 0, - 0, 128, 0, 0, 15, 144, - 4, 0, 0, 4, 0, 0, - 3, 224, 0, 0, 228, 144, - 1, 0, 238, 160, 1, 0, - 228, 160, 4, 0, 0, 4, - 0, 0, 3, 128, 0, 0, - 228, 144, 2, 0, 238, 160, - 2, 0, 228, 160, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 85, 128, 4, 0, - 228, 160, 4, 0, 0, 4, - 0, 0, 15, 128, 3, 0, - 228, 160, 0, 0, 0, 128, - 1, 0, 228, 128, 2, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 5, 0, - 228, 160, 6, 0, 0, 2, - 1, 0, 1, 128, 0, 0, - 255, 128, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 228, 128, 1, 0, 0, 128, - 2, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 6, 0, 228, 161, 5, 0, - 0, 3, 0, 0, 7, 128, - 0, 0, 255, 128, 0, 0, - 228, 128, 5, 0, 0, 3, - 1, 0, 15, 128, 0, 0, - 85, 128, 8, 0, 228, 160, - 4, 0, 0, 4, 1, 0, - 15, 128, 7, 0, 228, 160, - 0, 0, 0, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 1, 0, 15, 128, 9, 0, - 228, 160, 0, 0, 170, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 0, 0, 15, 128, - 10, 0, 228, 160, 0, 0, - 255, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 3, 192, 0, 0, 255, 128, - 0, 0, 228, 160, 0, 0, - 228, 128, 1, 0, 0, 2, - 0, 0, 12, 192, 0, 0, - 228, 128, 255, 255, 0, 0, - 83, 72, 68, 82, 32, 2, - 0, 0, 64, 0, 1, 0, - 136, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 8, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 1, 0, - 0, 0, 1, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 2, 0, 0, 0, - 4, 0, 0, 0, 95, 0, - 0, 3, 50, 16, 16, 0, - 0, 0, 0, 0, 103, 0, - 0, 4, 242, 32, 16, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 101, 0, 0, 3, - 50, 32, 16, 0, 1, 0, - 0, 0, 104, 0, 0, 2, - 2, 0, 0, 0, 50, 0, - 0, 11, 50, 0, 16, 0, - 0, 0, 0, 0, 70, 16, - 16, 0, 0, 0, 0, 0, - 230, 138, 32, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 70, 128, 32, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 1, 0, 0, 0, - 86, 5, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 5, 0, - 0, 0, 50, 0, 0, 10, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 4, 0, - 0, 0, 6, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 0, 0, 0, 8, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 7, 0, - 0, 0, 14, 0, 0, 7, - 114, 0, 16, 0, 0, 0, - 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 0, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 128, - 65, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 114, 0, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 1, 0, 0, 0, 86, 5, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 6, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 1, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 166, 10, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 32, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 3, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 11, 50, 32, - 16, 0, 1, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 13, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 12, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, 148, 2, 0, 0, - 3, 0, 0, 0, 168, 0, - 0, 0, 3, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 254, 255, 0, 1, 0, 0, - 96, 2, 0, 0, 124, 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, - 133, 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, 0, 0, - 0, 0, 152, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 0, 80, 101, 114, 79, 99, - 99, 97, 115, 105, 111, 110, - 97, 108, 76, 97, 121, 101, - 114, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 77, 97, - 110, 97, 103, 101, 114, 0, - 124, 0, 0, 0, 5, 0, - 0, 0, 240, 0, 0, 0, - 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 133, 0, 0, 0, 2, 0, - 0, 0, 220, 1, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 152, 0, 0, 0, 1, 0, - 0, 0, 60, 2, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 104, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 147, 1, 0, 0, 32, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 157, 1, 0, 0, 48, 0, - 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 172, 1, - 0, 0, 0, 0, 0, 0, - 188, 1, 0, 0, 64, 0, - 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 204, 1, - 0, 0, 0, 0, 0, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 12, 2, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 32, 2, 0, 0, 0, 0, - 0, 0, 48, 2, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 32, 2, 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, - 0, 0, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 67, 111, 108, 111, - 114, 0, 84, 2, 0, 0, - 0, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 204, 1, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 77, 105, 99, 114, - 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, - 100, 101, 114, 32, 67, 111, - 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, - 51, 56, 52, 0, 171, 171, - 73, 83, 71, 78, 44, 0, - 0, 0, 1, 0, 0, 0, - 8, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 3, 3, 0, 0, 80, 79, - 83, 73, 84, 73, 79, 78, - 0, 171, 171, 171, 79, 83, - 71, 78, 80, 0, 0, 0, - 2, 0, 0, 0, 8, 0, - 0, 0, 56, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 68, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 12, - 0, 0, 83, 86, 95, 80, - 111, 115, 105, 116, 105, 111, - 110, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, - 171, 171, 48, 29, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 80, 4, - 0, 0, 68, 88, 66, 67, - 197, 240, 201, 103, 219, 157, - 229, 76, 76, 196, 241, 175, - 193, 131, 135, 238, 1, 0, - 0, 0, 80, 4, 0, 0, - 6, 0, 0, 0, 56, 0, - 0, 0, 192, 0, 0, 0, - 100, 1, 0, 0, 224, 1, - 0, 0, 196, 3, 0, 0, - 28, 4, 0, 0, 65, 111, - 110, 57, 128, 0, 0, 0, - 128, 0, 0, 0, 0, 2, - 255, 255, 76, 0, 0, 0, - 52, 0, 0, 0, 1, 0, - 40, 0, 0, 0, 52, 0, - 0, 0, 52, 0, 1, 0, - 36, 0, 0, 0, 52, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 2, - 255, 255, 31, 0, 0, 2, - 0, 0, 0, 128, 0, 0, - 3, 176, 31, 0, 0, 2, - 0, 0, 0, 144, 0, 8, - 15, 160, 66, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 176, 0, 8, 228, 160, - 5, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 0, 0, 0, 160, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 156, 0, 0, 0, 64, 0, - 0, 0, 39, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, - 0, 0, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, - 0, 0, 98, 16, 0, 3, - 50, 16, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, - 242, 32, 16, 0, 0, 0, - 0, 0, 104, 0, 0, 2, - 1, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 16, - 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 0, 0, - 0, 0, 0, 96, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 8, 242, 32, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, - 6, 128, 32, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 82, 68, 69, 70, - 220, 1, 0, 0, 1, 0, - 0, 0, 164, 0, 0, 0, - 3, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 255, 255, - 0, 1, 0, 0, 168, 1, - 0, 0, 124, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 150, 0, - 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, - 155, 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, 76, 97, 121, 101, - 114, 84, 101, 120, 116, 117, - 114, 101, 83, 97, 109, 112, - 108, 101, 114, 76, 105, 110, - 101, 97, 114, 0, 116, 82, - 71, 66, 0, 80, 101, 114, - 76, 97, 121, 101, 114, 0, - 155, 0, 0, 0, 5, 0, - 0, 0, 188, 0, 0, 0, - 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 52, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 68, 1, - 0, 0, 0, 0, 0, 0, - 84, 1, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 68, 1, - 0, 0, 0, 0, 0, 0, - 95, 1, 0, 0, 32, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 68, 1, - 0, 0, 0, 0, 0, 0, - 105, 1, 0, 0, 48, 0, - 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 64, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 152, 1, - 0, 0, 0, 0, 0, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 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, 208, 36, 0, 0, - 0, 0, 0, 0, 82, 101, - 110, 100, 101, 114, 82, 71, - 66, 65, 76, 97, 121, 101, - 114, 78, 111, 110, 80, 114, - 101, 109, 117, 108, 0, 4, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 3, 0, 0, - 0, 255, 255, 255, 255, 136, - 7, 0, 0, 68, 88, 66, - 67, 134, 58, 181, 81, 234, - 180, 23, 54, 140, 98, 159, - 162, 74, 150, 11, 172, 1, - 0, 0, 0, 136, 7, 0, - 0, 6, 0, 0, 0, 56, - 0, 0, 0, 188, 1, 0, - 0, 228, 3, 0, 0, 96, - 4, 0, 0, 252, 6, 0, - 0, 48, 7, 0, 0, 65, - 111, 110, 57, 124, 1, 0, - 0, 124, 1, 0, 0, 0, - 2, 254, 255, 24, 1, 0, - 0, 100, 0, 0, 0, 5, - 0, 36, 0, 0, 0, 96, - 0, 0, 0, 96, 0, 0, - 0, 36, 0, 1, 0, 96, - 0, 0, 0, 0, 0, 2, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 4, 0, 2, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 1, - 0, 5, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 1, - 0, 6, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 4, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 2, 254, 255, 31, 0, 0, - 2, 5, 0, 0, 128, 0, - 0, 15, 144, 4, 0, 0, - 4, 0, 0, 3, 224, 0, - 0, 228, 144, 1, 0, 238, - 160, 1, 0, 228, 160, 4, - 0, 0, 4, 0, 0, 3, - 128, 0, 0, 228, 144, 2, - 0, 238, 160, 2, 0, 228, - 160, 5, 0, 0, 3, 1, - 0, 15, 128, 0, 0, 85, - 128, 4, 0, 228, 160, 4, - 0, 0, 4, 0, 0, 15, - 128, 3, 0, 228, 160, 0, - 0, 0, 128, 1, 0, 228, - 128, 2, 0, 0, 3, 0, - 0, 15, 128, 0, 0, 228, - 128, 5, 0, 228, 160, 6, - 0, 0, 2, 1, 0, 1, - 128, 0, 0, 255, 128, 5, - 0, 0, 3, 0, 0, 7, - 128, 0, 0, 228, 128, 1, - 0, 0, 128, 2, 0, 0, - 3, 0, 0, 15, 128, 0, - 0, 228, 128, 6, 0, 228, - 161, 5, 0, 0, 3, 0, - 0, 7, 128, 0, 0, 255, - 128, 0, 0, 228, 128, 5, - 0, 0, 3, 1, 0, 15, - 128, 0, 0, 85, 128, 8, - 0, 228, 160, 4, 0, 0, - 4, 1, 0, 15, 128, 7, - 0, 228, 160, 0, 0, 0, - 128, 1, 0, 228, 128, 4, - 0, 0, 4, 1, 0, 15, - 128, 9, 0, 228, 160, 0, - 0, 170, 128, 1, 0, 228, - 128, 4, 0, 0, 4, 0, - 0, 15, 128, 10, 0, 228, - 160, 0, 0, 255, 128, 1, - 0, 228, 128, 4, 0, 0, - 4, 0, 0, 3, 192, 0, - 0, 255, 128, 0, 0, 228, - 160, 0, 0, 228, 128, 1, - 0, 0, 2, 0, 0, 12, - 192, 0, 0, 228, 128, 255, - 255, 0, 0, 83, 72, 68, - 82, 32, 2, 0, 0, 64, - 0, 1, 0, 136, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 0, 0, 0, - 0, 8, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 1, 0, 0, 0, 1, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 2, - 0, 0, 0, 4, 0, 0, - 0, 95, 0, 0, 3, 50, - 16, 16, 0, 0, 0, 0, - 0, 103, 0, 0, 4, 242, - 32, 16, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 101, - 0, 0, 3, 50, 32, 16, - 0, 1, 0, 0, 0, 104, - 0, 0, 2, 2, 0, 0, - 0, 50, 0, 0, 11, 50, - 0, 16, 0, 0, 0, 0, - 0, 70, 16, 16, 0, 0, - 0, 0, 0, 230, 138, 32, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 70, 128, 32, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 56, 0, 0, - 8, 242, 0, 16, 0, 1, - 0, 0, 0, 86, 5, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 0, 0, 0, - 0, 5, 0, 0, 0, 50, - 0, 0, 10, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 6, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 0, 0, 0, - 8, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 14, - 0, 0, 7, 114, 0, 16, - 0, 0, 0, 0, 0, 70, - 2, 16, 0, 0, 0, 0, - 0, 246, 15, 16, 0, 0, - 0, 0, 0, 0, 0, 0, - 9, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 128, 65, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 56, 0, 0, - 7, 114, 0, 16, 0, 0, - 0, 0, 0, 246, 15, 16, - 0, 0, 0, 0, 0, 70, - 2, 16, 0, 0, 0, 0, - 0, 56, 0, 0, 8, 242, - 0, 16, 0, 1, 0, 0, - 0, 86, 5, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 1, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 1, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 6, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 50, 0, 0, 10, 242, - 0, 16, 0, 1, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 2, 0, 0, - 0, 166, 10, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 50, - 0, 0, 10, 242, 32, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 3, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 50, 0, 0, - 11, 50, 32, 16, 0, 1, - 0, 0, 0, 70, 16, 16, - 0, 0, 0, 0, 0, 230, - 138, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 70, - 128, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 62, - 0, 0, 1, 83, 84, 65, - 84, 116, 0, 0, 0, 13, - 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 12, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 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, 148, - 2, 0, 0, 3, 0, 0, - 0, 168, 0, 0, 0, 3, - 0, 0, 0, 28, 0, 0, - 0, 0, 4, 254, 255, 0, - 1, 0, 0, 96, 2, 0, - 0, 124, 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, 133, 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, 0, 0, 0, 0, 152, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 80, 101, 114, 76, 97, - 121, 101, 114, 0, 80, 101, - 114, 79, 99, 99, 97, 115, - 105, 111, 110, 97, 108, 76, - 97, 121, 101, 114, 0, 80, - 101, 114, 76, 97, 121, 101, - 114, 77, 97, 110, 97, 103, - 101, 114, 0, 124, 0, 0, - 0, 5, 0, 0, 0, 240, - 0, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 133, 0, 0, - 0, 2, 0, 0, 0, 220, - 1, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 152, 0, 0, - 0, 1, 0, 0, 0, 60, - 2, 0, 0, 64, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 104, 1, 0, - 0, 0, 0, 0, 0, 16, - 0, 0, 0, 2, 0, 0, - 0, 120, 1, 0, 0, 0, - 0, 0, 0, 136, 1, 0, - 0, 16, 0, 0, 0, 16, - 0, 0, 0, 2, 0, 0, - 0, 120, 1, 0, 0, 0, - 0, 0, 0, 147, 1, 0, - 0, 32, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 120, 1, 0, 0, 0, - 0, 0, 0, 157, 1, 0, - 0, 48, 0, 0, 0, 4, - 0, 0, 0, 0, 0, 0, - 0, 172, 1, 0, 0, 0, - 0, 0, 0, 188, 1, 0, - 0, 64, 0, 0, 0, 64, - 0, 0, 0, 2, 0, 0, - 0, 204, 1, 0, 0, 0, - 0, 0, 0, 118, 84, 101, - 120, 116, 117, 114, 101, 67, - 111, 111, 114, 100, 115, 0, - 171, 1, 0, 3, 0, 1, - 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 118, - 76, 97, 121, 101, 114, 81, - 117, 97, 100, 0, 118, 77, - 97, 115, 107, 81, 117, 97, - 100, 0, 102, 76, 97, 121, - 101, 114, 79, 112, 97, 99, - 105, 116, 121, 0, 171, 0, - 0, 3, 0, 1, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 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, 12, - 2, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 32, 2, 0, - 0, 0, 0, 0, 0, 48, - 2, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 32, 2, 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, 0, 0, 0, - 0, 0, 0, 0, 0, 102, - 76, 97, 121, 101, 114, 67, - 111, 108, 111, 114, 0, 84, - 2, 0, 0, 0, 0, 0, - 0, 64, 0, 0, 0, 2, - 0, 0, 0, 204, 1, 0, - 0, 0, 0, 0, 0, 109, - 80, 114, 111, 106, 101, 99, - 116, 105, 111, 110, 0, 77, - 105, 99, 114, 111, 115, 111, - 102, 116, 32, 40, 82, 41, - 32, 72, 76, 83, 76, 32, - 83, 104, 97, 100, 101, 114, - 32, 67, 111, 109, 112, 105, - 108, 101, 114, 32, 54, 46, - 51, 46, 57, 54, 48, 48, - 46, 49, 54, 51, 56, 52, - 0, 171, 171, 73, 83, 71, - 78, 44, 0, 0, 0, 1, - 0, 0, 0, 8, 0, 0, - 0, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 3, 3, 0, - 0, 80, 79, 83, 73, 84, - 73, 79, 78, 0, 171, 171, - 171, 79, 83, 71, 78, 80, - 0, 0, 0, 2, 0, 0, - 0, 8, 0, 0, 0, 56, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 68, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 1, 0, 0, - 0, 3, 12, 0, 0, 83, - 86, 95, 80, 111, 115, 105, - 116, 105, 111, 110, 0, 84, - 69, 88, 67, 79, 79, 82, - 68, 0, 171, 171, 171, 117, - 41, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 80, 4, 0, 0, 68, - 88, 66, 67, 197, 240, 201, - 103, 219, 157, 229, 76, 76, - 196, 241, 175, 193, 131, 135, - 238, 1, 0, 0, 0, 80, - 4, 0, 0, 6, 0, 0, - 0, 56, 0, 0, 0, 192, - 0, 0, 0, 100, 1, 0, - 0, 224, 1, 0, 0, 196, - 3, 0, 0, 28, 4, 0, - 0, 65, 111, 110, 57, 128, - 0, 0, 0, 128, 0, 0, - 0, 0, 2, 255, 255, 76, - 0, 0, 0, 52, 0, 0, - 0, 1, 0, 40, 0, 0, - 0, 52, 0, 0, 0, 52, - 0, 1, 0, 36, 0, 0, - 0, 52, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 2, 255, 255, 31, - 0, 0, 2, 0, 0, 0, - 128, 0, 0, 3, 176, 31, - 0, 0, 2, 0, 0, 0, - 144, 0, 8, 15, 160, 66, - 0, 0, 3, 0, 0, 15, - 128, 0, 0, 228, 176, 0, - 8, 228, 160, 5, 0, 0, - 3, 0, 0, 15, 128, 0, - 0, 228, 128, 0, 0, 0, - 160, 1, 0, 0, 2, 0, - 8, 15, 128, 0, 0, 228, - 128, 255, 255, 0, 0, 83, - 72, 68, 82, 156, 0, 0, - 0, 64, 0, 0, 0, 39, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 0, - 0, 0, 0, 4, 0, 0, - 0, 90, 0, 0, 3, 0, - 96, 16, 0, 0, 0, 0, - 0, 88, 24, 0, 4, 0, - 112, 16, 0, 0, 0, 0, - 0, 85, 85, 0, 0, 98, - 16, 0, 3, 50, 16, 16, - 0, 1, 0, 0, 0, 101, - 0, 0, 3, 242, 32, 16, - 0, 0, 0, 0, 0, 104, - 0, 0, 2, 1, 0, 0, - 0, 69, 0, 0, 9, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 16, 16, 0, 1, - 0, 0, 0, 70, 126, 16, - 0, 0, 0, 0, 0, 0, - 96, 16, 0, 0, 0, 0, - 0, 56, 0, 0, 8, 242, - 32, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 6, 128, 32, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 62, 0, 0, - 1, 83, 84, 65, 84, 116, - 0, 0, 0, 3, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 82, - 68, 69, 70, 220, 1, 0, - 0, 1, 0, 0, 0, 164, - 0, 0, 0, 3, 0, 0, - 0, 28, 0, 0, 0, 0, - 4, 255, 255, 0, 1, 0, - 0, 168, 1, 0, 0, 124, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 150, 0, 0, 0, 2, - 0, 0, 0, 5, 0, 0, - 0, 4, 0, 0, 0, 255, - 255, 255, 255, 0, 0, 0, - 0, 1, 0, 0, 0, 12, - 0, 0, 0, 155, 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, 76, - 97, 121, 101, 114, 84, 101, - 120, 116, 117, 114, 101, 83, - 97, 109, 112, 108, 101, 114, - 76, 105, 110, 101, 97, 114, - 0, 116, 82, 71, 66, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 0, 155, 0, 0, - 0, 5, 0, 0, 0, 188, - 0, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 52, 1, 0, - 0, 0, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 68, 1, 0, 0, 0, - 0, 0, 0, 84, 1, 0, - 0, 16, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 68, 1, 0, 0, 0, - 0, 0, 0, 95, 1, 0, - 0, 32, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 68, 1, 0, 0, 0, - 0, 0, 0, 105, 1, 0, - 0, 48, 0, 0, 0, 4, - 0, 0, 0, 2, 0, 0, - 0, 120, 1, 0, 0, 0, - 0, 0, 0, 136, 1, 0, - 0, 64, 0, 0, 0, 64, - 0, 0, 0, 0, 0, 0, - 0, 152, 1, 0, 0, 0, - 0, 0, 0, 118, 84, 101, - 120, 116, 117, 114, 101, 67, - 111, 111, 114, 100, 115, 0, - 171, 1, 0, 3, 0, 1, - 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 118, - 76, 97, 121, 101, 114, 81, - 117, 97, 100, 0, 118, 77, - 97, 115, 107, 81, 117, 97, - 100, 0, 102, 76, 97, 121, - 101, 114, 79, 112, 97, 99, - 105, 116, 121, 0, 171, 0, - 0, 3, 0, 1, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 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, 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, 21, - 49, 0, 0, 0, 0, 0, - 0, 82, 101, 110, 100, 101, - 114, 82, 71, 66, 65, 76, - 97, 121, 101, 114, 80, 114, - 101, 109, 117, 108, 80, 111, - 105, 110, 116, 0, 4, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 255, 255, 255, 255, 136, 7, - 0, 0, 68, 88, 66, 67, - 134, 58, 181, 81, 234, 180, - 23, 54, 140, 98, 159, 162, - 74, 150, 11, 172, 1, 0, - 0, 0, 136, 7, 0, 0, - 6, 0, 0, 0, 56, 0, - 0, 0, 188, 1, 0, 0, - 228, 3, 0, 0, 96, 4, - 0, 0, 252, 6, 0, 0, - 48, 7, 0, 0, 65, 111, - 110, 57, 124, 1, 0, 0, - 124, 1, 0, 0, 0, 2, - 254, 255, 24, 1, 0, 0, - 100, 0, 0, 0, 5, 0, - 36, 0, 0, 0, 96, 0, - 0, 0, 96, 0, 0, 0, - 36, 0, 1, 0, 96, 0, - 0, 0, 0, 0, 2, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 2, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 7, 0, 1, 0, - 5, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 6, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 4, 0, - 7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, - 254, 255, 31, 0, 0, 2, - 5, 0, 0, 128, 0, 0, - 15, 144, 4, 0, 0, 4, - 0, 0, 3, 224, 0, 0, - 228, 144, 1, 0, 238, 160, - 1, 0, 228, 160, 4, 0, - 0, 4, 0, 0, 3, 128, - 0, 0, 228, 144, 2, 0, - 238, 160, 2, 0, 228, 160, - 5, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 85, 128, - 4, 0, 228, 160, 4, 0, - 0, 4, 0, 0, 15, 128, - 3, 0, 228, 160, 0, 0, - 0, 128, 1, 0, 228, 128, - 2, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 5, 0, 228, 160, 6, 0, - 0, 2, 1, 0, 1, 128, - 0, 0, 255, 128, 5, 0, - 0, 3, 0, 0, 7, 128, - 0, 0, 228, 128, 1, 0, - 0, 128, 2, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 6, 0, 228, 161, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 255, 128, - 0, 0, 228, 128, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 85, 128, 8, 0, - 228, 160, 4, 0, 0, 4, - 1, 0, 15, 128, 7, 0, - 228, 160, 0, 0, 0, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 1, 0, 15, 128, - 9, 0, 228, 160, 0, 0, - 170, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 15, 128, 10, 0, 228, 160, - 0, 0, 255, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 3, 192, 0, 0, - 255, 128, 0, 0, 228, 160, - 0, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 12, 192, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 32, 2, 0, 0, 64, 0, - 1, 0, 136, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 8, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 2, 0, - 0, 0, 4, 0, 0, 0, - 95, 0, 0, 3, 50, 16, - 16, 0, 0, 0, 0, 0, - 103, 0, 0, 4, 242, 32, - 16, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 50, 32, 16, 0, - 1, 0, 0, 0, 104, 0, - 0, 2, 2, 0, 0, 0, - 50, 0, 0, 11, 50, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 1, 0, - 0, 0, 86, 5, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 6, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 8, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 14, 0, - 0, 7, 114, 0, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 0, 0, 0, 9, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 128, 65, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 56, 0, 0, 7, - 114, 0, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 1, 0, 0, 0, - 86, 5, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 0, 16, 0, 1, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 2, 0, 0, 0, - 166, 10, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 32, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 11, - 50, 32, 16, 0, 1, 0, - 0, 0, 70, 16, 16, 0, - 0, 0, 0, 0, 230, 138, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 70, 128, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, - 116, 0, 0, 0, 13, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 12, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 148, 2, - 0, 0, 3, 0, 0, 0, - 168, 0, 0, 0, 3, 0, - 0, 0, 28, 0, 0, 0, - 0, 4, 254, 255, 0, 1, - 0, 0, 96, 2, 0, 0, - 124, 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, 133, 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, - 0, 0, 0, 0, 152, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 0, 80, 101, 114, - 79, 99, 99, 97, 115, 105, - 111, 110, 97, 108, 76, 97, - 121, 101, 114, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 77, 97, 110, 97, 103, 101, - 114, 0, 124, 0, 0, 0, - 5, 0, 0, 0, 240, 0, - 0, 0, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 133, 0, 0, 0, - 2, 0, 0, 0, 220, 1, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 152, 0, 0, 0, - 1, 0, 0, 0, 60, 2, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 104, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 136, 1, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 147, 1, 0, 0, - 32, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 157, 1, 0, 0, - 48, 0, 0, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 172, 1, 0, 0, 0, 0, - 0, 0, 188, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 204, 1, 0, 0, 0, 0, - 0, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 102, 76, 97, 121, 101, - 114, 79, 112, 97, 99, 105, - 116, 121, 0, 171, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 12, 2, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 32, 2, 0, 0, - 0, 0, 0, 0, 48, 2, - 0, 0, 16, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 32, 2, 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, 0, 0, 0, 0, - 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 67, 111, - 108, 111, 114, 0, 84, 2, - 0, 0, 0, 0, 0, 0, - 64, 0, 0, 0, 2, 0, - 0, 0, 204, 1, 0, 0, - 0, 0, 0, 0, 109, 80, - 114, 111, 106, 101, 99, 116, - 105, 111, 110, 0, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 0, 0, - 80, 79, 83, 73, 84, 73, - 79, 78, 0, 171, 171, 171, - 79, 83, 71, 78, 80, 0, - 0, 0, 2, 0, 0, 0, - 8, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 68, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 188, 53, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 80, 4, 0, 0, 68, 88, - 66, 67, 151, 150, 8, 20, - 71, 31, 33, 136, 86, 87, - 200, 101, 153, 133, 218, 4, - 1, 0, 0, 0, 80, 4, - 0, 0, 6, 0, 0, 0, - 56, 0, 0, 0, 192, 0, - 0, 0, 100, 1, 0, 0, - 224, 1, 0, 0, 196, 3, - 0, 0, 28, 4, 0, 0, - 65, 111, 110, 57, 128, 0, - 0, 0, 128, 0, 0, 0, - 0, 2, 255, 255, 76, 0, - 0, 0, 52, 0, 0, 0, - 1, 0, 40, 0, 0, 0, - 52, 0, 0, 0, 52, 0, - 1, 0, 36, 0, 0, 0, - 52, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, - 0, 0, 3, 176, 31, 0, - 0, 2, 0, 0, 0, 144, - 0, 8, 15, 160, 66, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 176, 0, 8, - 228, 160, 5, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 0, 0, 0, 160, - 1, 0, 0, 2, 0, 8, - 15, 128, 0, 0, 228, 128, - 255, 255, 0, 0, 83, 72, - 68, 82, 156, 0, 0, 0, - 64, 0, 0, 0, 39, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 90, 0, 0, 3, 0, 96, - 16, 0, 0, 0, 0, 0, - 88, 24, 0, 4, 0, 112, - 16, 0, 0, 0, 0, 0, - 85, 85, 0, 0, 98, 16, - 0, 3, 50, 16, 16, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 242, 32, 16, 0, - 0, 0, 0, 0, 104, 0, - 0, 2, 1, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 0, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 32, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 6, 128, 32, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, - 69, 70, 220, 1, 0, 0, - 1, 0, 0, 0, 164, 0, - 0, 0, 3, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 255, 255, 0, 1, 0, 0, - 168, 1, 0, 0, 124, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 149, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, - 0, 0, 154, 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, 76, 97, - 121, 101, 114, 84, 101, 120, - 116, 117, 114, 101, 83, 97, - 109, 112, 108, 101, 114, 80, - 111, 105, 110, 116, 0, 116, - 82, 71, 66, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 0, 171, 154, 0, 0, 0, - 5, 0, 0, 0, 188, 0, - 0, 0, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 52, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 68, 1, 0, 0, 0, 0, - 0, 0, 84, 1, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 68, 1, 0, 0, 0, 0, - 0, 0, 95, 1, 0, 0, - 32, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 68, 1, 0, 0, 0, 0, - 0, 0, 105, 1, 0, 0, - 48, 0, 0, 0, 4, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 136, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 152, 1, 0, 0, 0, 0, - 0, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 102, 76, 97, 121, 101, - 114, 79, 112, 97, 99, 105, - 116, 121, 0, 171, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 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, 92, 61, - 0, 0, 0, 0, 0, 0, - 82, 101, 110, 100, 101, 114, - 82, 71, 66, 65, 76, 97, - 121, 101, 114, 78, 111, 110, - 80, 114, 101, 109, 117, 108, - 80, 111, 105, 110, 116, 0, - 4, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 255, 255, 255, 255, - 136, 7, 0, 0, 68, 88, - 66, 67, 134, 58, 181, 81, - 234, 180, 23, 54, 140, 98, - 159, 162, 74, 150, 11, 172, - 1, 0, 0, 0, 136, 7, - 0, 0, 6, 0, 0, 0, - 56, 0, 0, 0, 188, 1, - 0, 0, 228, 3, 0, 0, - 96, 4, 0, 0, 252, 6, - 0, 0, 48, 7, 0, 0, - 65, 111, 110, 57, 124, 1, - 0, 0, 124, 1, 0, 0, - 0, 2, 254, 255, 24, 1, - 0, 0, 100, 0, 0, 0, - 5, 0, 36, 0, 0, 0, - 96, 0, 0, 0, 96, 0, - 0, 0, 36, 0, 1, 0, - 96, 0, 0, 0, 0, 0, - 2, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 4, 0, - 2, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 7, 0, - 1, 0, 5, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 1, 0, 6, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 4, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 254, 255, 31, 0, - 0, 2, 5, 0, 0, 128, - 0, 0, 15, 144, 4, 0, - 0, 4, 0, 0, 3, 224, - 0, 0, 228, 144, 1, 0, - 238, 160, 1, 0, 228, 160, - 4, 0, 0, 4, 0, 0, - 3, 128, 0, 0, 228, 144, - 2, 0, 238, 160, 2, 0, - 228, 160, 5, 0, 0, 3, - 1, 0, 15, 128, 0, 0, - 85, 128, 4, 0, 228, 160, - 4, 0, 0, 4, 0, 0, - 15, 128, 3, 0, 228, 160, - 0, 0, 0, 128, 1, 0, - 228, 128, 2, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 5, 0, 228, 160, - 6, 0, 0, 2, 1, 0, - 1, 128, 0, 0, 255, 128, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 228, 128, - 1, 0, 0, 128, 2, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 6, 0, - 228, 161, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 255, 128, 0, 0, 228, 128, - 5, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 85, 128, - 8, 0, 228, 160, 4, 0, - 0, 4, 1, 0, 15, 128, - 7, 0, 228, 160, 0, 0, - 0, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 1, 0, - 15, 128, 9, 0, 228, 160, - 0, 0, 170, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 15, 128, 10, 0, - 228, 160, 0, 0, 255, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 0, 0, 3, 192, - 0, 0, 255, 128, 0, 0, - 228, 160, 0, 0, 228, 128, - 1, 0, 0, 2, 0, 0, - 12, 192, 0, 0, 228, 128, - 255, 255, 0, 0, 83, 72, - 68, 82, 32, 2, 0, 0, - 64, 0, 1, 0, 136, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 8, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 2, 0, 0, 0, 4, 0, - 0, 0, 95, 0, 0, 3, - 50, 16, 16, 0, 0, 0, - 0, 0, 103, 0, 0, 4, - 242, 32, 16, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 101, 0, 0, 3, 50, 32, - 16, 0, 1, 0, 0, 0, - 104, 0, 0, 2, 2, 0, - 0, 0, 50, 0, 0, 11, - 50, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, - 0, 0, 0, 0, 230, 138, - 32, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 70, 128, - 32, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 1, 0, 0, 0, 86, 5, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 5, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 6, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 0, 0, - 0, 8, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 7, 0, 0, 0, - 14, 0, 0, 7, 114, 0, - 16, 0, 0, 0, 0, 0, - 70, 2, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 0, 0, - 0, 9, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 128, 65, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 56, 0, - 0, 7, 114, 0, 16, 0, - 0, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 70, 2, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 1, 0, - 0, 0, 86, 5, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 1, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 6, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 0, 16, 0, 1, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 2, 0, - 0, 0, 166, 10, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 32, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 3, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 11, 50, 32, 16, 0, - 1, 0, 0, 0, 70, 16, - 16, 0, 0, 0, 0, 0, - 230, 138, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 70, 128, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, - 13, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 12, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, - 148, 2, 0, 0, 3, 0, - 0, 0, 168, 0, 0, 0, - 3, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 254, 255, - 0, 1, 0, 0, 96, 2, - 0, 0, 124, 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, 133, 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, 0, 0, 0, 0, - 152, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 0, 80, - 101, 114, 79, 99, 99, 97, - 115, 105, 111, 110, 97, 108, - 76, 97, 121, 101, 114, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 77, 97, 110, 97, - 103, 101, 114, 0, 124, 0, - 0, 0, 5, 0, 0, 0, - 240, 0, 0, 0, 128, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 133, 0, - 0, 0, 2, 0, 0, 0, - 220, 1, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 152, 0, - 0, 0, 1, 0, 0, 0, - 60, 2, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 104, 1, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 136, 1, - 0, 0, 16, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 147, 1, - 0, 0, 32, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 157, 1, - 0, 0, 48, 0, 0, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 172, 1, 0, 0, - 0, 0, 0, 0, 188, 1, - 0, 0, 64, 0, 0, 0, - 64, 0, 0, 0, 2, 0, - 0, 0, 204, 1, 0, 0, - 0, 0, 0, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 102, 76, 97, - 121, 101, 114, 79, 112, 97, - 99, 105, 116, 121, 0, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, - 12, 2, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 48, 2, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 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, 0, 0, - 0, 0, 0, 0, 0, 0, - 102, 76, 97, 121, 101, 114, - 67, 111, 108, 111, 114, 0, - 84, 2, 0, 0, 0, 0, - 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 204, 1, - 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 77, 105, 99, 114, 111, 115, - 111, 102, 116, 32, 40, 82, - 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, - 114, 32, 67, 111, 109, 112, - 105, 108, 101, 114, 32, 54, - 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 3, 3, - 0, 0, 80, 79, 83, 73, - 84, 73, 79, 78, 0, 171, - 171, 171, 79, 83, 71, 78, - 80, 0, 0, 0, 2, 0, - 0, 0, 8, 0, 0, 0, - 56, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 68, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, - 83, 86, 95, 80, 111, 115, - 105, 116, 105, 111, 110, 0, - 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, - 6, 66, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 80, 4, 0, 0, - 68, 88, 66, 67, 151, 150, - 8, 20, 71, 31, 33, 136, - 86, 87, 200, 101, 153, 133, - 218, 4, 1, 0, 0, 0, - 80, 4, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 192, 0, 0, 0, 100, 1, - 0, 0, 224, 1, 0, 0, - 196, 3, 0, 0, 28, 4, - 0, 0, 65, 111, 110, 57, - 128, 0, 0, 0, 128, 0, - 0, 0, 0, 2, 255, 255, - 76, 0, 0, 0, 52, 0, - 0, 0, 1, 0, 40, 0, - 0, 0, 52, 0, 0, 0, - 52, 0, 1, 0, 36, 0, - 0, 0, 52, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 255, 255, - 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 3, 176, - 31, 0, 0, 2, 0, 0, - 0, 144, 0, 8, 15, 160, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 176, - 0, 8, 228, 160, 5, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 0, 0, - 0, 160, 1, 0, 0, 2, - 0, 8, 15, 128, 0, 0, - 228, 128, 255, 255, 0, 0, - 83, 72, 68, 82, 156, 0, - 0, 0, 64, 0, 0, 0, - 39, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 4, 0, - 0, 0, 90, 0, 0, 3, - 0, 96, 16, 0, 0, 0, - 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 0, 0, - 0, 0, 85, 85, 0, 0, - 98, 16, 0, 3, 50, 16, - 16, 0, 1, 0, 0, 0, - 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, - 104, 0, 0, 2, 1, 0, - 0, 0, 69, 0, 0, 9, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, - 1, 0, 0, 0, 70, 126, - 16, 0, 0, 0, 0, 0, - 0, 96, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 8, - 242, 32, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 6, 128, - 32, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, - 116, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 82, 68, 69, 70, 220, 1, - 0, 0, 1, 0, 0, 0, - 164, 0, 0, 0, 3, 0, - 0, 0, 28, 0, 0, 0, - 0, 4, 255, 255, 0, 1, - 0, 0, 168, 1, 0, 0, - 124, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 149, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 0, 0, - 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 154, 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, - 76, 97, 121, 101, 114, 84, - 101, 120, 116, 117, 114, 101, - 83, 97, 109, 112, 108, 101, - 114, 80, 111, 105, 110, 116, - 0, 116, 82, 71, 66, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 0, 171, 154, 0, - 0, 0, 5, 0, 0, 0, - 188, 0, 0, 0, 128, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 52, 1, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 68, 1, 0, 0, - 0, 0, 0, 0, 84, 1, - 0, 0, 16, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 68, 1, 0, 0, - 0, 0, 0, 0, 95, 1, - 0, 0, 32, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 68, 1, 0, 0, - 0, 0, 0, 0, 105, 1, - 0, 0, 48, 0, 0, 0, - 4, 0, 0, 0, 2, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 136, 1, - 0, 0, 64, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 152, 1, 0, 0, - 0, 0, 0, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 102, 76, 97, - 121, 101, 114, 79, 112, 97, - 99, 105, 116, 121, 0, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, - 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, - 166, 73, 0, 0, 0, 0, - 0, 0, 82, 101, 110, 100, - 101, 114, 89, 67, 98, 67, - 114, 76, 97, 121, 101, 114, - 0, 4, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 3, - 0, 0, 0, 255, 255, 255, - 255, 136, 7, 0, 0, 68, - 88, 66, 67, 134, 58, 181, - 81, 234, 180, 23, 54, 140, - 98, 159, 162, 74, 150, 11, - 172, 1, 0, 0, 0, 136, - 7, 0, 0, 6, 0, 0, - 0, 56, 0, 0, 0, 188, - 1, 0, 0, 228, 3, 0, - 0, 96, 4, 0, 0, 252, - 6, 0, 0, 48, 7, 0, - 0, 65, 111, 110, 57, 124, - 1, 0, 0, 124, 1, 0, - 0, 0, 2, 254, 255, 24, - 1, 0, 0, 100, 0, 0, - 0, 5, 0, 36, 0, 0, - 0, 96, 0, 0, 0, 96, - 0, 0, 0, 36, 0, 1, - 0, 96, 0, 0, 0, 0, - 0, 2, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 4, - 0, 2, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 1, 0, 5, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 1, 0, 6, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 4, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 1, 2, 254, 255, 31, - 0, 0, 2, 5, 0, 0, - 128, 0, 0, 15, 144, 4, - 0, 0, 4, 0, 0, 3, - 224, 0, 0, 228, 144, 1, - 0, 238, 160, 1, 0, 228, - 160, 4, 0, 0, 4, 0, - 0, 3, 128, 0, 0, 228, - 144, 2, 0, 238, 160, 2, - 0, 228, 160, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 85, 128, 4, 0, 228, - 160, 4, 0, 0, 4, 0, - 0, 15, 128, 3, 0, 228, - 160, 0, 0, 0, 128, 1, - 0, 228, 128, 2, 0, 0, - 3, 0, 0, 15, 128, 0, - 0, 228, 128, 5, 0, 228, - 160, 6, 0, 0, 2, 1, - 0, 1, 128, 0, 0, 255, - 128, 5, 0, 0, 3, 0, - 0, 7, 128, 0, 0, 228, - 128, 1, 0, 0, 128, 2, - 0, 0, 3, 0, 0, 15, - 128, 0, 0, 228, 128, 6, - 0, 228, 161, 5, 0, 0, - 3, 0, 0, 7, 128, 0, - 0, 255, 128, 0, 0, 228, - 128, 5, 0, 0, 3, 1, - 0, 15, 128, 0, 0, 85, - 128, 8, 0, 228, 160, 4, - 0, 0, 4, 1, 0, 15, - 128, 7, 0, 228, 160, 0, - 0, 0, 128, 1, 0, 228, - 128, 4, 0, 0, 4, 1, - 0, 15, 128, 9, 0, 228, - 160, 0, 0, 170, 128, 1, - 0, 228, 128, 4, 0, 0, - 4, 0, 0, 15, 128, 10, - 0, 228, 160, 0, 0, 255, - 128, 1, 0, 228, 128, 4, - 0, 0, 4, 0, 0, 3, - 192, 0, 0, 255, 128, 0, - 0, 228, 160, 0, 0, 228, - 128, 1, 0, 0, 2, 0, - 0, 12, 192, 0, 0, 228, - 128, 255, 255, 0, 0, 83, - 72, 68, 82, 32, 2, 0, - 0, 64, 0, 1, 0, 136, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 0, - 0, 0, 0, 8, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 1, 0, 0, - 0, 1, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 2, 0, 0, 0, 4, - 0, 0, 0, 95, 0, 0, - 3, 50, 16, 16, 0, 0, - 0, 0, 0, 103, 0, 0, - 4, 242, 32, 16, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 101, 0, 0, 3, 50, - 32, 16, 0, 1, 0, 0, - 0, 104, 0, 0, 2, 2, - 0, 0, 0, 50, 0, 0, - 11, 50, 0, 16, 0, 0, - 0, 0, 0, 70, 16, 16, - 0, 0, 0, 0, 0, 230, - 138, 32, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 70, - 128, 32, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 56, - 0, 0, 8, 242, 0, 16, - 0, 1, 0, 0, 0, 86, - 5, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 0, - 0, 0, 0, 5, 0, 0, - 0, 50, 0, 0, 10, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 0, - 0, 0, 0, 4, 0, 0, - 0, 6, 0, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 0, - 0, 0, 8, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 14, 0, 0, 7, 114, - 0, 16, 0, 0, 0, 0, - 0, 70, 2, 16, 0, 0, - 0, 0, 0, 246, 15, 16, - 0, 0, 0, 0, 0, 0, - 0, 0, 9, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 128, 65, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 56, - 0, 0, 7, 114, 0, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 70, 2, 16, 0, 0, - 0, 0, 0, 56, 0, 0, - 8, 242, 0, 16, 0, 1, - 0, 0, 0, 86, 5, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 50, - 0, 0, 10, 242, 0, 16, - 0, 1, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 6, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 1, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 2, - 0, 0, 0, 166, 10, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 50, 0, 0, 10, 242, - 32, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 3, 0, 0, - 0, 246, 15, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 50, - 0, 0, 11, 50, 32, 16, - 0, 1, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 62, 0, 0, 1, 83, - 84, 65, 84, 116, 0, 0, - 0, 13, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 12, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 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, 148, 2, 0, 0, 3, - 0, 0, 0, 168, 0, 0, - 0, 3, 0, 0, 0, 28, - 0, 0, 0, 0, 4, 254, - 255, 0, 1, 0, 0, 96, - 2, 0, 0, 124, 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, 133, - 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, 0, 0, 0, - 0, 152, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 80, 101, 114, - 76, 97, 121, 101, 114, 0, - 80, 101, 114, 79, 99, 99, - 97, 115, 105, 111, 110, 97, - 108, 76, 97, 121, 101, 114, - 0, 80, 101, 114, 76, 97, - 121, 101, 114, 77, 97, 110, - 97, 103, 101, 114, 0, 124, - 0, 0, 0, 5, 0, 0, - 0, 240, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 133, - 0, 0, 0, 2, 0, 0, - 0, 220, 1, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, - 0, 0, 0, 1, 0, 0, - 0, 60, 2, 0, 0, 64, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 104, - 1, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 136, - 1, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 147, - 1, 0, 0, 32, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 157, - 1, 0, 0, 48, 0, 0, - 0, 4, 0, 0, 0, 0, - 0, 0, 0, 172, 1, 0, - 0, 0, 0, 0, 0, 188, - 1, 0, 0, 64, 0, 0, - 0, 64, 0, 0, 0, 2, - 0, 0, 0, 204, 1, 0, - 0, 0, 0, 0, 0, 118, - 84, 101, 120, 116, 117, 114, - 101, 67, 111, 111, 114, 100, - 115, 0, 171, 1, 0, 3, - 0, 1, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 118, 76, 97, 121, 101, - 114, 81, 117, 97, 100, 0, - 118, 77, 97, 115, 107, 81, - 117, 97, 100, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 0, 0, 3, 0, 1, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 12, 2, 0, 0, 0, - 0, 0, 0, 16, 0, 0, - 0, 2, 0, 0, 0, 32, - 2, 0, 0, 0, 0, 0, - 0, 48, 2, 0, 0, 16, - 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 32, - 2, 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, 0, - 0, 0, 0, 0, 0, 0, - 0, 102, 76, 97, 121, 101, - 114, 67, 111, 108, 111, 114, - 0, 84, 2, 0, 0, 0, - 0, 0, 0, 64, 0, 0, - 0, 2, 0, 0, 0, 204, - 1, 0, 0, 0, 0, 0, - 0, 109, 80, 114, 111, 106, - 101, 99, 116, 105, 111, 110, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 171, 73, - 83, 71, 78, 44, 0, 0, - 0, 1, 0, 0, 0, 8, - 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 3, - 3, 0, 0, 80, 79, 83, - 73, 84, 73, 79, 78, 0, - 171, 171, 171, 79, 83, 71, - 78, 80, 0, 0, 0, 2, - 0, 0, 0, 8, 0, 0, - 0, 56, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, - 0, 68, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 3, 12, 0, - 0, 83, 86, 95, 80, 111, - 115, 105, 116, 105, 111, 110, - 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 171, 171, - 171, 67, 78, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 96, 7, 0, - 0, 68, 88, 66, 67, 1, - 118, 228, 119, 234, 238, 25, - 215, 211, 69, 59, 5, 242, - 177, 6, 183, 1, 0, 0, - 0, 96, 7, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 220, 1, 0, 0, 44, - 4, 0, 0, 168, 4, 0, - 0, 212, 6, 0, 0, 44, - 7, 0, 0, 65, 111, 110, - 57, 156, 1, 0, 0, 156, - 1, 0, 0, 0, 2, 255, - 255, 96, 1, 0, 0, 60, - 0, 0, 0, 1, 0, 48, - 0, 0, 0, 60, 0, 0, - 0, 60, 0, 3, 0, 36, - 0, 0, 0, 60, 0, 0, - 0, 0, 0, 1, 0, 1, - 0, 2, 0, 2, 0, 0, - 0, 3, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 2, 255, 255, 81, 0, 0, - 5, 1, 0, 15, 160, 115, - 128, 0, 191, 18, 131, 128, - 189, 182, 74, 204, 63, 205, - 30, 80, 63, 81, 0, 0, - 5, 2, 0, 15, 160, 103, - 10, 149, 63, 76, 26, 1, - 64, 196, 148, 200, 62, 0, - 0, 128, 63, 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, 2, 8, 228, 160, 2, - 0, 0, 3, 0, 0, 1, - 128, 1, 0, 255, 128, 1, - 0, 0, 160, 5, 0, 0, - 3, 0, 0, 3, 128, 0, - 0, 0, 128, 1, 0, 238, - 160, 2, 0, 0, 3, 0, - 0, 4, 128, 0, 0, 255, - 128, 1, 0, 85, 160, 4, - 0, 0, 4, 0, 0, 2, - 128, 0, 0, 170, 128, 2, - 0, 0, 160, 0, 0, 85, - 129, 4, 0, 0, 4, 1, - 0, 1, 128, 0, 0, 170, - 128, 2, 0, 0, 160, 0, - 0, 0, 128, 66, 0, 0, - 3, 2, 0, 15, 128, 0, - 0, 228, 176, 1, 8, 228, - 160, 2, 0, 0, 3, 0, - 0, 1, 128, 2, 0, 255, - 128, 1, 0, 0, 160, 4, - 0, 0, 4, 1, 0, 2, - 128, 0, 0, 0, 128, 2, - 0, 170, 161, 0, 0, 85, - 128, 5, 0, 0, 3, 0, - 0, 1, 128, 0, 0, 0, - 128, 2, 0, 85, 160, 4, - 0, 0, 4, 1, 0, 4, - 128, 0, 0, 170, 128, 2, - 0, 0, 160, 0, 0, 0, - 128, 1, 0, 0, 2, 1, - 0, 8, 128, 2, 0, 255, - 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, 83, 72, 68, - 82, 72, 2, 0, 0, 64, - 0, 0, 0, 146, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 0, 0, 0, - 0, 4, 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, 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, 69, 0, 0, 9, 242, - 0, 16, 0, 0, 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, 18, - 0, 16, 0, 0, 0, 0, - 0, 58, 0, 16, 0, 0, - 0, 0, 0, 1, 64, 0, - 0, 115, 128, 0, 191, 56, - 0, 0, 10, 50, 0, 16, - 0, 0, 0, 0, 0, 6, - 0, 16, 0, 0, 0, 0, - 0, 2, 64, 0, 0, 182, - 74, 204, 63, 205, 30, 80, - 63, 0, 0, 0, 0, 0, - 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, 0, 0, 0, - 7, 66, 0, 16, 0, 0, - 0, 0, 0, 58, 0, 16, - 0, 1, 0, 0, 0, 1, - 64, 0, 0, 18, 131, 128, - 189, 50, 0, 0, 10, 34, - 0, 16, 0, 0, 0, 0, - 0, 42, 0, 16, 0, 0, - 0, 0, 0, 1, 64, 0, - 0, 103, 10, 149, 63, 26, - 0, 16, 128, 65, 0, 0, - 0, 0, 0, 0, 0, 50, - 0, 0, 9, 18, 0, 16, - 0, 1, 0, 0, 0, 42, - 0, 16, 0, 0, 0, 0, - 0, 1, 64, 0, 0, 103, - 10, 149, 63, 10, 0, 16, - 0, 0, 0, 0, 0, 69, - 0, 0, 9, 242, 0, 16, - 0, 2, 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, 0, 0, 0, 0, 58, - 0, 16, 0, 2, 0, 0, - 0, 1, 64, 0, 0, 115, - 128, 0, 191, 50, 0, 0, - 10, 34, 0, 16, 0, 1, - 0, 0, 0, 10, 0, 16, - 128, 65, 0, 0, 0, 0, - 0, 0, 0, 1, 64, 0, - 0, 196, 148, 200, 62, 26, - 0, 16, 0, 0, 0, 0, - 0, 56, 0, 0, 7, 18, - 0, 16, 0, 0, 0, 0, - 0, 10, 0, 16, 0, 0, - 0, 0, 0, 1, 64, 0, - 0, 76, 26, 1, 64, 50, - 0, 0, 9, 66, 0, 16, - 0, 1, 0, 0, 0, 42, - 0, 16, 0, 0, 0, 0, - 0, 1, 64, 0, 0, 103, - 10, 149, 63, 10, 0, 16, - 0, 0, 0, 0, 0, 54, - 0, 0, 5, 130, 0, 16, - 0, 1, 0, 0, 0, 1, - 64, 0, 0, 0, 0, 128, - 63, 56, 0, 0, 8, 242, - 32, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 6, 128, 32, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 62, 0, 0, - 1, 83, 84, 65, 84, 116, - 0, 0, 0, 15, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 10, 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, 36, 2, 0, - 0, 1, 0, 0, 0, 236, - 0, 0, 0, 5, 0, 0, - 0, 28, 0, 0, 0, 0, - 4, 255, 255, 0, 1, 0, - 0, 240, 1, 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, 0, 0, 0, - 0, 214, 0, 0, 0, 2, - 0, 0, 0, 5, 0, 0, - 0, 4, 0, 0, 0, 255, - 255, 255, 255, 0, 0, 0, - 0, 1, 0, 0, 0, 12, - 0, 0, 0, 217, 0, 0, - 0, 2, 0, 0, 0, 5, - 0, 0, 0, 4, 0, 0, - 0, 255, 255, 255, 255, 1, - 0, 0, 0, 1, 0, 0, - 0, 12, 0, 0, 0, 221, - 0, 0, 0, 2, 0, 0, - 0, 5, 0, 0, 0, 4, - 0, 0, 0, 255, 255, 255, - 255, 2, 0, 0, 0, 1, - 0, 0, 0, 12, 0, 0, - 0, 225, 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, 76, 97, 121, - 101, 114, 84, 101, 120, 116, - 117, 114, 101, 83, 97, 109, - 112, 108, 101, 114, 76, 105, - 110, 101, 97, 114, 0, 116, - 89, 0, 116, 67, 98, 0, - 116, 67, 114, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 0, 171, 171, 225, 0, 0, - 0, 5, 0, 0, 0, 4, - 1, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 124, 1, 0, - 0, 0, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 140, 1, 0, 0, 0, - 0, 0, 0, 156, 1, 0, - 0, 16, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 140, 1, 0, 0, 0, - 0, 0, 0, 167, 1, 0, - 0, 32, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 140, 1, 0, 0, 0, - 0, 0, 0, 177, 1, 0, - 0, 48, 0, 0, 0, 4, - 0, 0, 0, 2, 0, 0, - 0, 192, 1, 0, 0, 0, - 0, 0, 0, 208, 1, 0, - 0, 64, 0, 0, 0, 64, - 0, 0, 0, 0, 0, 0, - 0, 224, 1, 0, 0, 0, - 0, 0, 0, 118, 84, 101, - 120, 116, 117, 114, 101, 67, - 111, 111, 114, 100, 115, 0, - 171, 1, 0, 3, 0, 1, - 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 118, - 76, 97, 121, 101, 114, 81, - 117, 97, 100, 0, 118, 77, - 97, 115, 107, 81, 117, 97, - 100, 0, 102, 76, 97, 121, - 101, 114, 79, 112, 97, 99, - 105, 116, 121, 0, 171, 0, - 0, 3, 0, 1, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 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, 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, 227, - 85, 0, 0, 0, 0, 0, - 0, 82, 101, 110, 100, 101, - 114, 67, 111, 109, 112, 111, - 110, 101, 110, 116, 65, 108, - 112, 104, 97, 76, 97, 121, - 101, 114, 0, 4, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 255, - 255, 255, 255, 136, 7, 0, - 0, 68, 88, 66, 67, 134, - 58, 181, 81, 234, 180, 23, - 54, 140, 98, 159, 162, 74, - 150, 11, 172, 1, 0, 0, - 0, 136, 7, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 188, 1, 0, 0, 228, - 3, 0, 0, 96, 4, 0, - 0, 252, 6, 0, 0, 48, - 7, 0, 0, 65, 111, 110, - 57, 124, 1, 0, 0, 124, - 1, 0, 0, 0, 2, 254, - 255, 24, 1, 0, 0, 100, - 0, 0, 0, 5, 0, 36, - 0, 0, 0, 96, 0, 0, - 0, 96, 0, 0, 0, 36, - 0, 1, 0, 96, 0, 0, - 0, 0, 0, 2, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 4, 0, 2, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 1, 0, 5, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 1, 0, 6, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 4, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 254, - 255, 31, 0, 0, 2, 5, - 0, 0, 128, 0, 0, 15, - 144, 4, 0, 0, 4, 0, - 0, 3, 224, 0, 0, 228, - 144, 1, 0, 238, 160, 1, - 0, 228, 160, 4, 0, 0, - 4, 0, 0, 3, 128, 0, - 0, 228, 144, 2, 0, 238, - 160, 2, 0, 228, 160, 5, - 0, 0, 3, 1, 0, 15, - 128, 0, 0, 85, 128, 4, - 0, 228, 160, 4, 0, 0, - 4, 0, 0, 15, 128, 3, - 0, 228, 160, 0, 0, 0, - 128, 1, 0, 228, 128, 2, - 0, 0, 3, 0, 0, 15, - 128, 0, 0, 228, 128, 5, - 0, 228, 160, 6, 0, 0, - 2, 1, 0, 1, 128, 0, - 0, 255, 128, 5, 0, 0, - 3, 0, 0, 7, 128, 0, - 0, 228, 128, 1, 0, 0, - 128, 2, 0, 0, 3, 0, - 0, 15, 128, 0, 0, 228, - 128, 6, 0, 228, 161, 5, - 0, 0, 3, 0, 0, 7, - 128, 0, 0, 255, 128, 0, - 0, 228, 128, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 85, 128, 8, 0, 228, - 160, 4, 0, 0, 4, 1, - 0, 15, 128, 7, 0, 228, - 160, 0, 0, 0, 128, 1, - 0, 228, 128, 4, 0, 0, - 4, 1, 0, 15, 128, 9, - 0, 228, 160, 0, 0, 170, - 128, 1, 0, 228, 128, 4, - 0, 0, 4, 0, 0, 15, - 128, 10, 0, 228, 160, 0, - 0, 255, 128, 1, 0, 228, - 128, 4, 0, 0, 4, 0, - 0, 3, 192, 0, 0, 255, - 128, 0, 0, 228, 160, 0, - 0, 228, 128, 1, 0, 0, - 2, 0, 0, 12, 192, 0, - 0, 228, 128, 255, 255, 0, - 0, 83, 72, 68, 82, 32, - 2, 0, 0, 64, 0, 1, - 0, 136, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 0, 0, 0, 0, 8, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 1, - 0, 0, 0, 1, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 2, 0, 0, - 0, 4, 0, 0, 0, 95, - 0, 0, 3, 50, 16, 16, - 0, 0, 0, 0, 0, 103, - 0, 0, 4, 242, 32, 16, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 50, 32, 16, 0, 1, - 0, 0, 0, 104, 0, 0, - 2, 2, 0, 0, 0, 50, - 0, 0, 11, 50, 0, 16, - 0, 0, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 56, 0, 0, 8, 242, - 0, 16, 0, 1, 0, 0, - 0, 86, 5, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 5, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 4, - 0, 0, 0, 6, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 0, 0, 0, 8, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 14, 0, 0, - 7, 114, 0, 16, 0, 0, - 0, 0, 0, 70, 2, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 128, 65, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 56, 0, 0, 7, 114, - 0, 16, 0, 0, 0, 0, - 0, 246, 15, 16, 0, 0, - 0, 0, 0, 70, 2, 16, - 0, 0, 0, 0, 0, 56, - 0, 0, 8, 242, 0, 16, - 0, 1, 0, 0, 0, 86, - 5, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 1, 0, 0, - 0, 50, 0, 0, 10, 242, - 0, 16, 0, 1, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 6, 0, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 50, - 0, 0, 10, 242, 0, 16, - 0, 1, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 2, 0, 0, 0, 166, - 10, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 50, 0, 0, - 10, 242, 32, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 3, - 0, 0, 0, 246, 15, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 50, 0, 0, 11, 50, - 32, 16, 0, 1, 0, 0, - 0, 70, 16, 16, 0, 0, - 0, 0, 0, 230, 138, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 70, 128, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 62, 0, 0, - 1, 83, 84, 65, 84, 116, - 0, 0, 0, 13, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 12, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 148, 2, 0, - 0, 3, 0, 0, 0, 168, - 0, 0, 0, 3, 0, 0, - 0, 28, 0, 0, 0, 0, - 4, 254, 255, 0, 1, 0, - 0, 96, 2, 0, 0, 124, - 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, 133, 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, 0, - 0, 0, 0, 152, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 80, - 101, 114, 76, 97, 121, 101, - 114, 0, 80, 101, 114, 79, - 99, 99, 97, 115, 105, 111, - 110, 97, 108, 76, 97, 121, - 101, 114, 0, 80, 101, 114, - 76, 97, 121, 101, 114, 77, - 97, 110, 97, 103, 101, 114, - 0, 124, 0, 0, 0, 5, - 0, 0, 0, 240, 0, 0, - 0, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 133, 0, 0, 0, 2, - 0, 0, 0, 220, 1, 0, - 0, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 152, 0, 0, 0, 1, - 0, 0, 0, 60, 2, 0, - 0, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 104, 1, 0, 0, 0, - 0, 0, 0, 16, 0, 0, - 0, 2, 0, 0, 0, 120, - 1, 0, 0, 0, 0, 0, - 0, 136, 1, 0, 0, 16, - 0, 0, 0, 16, 0, 0, - 0, 2, 0, 0, 0, 120, - 1, 0, 0, 0, 0, 0, - 0, 147, 1, 0, 0, 32, - 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 120, - 1, 0, 0, 0, 0, 0, - 0, 157, 1, 0, 0, 48, - 0, 0, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 172, - 1, 0, 0, 0, 0, 0, - 0, 188, 1, 0, 0, 64, - 0, 0, 0, 64, 0, 0, - 0, 2, 0, 0, 0, 204, - 1, 0, 0, 0, 0, 0, - 0, 118, 84, 101, 120, 116, - 117, 114, 101, 67, 111, 111, - 114, 100, 115, 0, 171, 1, - 0, 3, 0, 1, 0, 4, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 118, 76, 97, - 121, 101, 114, 81, 117, 97, - 100, 0, 118, 77, 97, 115, - 107, 81, 117, 97, 100, 0, - 102, 76, 97, 121, 101, 114, - 79, 112, 97, 99, 105, 116, - 121, 0, 171, 0, 0, 3, - 0, 1, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 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, 12, 2, 0, - 0, 0, 0, 0, 0, 16, - 0, 0, 0, 2, 0, 0, - 0, 32, 2, 0, 0, 0, - 0, 0, 0, 48, 2, 0, - 0, 16, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 32, 2, 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, 0, 0, 0, 0, 0, - 0, 0, 0, 102, 76, 97, - 121, 101, 114, 67, 111, 108, - 111, 114, 0, 84, 2, 0, - 0, 0, 0, 0, 0, 64, - 0, 0, 0, 2, 0, 0, - 0, 204, 1, 0, 0, 0, - 0, 0, 0, 109, 80, 114, - 111, 106, 101, 99, 116, 105, - 111, 110, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 171, 73, 83, 71, 78, 44, - 0, 0, 0, 1, 0, 0, - 0, 8, 0, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 3, 3, 0, 0, 80, - 79, 83, 73, 84, 73, 79, - 78, 0, 171, 171, 171, 79, - 83, 71, 78, 80, 0, 0, - 0, 2, 0, 0, 0, 8, - 0, 0, 0, 56, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 15, - 0, 0, 0, 68, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 1, 0, 0, 0, 3, - 12, 0, 0, 83, 86, 95, - 80, 111, 115, 105, 116, 105, - 111, 110, 0, 84, 69, 88, - 67, 79, 79, 82, 68, 0, - 171, 171, 171, 153, 93, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 208, - 5, 0, 0, 68, 88, 66, - 67, 221, 34, 215, 183, 71, - 137, 39, 113, 128, 157, 241, - 55, 153, 55, 174, 108, 1, - 0, 0, 0, 208, 5, 0, - 0, 6, 0, 0, 0, 56, - 0, 0, 0, 64, 1, 0, - 0, 160, 2, 0, 0, 28, - 3, 0, 0, 44, 5, 0, - 0, 132, 5, 0, 0, 65, - 111, 110, 57, 0, 1, 0, - 0, 0, 1, 0, 0, 0, - 2, 255, 255, 200, 0, 0, - 0, 56, 0, 0, 0, 1, - 0, 44, 0, 0, 0, 56, - 0, 0, 0, 56, 0, 2, - 0, 36, 0, 0, 0, 56, - 0, 0, 0, 0, 0, 1, - 0, 1, 0, 0, 0, 3, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 255, - 255, 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, 1, 0, 15, 128, 0, - 0, 228, 128, 1, 0, 228, - 129, 2, 0, 0, 3, 1, - 0, 15, 128, 1, 0, 228, - 128, 1, 0, 0, 160, 1, - 0, 0, 2, 0, 0, 8, - 128, 1, 0, 85, 128, 5, - 0, 0, 3, 1, 0, 15, - 128, 1, 0, 228, 128, 0, - 0, 0, 160, 1, 0, 0, - 2, 1, 8, 15, 128, 1, - 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, 88, 1, 0, - 0, 64, 0, 0, 0, 86, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 0, - 0, 0, 0, 4, 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, 1, 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, 101, 0, 0, - 3, 242, 32, 16, 0, 1, - 0, 0, 0, 104, 0, 0, - 2, 2, 0, 0, 0, 69, - 0, 0, 9, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 16, 16, 0, 1, 0, 0, - 0, 70, 126, 16, 0, 1, - 0, 0, 0, 0, 96, 16, - 0, 0, 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, 0, - 0, 0, 8, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 128, 65, 0, 0, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 0, 0, 0, 10, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 2, 64, 0, - 0, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, - 63, 0, 0, 128, 63, 54, - 0, 0, 5, 130, 0, 16, - 0, 1, 0, 0, 0, 26, - 0, 16, 0, 0, 0, 0, - 0, 56, 0, 0, 8, 242, - 32, 16, 0, 1, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 6, 128, 32, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 56, 0, 0, - 8, 242, 32, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 6, - 128, 32, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 62, - 0, 0, 1, 83, 84, 65, - 84, 116, 0, 0, 0, 8, - 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 82, 68, 69, 70, 8, - 2, 0, 0, 1, 0, 0, - 0, 208, 0, 0, 0, 4, - 0, 0, 0, 28, 0, 0, - 0, 0, 4, 255, 255, 0, - 1, 0, 0, 212, 1, 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, 0, - 0, 0, 0, 182, 0, 0, - 0, 2, 0, 0, 0, 5, - 0, 0, 0, 4, 0, 0, - 0, 255, 255, 255, 255, 0, - 0, 0, 0, 1, 0, 0, - 0, 12, 0, 0, 0, 187, - 0, 0, 0, 2, 0, 0, - 0, 5, 0, 0, 0, 4, - 0, 0, 0, 255, 255, 255, - 255, 1, 0, 0, 0, 1, - 0, 0, 0, 12, 0, 0, - 0, 197, 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, 76, 97, 121, - 101, 114, 84, 101, 120, 116, - 117, 114, 101, 83, 97, 109, - 112, 108, 101, 114, 76, 105, - 110, 101, 97, 114, 0, 116, - 82, 71, 66, 0, 116, 82, - 71, 66, 87, 104, 105, 116, - 101, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 0, 171, - 171, 197, 0, 0, 0, 5, - 0, 0, 0, 232, 0, 0, - 0, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 96, 1, 0, 0, 0, - 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 112, - 1, 0, 0, 0, 0, 0, - 0, 128, 1, 0, 0, 16, - 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 112, - 1, 0, 0, 0, 0, 0, - 0, 139, 1, 0, 0, 32, - 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 112, - 1, 0, 0, 0, 0, 0, - 0, 149, 1, 0, 0, 48, - 0, 0, 0, 4, 0, 0, - 0, 2, 0, 0, 0, 164, - 1, 0, 0, 0, 0, 0, - 0, 180, 1, 0, 0, 64, - 0, 0, 0, 64, 0, 0, - 0, 0, 0, 0, 0, 196, - 1, 0, 0, 0, 0, 0, - 0, 118, 84, 101, 120, 116, - 117, 114, 101, 67, 111, 111, - 114, 100, 115, 0, 171, 1, - 0, 3, 0, 1, 0, 4, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 118, 76, 97, - 121, 101, 114, 81, 117, 97, - 100, 0, 118, 77, 97, 115, - 107, 81, 117, 97, 100, 0, - 102, 76, 97, 121, 101, 114, - 79, 112, 97, 99, 105, 116, - 121, 0, 171, 0, 0, 3, - 0, 1, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 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, 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, 68, 0, 0, - 0, 2, 0, 0, 0, 8, - 0, 0, 0, 56, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 15, - 0, 0, 0, 56, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 1, 0, 0, 0, 15, - 0, 0, 0, 83, 86, 95, - 84, 97, 114, 103, 101, 116, - 0, 171, 171, 57, 101, 0, - 0, 0, 0, 0, 0, 82, - 101, 110, 100, 101, 114, 83, - 111, 108, 105, 100, 67, 111, - 108, 111, 114, 76, 97, 121, - 101, 114, 0, 4, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 255, - 255, 255, 255, 136, 7, 0, - 0, 68, 88, 66, 67, 134, - 58, 181, 81, 234, 180, 23, - 54, 140, 98, 159, 162, 74, - 150, 11, 172, 1, 0, 0, - 0, 136, 7, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 188, 1, 0, 0, 228, - 3, 0, 0, 96, 4, 0, - 0, 252, 6, 0, 0, 48, - 7, 0, 0, 65, 111, 110, - 57, 124, 1, 0, 0, 124, - 1, 0, 0, 0, 2, 254, - 255, 24, 1, 0, 0, 100, - 0, 0, 0, 5, 0, 36, - 0, 0, 0, 96, 0, 0, - 0, 96, 0, 0, 0, 36, - 0, 1, 0, 96, 0, 0, - 0, 0, 0, 2, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 4, 0, 2, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 1, 0, 5, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 1, 0, 6, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 4, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 254, - 255, 31, 0, 0, 2, 5, - 0, 0, 128, 0, 0, 15, - 144, 4, 0, 0, 4, 0, - 0, 3, 224, 0, 0, 228, - 144, 1, 0, 238, 160, 1, - 0, 228, 160, 4, 0, 0, - 4, 0, 0, 3, 128, 0, - 0, 228, 144, 2, 0, 238, - 160, 2, 0, 228, 160, 5, - 0, 0, 3, 1, 0, 15, - 128, 0, 0, 85, 128, 4, - 0, 228, 160, 4, 0, 0, - 4, 0, 0, 15, 128, 3, - 0, 228, 160, 0, 0, 0, - 128, 1, 0, 228, 128, 2, - 0, 0, 3, 0, 0, 15, - 128, 0, 0, 228, 128, 5, - 0, 228, 160, 6, 0, 0, - 2, 1, 0, 1, 128, 0, - 0, 255, 128, 5, 0, 0, - 3, 0, 0, 7, 128, 0, - 0, 228, 128, 1, 0, 0, - 128, 2, 0, 0, 3, 0, - 0, 15, 128, 0, 0, 228, - 128, 6, 0, 228, 161, 5, - 0, 0, 3, 0, 0, 7, - 128, 0, 0, 255, 128, 0, - 0, 228, 128, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 85, 128, 8, 0, 228, - 160, 4, 0, 0, 4, 1, - 0, 15, 128, 7, 0, 228, - 160, 0, 0, 0, 128, 1, - 0, 228, 128, 4, 0, 0, - 4, 1, 0, 15, 128, 9, - 0, 228, 160, 0, 0, 170, - 128, 1, 0, 228, 128, 4, - 0, 0, 4, 0, 0, 15, - 128, 10, 0, 228, 160, 0, - 0, 255, 128, 1, 0, 228, - 128, 4, 0, 0, 4, 0, - 0, 3, 192, 0, 0, 255, - 128, 0, 0, 228, 160, 0, - 0, 228, 128, 1, 0, 0, - 2, 0, 0, 12, 192, 0, - 0, 228, 128, 255, 255, 0, - 0, 83, 72, 68, 82, 32, - 2, 0, 0, 64, 0, 1, - 0, 136, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 0, 0, 0, 0, 8, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 1, - 0, 0, 0, 1, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 2, 0, 0, - 0, 4, 0, 0, 0, 95, - 0, 0, 3, 50, 16, 16, - 0, 0, 0, 0, 0, 103, - 0, 0, 4, 242, 32, 16, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 50, 32, 16, 0, 1, - 0, 0, 0, 104, 0, 0, - 2, 2, 0, 0, 0, 50, - 0, 0, 11, 50, 0, 16, - 0, 0, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 56, 0, 0, 8, 242, - 0, 16, 0, 1, 0, 0, - 0, 86, 5, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 5, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 4, - 0, 0, 0, 6, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 0, 0, 0, 8, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 14, 0, 0, - 7, 114, 0, 16, 0, 0, - 0, 0, 0, 70, 2, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 128, 65, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 56, 0, 0, 7, 114, - 0, 16, 0, 0, 0, 0, - 0, 246, 15, 16, 0, 0, - 0, 0, 0, 70, 2, 16, - 0, 0, 0, 0, 0, 56, - 0, 0, 8, 242, 0, 16, - 0, 1, 0, 0, 0, 86, - 5, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 1, 0, 0, - 0, 50, 0, 0, 10, 242, - 0, 16, 0, 1, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 6, 0, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 50, - 0, 0, 10, 242, 0, 16, - 0, 1, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 2, 0, 0, 0, 166, - 10, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 50, 0, 0, - 10, 242, 32, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 3, - 0, 0, 0, 246, 15, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 50, 0, 0, 11, 50, - 32, 16, 0, 1, 0, 0, - 0, 70, 16, 16, 0, 0, - 0, 0, 0, 230, 138, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 70, 128, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 62, 0, 0, - 1, 83, 84, 65, 84, 116, - 0, 0, 0, 13, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 12, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 148, 2, 0, - 0, 3, 0, 0, 0, 168, - 0, 0, 0, 3, 0, 0, - 0, 28, 0, 0, 0, 0, - 4, 254, 255, 0, 1, 0, - 0, 96, 2, 0, 0, 124, - 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, 133, 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, 0, - 0, 0, 0, 152, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 80, - 101, 114, 76, 97, 121, 101, - 114, 0, 80, 101, 114, 79, - 99, 99, 97, 115, 105, 111, - 110, 97, 108, 76, 97, 121, - 101, 114, 0, 80, 101, 114, - 76, 97, 121, 101, 114, 77, - 97, 110, 97, 103, 101, 114, - 0, 124, 0, 0, 0, 5, - 0, 0, 0, 240, 0, 0, - 0, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 133, 0, 0, 0, 2, - 0, 0, 0, 220, 1, 0, - 0, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 152, 0, 0, 0, 1, - 0, 0, 0, 60, 2, 0, - 0, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 104, 1, 0, 0, 0, - 0, 0, 0, 16, 0, 0, - 0, 2, 0, 0, 0, 120, - 1, 0, 0, 0, 0, 0, - 0, 136, 1, 0, 0, 16, - 0, 0, 0, 16, 0, 0, - 0, 2, 0, 0, 0, 120, - 1, 0, 0, 0, 0, 0, - 0, 147, 1, 0, 0, 32, - 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 120, - 1, 0, 0, 0, 0, 0, - 0, 157, 1, 0, 0, 48, - 0, 0, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 172, - 1, 0, 0, 0, 0, 0, - 0, 188, 1, 0, 0, 64, - 0, 0, 0, 64, 0, 0, - 0, 2, 0, 0, 0, 204, - 1, 0, 0, 0, 0, 0, - 0, 118, 84, 101, 120, 116, - 117, 114, 101, 67, 111, 111, - 114, 100, 115, 0, 171, 1, - 0, 3, 0, 1, 0, 4, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 118, 76, 97, - 121, 101, 114, 81, 117, 97, - 100, 0, 118, 77, 97, 115, - 107, 81, 117, 97, 100, 0, - 102, 76, 97, 121, 101, 114, - 79, 112, 97, 99, 105, 116, - 121, 0, 171, 0, 0, 3, - 0, 1, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 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, 12, 2, 0, - 0, 0, 0, 0, 0, 16, - 0, 0, 0, 2, 0, 0, - 0, 32, 2, 0, 0, 0, - 0, 0, 0, 48, 2, 0, - 0, 16, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 32, 2, 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, 0, 0, 0, 0, 0, - 0, 0, 0, 102, 76, 97, - 121, 101, 114, 67, 111, 108, - 111, 114, 0, 84, 2, 0, - 0, 0, 0, 0, 0, 64, - 0, 0, 0, 2, 0, 0, - 0, 204, 1, 0, 0, 0, - 0, 0, 0, 109, 80, 114, - 111, 106, 101, 99, 116, 105, - 111, 110, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 171, 73, 83, 71, 78, 44, - 0, 0, 0, 1, 0, 0, - 0, 8, 0, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 3, 3, 0, 0, 80, - 79, 83, 73, 84, 73, 79, - 78, 0, 171, 171, 171, 79, - 83, 71, 78, 80, 0, 0, - 0, 2, 0, 0, 0, 8, - 0, 0, 0, 56, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 15, - 0, 0, 0, 68, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 1, 0, 0, 0, 3, - 12, 0, 0, 83, 86, 95, - 80, 111, 115, 105, 116, 105, - 111, 110, 0, 84, 69, 88, - 67, 79, 79, 82, 68, 0, - 171, 171, 171, 91, 107, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 216, - 2, 0, 0, 68, 88, 66, - 67, 127, 205, 139, 78, 240, - 148, 72, 80, 60, 232, 29, - 175, 91, 153, 47, 16, 1, - 0, 0, 0, 216, 2, 0, - 0, 6, 0, 0, 0, 56, - 0, 0, 0, 132, 0, 0, - 0, 204, 0, 0, 0, 72, - 1, 0, 0, 76, 2, 0, - 0, 164, 2, 0, 0, 65, - 111, 110, 57, 68, 0, 0, - 0, 68, 0, 0, 0, 0, - 2, 255, 255, 20, 0, 0, - 0, 48, 0, 0, 0, 1, - 0, 36, 0, 0, 0, 48, - 0, 0, 0, 48, 0, 0, - 0, 36, 0, 0, 0, 48, - 0, 0, 0, 1, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 2, 255, 255, 1, - 0, 0, 2, 0, 8, 15, - 128, 0, 0, 228, 160, 255, - 255, 0, 0, 83, 72, 68, - 82, 64, 0, 0, 0, 64, - 0, 0, 0, 16, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 101, - 0, 0, 3, 242, 32, 16, - 0, 0, 0, 0, 0, 54, - 0, 0, 6, 242, 32, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 62, - 0, 0, 1, 83, 84, 65, - 84, 116, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 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, 252, - 0, 0, 0, 1, 0, 0, - 0, 80, 0, 0, 0, 1, - 0, 0, 0, 28, 0, 0, - 0, 0, 4, 255, 255, 0, - 1, 0, 0, 200, 0, 0, - 0, 60, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 80, 101, 114, - 79, 99, 99, 97, 115, 105, - 111, 110, 97, 108, 76, 97, - 121, 101, 114, 0, 171, 60, - 0, 0, 0, 2, 0, 0, - 0, 104, 0, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, - 0, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 172, 0, 0, - 0, 0, 0, 0, 0, 188, - 0, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 172, 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, 0, 0, 0, - 0, 0, 0, 0, 0, 102, - 76, 97, 121, 101, 114, 67, - 111, 108, 111, 114, 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, 0, 0, - 0, 83, 86, 95, 80, 111, - 115, 105, 116, 105, 111, 110, - 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 171, 171, - 171, 79, 83, 71, 78, 44, - 0, 0, 0, 1, 0, 0, - 0, 8, 0, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 83, - 86, 95, 84, 97, 114, 103, - 101, 116, 0, 171, 171, 251, - 114, 0, 0, 0, 0, 0, - 0, 82, 101, 110, 100, 101, - 114, 67, 108, 101, 97, 114, - 76, 97, 121, 101, 114, 0, - 4, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 255, 255, 255, 255, - 136, 7, 0, 0, 68, 88, - 66, 67, 134, 58, 181, 81, - 234, 180, 23, 54, 140, 98, - 159, 162, 74, 150, 11, 172, - 1, 0, 0, 0, 136, 7, - 0, 0, 6, 0, 0, 0, - 56, 0, 0, 0, 188, 1, - 0, 0, 228, 3, 0, 0, - 96, 4, 0, 0, 252, 6, - 0, 0, 48, 7, 0, 0, - 65, 111, 110, 57, 124, 1, - 0, 0, 124, 1, 0, 0, - 0, 2, 254, 255, 24, 1, - 0, 0, 100, 0, 0, 0, - 5, 0, 36, 0, 0, 0, - 96, 0, 0, 0, 96, 0, - 0, 0, 36, 0, 1, 0, - 96, 0, 0, 0, 0, 0, - 2, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 4, 0, - 2, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 7, 0, - 1, 0, 5, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 1, 0, 6, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 4, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 254, 255, 31, 0, - 0, 2, 5, 0, 0, 128, - 0, 0, 15, 144, 4, 0, - 0, 4, 0, 0, 3, 224, - 0, 0, 228, 144, 1, 0, - 238, 160, 1, 0, 228, 160, - 4, 0, 0, 4, 0, 0, - 3, 128, 0, 0, 228, 144, - 2, 0, 238, 160, 2, 0, - 228, 160, 5, 0, 0, 3, - 1, 0, 15, 128, 0, 0, - 85, 128, 4, 0, 228, 160, - 4, 0, 0, 4, 0, 0, - 15, 128, 3, 0, 228, 160, - 0, 0, 0, 128, 1, 0, - 228, 128, 2, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 228, 128, 5, 0, 228, 160, - 6, 0, 0, 2, 1, 0, - 1, 128, 0, 0, 255, 128, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 228, 128, - 1, 0, 0, 128, 2, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 6, 0, - 228, 161, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 255, 128, 0, 0, 228, 128, - 5, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 85, 128, - 8, 0, 228, 160, 4, 0, - 0, 4, 1, 0, 15, 128, - 7, 0, 228, 160, 0, 0, - 0, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 1, 0, - 15, 128, 9, 0, 228, 160, - 0, 0, 170, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 15, 128, 10, 0, - 228, 160, 0, 0, 255, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 0, 0, 3, 192, - 0, 0, 255, 128, 0, 0, - 228, 160, 0, 0, 228, 128, - 1, 0, 0, 2, 0, 0, - 12, 192, 0, 0, 228, 128, - 255, 255, 0, 0, 83, 72, - 68, 82, 32, 2, 0, 0, - 64, 0, 1, 0, 136, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 8, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 2, 0, 0, 0, 4, 0, - 0, 0, 95, 0, 0, 3, - 50, 16, 16, 0, 0, 0, - 0, 0, 103, 0, 0, 4, - 242, 32, 16, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 101, 0, 0, 3, 50, 32, - 16, 0, 1, 0, 0, 0, - 104, 0, 0, 2, 2, 0, - 0, 0, 50, 0, 0, 11, - 50, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, - 0, 0, 0, 0, 230, 138, - 32, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 70, 128, - 32, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 1, 0, 0, 0, 86, 5, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 5, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 6, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 0, 0, - 0, 8, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 7, 0, 0, 0, - 14, 0, 0, 7, 114, 0, - 16, 0, 0, 0, 0, 0, - 70, 2, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 0, 0, - 0, 9, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 128, 65, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 56, 0, - 0, 7, 114, 0, 16, 0, - 0, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 70, 2, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 1, 0, - 0, 0, 86, 5, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 1, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 6, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 0, 16, 0, 1, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 2, 0, - 0, 0, 166, 10, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 32, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 3, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 11, 50, 32, 16, 0, - 1, 0, 0, 0, 70, 16, - 16, 0, 0, 0, 0, 0, - 230, 138, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 70, 128, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, - 13, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 12, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, - 148, 2, 0, 0, 3, 0, - 0, 0, 168, 0, 0, 0, - 3, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 254, 255, - 0, 1, 0, 0, 96, 2, - 0, 0, 124, 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, 133, 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, 0, 0, 0, 0, - 152, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 0, 80, - 101, 114, 79, 99, 99, 97, - 115, 105, 111, 110, 97, 108, - 76, 97, 121, 101, 114, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 77, 97, 110, 97, - 103, 101, 114, 0, 124, 0, - 0, 0, 5, 0, 0, 0, - 240, 0, 0, 0, 128, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 133, 0, - 0, 0, 2, 0, 0, 0, - 220, 1, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 152, 0, - 0, 0, 1, 0, 0, 0, - 60, 2, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 104, 1, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 136, 1, - 0, 0, 16, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 147, 1, - 0, 0, 32, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 157, 1, - 0, 0, 48, 0, 0, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 172, 1, 0, 0, - 0, 0, 0, 0, 188, 1, - 0, 0, 64, 0, 0, 0, - 64, 0, 0, 0, 2, 0, - 0, 0, 204, 1, 0, 0, - 0, 0, 0, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 102, 76, 97, - 121, 101, 114, 79, 112, 97, - 99, 105, 116, 121, 0, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, - 12, 2, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 48, 2, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 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, 0, 0, - 0, 0, 0, 0, 0, 0, - 102, 76, 97, 121, 101, 114, - 67, 111, 108, 111, 114, 0, - 84, 2, 0, 0, 0, 0, - 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 204, 1, - 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 77, 105, 99, 114, 111, 115, - 111, 102, 116, 32, 40, 82, - 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, - 114, 32, 67, 111, 109, 112, - 105, 108, 101, 114, 32, 54, - 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 3, 3, - 0, 0, 80, 79, 83, 73, - 84, 73, 79, 78, 0, 171, - 171, 171, 79, 83, 71, 78, - 80, 0, 0, 0, 2, 0, - 0, 0, 8, 0, 0, 0, - 56, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 68, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, - 83, 86, 95, 80, 111, 115, - 105, 116, 105, 111, 110, 0, - 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, - 32, 118, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 216, 2, 0, 0, - 68, 88, 66, 67, 127, 205, - 139, 78, 240, 148, 72, 80, - 60, 232, 29, 175, 91, 153, - 47, 16, 1, 0, 0, 0, - 216, 2, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 132, 0, 0, 0, 204, 0, - 0, 0, 72, 1, 0, 0, - 76, 2, 0, 0, 164, 2, - 0, 0, 65, 111, 110, 57, - 68, 0, 0, 0, 68, 0, - 0, 0, 0, 2, 255, 255, - 20, 0, 0, 0, 48, 0, - 0, 0, 1, 0, 36, 0, - 0, 0, 48, 0, 0, 0, - 48, 0, 0, 0, 36, 0, - 0, 0, 48, 0, 0, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 2, - 255, 255, 1, 0, 0, 2, - 0, 8, 15, 128, 0, 0, - 228, 160, 255, 255, 0, 0, - 83, 72, 68, 82, 64, 0, - 0, 0, 64, 0, 0, 0, - 16, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 101, 0, 0, 3, - 242, 32, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 6, - 242, 32, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 252, 0, 0, 0, - 1, 0, 0, 0, 80, 0, - 0, 0, 1, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 255, 255, 0, 1, 0, 0, - 200, 0, 0, 0, 60, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 80, 101, 114, 79, 99, 99, - 97, 115, 105, 111, 110, 97, - 108, 76, 97, 121, 101, 114, - 0, 171, 60, 0, 0, 0, - 2, 0, 0, 0, 104, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 152, 0, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 172, 0, 0, 0, 0, 0, - 0, 0, 188, 0, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 172, 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, - 0, 0, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 67, 111, 108, 111, - 114, 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, 0, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171, 192, 125, 0, 0, - 0, 0, 0, 0, 80, 114, - 101, 112, 97, 114, 101, 65, - 108, 112, 104, 97, 69, 120, - 116, 114, 97, 99, 116, 105, - 111, 110, 84, 101, 120, 116, - 117, 114, 101, 115, 0, 4, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 3, 0, 0, - 0, 255, 255, 255, 255, 136, - 7, 0, 0, 68, 88, 66, - 67, 134, 58, 181, 81, 234, - 180, 23, 54, 140, 98, 159, - 162, 74, 150, 11, 172, 1, - 0, 0, 0, 136, 7, 0, - 0, 6, 0, 0, 0, 56, - 0, 0, 0, 188, 1, 0, - 0, 228, 3, 0, 0, 96, - 4, 0, 0, 252, 6, 0, - 0, 48, 7, 0, 0, 65, - 111, 110, 57, 124, 1, 0, - 0, 124, 1, 0, 0, 0, - 2, 254, 255, 24, 1, 0, - 0, 100, 0, 0, 0, 5, - 0, 36, 0, 0, 0, 96, - 0, 0, 0, 96, 0, 0, - 0, 36, 0, 1, 0, 96, - 0, 0, 0, 0, 0, 2, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 4, 0, 2, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 1, - 0, 5, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 1, - 0, 6, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 4, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 2, 254, 255, 31, 0, 0, - 2, 5, 0, 0, 128, 0, - 0, 15, 144, 4, 0, 0, - 4, 0, 0, 3, 224, 0, - 0, 228, 144, 1, 0, 238, - 160, 1, 0, 228, 160, 4, - 0, 0, 4, 0, 0, 3, - 128, 0, 0, 228, 144, 2, - 0, 238, 160, 2, 0, 228, - 160, 5, 0, 0, 3, 1, - 0, 15, 128, 0, 0, 85, - 128, 4, 0, 228, 160, 4, - 0, 0, 4, 0, 0, 15, - 128, 3, 0, 228, 160, 0, - 0, 0, 128, 1, 0, 228, - 128, 2, 0, 0, 3, 0, - 0, 15, 128, 0, 0, 228, - 128, 5, 0, 228, 160, 6, - 0, 0, 2, 1, 0, 1, - 128, 0, 0, 255, 128, 5, - 0, 0, 3, 0, 0, 7, - 128, 0, 0, 228, 128, 1, - 0, 0, 128, 2, 0, 0, - 3, 0, 0, 15, 128, 0, - 0, 228, 128, 6, 0, 228, - 161, 5, 0, 0, 3, 0, - 0, 7, 128, 0, 0, 255, - 128, 0, 0, 228, 128, 5, - 0, 0, 3, 1, 0, 15, - 128, 0, 0, 85, 128, 8, - 0, 228, 160, 4, 0, 0, - 4, 1, 0, 15, 128, 7, - 0, 228, 160, 0, 0, 0, - 128, 1, 0, 228, 128, 4, - 0, 0, 4, 1, 0, 15, - 128, 9, 0, 228, 160, 0, - 0, 170, 128, 1, 0, 228, - 128, 4, 0, 0, 4, 0, - 0, 15, 128, 10, 0, 228, - 160, 0, 0, 255, 128, 1, - 0, 228, 128, 4, 0, 0, - 4, 0, 0, 3, 192, 0, - 0, 255, 128, 0, 0, 228, - 160, 0, 0, 228, 128, 1, - 0, 0, 2, 0, 0, 12, - 192, 0, 0, 228, 128, 255, - 255, 0, 0, 83, 72, 68, - 82, 32, 2, 0, 0, 64, - 0, 1, 0, 136, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 0, 0, 0, - 0, 8, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 1, 0, 0, 0, 1, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 2, - 0, 0, 0, 4, 0, 0, - 0, 95, 0, 0, 3, 50, - 16, 16, 0, 0, 0, 0, - 0, 103, 0, 0, 4, 242, - 32, 16, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 101, - 0, 0, 3, 50, 32, 16, - 0, 1, 0, 0, 0, 104, - 0, 0, 2, 2, 0, 0, - 0, 50, 0, 0, 11, 50, - 0, 16, 0, 0, 0, 0, - 0, 70, 16, 16, 0, 0, - 0, 0, 0, 230, 138, 32, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 70, 128, 32, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 56, 0, 0, - 8, 242, 0, 16, 0, 1, - 0, 0, 0, 86, 5, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 0, 0, 0, - 0, 5, 0, 0, 0, 50, - 0, 0, 10, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 6, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 0, 0, 0, - 8, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 14, - 0, 0, 7, 114, 0, 16, - 0, 0, 0, 0, 0, 70, - 2, 16, 0, 0, 0, 0, - 0, 246, 15, 16, 0, 0, - 0, 0, 0, 0, 0, 0, - 9, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 128, 65, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 56, 0, 0, - 7, 114, 0, 16, 0, 0, - 0, 0, 0, 246, 15, 16, - 0, 0, 0, 0, 0, 70, - 2, 16, 0, 0, 0, 0, - 0, 56, 0, 0, 8, 242, - 0, 16, 0, 1, 0, 0, - 0, 86, 5, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 1, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 1, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 6, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 50, 0, 0, 10, 242, - 0, 16, 0, 1, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 2, 0, 0, - 0, 166, 10, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 50, - 0, 0, 10, 242, 32, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 3, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 50, 0, 0, - 11, 50, 32, 16, 0, 1, - 0, 0, 0, 70, 16, 16, - 0, 0, 0, 0, 0, 230, - 138, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 70, - 128, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 62, - 0, 0, 1, 83, 84, 65, - 84, 116, 0, 0, 0, 13, - 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 12, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 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, 148, - 2, 0, 0, 3, 0, 0, - 0, 168, 0, 0, 0, 3, - 0, 0, 0, 28, 0, 0, - 0, 0, 4, 254, 255, 0, - 1, 0, 0, 96, 2, 0, - 0, 124, 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, 133, 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, 0, 0, 0, 0, 152, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 80, 101, 114, 76, 97, - 121, 101, 114, 0, 80, 101, - 114, 79, 99, 99, 97, 115, - 105, 111, 110, 97, 108, 76, - 97, 121, 101, 114, 0, 80, - 101, 114, 76, 97, 121, 101, - 114, 77, 97, 110, 97, 103, - 101, 114, 0, 124, 0, 0, - 0, 5, 0, 0, 0, 240, - 0, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 133, 0, 0, - 0, 2, 0, 0, 0, 220, - 1, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 152, 0, 0, - 0, 1, 0, 0, 0, 60, - 2, 0, 0, 64, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 104, 1, 0, - 0, 0, 0, 0, 0, 16, - 0, 0, 0, 2, 0, 0, - 0, 120, 1, 0, 0, 0, - 0, 0, 0, 136, 1, 0, - 0, 16, 0, 0, 0, 16, - 0, 0, 0, 2, 0, 0, - 0, 120, 1, 0, 0, 0, - 0, 0, 0, 147, 1, 0, - 0, 32, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 120, 1, 0, 0, 0, - 0, 0, 0, 157, 1, 0, - 0, 48, 0, 0, 0, 4, - 0, 0, 0, 0, 0, 0, - 0, 172, 1, 0, 0, 0, - 0, 0, 0, 188, 1, 0, - 0, 64, 0, 0, 0, 64, - 0, 0, 0, 2, 0, 0, - 0, 204, 1, 0, 0, 0, - 0, 0, 0, 118, 84, 101, - 120, 116, 117, 114, 101, 67, - 111, 111, 114, 100, 115, 0, - 171, 1, 0, 3, 0, 1, - 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 118, - 76, 97, 121, 101, 114, 81, - 117, 97, 100, 0, 118, 77, - 97, 115, 107, 81, 117, 97, - 100, 0, 102, 76, 97, 121, - 101, 114, 79, 112, 97, 99, - 105, 116, 121, 0, 171, 0, - 0, 3, 0, 1, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 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, 12, - 2, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 32, 2, 0, - 0, 0, 0, 0, 0, 48, - 2, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 32, 2, 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, 0, 0, 0, - 0, 0, 0, 0, 0, 102, - 76, 97, 121, 101, 114, 67, - 111, 108, 111, 114, 0, 84, - 2, 0, 0, 0, 0, 0, - 0, 64, 0, 0, 0, 2, - 0, 0, 0, 204, 1, 0, - 0, 0, 0, 0, 0, 109, - 80, 114, 111, 106, 101, 99, - 116, 105, 111, 110, 0, 77, - 105, 99, 114, 111, 115, 111, - 102, 116, 32, 40, 82, 41, - 32, 72, 76, 83, 76, 32, - 83, 104, 97, 100, 101, 114, - 32, 67, 111, 109, 112, 105, - 108, 101, 114, 32, 54, 46, - 51, 46, 57, 54, 48, 48, - 46, 49, 54, 51, 56, 52, - 0, 171, 171, 73, 83, 71, - 78, 44, 0, 0, 0, 1, - 0, 0, 0, 8, 0, 0, - 0, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 3, 3, 0, - 0, 80, 79, 83, 73, 84, - 73, 79, 78, 0, 171, 171, - 171, 79, 83, 71, 78, 80, - 0, 0, 0, 2, 0, 0, - 0, 8, 0, 0, 0, 56, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 68, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 1, 0, 0, - 0, 3, 12, 0, 0, 83, - 86, 95, 80, 111, 115, 105, - 116, 105, 111, 110, 0, 84, - 69, 88, 67, 79, 79, 82, - 68, 0, 171, 171, 171, 243, - 128, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 140, 2, 0, 0, 68, - 88, 66, 67, 242, 13, 26, - 125, 185, 83, 251, 62, 147, - 219, 54, 247, 94, 94, 245, - 124, 1, 0, 0, 0, 140, - 2, 0, 0, 6, 0, 0, - 0, 56, 0, 0, 0, 168, - 0, 0, 0, 20, 1, 0, - 0, 144, 1, 0, 0, 232, - 1, 0, 0, 64, 2, 0, - 0, 65, 111, 110, 57, 104, - 0, 0, 0, 104, 0, 0, - 0, 0, 2, 255, 255, 68, - 0, 0, 0, 36, 0, 0, - 0, 0, 0, 36, 0, 0, - 0, 36, 0, 0, 0, 36, - 0, 0, 0, 36, 0, 0, - 0, 36, 0, 1, 2, 255, - 255, 81, 0, 0, 5, 0, - 0, 15, 160, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 128, - 63, 1, 0, 0, 2, 0, - 8, 15, 128, 0, 0, 228, - 160, 1, 0, 0, 2, 0, - 0, 15, 128, 0, 0, 255, - 160, 1, 0, 0, 2, 1, - 8, 15, 128, 0, 0, 228, - 128, 255, 255, 0, 0, 83, - 72, 68, 82, 100, 0, 0, - 0, 64, 0, 0, 0, 25, - 0, 0, 0, 101, 0, 0, - 3, 242, 32, 16, 0, 0, - 0, 0, 0, 101, 0, 0, - 3, 242, 32, 16, 0, 1, - 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, 128, 63, 54, - 0, 0, 8, 242, 32, 16, - 0, 1, 0, 0, 0, 2, - 64, 0, 0, 0, 0, 128, - 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, - 63, 62, 0, 0, 1, 83, - 84, 65, 84, 116, 0, 0, - 0, 3, 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, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 82, 68, 69, - 70, 80, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 28, - 0, 0, 0, 0, 4, 255, - 255, 0, 1, 0, 0, 28, - 0, 0, 0, 77, 105, 99, - 114, 111, 115, 111, 102, 116, - 32, 40, 82, 41, 32, 72, - 76, 83, 76, 32, 83, 104, - 97, 100, 101, 114, 32, 67, - 111, 109, 112, 105, 108, 101, - 114, 32, 54, 46, 51, 46, - 57, 54, 48, 48, 46, 49, - 54, 51, 56, 52, 0, 171, - 171, 73, 83, 71, 78, 80, - 0, 0, 0, 2, 0, 0, - 0, 8, 0, 0, 0, 56, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 68, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 83, - 86, 95, 80, 111, 115, 105, - 116, 105, 111, 110, 0, 84, - 69, 88, 67, 79, 79, 82, - 68, 0, 171, 171, 171, 79, - 83, 71, 78, 68, 0, 0, - 0, 2, 0, 0, 0, 8, - 0, 0, 0, 56, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 15, - 0, 0, 0, 56, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 1, 0, 0, 0, 15, - 0, 0, 0, 83, 86, 95, - 84, 97, 114, 103, 101, 116, - 0, 171, 171, 147, 136, 0, - 0, 0, 0, 0, 0, 82, - 101, 110, 100, 101, 114, 82, - 71, 66, 76, 97, 121, 101, - 114, 80, 114, 101, 109, 117, - 108, 77, 97, 115, 107, 0, - 4, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 255, 255, 255, 255, - 76, 8, 0, 0, 68, 88, - 66, 67, 190, 117, 181, 57, - 187, 108, 178, 85, 11, 114, - 197, 104, 54, 155, 141, 115, - 1, 0, 0, 0, 76, 8, - 0, 0, 6, 0, 0, 0, - 56, 0, 0, 0, 4, 2, - 0, 0, 144, 4, 0, 0, - 12, 5, 0, 0, 168, 7, - 0, 0, 220, 7, 0, 0, - 65, 111, 110, 57, 196, 1, - 0, 0, 196, 1, 0, 0, - 0, 2, 254, 255, 96, 1, - 0, 0, 100, 0, 0, 0, - 5, 0, 36, 0, 0, 0, - 96, 0, 0, 0, 96, 0, - 0, 0, 36, 0, 1, 0, - 96, 0, 0, 0, 0, 0, - 3, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 4, 0, - 2, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 7, 0, - 1, 0, 6, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 1, 0, 7, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 4, 0, 8, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 254, 255, 31, 0, - 0, 2, 5, 0, 0, 128, - 0, 0, 15, 144, 6, 0, - 0, 2, 0, 0, 1, 128, - 3, 0, 170, 160, 4, 0, - 0, 4, 0, 0, 6, 128, - 0, 0, 208, 144, 2, 0, - 248, 160, 2, 0, 208, 160, - 5, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 170, 128, - 5, 0, 228, 160, 4, 0, - 0, 4, 1, 0, 15, 128, - 4, 0, 228, 160, 0, 0, - 85, 128, 1, 0, 228, 128, - 2, 0, 0, 3, 1, 0, - 15, 128, 1, 0, 228, 128, - 6, 0, 228, 160, 2, 0, - 0, 3, 0, 0, 6, 128, - 1, 0, 208, 128, 3, 0, - 208, 161, 5, 0, 0, 3, - 0, 0, 8, 224, 0, 0, - 0, 128, 0, 0, 85, 128, - 6, 0, 0, 2, 0, 0, - 1, 128, 3, 0, 255, 160, - 5, 0, 0, 3, 0, 0, - 4, 224, 0, 0, 0, 128, - 0, 0, 170, 128, 4, 0, - 0, 4, 0, 0, 3, 224, - 0, 0, 228, 144, 1, 0, - 238, 160, 1, 0, 228, 160, - 6, 0, 0, 2, 0, 0, - 1, 128, 1, 0, 255, 128, - 5, 0, 0, 3, 1, 0, - 7, 128, 0, 0, 0, 128, - 1, 0, 228, 128, 2, 0, - 0, 3, 0, 0, 15, 128, - 1, 0, 228, 128, 7, 0, - 228, 161, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 255, 128, 0, 0, 228, 128, - 5, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 85, 128, - 9, 0, 228, 160, 4, 0, - 0, 4, 1, 0, 15, 128, - 8, 0, 228, 160, 0, 0, - 0, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 1, 0, - 15, 128, 10, 0, 228, 160, - 0, 0, 170, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 15, 128, 11, 0, - 228, 160, 0, 0, 255, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 0, 0, 3, 192, - 0, 0, 255, 128, 0, 0, - 228, 160, 0, 0, 228, 128, - 1, 0, 0, 2, 0, 0, - 12, 192, 0, 0, 228, 128, - 255, 255, 0, 0, 83, 72, - 68, 82, 132, 2, 0, 0, - 64, 0, 1, 0, 161, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 8, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 2, 0, 0, 0, 4, 0, - 0, 0, 95, 0, 0, 3, - 50, 16, 16, 0, 0, 0, - 0, 0, 103, 0, 0, 4, - 242, 32, 16, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 101, 0, 0, 3, 50, 32, - 16, 0, 1, 0, 0, 0, - 101, 0, 0, 3, 194, 32, - 16, 0, 1, 0, 0, 0, - 104, 0, 0, 2, 2, 0, - 0, 0, 50, 0, 0, 11, - 50, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, - 0, 0, 0, 0, 230, 138, - 32, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 70, 128, - 32, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 1, 0, 0, 0, 86, 5, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 5, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 6, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 0, 0, - 0, 8, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 7, 0, 0, 0, - 14, 0, 0, 7, 114, 0, - 16, 0, 1, 0, 0, 0, - 70, 2, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 54, 0, - 0, 5, 130, 0, 16, 0, - 1, 0, 0, 0, 58, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 0, 9, 50, 0, - 16, 0, 0, 0, 0, 0, - 70, 0, 16, 0, 0, 0, - 0, 0, 70, 128, 32, 128, - 65, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 14, 0, 0, 8, 194, 32, - 16, 0, 1, 0, 0, 0, - 6, 4, 16, 0, 0, 0, - 0, 0, 166, 142, 32, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 9, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 70, 142, - 32, 128, 65, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 56, 0, 0, 7, - 114, 0, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 1, 0, 0, 0, - 86, 5, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 0, 16, 0, 1, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 2, 0, 0, 0, - 166, 10, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 32, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 11, - 50, 32, 16, 0, 1, 0, - 0, 0, 70, 16, 16, 0, - 0, 0, 0, 0, 230, 138, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 70, 128, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, - 116, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 4, 0, - 0, 0, 14, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 148, 2, - 0, 0, 3, 0, 0, 0, - 168, 0, 0, 0, 3, 0, - 0, 0, 28, 0, 0, 0, - 0, 4, 254, 255, 0, 1, - 0, 0, 96, 2, 0, 0, - 124, 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, 133, 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, - 0, 0, 0, 0, 152, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 0, 80, 101, 114, - 79, 99, 99, 97, 115, 105, - 111, 110, 97, 108, 76, 97, - 121, 101, 114, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 77, 97, 110, 97, 103, 101, - 114, 0, 124, 0, 0, 0, - 5, 0, 0, 0, 240, 0, - 0, 0, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 133, 0, 0, 0, - 2, 0, 0, 0, 220, 1, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 152, 0, 0, 0, - 1, 0, 0, 0, 60, 2, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 104, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 136, 1, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 147, 1, 0, 0, - 32, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 157, 1, 0, 0, - 48, 0, 0, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 172, 1, 0, 0, 0, 0, - 0, 0, 188, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 204, 1, 0, 0, 0, 0, - 0, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 102, 76, 97, 121, 101, - 114, 79, 112, 97, 99, 105, - 116, 121, 0, 171, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 12, 2, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 32, 2, 0, 0, - 0, 0, 0, 0, 48, 2, - 0, 0, 16, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 32, 2, 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, 0, 0, 0, 0, - 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 67, 111, - 108, 111, 114, 0, 84, 2, - 0, 0, 0, 0, 0, 0, - 64, 0, 0, 0, 2, 0, - 0, 0, 204, 1, 0, 0, - 0, 0, 0, 0, 109, 80, - 114, 111, 106, 101, 99, 116, - 105, 111, 110, 0, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 0, 0, - 80, 79, 83, 73, 84, 73, - 79, 78, 0, 171, 171, 171, - 79, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 12, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 3, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 116, 139, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 76, 5, 0, 0, 68, 88, - 66, 67, 130, 78, 41, 193, - 98, 190, 236, 116, 206, 211, - 190, 246, 52, 93, 124, 137, - 1, 0, 0, 0, 76, 5, - 0, 0, 6, 0, 0, 0, - 56, 0, 0, 0, 8, 1, - 0, 0, 32, 2, 0, 0, - 156, 2, 0, 0, 168, 4, - 0, 0, 24, 5, 0, 0, - 65, 111, 110, 57, 200, 0, - 0, 0, 200, 0, 0, 0, - 0, 2, 255, 255, 144, 0, - 0, 0, 56, 0, 0, 0, - 1, 0, 44, 0, 0, 0, - 56, 0, 0, 0, 56, 0, - 2, 0, 36, 0, 0, 0, - 56, 0, 0, 0, 0, 0, - 1, 0, 1, 0, 0, 0, - 3, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 2, - 255, 255, 31, 0, 0, 2, - 0, 0, 0, 128, 0, 0, - 15, 176, 31, 0, 0, 2, - 0, 0, 0, 144, 0, 8, - 15, 160, 31, 0, 0, 2, - 0, 0, 0, 144, 1, 8, - 15, 160, 1, 0, 0, 2, - 0, 0, 3, 128, 0, 0, - 235, 176, 66, 0, 0, 3, - 1, 0, 15, 128, 0, 0, - 228, 176, 0, 8, 228, 160, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 1, 8, 228, 160, 5, 0, - 0, 3, 1, 0, 7, 128, - 1, 0, 228, 128, 0, 0, - 0, 160, 1, 0, 0, 2, - 1, 0, 8, 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, 83, 72, - 68, 82, 16, 1, 0, 0, - 64, 0, 0, 0, 68, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 4, 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, - 1, 0, 0, 0, 85, 85, - 0, 0, 98, 16, 0, 3, - 50, 16, 16, 0, 1, 0, - 0, 0, 98, 16, 0, 3, - 194, 16, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, - 242, 32, 16, 0, 0, 0, - 0, 0, 104, 0, 0, 2, - 2, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 16, - 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 0, 0, - 0, 0, 0, 96, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 8, 114, 0, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 6, 128, 32, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 1, 0, 0, 0, - 230, 26, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 1, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 54, 0, 0, 6, 130, 0, - 16, 0, 0, 0, 0, 0, - 10, 128, 32, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 56, 0, 0, 7, 242, 32, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 1, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, - 116, 0, 0, 0, 6, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 4, 2, - 0, 0, 1, 0, 0, 0, - 204, 0, 0, 0, 4, 0, - 0, 0, 28, 0, 0, 0, - 0, 4, 255, 255, 0, 1, - 0, 0, 208, 1, 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, 0, 0, - 0, 0, 182, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 0, 0, - 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 187, 0, - 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, - 193, 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, 76, 97, 121, 101, - 114, 84, 101, 120, 116, 117, - 114, 101, 83, 97, 109, 112, - 108, 101, 114, 76, 105, 110, - 101, 97, 114, 0, 116, 82, - 71, 66, 0, 116, 77, 97, - 115, 107, 0, 80, 101, 114, - 76, 97, 121, 101, 114, 0, - 171, 171, 193, 0, 0, 0, - 5, 0, 0, 0, 228, 0, - 0, 0, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 92, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 108, 1, 0, 0, 0, 0, - 0, 0, 124, 1, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 108, 1, 0, 0, 0, 0, - 0, 0, 135, 1, 0, 0, - 32, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 108, 1, 0, 0, 0, 0, - 0, 0, 145, 1, 0, 0, - 48, 0, 0, 0, 4, 0, - 0, 0, 2, 0, 0, 0, - 160, 1, 0, 0, 0, 0, - 0, 0, 176, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 192, 1, 0, 0, 0, 0, - 0, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 102, 76, 97, 121, 101, - 114, 79, 112, 97, 99, 105, - 116, 121, 0, 171, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 104, 0, 0, 0, 3, 0, - 0, 0, 8, 0, 0, 0, - 80, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 92, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 3, 3, 0, 0, - 92, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 12, 12, 0, 0, - 83, 86, 95, 80, 111, 115, - 105, 116, 105, 111, 110, 0, - 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, - 79, 83, 71, 78, 44, 0, - 0, 0, 1, 0, 0, 0, - 8, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 83, 86, - 95, 84, 97, 114, 103, 101, - 116, 0, 171, 171, 216, 147, - 0, 0, 0, 0, 0, 0, - 82, 101, 110, 100, 101, 114, - 82, 71, 66, 76, 97, 121, - 101, 114, 80, 114, 101, 109, - 117, 108, 80, 111, 105, 110, - 116, 77, 97, 115, 107, 0, - 4, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 255, 255, 255, 255, - 76, 8, 0, 0, 68, 88, - 66, 67, 190, 117, 181, 57, - 187, 108, 178, 85, 11, 114, - 197, 104, 54, 155, 141, 115, - 1, 0, 0, 0, 76, 8, - 0, 0, 6, 0, 0, 0, - 56, 0, 0, 0, 4, 2, - 0, 0, 144, 4, 0, 0, - 12, 5, 0, 0, 168, 7, - 0, 0, 220, 7, 0, 0, - 65, 111, 110, 57, 196, 1, - 0, 0, 196, 1, 0, 0, - 0, 2, 254, 255, 96, 1, - 0, 0, 100, 0, 0, 0, - 5, 0, 36, 0, 0, 0, - 96, 0, 0, 0, 96, 0, - 0, 0, 36, 0, 1, 0, - 96, 0, 0, 0, 0, 0, - 3, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 4, 0, - 2, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 7, 0, - 1, 0, 6, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 1, 0, 7, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 4, 0, 8, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 254, 255, 31, 0, - 0, 2, 5, 0, 0, 128, - 0, 0, 15, 144, 6, 0, - 0, 2, 0, 0, 1, 128, - 3, 0, 170, 160, 4, 0, - 0, 4, 0, 0, 6, 128, - 0, 0, 208, 144, 2, 0, - 248, 160, 2, 0, 208, 160, - 5, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 170, 128, - 5, 0, 228, 160, 4, 0, - 0, 4, 1, 0, 15, 128, - 4, 0, 228, 160, 0, 0, - 85, 128, 1, 0, 228, 128, - 2, 0, 0, 3, 1, 0, - 15, 128, 1, 0, 228, 128, - 6, 0, 228, 160, 2, 0, - 0, 3, 0, 0, 6, 128, - 1, 0, 208, 128, 3, 0, - 208, 161, 5, 0, 0, 3, - 0, 0, 8, 224, 0, 0, - 0, 128, 0, 0, 85, 128, - 6, 0, 0, 2, 0, 0, - 1, 128, 3, 0, 255, 160, - 5, 0, 0, 3, 0, 0, - 4, 224, 0, 0, 0, 128, - 0, 0, 170, 128, 4, 0, - 0, 4, 0, 0, 3, 224, - 0, 0, 228, 144, 1, 0, - 238, 160, 1, 0, 228, 160, - 6, 0, 0, 2, 0, 0, - 1, 128, 1, 0, 255, 128, - 5, 0, 0, 3, 1, 0, - 7, 128, 0, 0, 0, 128, - 1, 0, 228, 128, 2, 0, - 0, 3, 0, 0, 15, 128, - 1, 0, 228, 128, 7, 0, - 228, 161, 5, 0, 0, 3, - 0, 0, 7, 128, 0, 0, - 255, 128, 0, 0, 228, 128, - 5, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 85, 128, - 9, 0, 228, 160, 4, 0, - 0, 4, 1, 0, 15, 128, - 8, 0, 228, 160, 0, 0, - 0, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 1, 0, - 15, 128, 10, 0, 228, 160, - 0, 0, 170, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 15, 128, 11, 0, - 228, 160, 0, 0, 255, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 0, 0, 3, 192, - 0, 0, 255, 128, 0, 0, - 228, 160, 0, 0, 228, 128, - 1, 0, 0, 2, 0, 0, - 12, 192, 0, 0, 228, 128, - 255, 255, 0, 0, 83, 72, - 68, 82, 132, 2, 0, 0, - 64, 0, 1, 0, 161, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 8, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 2, 0, 0, 0, 4, 0, - 0, 0, 95, 0, 0, 3, - 50, 16, 16, 0, 0, 0, - 0, 0, 103, 0, 0, 4, - 242, 32, 16, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 101, 0, 0, 3, 50, 32, - 16, 0, 1, 0, 0, 0, - 101, 0, 0, 3, 194, 32, - 16, 0, 1, 0, 0, 0, - 104, 0, 0, 2, 2, 0, - 0, 0, 50, 0, 0, 11, - 50, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, - 0, 0, 0, 0, 230, 138, - 32, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 70, 128, - 32, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 1, 0, 0, 0, 86, 5, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 5, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 6, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 0, 0, - 0, 8, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 0, 0, - 0, 0, 7, 0, 0, 0, - 14, 0, 0, 7, 114, 0, - 16, 0, 1, 0, 0, 0, - 70, 2, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 54, 0, - 0, 5, 130, 0, 16, 0, - 1, 0, 0, 0, 58, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 0, 9, 50, 0, - 16, 0, 0, 0, 0, 0, - 70, 0, 16, 0, 0, 0, - 0, 0, 70, 128, 32, 128, - 65, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 14, 0, 0, 8, 194, 32, - 16, 0, 1, 0, 0, 0, - 6, 4, 16, 0, 0, 0, - 0, 0, 166, 142, 32, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 9, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 70, 142, - 32, 128, 65, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 56, 0, 0, 7, - 114, 0, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 56, 0, 0, 8, 242, 0, - 16, 0, 1, 0, 0, 0, - 86, 5, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 0, 16, 0, 1, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 2, 0, 0, 0, - 166, 10, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 32, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 11, - 50, 32, 16, 0, 1, 0, - 0, 0, 70, 16, 16, 0, - 0, 0, 0, 0, 230, 138, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 70, 128, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, - 116, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 4, 0, - 0, 0, 14, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 148, 2, - 0, 0, 3, 0, 0, 0, - 168, 0, 0, 0, 3, 0, - 0, 0, 28, 0, 0, 0, - 0, 4, 254, 255, 0, 1, - 0, 0, 96, 2, 0, 0, - 124, 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, 133, 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, - 0, 0, 0, 0, 152, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 0, 80, 101, 114, - 79, 99, 99, 97, 115, 105, - 111, 110, 97, 108, 76, 97, - 121, 101, 114, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 77, 97, 110, 97, 103, 101, - 114, 0, 124, 0, 0, 0, - 5, 0, 0, 0, 240, 0, - 0, 0, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 133, 0, 0, 0, - 2, 0, 0, 0, 220, 1, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 152, 0, 0, 0, - 1, 0, 0, 0, 60, 2, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 104, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 136, 1, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 147, 1, 0, 0, - 32, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 120, 1, 0, 0, 0, 0, - 0, 0, 157, 1, 0, 0, - 48, 0, 0, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 172, 1, 0, 0, 0, 0, - 0, 0, 188, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 204, 1, 0, 0, 0, 0, - 0, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 102, 76, 97, 121, 101, - 114, 79, 112, 97, 99, 105, - 116, 121, 0, 171, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 12, 2, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 32, 2, 0, 0, - 0, 0, 0, 0, 48, 2, - 0, 0, 16, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 32, 2, 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, 0, 0, 0, 0, - 0, 0, 0, 0, 102, 76, - 97, 121, 101, 114, 67, 111, - 108, 111, 114, 0, 84, 2, - 0, 0, 0, 0, 0, 0, - 64, 0, 0, 0, 2, 0, - 0, 0, 204, 1, 0, 0, - 0, 0, 0, 0, 109, 80, - 114, 111, 106, 101, 99, 116, - 105, 111, 110, 0, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 3, 3, 0, 0, - 80, 79, 83, 73, 84, 73, - 79, 78, 0, 171, 171, 171, - 79, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 12, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 3, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 126, 153, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 144, 5, 0, 0, 68, 88, - 66, 67, 113, 140, 186, 29, - 121, 124, 246, 156, 156, 129, - 164, 254, 156, 2, 223, 127, - 1, 0, 0, 0, 144, 5, - 0, 0, 6, 0, 0, 0, - 56, 0, 0, 0, 8, 1, - 0, 0, 44, 2, 0, 0, - 168, 2, 0, 0, 236, 4, - 0, 0, 92, 5, 0, 0, - 65, 111, 110, 57, 200, 0, - 0, 0, 200, 0, 0, 0, - 0, 2, 255, 255, 144, 0, - 0, 0, 56, 0, 0, 0, - 1, 0, 44, 0, 0, 0, - 56, 0, 0, 0, 56, 0, - 2, 0, 36, 0, 0, 0, - 56, 0, 1, 0, 0, 0, - 0, 1, 1, 0, 0, 0, - 3, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 2, - 255, 255, 31, 0, 0, 2, - 0, 0, 0, 128, 0, 0, - 15, 176, 31, 0, 0, 2, - 0, 0, 0, 144, 0, 8, - 15, 160, 31, 0, 0, 2, - 0, 0, 0, 144, 1, 8, - 15, 160, 1, 0, 0, 2, - 0, 0, 3, 128, 0, 0, - 235, 176, 66, 0, 0, 3, - 1, 0, 15, 128, 0, 0, - 228, 176, 1, 8, 228, 160, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 0, 8, 228, 160, 5, 0, - 0, 3, 1, 0, 7, 128, - 1, 0, 228, 128, 0, 0, - 0, 160, 1, 0, 0, 2, - 1, 0, 8, 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, 83, 72, - 68, 82, 28, 1, 0, 0, - 64, 0, 0, 0, 71, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 90, 0, 0, 3, 0, 96, - 16, 0, 0, 0, 0, 0, - 90, 0, 0, 3, 0, 96, - 16, 0, 1, 0, 0, 0, - 88, 24, 0, 4, 0, 112, - 16, 0, 0, 0, 0, 0, - 85, 85, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, - 1, 0, 0, 0, 85, 85, - 0, 0, 98, 16, 0, 3, - 50, 16, 16, 0, 1, 0, - 0, 0, 98, 16, 0, 3, - 194, 16, 16, 0, 1, 0, - 0, 0, 101, 0, 0, 3, - 242, 32, 16, 0, 0, 0, - 0, 0, 104, 0, 0, 2, - 2, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 16, - 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 0, 0, - 0, 0, 0, 96, 16, 0, - 1, 0, 0, 0, 56, 0, - 0, 8, 114, 0, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 6, 128, 32, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 69, 0, 0, 9, 242, 0, - 16, 0, 1, 0, 0, 0, - 230, 26, 16, 0, 1, 0, - 0, 0, 70, 126, 16, 0, - 1, 0, 0, 0, 0, 96, - 16, 0, 0, 0, 0, 0, - 54, 0, 0, 6, 130, 0, - 16, 0, 0, 0, 0, 0, - 10, 128, 32, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 56, 0, 0, 7, 242, 32, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 0, 0, - 0, 0, 246, 15, 16, 0, - 1, 0, 0, 0, 62, 0, - 0, 1, 83, 84, 65, 84, - 116, 0, 0, 0, 6, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 60, 2, - 0, 0, 1, 0, 0, 0, - 4, 1, 0, 0, 5, 0, - 0, 0, 28, 0, 0, 0, - 0, 4, 255, 255, 0, 1, - 0, 0, 8, 2, 0, 0, - 188, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 214, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 239, 0, - 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, - 0, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, - 244, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 1, 0, 0, 0, - 1, 0, 0, 0, 12, 0, - 0, 0, 250, 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, 76, 97, - 121, 101, 114, 84, 101, 120, - 116, 117, 114, 101, 83, 97, - 109, 112, 108, 101, 114, 76, - 105, 110, 101, 97, 114, 0, - 76, 97, 121, 101, 114, 84, - 101, 120, 116, 117, 114, 101, - 83, 97, 109, 112, 108, 101, - 114, 80, 111, 105, 110, 116, - 0, 116, 82, 71, 66, 0, - 116, 77, 97, 115, 107, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 0, 171, 250, 0, - 0, 0, 5, 0, 0, 0, - 28, 1, 0, 0, 128, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 148, 1, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 164, 1, 0, 0, - 0, 0, 0, 0, 180, 1, - 0, 0, 16, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 164, 1, 0, 0, - 0, 0, 0, 0, 191, 1, - 0, 0, 32, 0, 0, 0, - 16, 0, 0, 0, 0, 0, - 0, 0, 164, 1, 0, 0, - 0, 0, 0, 0, 201, 1, - 0, 0, 48, 0, 0, 0, - 4, 0, 0, 0, 2, 0, - 0, 0, 216, 1, 0, 0, - 0, 0, 0, 0, 232, 1, - 0, 0, 64, 0, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 248, 1, 0, 0, - 0, 0, 0, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 102, 76, 97, - 121, 101, 114, 79, 112, 97, - 99, 105, 116, 121, 0, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, - 77, 105, 99, 114, 111, 115, - 111, 102, 116, 32, 40, 82, - 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, - 114, 32, 67, 111, 109, 112, - 105, 108, 101, 114, 32, 54, - 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, - 71, 78, 104, 0, 0, 0, - 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 92, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 3, - 0, 0, 92, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 12, 12, - 0, 0, 83, 86, 95, 80, - 111, 115, 105, 116, 105, 111, - 110, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, - 171, 171, 79, 83, 71, 78, - 44, 0, 0, 0, 1, 0, - 0, 0, 8, 0, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 83, 86, 95, 84, 97, 114, - 103, 101, 116, 0, 171, 171, - 226, 161, 0, 0, 0, 0, - 0, 0, 82, 101, 110, 100, - 101, 114, 82, 71, 66, 65, - 76, 97, 121, 101, 114, 80, - 114, 101, 109, 117, 108, 77, - 97, 115, 107, 0, 4, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 255, 255, 255, 255, 76, 8, - 0, 0, 68, 88, 66, 67, - 190, 117, 181, 57, 187, 108, - 178, 85, 11, 114, 197, 104, - 54, 155, 141, 115, 1, 0, - 0, 0, 76, 8, 0, 0, - 6, 0, 0, 0, 56, 0, - 0, 0, 4, 2, 0, 0, - 144, 4, 0, 0, 12, 5, - 0, 0, 168, 7, 0, 0, - 220, 7, 0, 0, 65, 111, - 110, 57, 196, 1, 0, 0, - 196, 1, 0, 0, 0, 2, - 254, 255, 96, 1, 0, 0, - 100, 0, 0, 0, 5, 0, - 36, 0, 0, 0, 96, 0, - 0, 0, 96, 0, 0, 0, - 36, 0, 1, 0, 96, 0, - 0, 0, 0, 0, 3, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 2, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 7, 0, 1, 0, - 6, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 7, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 4, 0, - 8, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, - 254, 255, 31, 0, 0, 2, - 5, 0, 0, 128, 0, 0, - 15, 144, 6, 0, 0, 2, - 0, 0, 1, 128, 3, 0, - 170, 160, 4, 0, 0, 4, - 0, 0, 6, 128, 0, 0, - 208, 144, 2, 0, 248, 160, - 2, 0, 208, 160, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 170, 128, 5, 0, - 228, 160, 4, 0, 0, 4, - 1, 0, 15, 128, 4, 0, - 228, 160, 0, 0, 85, 128, - 1, 0, 228, 128, 2, 0, - 0, 3, 1, 0, 15, 128, - 1, 0, 228, 128, 6, 0, - 228, 160, 2, 0, 0, 3, - 0, 0, 6, 128, 1, 0, - 208, 128, 3, 0, 208, 161, - 5, 0, 0, 3, 0, 0, - 8, 224, 0, 0, 0, 128, - 0, 0, 85, 128, 6, 0, - 0, 2, 0, 0, 1, 128, - 3, 0, 255, 160, 5, 0, - 0, 3, 0, 0, 4, 224, - 0, 0, 0, 128, 0, 0, - 170, 128, 4, 0, 0, 4, - 0, 0, 3, 224, 0, 0, - 228, 144, 1, 0, 238, 160, - 1, 0, 228, 160, 6, 0, - 0, 2, 0, 0, 1, 128, - 1, 0, 255, 128, 5, 0, - 0, 3, 1, 0, 7, 128, - 0, 0, 0, 128, 1, 0, - 228, 128, 2, 0, 0, 3, - 0, 0, 15, 128, 1, 0, - 228, 128, 7, 0, 228, 161, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 255, 128, - 0, 0, 228, 128, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 85, 128, 9, 0, - 228, 160, 4, 0, 0, 4, - 1, 0, 15, 128, 8, 0, - 228, 160, 0, 0, 0, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 1, 0, 15, 128, - 10, 0, 228, 160, 0, 0, - 170, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 15, 128, 11, 0, 228, 160, - 0, 0, 255, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 3, 192, 0, 0, - 255, 128, 0, 0, 228, 160, - 0, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 12, 192, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 132, 2, 0, 0, 64, 0, - 1, 0, 161, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 8, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 2, 0, - 0, 0, 4, 0, 0, 0, - 95, 0, 0, 3, 50, 16, - 16, 0, 0, 0, 0, 0, - 103, 0, 0, 4, 242, 32, - 16, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 50, 32, 16, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 194, 32, 16, 0, - 1, 0, 0, 0, 104, 0, - 0, 2, 2, 0, 0, 0, - 50, 0, 0, 11, 50, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 1, 0, - 0, 0, 86, 5, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 6, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 8, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 14, 0, - 0, 7, 114, 0, 16, 0, - 1, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, - 130, 0, 16, 0, 1, 0, - 0, 0, 58, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 0, 9, 50, 0, 16, 0, - 0, 0, 0, 0, 70, 0, - 16, 0, 0, 0, 0, 0, - 70, 128, 32, 128, 65, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 14, 0, - 0, 8, 194, 32, 16, 0, - 1, 0, 0, 0, 6, 4, - 16, 0, 0, 0, 0, 0, - 166, 142, 32, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 70, 142, 32, 128, - 65, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 114, 0, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 1, 0, 0, 0, 86, 5, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 6, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 1, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 166, 10, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 32, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 3, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 11, 50, 32, - 16, 0, 1, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 148, 2, 0, 0, - 3, 0, 0, 0, 168, 0, - 0, 0, 3, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 254, 255, 0, 1, 0, 0, - 96, 2, 0, 0, 124, 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, - 133, 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, 0, 0, - 0, 0, 152, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 0, 80, 101, 114, 79, 99, - 99, 97, 115, 105, 111, 110, - 97, 108, 76, 97, 121, 101, - 114, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 77, 97, - 110, 97, 103, 101, 114, 0, - 124, 0, 0, 0, 5, 0, - 0, 0, 240, 0, 0, 0, - 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 133, 0, 0, 0, 2, 0, - 0, 0, 220, 1, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 152, 0, 0, 0, 1, 0, - 0, 0, 60, 2, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 104, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 147, 1, 0, 0, 32, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 157, 1, 0, 0, 48, 0, - 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 172, 1, - 0, 0, 0, 0, 0, 0, - 188, 1, 0, 0, 64, 0, - 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 204, 1, - 0, 0, 0, 0, 0, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 12, 2, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 32, 2, 0, 0, 0, 0, - 0, 0, 48, 2, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 32, 2, 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, - 0, 0, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 67, 111, 108, 111, - 114, 0, 84, 2, 0, 0, - 0, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 204, 1, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 77, 105, 99, 114, - 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, - 100, 101, 114, 32, 67, 111, - 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, - 51, 56, 52, 0, 171, 171, - 73, 83, 71, 78, 44, 0, - 0, 0, 1, 0, 0, 0, - 8, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 3, 3, 0, 0, 80, 79, - 83, 73, 84, 73, 79, 78, - 0, 171, 171, 171, 79, 83, - 71, 78, 104, 0, 0, 0, - 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 92, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 12, - 0, 0, 92, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 12, 3, - 0, 0, 83, 86, 95, 80, - 111, 115, 105, 116, 105, 111, - 110, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, - 171, 171, 200, 167, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 40, 5, - 0, 0, 68, 88, 66, 67, - 134, 242, 22, 210, 198, 226, - 208, 239, 25, 201, 212, 19, - 217, 12, 67, 204, 1, 0, - 0, 0, 40, 5, 0, 0, - 6, 0, 0, 0, 56, 0, - 0, 0, 252, 0, 0, 0, - 252, 1, 0, 0, 120, 2, - 0, 0, 132, 4, 0, 0, - 244, 4, 0, 0, 65, 111, - 110, 57, 188, 0, 0, 0, - 188, 0, 0, 0, 0, 2, - 255, 255, 132, 0, 0, 0, - 56, 0, 0, 0, 1, 0, - 44, 0, 0, 0, 56, 0, - 0, 0, 56, 0, 2, 0, - 36, 0, 0, 0, 56, 0, - 0, 0, 0, 0, 1, 0, - 1, 0, 0, 0, 3, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 255, 255, - 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 15, 176, - 31, 0, 0, 2, 0, 0, - 0, 144, 0, 8, 15, 160, - 31, 0, 0, 2, 0, 0, - 0, 144, 1, 8, 15, 160, - 1, 0, 0, 2, 0, 0, - 3, 128, 0, 0, 235, 176, - 66, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 228, 176, - 0, 8, 228, 160, 66, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 1, 8, - 228, 160, 5, 0, 0, 3, - 1, 0, 15, 128, 1, 0, - 228, 128, 0, 0, 0, 160, - 5, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 255, 128, - 1, 0, 228, 128, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 248, 0, 0, 0, 64, 0, - 0, 0, 62, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 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, 1, 0, - 0, 0, 85, 85, 0, 0, - 98, 16, 0, 3, 50, 16, - 16, 0, 1, 0, 0, 0, - 98, 16, 0, 3, 194, 16, - 16, 0, 1, 0, 0, 0, - 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, - 104, 0, 0, 2, 2, 0, - 0, 0, 69, 0, 0, 9, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, - 1, 0, 0, 0, 70, 126, - 16, 0, 0, 0, 0, 0, - 0, 96, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 6, 128, - 32, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, - 1, 0, 0, 0, 230, 26, - 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 1, 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, - 246, 15, 16, 0, 1, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 5, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, - 69, 70, 4, 2, 0, 0, - 1, 0, 0, 0, 204, 0, - 0, 0, 4, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 255, 255, 0, 1, 0, 0, - 208, 1, 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, 0, 0, 0, 0, - 182, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, - 0, 0, 187, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 1, 0, - 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 193, 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, - 76, 97, 121, 101, 114, 84, - 101, 120, 116, 117, 114, 101, - 83, 97, 109, 112, 108, 101, - 114, 76, 105, 110, 101, 97, - 114, 0, 116, 82, 71, 66, - 0, 116, 77, 97, 115, 107, - 0, 80, 101, 114, 76, 97, - 121, 101, 114, 0, 171, 171, - 193, 0, 0, 0, 5, 0, - 0, 0, 228, 0, 0, 0, - 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 92, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 108, 1, - 0, 0, 0, 0, 0, 0, - 124, 1, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 108, 1, - 0, 0, 0, 0, 0, 0, - 135, 1, 0, 0, 32, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 108, 1, - 0, 0, 0, 0, 0, 0, - 145, 1, 0, 0, 48, 0, - 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 160, 1, - 0, 0, 0, 0, 0, 0, - 176, 1, 0, 0, 64, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 192, 1, - 0, 0, 0, 0, 0, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 77, 105, 99, 114, - 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, - 100, 101, 114, 32, 67, 111, - 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, - 51, 56, 52, 0, 171, 171, - 73, 83, 71, 78, 104, 0, - 0, 0, 3, 0, 0, 0, - 8, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 92, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 3, 3, 0, 0, 92, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 1, 0, 0, 0, - 12, 12, 0, 0, 83, 86, - 95, 80, 111, 115, 105, 116, - 105, 111, 110, 0, 84, 69, - 88, 67, 79, 79, 82, 68, - 0, 171, 171, 171, 79, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 83, 86, 95, 84, - 97, 114, 103, 101, 116, 0, - 171, 171, 44, 176, 0, 0, - 0, 0, 0, 0, 82, 101, - 110, 100, 101, 114, 82, 71, - 66, 65, 76, 97, 121, 101, - 114, 80, 114, 101, 109, 117, - 108, 77, 97, 115, 107, 51, - 68, 0, 4, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 255, 255, - 255, 255, 160, 8, 0, 0, - 68, 88, 66, 67, 34, 121, - 201, 137, 199, 29, 125, 49, - 68, 233, 221, 121, 196, 122, - 136, 83, 1, 0, 0, 0, - 160, 8, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 60, 2, 0, 0, 228, 4, - 0, 0, 96, 5, 0, 0, - 252, 7, 0, 0, 48, 8, - 0, 0, 65, 111, 110, 57, - 252, 1, 0, 0, 252, 1, - 0, 0, 0, 2, 254, 255, - 152, 1, 0, 0, 100, 0, - 0, 0, 5, 0, 36, 0, - 0, 0, 96, 0, 0, 0, - 96, 0, 0, 0, 36, 0, - 1, 0, 96, 0, 0, 0, - 0, 0, 3, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 4, 0, 2, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 7, 0, 1, 0, 6, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 1, 0, 7, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 4, 0, 8, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 254, 255, - 81, 0, 0, 5, 12, 0, - 15, 160, 0, 0, 128, 63, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 31, 0, 0, 2, 5, 0, - 0, 128, 0, 0, 15, 144, - 1, 0, 0, 2, 0, 0, - 4, 128, 12, 0, 0, 160, - 6, 0, 0, 2, 0, 0, - 8, 128, 3, 0, 170, 160, - 4, 0, 0, 4, 1, 0, - 3, 128, 0, 0, 228, 144, - 2, 0, 238, 160, 2, 0, - 228, 160, 5, 0, 0, 3, - 2, 0, 15, 128, 1, 0, - 85, 128, 5, 0, 228, 160, - 4, 0, 0, 4, 1, 0, - 15, 128, 4, 0, 228, 160, - 1, 0, 0, 128, 2, 0, - 228, 128, 2, 0, 0, 3, - 1, 0, 15, 128, 1, 0, - 228, 128, 6, 0, 228, 160, - 6, 0, 0, 2, 2, 0, - 1, 128, 1, 0, 255, 128, - 4, 0, 0, 4, 2, 0, - 6, 128, 1, 0, 208, 128, - 2, 0, 0, 128, 3, 0, - 208, 161, 5, 0, 0, 3, - 1, 0, 7, 128, 1, 0, - 228, 128, 2, 0, 0, 128, - 5, 0, 0, 3, 0, 0, - 1, 128, 0, 0, 255, 128, - 2, 0, 85, 128, 6, 0, - 0, 2, 0, 0, 8, 128, - 3, 0, 255, 160, 5, 0, - 0, 3, 0, 0, 2, 128, - 0, 0, 255, 128, 2, 0, - 170, 128, 5, 0, 0, 3, - 1, 0, 7, 224, 0, 0, - 228, 128, 1, 0, 255, 128, - 2, 0, 0, 3, 0, 0, - 15, 128, 1, 0, 228, 128, - 7, 0, 228, 161, 4, 0, - 0, 4, 0, 0, 3, 224, - 0, 0, 228, 144, 1, 0, - 238, 160, 1, 0, 228, 160, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 255, 128, - 0, 0, 228, 128, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 85, 128, 9, 0, - 228, 160, 4, 0, 0, 4, - 1, 0, 15, 128, 8, 0, - 228, 160, 0, 0, 0, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 1, 0, 15, 128, - 10, 0, 228, 160, 0, 0, - 170, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 15, 128, 11, 0, 228, 160, - 0, 0, 255, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 3, 192, 0, 0, - 255, 128, 0, 0, 228, 160, - 0, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 12, 192, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 160, 2, 0, 0, 64, 0, - 1, 0, 168, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 8, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 2, 0, - 0, 0, 4, 0, 0, 0, - 95, 0, 0, 3, 50, 16, - 16, 0, 0, 0, 0, 0, - 103, 0, 0, 4, 242, 32, - 16, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 50, 32, 16, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 114, 32, 16, 0, - 2, 0, 0, 0, 104, 0, - 0, 2, 3, 0, 0, 0, - 50, 0, 0, 11, 50, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 1, 0, - 0, 0, 86, 5, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 6, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 8, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 14, 0, - 0, 7, 114, 0, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 0, 0, 0, 9, - 242, 0, 16, 0, 1, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 128, 65, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 9, - 50, 0, 16, 0, 0, 0, - 0, 0, 70, 0, 16, 0, - 0, 0, 0, 0, 70, 128, - 32, 128, 65, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 14, 0, 0, 8, - 50, 0, 16, 0, 0, 0, - 0, 0, 70, 0, 16, 0, - 0, 0, 0, 0, 230, 138, - 32, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 56, 0, - 0, 7, 114, 0, 16, 0, - 1, 0, 0, 0, 246, 15, - 16, 0, 1, 0, 0, 0, - 70, 2, 16, 0, 1, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 2, 0, - 0, 0, 86, 5, 16, 0, - 1, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 2, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 6, 0, - 16, 0, 1, 0, 0, 0, - 70, 14, 16, 0, 2, 0, - 0, 0, 50, 0, 0, 10, - 242, 0, 16, 0, 2, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 2, 0, - 0, 0, 166, 10, 16, 0, - 1, 0, 0, 0, 70, 14, - 16, 0, 2, 0, 0, 0, - 50, 0, 0, 10, 242, 32, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 3, 0, 0, 0, - 246, 15, 16, 0, 1, 0, - 0, 0, 70, 14, 16, 0, - 2, 0, 0, 0, 50, 0, - 0, 11, 50, 32, 16, 0, - 1, 0, 0, 0, 70, 16, - 16, 0, 0, 0, 0, 0, - 230, 138, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 70, 128, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 54, 0, 0, 5, 66, 0, - 16, 0, 0, 0, 0, 0, - 1, 64, 0, 0, 0, 0, - 128, 63, 56, 0, 0, 7, - 114, 32, 16, 0, 2, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 62, 0, 0, 1, 83, 84, - 65, 84, 116, 0, 0, 0, - 17, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 15, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, - 148, 2, 0, 0, 3, 0, - 0, 0, 168, 0, 0, 0, - 3, 0, 0, 0, 28, 0, - 0, 0, 0, 4, 254, 255, - 0, 1, 0, 0, 96, 2, - 0, 0, 124, 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, 133, 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, 0, 0, 0, 0, - 152, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 0, 80, - 101, 114, 79, 99, 99, 97, - 115, 105, 111, 110, 97, 108, - 76, 97, 121, 101, 114, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 77, 97, 110, 97, - 103, 101, 114, 0, 124, 0, - 0, 0, 5, 0, 0, 0, - 240, 0, 0, 0, 128, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 133, 0, - 0, 0, 2, 0, 0, 0, - 220, 1, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 152, 0, - 0, 0, 1, 0, 0, 0, - 60, 2, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 104, 1, - 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 136, 1, - 0, 0, 16, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 147, 1, - 0, 0, 32, 0, 0, 0, - 16, 0, 0, 0, 2, 0, - 0, 0, 120, 1, 0, 0, - 0, 0, 0, 0, 157, 1, - 0, 0, 48, 0, 0, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 172, 1, 0, 0, - 0, 0, 0, 0, 188, 1, - 0, 0, 64, 0, 0, 0, - 64, 0, 0, 0, 2, 0, - 0, 0, 204, 1, 0, 0, - 0, 0, 0, 0, 118, 84, - 101, 120, 116, 117, 114, 101, - 67, 111, 111, 114, 100, 115, - 0, 171, 1, 0, 3, 0, - 1, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 118, 76, 97, 121, 101, 114, - 81, 117, 97, 100, 0, 118, - 77, 97, 115, 107, 81, 117, - 97, 100, 0, 102, 76, 97, - 121, 101, 114, 79, 112, 97, - 99, 105, 116, 121, 0, 171, - 0, 0, 3, 0, 1, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, - 12, 2, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 32, 2, - 0, 0, 0, 0, 0, 0, - 48, 2, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 32, 2, - 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, 0, 0, - 0, 0, 0, 0, 0, 0, - 102, 76, 97, 121, 101, 114, - 67, 111, 108, 111, 114, 0, - 84, 2, 0, 0, 0, 0, - 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 204, 1, - 0, 0, 0, 0, 0, 0, - 109, 80, 114, 111, 106, 101, - 99, 116, 105, 111, 110, 0, - 77, 105, 99, 114, 111, 115, - 111, 102, 116, 32, 40, 82, - 41, 32, 72, 76, 83, 76, - 32, 83, 104, 97, 100, 101, - 114, 32, 67, 111, 109, 112, - 105, 108, 101, 114, 32, 54, - 46, 51, 46, 57, 54, 48, - 48, 46, 49, 54, 51, 56, - 52, 0, 171, 171, 73, 83, - 71, 78, 44, 0, 0, 0, - 1, 0, 0, 0, 8, 0, - 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 3, 3, - 0, 0, 80, 79, 83, 73, - 84, 73, 79, 78, 0, 171, - 171, 171, 79, 83, 71, 78, - 104, 0, 0, 0, 3, 0, - 0, 0, 8, 0, 0, 0, - 80, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 92, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 3, 12, 0, 0, - 92, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 2, 0, - 0, 0, 7, 8, 0, 0, - 83, 86, 95, 80, 111, 115, - 105, 116, 105, 111, 110, 0, - 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, - 172, 181, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 96, 5, 0, 0, - 68, 88, 66, 67, 241, 142, - 205, 228, 253, 156, 187, 52, - 46, 187, 89, 206, 15, 61, - 26, 195, 1, 0, 0, 0, - 96, 5, 0, 0, 6, 0, - 0, 0, 56, 0, 0, 0, - 24, 1, 0, 0, 52, 2, - 0, 0, 176, 2, 0, 0, - 188, 4, 0, 0, 44, 5, - 0, 0, 65, 111, 110, 57, - 216, 0, 0, 0, 216, 0, - 0, 0, 0, 2, 255, 255, - 160, 0, 0, 0, 56, 0, - 0, 0, 1, 0, 44, 0, - 0, 0, 56, 0, 0, 0, - 56, 0, 2, 0, 36, 0, - 0, 0, 56, 0, 0, 0, - 0, 0, 1, 0, 1, 0, - 0, 0, 3, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 2, 255, 255, 31, 0, - 0, 2, 0, 0, 0, 128, - 0, 0, 3, 176, 31, 0, - 0, 2, 0, 0, 0, 128, - 1, 0, 7, 176, 31, 0, - 0, 2, 0, 0, 0, 144, - 0, 8, 15, 160, 31, 0, - 0, 2, 0, 0, 0, 144, - 1, 8, 15, 160, 6, 0, - 0, 2, 0, 0, 8, 128, - 1, 0, 170, 176, 5, 0, - 0, 3, 0, 0, 3, 128, - 0, 0, 255, 128, 1, 0, - 228, 176, 66, 0, 0, 3, - 1, 0, 15, 128, 0, 0, - 228, 176, 0, 8, 228, 160, - 66, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 1, 8, 228, 160, 5, 0, - 0, 3, 1, 0, 15, 128, - 1, 0, 228, 128, 0, 0, - 0, 160, 5, 0, 0, 3, - 0, 0, 15, 128, 0, 0, - 255, 128, 1, 0, 228, 128, - 1, 0, 0, 2, 0, 8, - 15, 128, 0, 0, 228, 128, - 255, 255, 0, 0, 83, 72, - 68, 82, 20, 1, 0, 0, - 64, 0, 0, 0, 69, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 0, 0, - 0, 0, 4, 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, - 1, 0, 0, 0, 85, 85, - 0, 0, 98, 16, 0, 3, - 50, 16, 16, 0, 1, 0, - 0, 0, 98, 16, 0, 3, - 114, 16, 16, 0, 2, 0, - 0, 0, 101, 0, 0, 3, - 242, 32, 16, 0, 0, 0, - 0, 0, 104, 0, 0, 2, - 2, 0, 0, 0, 14, 0, - 0, 7, 50, 0, 16, 0, - 0, 0, 0, 0, 70, 16, - 16, 0, 2, 0, 0, 0, - 166, 26, 16, 0, 2, 0, - 0, 0, 69, 0, 0, 9, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 0, 16, 0, - 0, 0, 0, 0, 70, 126, - 16, 0, 1, 0, 0, 0, - 0, 96, 16, 0, 0, 0, - 0, 0, 69, 0, 0, 9, - 242, 0, 16, 0, 1, 0, - 0, 0, 70, 16, 16, 0, - 1, 0, 0, 0, 70, 126, - 16, 0, 0, 0, 0, 0, - 0, 96, 16, 0, 0, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 1, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 6, 128, - 32, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 56, 0, - 0, 7, 242, 32, 16, 0, - 0, 0, 0, 0, 246, 15, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 6, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 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, 4, 2, 0, 0, - 1, 0, 0, 0, 204, 0, - 0, 0, 4, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 255, 255, 0, 1, 0, 0, - 208, 1, 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, 0, 0, 0, 0, - 182, 0, 0, 0, 2, 0, - 0, 0, 5, 0, 0, 0, - 4, 0, 0, 0, 255, 255, - 255, 255, 0, 0, 0, 0, - 1, 0, 0, 0, 12, 0, - 0, 0, 187, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 1, 0, - 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 193, 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, - 76, 97, 121, 101, 114, 84, - 101, 120, 116, 117, 114, 101, - 83, 97, 109, 112, 108, 101, - 114, 76, 105, 110, 101, 97, - 114, 0, 116, 82, 71, 66, - 0, 116, 77, 97, 115, 107, - 0, 80, 101, 114, 76, 97, - 121, 101, 114, 0, 171, 171, - 193, 0, 0, 0, 5, 0, - 0, 0, 228, 0, 0, 0, - 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 92, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 108, 1, - 0, 0, 0, 0, 0, 0, - 124, 1, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 108, 1, - 0, 0, 0, 0, 0, 0, - 135, 1, 0, 0, 32, 0, - 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 108, 1, - 0, 0, 0, 0, 0, 0, - 145, 1, 0, 0, 48, 0, - 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 160, 1, - 0, 0, 0, 0, 0, 0, - 176, 1, 0, 0, 64, 0, - 0, 0, 64, 0, 0, 0, - 0, 0, 0, 0, 192, 1, - 0, 0, 0, 0, 0, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 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, 100, 190, 0, 0, - 0, 0, 0, 0, 82, 101, - 110, 100, 101, 114, 82, 71, - 66, 65, 76, 97, 121, 101, - 114, 78, 111, 110, 80, 114, - 101, 109, 117, 108, 77, 97, - 115, 107, 0, 4, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 255, - 255, 255, 255, 76, 8, 0, - 0, 68, 88, 66, 67, 190, - 117, 181, 57, 187, 108, 178, - 85, 11, 114, 197, 104, 54, - 155, 141, 115, 1, 0, 0, - 0, 76, 8, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 4, 2, 0, 0, 144, - 4, 0, 0, 12, 5, 0, - 0, 168, 7, 0, 0, 220, - 7, 0, 0, 65, 111, 110, - 57, 196, 1, 0, 0, 196, - 1, 0, 0, 0, 2, 254, - 255, 96, 1, 0, 0, 100, - 0, 0, 0, 5, 0, 36, - 0, 0, 0, 96, 0, 0, - 0, 96, 0, 0, 0, 36, - 0, 1, 0, 96, 0, 0, - 0, 0, 0, 3, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 4, 0, 2, 0, 4, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 1, 0, 6, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 1, 0, 7, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 4, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 254, - 255, 31, 0, 0, 2, 5, - 0, 0, 128, 0, 0, 15, - 144, 6, 0, 0, 2, 0, - 0, 1, 128, 3, 0, 170, - 160, 4, 0, 0, 4, 0, - 0, 6, 128, 0, 0, 208, - 144, 2, 0, 248, 160, 2, - 0, 208, 160, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 170, 128, 5, 0, 228, - 160, 4, 0, 0, 4, 1, - 0, 15, 128, 4, 0, 228, - 160, 0, 0, 85, 128, 1, - 0, 228, 128, 2, 0, 0, - 3, 1, 0, 15, 128, 1, - 0, 228, 128, 6, 0, 228, - 160, 2, 0, 0, 3, 0, - 0, 6, 128, 1, 0, 208, - 128, 3, 0, 208, 161, 5, - 0, 0, 3, 0, 0, 8, - 224, 0, 0, 0, 128, 0, - 0, 85, 128, 6, 0, 0, - 2, 0, 0, 1, 128, 3, - 0, 255, 160, 5, 0, 0, - 3, 0, 0, 4, 224, 0, - 0, 0, 128, 0, 0, 170, - 128, 4, 0, 0, 4, 0, - 0, 3, 224, 0, 0, 228, - 144, 1, 0, 238, 160, 1, - 0, 228, 160, 6, 0, 0, - 2, 0, 0, 1, 128, 1, - 0, 255, 128, 5, 0, 0, - 3, 1, 0, 7, 128, 0, - 0, 0, 128, 1, 0, 228, - 128, 2, 0, 0, 3, 0, - 0, 15, 128, 1, 0, 228, - 128, 7, 0, 228, 161, 5, - 0, 0, 3, 0, 0, 7, - 128, 0, 0, 255, 128, 0, - 0, 228, 128, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 85, 128, 9, 0, 228, - 160, 4, 0, 0, 4, 1, - 0, 15, 128, 8, 0, 228, - 160, 0, 0, 0, 128, 1, - 0, 228, 128, 4, 0, 0, - 4, 1, 0, 15, 128, 10, - 0, 228, 160, 0, 0, 170, - 128, 1, 0, 228, 128, 4, - 0, 0, 4, 0, 0, 15, - 128, 11, 0, 228, 160, 0, - 0, 255, 128, 1, 0, 228, - 128, 4, 0, 0, 4, 0, - 0, 3, 192, 0, 0, 255, - 128, 0, 0, 228, 160, 0, - 0, 228, 128, 1, 0, 0, - 2, 0, 0, 12, 192, 0, - 0, 228, 128, 255, 255, 0, - 0, 83, 72, 68, 82, 132, - 2, 0, 0, 64, 0, 1, - 0, 161, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 0, 0, 0, 0, 8, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 1, - 0, 0, 0, 1, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 2, 0, 0, - 0, 4, 0, 0, 0, 95, - 0, 0, 3, 50, 16, 16, - 0, 0, 0, 0, 0, 103, - 0, 0, 4, 242, 32, 16, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 50, 32, 16, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 194, 32, 16, 0, 1, - 0, 0, 0, 104, 0, 0, - 2, 2, 0, 0, 0, 50, - 0, 0, 11, 50, 0, 16, - 0, 0, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 56, 0, 0, 8, 242, - 0, 16, 0, 1, 0, 0, - 0, 86, 5, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 5, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 4, - 0, 0, 0, 6, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 0, 0, 0, 8, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 14, 0, 0, - 7, 114, 0, 16, 0, 1, - 0, 0, 0, 70, 2, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 54, 0, 0, 5, 130, - 0, 16, 0, 1, 0, 0, - 0, 58, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, - 9, 50, 0, 16, 0, 0, - 0, 0, 0, 70, 0, 16, - 0, 0, 0, 0, 0, 70, - 128, 32, 128, 65, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 14, 0, 0, - 8, 194, 32, 16, 0, 1, - 0, 0, 0, 6, 4, 16, - 0, 0, 0, 0, 0, 166, - 142, 32, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 9, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 70, 142, 32, 128, 65, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 56, - 0, 0, 7, 114, 0, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 70, 2, 16, 0, 0, - 0, 0, 0, 56, 0, 0, - 8, 242, 0, 16, 0, 1, - 0, 0, 0, 86, 5, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 50, - 0, 0, 10, 242, 0, 16, - 0, 1, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 6, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 1, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 2, - 0, 0, 0, 166, 10, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 50, 0, 0, 10, 242, - 32, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 3, 0, 0, - 0, 246, 15, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 50, - 0, 0, 11, 50, 32, 16, - 0, 1, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 62, 0, 0, 1, 83, - 84, 65, 84, 116, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 14, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 148, 2, 0, 0, 3, - 0, 0, 0, 168, 0, 0, - 0, 3, 0, 0, 0, 28, - 0, 0, 0, 0, 4, 254, - 255, 0, 1, 0, 0, 96, - 2, 0, 0, 124, 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, 133, - 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, 0, 0, 0, - 0, 152, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 80, 101, 114, - 76, 97, 121, 101, 114, 0, - 80, 101, 114, 79, 99, 99, - 97, 115, 105, 111, 110, 97, - 108, 76, 97, 121, 101, 114, - 0, 80, 101, 114, 76, 97, - 121, 101, 114, 77, 97, 110, - 97, 103, 101, 114, 0, 124, - 0, 0, 0, 5, 0, 0, - 0, 240, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 133, - 0, 0, 0, 2, 0, 0, - 0, 220, 1, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, - 0, 0, 0, 1, 0, 0, - 0, 60, 2, 0, 0, 64, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 104, - 1, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 136, - 1, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 147, - 1, 0, 0, 32, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 157, - 1, 0, 0, 48, 0, 0, - 0, 4, 0, 0, 0, 0, - 0, 0, 0, 172, 1, 0, - 0, 0, 0, 0, 0, 188, - 1, 0, 0, 64, 0, 0, - 0, 64, 0, 0, 0, 2, - 0, 0, 0, 204, 1, 0, - 0, 0, 0, 0, 0, 118, - 84, 101, 120, 116, 117, 114, - 101, 67, 111, 111, 114, 100, - 115, 0, 171, 1, 0, 3, - 0, 1, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 118, 76, 97, 121, 101, - 114, 81, 117, 97, 100, 0, - 118, 77, 97, 115, 107, 81, - 117, 97, 100, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 0, 0, 3, 0, 1, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 12, 2, 0, 0, 0, - 0, 0, 0, 16, 0, 0, - 0, 2, 0, 0, 0, 32, - 2, 0, 0, 0, 0, 0, - 0, 48, 2, 0, 0, 16, - 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 32, - 2, 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, 0, - 0, 0, 0, 0, 0, 0, - 0, 102, 76, 97, 121, 101, - 114, 67, 111, 108, 111, 114, - 0, 84, 2, 0, 0, 0, - 0, 0, 0, 64, 0, 0, - 0, 2, 0, 0, 0, 204, - 1, 0, 0, 0, 0, 0, - 0, 109, 80, 114, 111, 106, - 101, 99, 116, 105, 111, 110, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 171, 73, - 83, 71, 78, 44, 0, 0, - 0, 1, 0, 0, 0, 8, - 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 3, - 3, 0, 0, 80, 79, 83, - 73, 84, 73, 79, 78, 0, - 171, 171, 171, 79, 83, 71, - 78, 104, 0, 0, 0, 3, - 0, 0, 0, 8, 0, 0, - 0, 80, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, - 0, 92, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 3, 12, 0, - 0, 92, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 12, 3, 0, - 0, 83, 86, 95, 80, 111, - 115, 105, 116, 105, 111, 110, - 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 171, 171, - 171, 29, 196, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 40, 5, 0, - 0, 68, 88, 66, 67, 134, - 242, 22, 210, 198, 226, 208, - 239, 25, 201, 212, 19, 217, - 12, 67, 204, 1, 0, 0, - 0, 40, 5, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 252, 0, 0, 0, 252, - 1, 0, 0, 120, 2, 0, - 0, 132, 4, 0, 0, 244, - 4, 0, 0, 65, 111, 110, - 57, 188, 0, 0, 0, 188, - 0, 0, 0, 0, 2, 255, - 255, 132, 0, 0, 0, 56, - 0, 0, 0, 1, 0, 44, - 0, 0, 0, 56, 0, 0, - 0, 56, 0, 2, 0, 36, - 0, 0, 0, 56, 0, 0, - 0, 0, 0, 1, 0, 1, - 0, 0, 0, 3, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 2, 255, 255, 31, - 0, 0, 2, 0, 0, 0, - 128, 0, 0, 15, 176, 31, - 0, 0, 2, 0, 0, 0, - 144, 0, 8, 15, 160, 31, - 0, 0, 2, 0, 0, 0, - 144, 1, 8, 15, 160, 1, - 0, 0, 2, 0, 0, 3, - 128, 0, 0, 235, 176, 66, - 0, 0, 3, 1, 0, 15, - 128, 0, 0, 228, 176, 0, - 8, 228, 160, 66, 0, 0, - 3, 0, 0, 15, 128, 0, - 0, 228, 128, 1, 8, 228, - 160, 5, 0, 0, 3, 1, - 0, 15, 128, 1, 0, 228, - 128, 0, 0, 0, 160, 5, - 0, 0, 3, 0, 0, 15, - 128, 0, 0, 255, 128, 1, - 0, 228, 128, 1, 0, 0, - 2, 0, 8, 15, 128, 0, - 0, 228, 128, 255, 255, 0, - 0, 83, 72, 68, 82, 248, - 0, 0, 0, 64, 0, 0, - 0, 62, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 0, 0, 0, 0, 4, - 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, 1, 0, 0, - 0, 85, 85, 0, 0, 98, - 16, 0, 3, 50, 16, 16, - 0, 1, 0, 0, 0, 98, - 16, 0, 3, 194, 16, 16, - 0, 1, 0, 0, 0, 101, - 0, 0, 3, 242, 32, 16, - 0, 0, 0, 0, 0, 104, - 0, 0, 2, 2, 0, 0, - 0, 69, 0, 0, 9, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 16, 16, 0, 1, - 0, 0, 0, 70, 126, 16, - 0, 0, 0, 0, 0, 0, - 96, 16, 0, 0, 0, 0, - 0, 56, 0, 0, 8, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 6, 128, 32, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 69, 0, 0, - 9, 242, 0, 16, 0, 1, - 0, 0, 0, 230, 26, 16, - 0, 1, 0, 0, 0, 70, - 126, 16, 0, 1, 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, 246, - 15, 16, 0, 1, 0, 0, - 0, 62, 0, 0, 1, 83, - 84, 65, 84, 116, 0, 0, - 0, 5, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 82, 68, 69, - 70, 4, 2, 0, 0, 1, - 0, 0, 0, 204, 0, 0, - 0, 4, 0, 0, 0, 28, - 0, 0, 0, 0, 4, 255, - 255, 0, 1, 0, 0, 208, - 1, 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, 0, 0, 0, 0, 182, - 0, 0, 0, 2, 0, 0, - 0, 5, 0, 0, 0, 4, - 0, 0, 0, 255, 255, 255, - 255, 0, 0, 0, 0, 1, - 0, 0, 0, 12, 0, 0, - 0, 187, 0, 0, 0, 2, - 0, 0, 0, 5, 0, 0, - 0, 4, 0, 0, 0, 255, - 255, 255, 255, 1, 0, 0, - 0, 1, 0, 0, 0, 12, - 0, 0, 0, 193, 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, 76, - 97, 121, 101, 114, 84, 101, - 120, 116, 117, 114, 101, 83, - 97, 109, 112, 108, 101, 114, - 76, 105, 110, 101, 97, 114, - 0, 116, 82, 71, 66, 0, - 116, 77, 97, 115, 107, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 0, 171, 171, 193, - 0, 0, 0, 5, 0, 0, - 0, 228, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 92, - 1, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 108, 1, 0, - 0, 0, 0, 0, 0, 124, - 1, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 108, 1, 0, - 0, 0, 0, 0, 0, 135, - 1, 0, 0, 32, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 108, 1, 0, - 0, 0, 0, 0, 0, 145, - 1, 0, 0, 48, 0, 0, - 0, 4, 0, 0, 0, 2, - 0, 0, 0, 160, 1, 0, - 0, 0, 0, 0, 0, 176, - 1, 0, 0, 64, 0, 0, - 0, 64, 0, 0, 0, 0, - 0, 0, 0, 192, 1, 0, - 0, 0, 0, 0, 0, 118, - 84, 101, 120, 116, 117, 114, - 101, 67, 111, 111, 114, 100, - 115, 0, 171, 1, 0, 3, - 0, 1, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 118, 76, 97, 121, 101, - 114, 81, 117, 97, 100, 0, - 118, 77, 97, 115, 107, 81, - 117, 97, 100, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 0, 0, 3, 0, 1, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 171, 73, - 83, 71, 78, 104, 0, 0, - 0, 3, 0, 0, 0, 8, - 0, 0, 0, 80, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 15, - 0, 0, 0, 92, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 1, 0, 0, 0, 3, - 3, 0, 0, 92, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 1, 0, 0, 0, 12, - 12, 0, 0, 83, 86, 95, - 80, 111, 115, 105, 116, 105, - 111, 110, 0, 84, 69, 88, - 67, 79, 79, 82, 68, 0, - 171, 171, 171, 79, 83, 71, - 78, 44, 0, 0, 0, 1, - 0, 0, 0, 8, 0, 0, - 0, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, - 0, 83, 86, 95, 84, 97, - 114, 103, 101, 116, 0, 171, - 171, 129, 204, 0, 0, 0, - 0, 0, 0, 82, 101, 110, - 100, 101, 114, 82, 71, 66, - 65, 76, 97, 121, 101, 114, - 80, 114, 101, 109, 117, 108, - 80, 111, 105, 110, 116, 77, - 97, 115, 107, 0, 4, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 255, 255, 255, 255, 76, 8, - 0, 0, 68, 88, 66, 67, - 190, 117, 181, 57, 187, 108, - 178, 85, 11, 114, 197, 104, - 54, 155, 141, 115, 1, 0, - 0, 0, 76, 8, 0, 0, - 6, 0, 0, 0, 56, 0, - 0, 0, 4, 2, 0, 0, - 144, 4, 0, 0, 12, 5, - 0, 0, 168, 7, 0, 0, - 220, 7, 0, 0, 65, 111, - 110, 57, 196, 1, 0, 0, - 196, 1, 0, 0, 0, 2, - 254, 255, 96, 1, 0, 0, - 100, 0, 0, 0, 5, 0, - 36, 0, 0, 0, 96, 0, - 0, 0, 96, 0, 0, 0, - 36, 0, 1, 0, 96, 0, - 0, 0, 0, 0, 3, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 2, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 7, 0, 1, 0, - 6, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 7, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 4, 0, - 8, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, - 254, 255, 31, 0, 0, 2, - 5, 0, 0, 128, 0, 0, - 15, 144, 6, 0, 0, 2, - 0, 0, 1, 128, 3, 0, - 170, 160, 4, 0, 0, 4, - 0, 0, 6, 128, 0, 0, - 208, 144, 2, 0, 248, 160, - 2, 0, 208, 160, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 170, 128, 5, 0, - 228, 160, 4, 0, 0, 4, - 1, 0, 15, 128, 4, 0, - 228, 160, 0, 0, 85, 128, - 1, 0, 228, 128, 2, 0, - 0, 3, 1, 0, 15, 128, - 1, 0, 228, 128, 6, 0, - 228, 160, 2, 0, 0, 3, - 0, 0, 6, 128, 1, 0, - 208, 128, 3, 0, 208, 161, - 5, 0, 0, 3, 0, 0, - 8, 224, 0, 0, 0, 128, - 0, 0, 85, 128, 6, 0, - 0, 2, 0, 0, 1, 128, - 3, 0, 255, 160, 5, 0, - 0, 3, 0, 0, 4, 224, - 0, 0, 0, 128, 0, 0, - 170, 128, 4, 0, 0, 4, - 0, 0, 3, 224, 0, 0, - 228, 144, 1, 0, 238, 160, - 1, 0, 228, 160, 6, 0, - 0, 2, 0, 0, 1, 128, - 1, 0, 255, 128, 5, 0, - 0, 3, 1, 0, 7, 128, - 0, 0, 0, 128, 1, 0, - 228, 128, 2, 0, 0, 3, - 0, 0, 15, 128, 1, 0, - 228, 128, 7, 0, 228, 161, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 255, 128, - 0, 0, 228, 128, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 85, 128, 9, 0, - 228, 160, 4, 0, 0, 4, - 1, 0, 15, 128, 8, 0, - 228, 160, 0, 0, 0, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 1, 0, 15, 128, - 10, 0, 228, 160, 0, 0, - 170, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 15, 128, 11, 0, 228, 160, - 0, 0, 255, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 3, 192, 0, 0, - 255, 128, 0, 0, 228, 160, - 0, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 12, 192, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 132, 2, 0, 0, 64, 0, - 1, 0, 161, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 8, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 2, 0, - 0, 0, 4, 0, 0, 0, - 95, 0, 0, 3, 50, 16, - 16, 0, 0, 0, 0, 0, - 103, 0, 0, 4, 242, 32, - 16, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 50, 32, 16, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 194, 32, 16, 0, - 1, 0, 0, 0, 104, 0, - 0, 2, 2, 0, 0, 0, - 50, 0, 0, 11, 50, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 1, 0, - 0, 0, 86, 5, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 6, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 8, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 14, 0, - 0, 7, 114, 0, 16, 0, - 1, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, - 130, 0, 16, 0, 1, 0, - 0, 0, 58, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 0, 9, 50, 0, 16, 0, - 0, 0, 0, 0, 70, 0, - 16, 0, 0, 0, 0, 0, - 70, 128, 32, 128, 65, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 14, 0, - 0, 8, 194, 32, 16, 0, - 1, 0, 0, 0, 6, 4, - 16, 0, 0, 0, 0, 0, - 166, 142, 32, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 70, 142, 32, 128, - 65, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 114, 0, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 1, 0, 0, 0, 86, 5, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 6, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 1, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 166, 10, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 32, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 3, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 11, 50, 32, - 16, 0, 1, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 148, 2, 0, 0, - 3, 0, 0, 0, 168, 0, - 0, 0, 3, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 254, 255, 0, 1, 0, 0, - 96, 2, 0, 0, 124, 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, - 133, 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, 0, 0, - 0, 0, 152, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 0, 80, 101, 114, 79, 99, - 99, 97, 115, 105, 111, 110, - 97, 108, 76, 97, 121, 101, - 114, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 77, 97, - 110, 97, 103, 101, 114, 0, - 124, 0, 0, 0, 5, 0, - 0, 0, 240, 0, 0, 0, - 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 133, 0, 0, 0, 2, 0, - 0, 0, 220, 1, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 152, 0, 0, 0, 1, 0, - 0, 0, 60, 2, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 104, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 147, 1, 0, 0, 32, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 157, 1, 0, 0, 48, 0, - 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 172, 1, - 0, 0, 0, 0, 0, 0, - 188, 1, 0, 0, 64, 0, - 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 204, 1, - 0, 0, 0, 0, 0, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 12, 2, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 32, 2, 0, 0, 0, 0, - 0, 0, 48, 2, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 32, 2, 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, - 0, 0, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 67, 111, 108, 111, - 114, 0, 84, 2, 0, 0, - 0, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 204, 1, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 77, 105, 99, 114, - 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, - 100, 101, 114, 32, 67, 111, - 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, - 51, 56, 52, 0, 171, 171, - 73, 83, 71, 78, 44, 0, - 0, 0, 1, 0, 0, 0, - 8, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 3, 3, 0, 0, 80, 79, - 83, 73, 84, 73, 79, 78, - 0, 171, 171, 171, 79, 83, - 71, 78, 104, 0, 0, 0, - 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 92, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 12, - 0, 0, 92, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 12, 3, - 0, 0, 83, 86, 95, 80, - 111, 115, 105, 116, 105, 111, - 110, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, - 171, 171, 4, 210, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 108, 5, - 0, 0, 68, 88, 66, 67, - 186, 119, 163, 245, 195, 113, - 37, 97, 142, 174, 157, 244, - 160, 5, 164, 176, 1, 0, - 0, 0, 108, 5, 0, 0, - 6, 0, 0, 0, 56, 0, - 0, 0, 252, 0, 0, 0, - 8, 2, 0, 0, 132, 2, - 0, 0, 200, 4, 0, 0, - 56, 5, 0, 0, 65, 111, - 110, 57, 188, 0, 0, 0, - 188, 0, 0, 0, 0, 2, - 255, 255, 132, 0, 0, 0, - 56, 0, 0, 0, 1, 0, - 44, 0, 0, 0, 56, 0, - 0, 0, 56, 0, 2, 0, - 36, 0, 0, 0, 56, 0, - 1, 0, 0, 0, 0, 1, - 1, 0, 0, 0, 3, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 255, 255, - 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 15, 176, - 31, 0, 0, 2, 0, 0, - 0, 144, 0, 8, 15, 160, - 31, 0, 0, 2, 0, 0, - 0, 144, 1, 8, 15, 160, - 1, 0, 0, 2, 0, 0, - 3, 128, 0, 0, 235, 176, - 66, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 228, 176, - 1, 8, 228, 160, 66, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 0, 8, - 228, 160, 5, 0, 0, 3, - 1, 0, 15, 128, 1, 0, - 228, 128, 0, 0, 0, 160, - 5, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 255, 128, - 1, 0, 228, 128, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 4, 1, 0, 0, 64, 0, - 0, 0, 65, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, - 0, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, - 1, 0, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, - 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 1, 0, - 0, 0, 85, 85, 0, 0, - 98, 16, 0, 3, 50, 16, - 16, 0, 1, 0, 0, 0, - 98, 16, 0, 3, 194, 16, - 16, 0, 1, 0, 0, 0, - 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, - 104, 0, 0, 2, 2, 0, - 0, 0, 69, 0, 0, 9, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, - 1, 0, 0, 0, 70, 126, - 16, 0, 0, 0, 0, 0, - 0, 96, 16, 0, 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, - 3, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, - 1, 0, 0, 0, 230, 26, - 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 1, 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, - 246, 15, 16, 0, 1, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 5, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, - 69, 70, 60, 2, 0, 0, - 1, 0, 0, 0, 4, 1, - 0, 0, 5, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 255, 255, 0, 1, 0, 0, - 8, 2, 0, 0, 188, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 214, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 239, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 0, 0, - 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 244, 0, - 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, - 250, 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, 76, 97, 121, 101, - 114, 84, 101, 120, 116, 117, - 114, 101, 83, 97, 109, 112, - 108, 101, 114, 76, 105, 110, - 101, 97, 114, 0, 76, 97, - 121, 101, 114, 84, 101, 120, - 116, 117, 114, 101, 83, 97, - 109, 112, 108, 101, 114, 80, - 111, 105, 110, 116, 0, 116, - 82, 71, 66, 0, 116, 77, - 97, 115, 107, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 0, 171, 250, 0, 0, 0, - 5, 0, 0, 0, 28, 1, - 0, 0, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 148, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 164, 1, 0, 0, 0, 0, - 0, 0, 180, 1, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 164, 1, 0, 0, 0, 0, - 0, 0, 191, 1, 0, 0, - 32, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 164, 1, 0, 0, 0, 0, - 0, 0, 201, 1, 0, 0, - 48, 0, 0, 0, 4, 0, - 0, 0, 2, 0, 0, 0, - 216, 1, 0, 0, 0, 0, - 0, 0, 232, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 248, 1, 0, 0, 0, 0, - 0, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 102, 76, 97, 121, 101, - 114, 79, 112, 97, 99, 105, - 116, 121, 0, 171, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 104, 0, 0, 0, 3, 0, - 0, 0, 8, 0, 0, 0, - 80, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 92, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 3, 3, 0, 0, - 92, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 12, 12, 0, 0, - 83, 86, 95, 80, 111, 115, - 105, 116, 105, 111, 110, 0, - 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, - 79, 83, 71, 78, 44, 0, - 0, 0, 1, 0, 0, 0, - 8, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 83, 86, - 95, 84, 97, 114, 103, 101, - 116, 0, 171, 171, 104, 218, - 0, 0, 0, 0, 0, 0, - 82, 101, 110, 100, 101, 114, - 82, 71, 66, 65, 76, 97, - 121, 101, 114, 78, 111, 110, - 80, 114, 101, 109, 117, 108, - 80, 111, 105, 110, 116, 77, - 97, 115, 107, 0, 4, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 255, 255, 255, 255, 76, 8, - 0, 0, 68, 88, 66, 67, - 190, 117, 181, 57, 187, 108, - 178, 85, 11, 114, 197, 104, - 54, 155, 141, 115, 1, 0, - 0, 0, 76, 8, 0, 0, - 6, 0, 0, 0, 56, 0, - 0, 0, 4, 2, 0, 0, - 144, 4, 0, 0, 12, 5, - 0, 0, 168, 7, 0, 0, - 220, 7, 0, 0, 65, 111, - 110, 57, 196, 1, 0, 0, - 196, 1, 0, 0, 0, 2, - 254, 255, 96, 1, 0, 0, - 100, 0, 0, 0, 5, 0, - 36, 0, 0, 0, 96, 0, - 0, 0, 96, 0, 0, 0, - 36, 0, 1, 0, 96, 0, - 0, 0, 0, 0, 3, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 2, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 7, 0, 1, 0, - 6, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, - 7, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 4, 0, - 8, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, - 254, 255, 31, 0, 0, 2, - 5, 0, 0, 128, 0, 0, - 15, 144, 6, 0, 0, 2, - 0, 0, 1, 128, 3, 0, - 170, 160, 4, 0, 0, 4, - 0, 0, 6, 128, 0, 0, - 208, 144, 2, 0, 248, 160, - 2, 0, 208, 160, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 170, 128, 5, 0, - 228, 160, 4, 0, 0, 4, - 1, 0, 15, 128, 4, 0, - 228, 160, 0, 0, 85, 128, - 1, 0, 228, 128, 2, 0, - 0, 3, 1, 0, 15, 128, - 1, 0, 228, 128, 6, 0, - 228, 160, 2, 0, 0, 3, - 0, 0, 6, 128, 1, 0, - 208, 128, 3, 0, 208, 161, - 5, 0, 0, 3, 0, 0, - 8, 224, 0, 0, 0, 128, - 0, 0, 85, 128, 6, 0, - 0, 2, 0, 0, 1, 128, - 3, 0, 255, 160, 5, 0, - 0, 3, 0, 0, 4, 224, - 0, 0, 0, 128, 0, 0, - 170, 128, 4, 0, 0, 4, - 0, 0, 3, 224, 0, 0, - 228, 144, 1, 0, 238, 160, - 1, 0, 228, 160, 6, 0, - 0, 2, 0, 0, 1, 128, - 1, 0, 255, 128, 5, 0, - 0, 3, 1, 0, 7, 128, - 0, 0, 0, 128, 1, 0, - 228, 128, 2, 0, 0, 3, - 0, 0, 15, 128, 1, 0, - 228, 128, 7, 0, 228, 161, - 5, 0, 0, 3, 0, 0, - 7, 128, 0, 0, 255, 128, - 0, 0, 228, 128, 5, 0, - 0, 3, 1, 0, 15, 128, - 0, 0, 85, 128, 9, 0, - 228, 160, 4, 0, 0, 4, - 1, 0, 15, 128, 8, 0, - 228, 160, 0, 0, 0, 128, - 1, 0, 228, 128, 4, 0, - 0, 4, 1, 0, 15, 128, - 10, 0, 228, 160, 0, 0, - 170, 128, 1, 0, 228, 128, - 4, 0, 0, 4, 0, 0, - 15, 128, 11, 0, 228, 160, - 0, 0, 255, 128, 1, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 3, 192, 0, 0, - 255, 128, 0, 0, 228, 160, - 0, 0, 228, 128, 1, 0, - 0, 2, 0, 0, 12, 192, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 132, 2, 0, 0, 64, 0, - 1, 0, 161, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 8, 0, 0, 0, 89, 0, - 0, 4, 70, 142, 32, 0, - 1, 0, 0, 0, 1, 0, - 0, 0, 89, 0, 0, 4, - 70, 142, 32, 0, 2, 0, - 0, 0, 4, 0, 0, 0, - 95, 0, 0, 3, 50, 16, - 16, 0, 0, 0, 0, 0, - 103, 0, 0, 4, 242, 32, - 16, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 50, 32, 16, 0, - 1, 0, 0, 0, 101, 0, - 0, 3, 194, 32, 16, 0, - 1, 0, 0, 0, 104, 0, - 0, 2, 2, 0, 0, 0, - 50, 0, 0, 11, 50, 0, - 16, 0, 0, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 56, 0, 0, 8, - 242, 0, 16, 0, 1, 0, - 0, 0, 86, 5, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 6, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 0, 0, 0, 8, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 0, 0, 0, 0, 70, 142, - 32, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 14, 0, - 0, 7, 114, 0, 16, 0, - 1, 0, 0, 0, 70, 2, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 54, 0, 0, 5, - 130, 0, 16, 0, 1, 0, - 0, 0, 58, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 0, 9, 50, 0, 16, 0, - 0, 0, 0, 0, 70, 0, - 16, 0, 0, 0, 0, 0, - 70, 128, 32, 128, 65, 0, - 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 14, 0, - 0, 8, 194, 32, 16, 0, - 1, 0, 0, 0, 6, 4, - 16, 0, 0, 0, 0, 0, - 166, 142, 32, 0, 0, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 9, 242, 0, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 70, 142, 32, 128, - 65, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 56, 0, 0, 7, 114, 0, - 16, 0, 0, 0, 0, 0, - 246, 15, 16, 0, 0, 0, - 0, 0, 70, 2, 16, 0, - 0, 0, 0, 0, 56, 0, - 0, 8, 242, 0, 16, 0, - 1, 0, 0, 0, 86, 5, - 16, 0, 0, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 50, 0, 0, 10, 242, 0, - 16, 0, 1, 0, 0, 0, - 70, 142, 32, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 6, 0, 16, 0, 0, 0, - 0, 0, 70, 14, 16, 0, - 1, 0, 0, 0, 50, 0, - 0, 10, 242, 0, 16, 0, - 1, 0, 0, 0, 70, 142, - 32, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 166, 10, - 16, 0, 0, 0, 0, 0, - 70, 14, 16, 0, 1, 0, - 0, 0, 50, 0, 0, 10, - 242, 32, 16, 0, 0, 0, - 0, 0, 70, 142, 32, 0, - 2, 0, 0, 0, 3, 0, - 0, 0, 246, 15, 16, 0, - 0, 0, 0, 0, 70, 14, - 16, 0, 1, 0, 0, 0, - 50, 0, 0, 11, 50, 32, - 16, 0, 1, 0, 0, 0, - 70, 16, 16, 0, 0, 0, - 0, 0, 230, 138, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 70, 128, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, - 14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 148, 2, 0, 0, - 3, 0, 0, 0, 168, 0, - 0, 0, 3, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 254, 255, 0, 1, 0, 0, - 96, 2, 0, 0, 124, 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, - 133, 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, 0, 0, - 0, 0, 152, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 0, 80, 101, 114, 79, 99, - 99, 97, 115, 105, 111, 110, - 97, 108, 76, 97, 121, 101, - 114, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 77, 97, - 110, 97, 103, 101, 114, 0, - 124, 0, 0, 0, 5, 0, - 0, 0, 240, 0, 0, 0, - 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 133, 0, 0, 0, 2, 0, - 0, 0, 220, 1, 0, 0, - 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 152, 0, 0, 0, 1, 0, - 0, 0, 60, 2, 0, 0, - 64, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 104, 1, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 136, 1, 0, 0, 16, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 147, 1, 0, 0, 32, 0, - 0, 0, 16, 0, 0, 0, - 2, 0, 0, 0, 120, 1, - 0, 0, 0, 0, 0, 0, - 157, 1, 0, 0, 48, 0, - 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 172, 1, - 0, 0, 0, 0, 0, 0, - 188, 1, 0, 0, 64, 0, - 0, 0, 64, 0, 0, 0, - 2, 0, 0, 0, 204, 1, - 0, 0, 0, 0, 0, 0, - 118, 84, 101, 120, 116, 117, - 114, 101, 67, 111, 111, 114, - 100, 115, 0, 171, 1, 0, - 3, 0, 1, 0, 4, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 118, 76, 97, 121, - 101, 114, 81, 117, 97, 100, - 0, 118, 77, 97, 115, 107, - 81, 117, 97, 100, 0, 102, - 76, 97, 121, 101, 114, 79, - 112, 97, 99, 105, 116, 121, - 0, 171, 0, 0, 3, 0, - 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 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, 12, 2, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 2, 0, 0, 0, - 32, 2, 0, 0, 0, 0, - 0, 0, 48, 2, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 32, 2, 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, - 0, 0, 0, 0, 0, 0, - 0, 0, 102, 76, 97, 121, - 101, 114, 67, 111, 108, 111, - 114, 0, 84, 2, 0, 0, - 0, 0, 0, 0, 64, 0, - 0, 0, 2, 0, 0, 0, - 204, 1, 0, 0, 0, 0, - 0, 0, 109, 80, 114, 111, - 106, 101, 99, 116, 105, 111, - 110, 0, 77, 105, 99, 114, - 111, 115, 111, 102, 116, 32, - 40, 82, 41, 32, 72, 76, - 83, 76, 32, 83, 104, 97, - 100, 101, 114, 32, 67, 111, - 109, 112, 105, 108, 101, 114, - 32, 54, 46, 51, 46, 57, - 54, 48, 48, 46, 49, 54, - 51, 56, 52, 0, 171, 171, - 73, 83, 71, 78, 44, 0, - 0, 0, 1, 0, 0, 0, - 8, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 3, 3, 0, 0, 80, 79, - 83, 73, 84, 73, 79, 78, - 0, 171, 171, 171, 79, 83, - 71, 78, 104, 0, 0, 0, - 3, 0, 0, 0, 8, 0, - 0, 0, 80, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 15, 0, - 0, 0, 92, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 3, 12, - 0, 0, 92, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 1, 0, 0, 0, 12, 3, - 0, 0, 83, 86, 95, 80, - 111, 115, 105, 116, 105, 111, - 110, 0, 84, 69, 88, 67, - 79, 79, 82, 68, 0, 171, - 171, 171, 50, 224, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 108, 5, - 0, 0, 68, 88, 66, 67, - 186, 119, 163, 245, 195, 113, - 37, 97, 142, 174, 157, 244, - 160, 5, 164, 176, 1, 0, - 0, 0, 108, 5, 0, 0, - 6, 0, 0, 0, 56, 0, - 0, 0, 252, 0, 0, 0, - 8, 2, 0, 0, 132, 2, - 0, 0, 200, 4, 0, 0, - 56, 5, 0, 0, 65, 111, - 110, 57, 188, 0, 0, 0, - 188, 0, 0, 0, 0, 2, - 255, 255, 132, 0, 0, 0, - 56, 0, 0, 0, 1, 0, - 44, 0, 0, 0, 56, 0, - 0, 0, 56, 0, 2, 0, - 36, 0, 0, 0, 56, 0, - 1, 0, 0, 0, 0, 1, - 1, 0, 0, 0, 3, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 255, 255, - 31, 0, 0, 2, 0, 0, - 0, 128, 0, 0, 15, 176, - 31, 0, 0, 2, 0, 0, - 0, 144, 0, 8, 15, 160, - 31, 0, 0, 2, 0, 0, - 0, 144, 1, 8, 15, 160, - 1, 0, 0, 2, 0, 0, - 3, 128, 0, 0, 235, 176, - 66, 0, 0, 3, 1, 0, - 15, 128, 0, 0, 228, 176, - 1, 8, 228, 160, 66, 0, - 0, 3, 0, 0, 15, 128, - 0, 0, 228, 128, 0, 8, - 228, 160, 5, 0, 0, 3, - 1, 0, 15, 128, 1, 0, - 228, 128, 0, 0, 0, 160, - 5, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 255, 128, - 1, 0, 228, 128, 1, 0, - 0, 2, 0, 8, 15, 128, - 0, 0, 228, 128, 255, 255, - 0, 0, 83, 72, 68, 82, - 4, 1, 0, 0, 64, 0, - 0, 0, 65, 0, 0, 0, - 89, 0, 0, 4, 70, 142, - 32, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, - 0, 0, 0, 0, 90, 0, - 0, 3, 0, 96, 16, 0, - 1, 0, 0, 0, 88, 24, - 0, 4, 0, 112, 16, 0, - 0, 0, 0, 0, 85, 85, - 0, 0, 88, 24, 0, 4, - 0, 112, 16, 0, 1, 0, - 0, 0, 85, 85, 0, 0, - 98, 16, 0, 3, 50, 16, - 16, 0, 1, 0, 0, 0, - 98, 16, 0, 3, 194, 16, - 16, 0, 1, 0, 0, 0, - 101, 0, 0, 3, 242, 32, - 16, 0, 0, 0, 0, 0, - 104, 0, 0, 2, 2, 0, - 0, 0, 69, 0, 0, 9, - 242, 0, 16, 0, 0, 0, - 0, 0, 70, 16, 16, 0, - 1, 0, 0, 0, 70, 126, - 16, 0, 0, 0, 0, 0, - 0, 96, 16, 0, 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, - 3, 0, 0, 0, 69, 0, - 0, 9, 242, 0, 16, 0, - 1, 0, 0, 0, 230, 26, - 16, 0, 1, 0, 0, 0, - 70, 126, 16, 0, 1, 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, - 246, 15, 16, 0, 1, 0, - 0, 0, 62, 0, 0, 1, - 83, 84, 65, 84, 116, 0, - 0, 0, 5, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 0, 0, - 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 68, - 69, 70, 60, 2, 0, 0, - 1, 0, 0, 0, 4, 1, - 0, 0, 5, 0, 0, 0, - 28, 0, 0, 0, 0, 4, - 255, 255, 0, 1, 0, 0, - 8, 2, 0, 0, 188, 0, - 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 214, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 0, 0, - 0, 0, 239, 0, 0, 0, - 2, 0, 0, 0, 5, 0, - 0, 0, 4, 0, 0, 0, - 255, 255, 255, 255, 0, 0, - 0, 0, 1, 0, 0, 0, - 12, 0, 0, 0, 244, 0, - 0, 0, 2, 0, 0, 0, - 5, 0, 0, 0, 4, 0, - 0, 0, 255, 255, 255, 255, - 1, 0, 0, 0, 1, 0, - 0, 0, 12, 0, 0, 0, - 250, 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, 76, 97, 121, 101, - 114, 84, 101, 120, 116, 117, - 114, 101, 83, 97, 109, 112, - 108, 101, 114, 76, 105, 110, - 101, 97, 114, 0, 76, 97, - 121, 101, 114, 84, 101, 120, - 116, 117, 114, 101, 83, 97, - 109, 112, 108, 101, 114, 80, - 111, 105, 110, 116, 0, 116, - 82, 71, 66, 0, 116, 77, - 97, 115, 107, 0, 80, 101, - 114, 76, 97, 121, 101, 114, - 0, 171, 250, 0, 0, 0, - 5, 0, 0, 0, 28, 1, - 0, 0, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 148, 1, 0, 0, - 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 164, 1, 0, 0, 0, 0, - 0, 0, 180, 1, 0, 0, - 16, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 164, 1, 0, 0, 0, 0, - 0, 0, 191, 1, 0, 0, - 32, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, - 164, 1, 0, 0, 0, 0, - 0, 0, 201, 1, 0, 0, - 48, 0, 0, 0, 4, 0, - 0, 0, 2, 0, 0, 0, - 216, 1, 0, 0, 0, 0, - 0, 0, 232, 1, 0, 0, - 64, 0, 0, 0, 64, 0, - 0, 0, 0, 0, 0, 0, - 248, 1, 0, 0, 0, 0, - 0, 0, 118, 84, 101, 120, - 116, 117, 114, 101, 67, 111, - 111, 114, 100, 115, 0, 171, - 1, 0, 3, 0, 1, 0, - 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 76, - 97, 121, 101, 114, 81, 117, - 97, 100, 0, 118, 77, 97, - 115, 107, 81, 117, 97, 100, - 0, 102, 76, 97, 121, 101, - 114, 79, 112, 97, 99, 105, - 116, 121, 0, 171, 0, 0, - 3, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 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, 77, 105, - 99, 114, 111, 115, 111, 102, - 116, 32, 40, 82, 41, 32, - 72, 76, 83, 76, 32, 83, - 104, 97, 100, 101, 114, 32, - 67, 111, 109, 112, 105, 108, - 101, 114, 32, 54, 46, 51, - 46, 57, 54, 48, 48, 46, - 49, 54, 51, 56, 52, 0, - 171, 171, 73, 83, 71, 78, - 104, 0, 0, 0, 3, 0, - 0, 0, 8, 0, 0, 0, - 80, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, - 3, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, - 92, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 3, 3, 0, 0, - 92, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 1, 0, - 0, 0, 12, 12, 0, 0, - 83, 86, 95, 80, 111, 115, - 105, 116, 105, 111, 110, 0, - 84, 69, 88, 67, 79, 79, - 82, 68, 0, 171, 171, 171, - 79, 83, 71, 78, 44, 0, - 0, 0, 1, 0, 0, 0, - 8, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, - 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 83, 86, - 95, 84, 97, 114, 103, 101, - 116, 0, 171, 171, 150, 232, - 0, 0, 0, 0, 0, 0, - 82, 101, 110, 100, 101, 114, - 89, 67, 98, 67, 114, 76, - 97, 121, 101, 114, 77, 97, - 115, 107, 0, 4, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 255, - 255, 255, 255, 76, 8, 0, - 0, 68, 88, 66, 67, 190, - 117, 181, 57, 187, 108, 178, - 85, 11, 114, 197, 104, 54, - 155, 141, 115, 1, 0, 0, - 0, 76, 8, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 4, 2, 0, 0, 144, - 4, 0, 0, 12, 5, 0, - 0, 168, 7, 0, 0, 220, - 7, 0, 0, 65, 111, 110, - 57, 196, 1, 0, 0, 196, - 1, 0, 0, 0, 2, 254, - 255, 96, 1, 0, 0, 100, - 0, 0, 0, 5, 0, 36, - 0, 0, 0, 96, 0, 0, - 0, 96, 0, 0, 0, 36, - 0, 1, 0, 96, 0, 0, - 0, 0, 0, 3, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 4, 0, 2, 0, 4, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 1, 0, 6, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 1, 0, 7, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 4, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 254, - 255, 31, 0, 0, 2, 5, - 0, 0, 128, 0, 0, 15, - 144, 6, 0, 0, 2, 0, - 0, 1, 128, 3, 0, 170, - 160, 4, 0, 0, 4, 0, - 0, 6, 128, 0, 0, 208, - 144, 2, 0, 248, 160, 2, - 0, 208, 160, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 170, 128, 5, 0, 228, - 160, 4, 0, 0, 4, 1, - 0, 15, 128, 4, 0, 228, - 160, 0, 0, 85, 128, 1, - 0, 228, 128, 2, 0, 0, - 3, 1, 0, 15, 128, 1, - 0, 228, 128, 6, 0, 228, - 160, 2, 0, 0, 3, 0, - 0, 6, 128, 1, 0, 208, - 128, 3, 0, 208, 161, 5, - 0, 0, 3, 0, 0, 8, - 224, 0, 0, 0, 128, 0, - 0, 85, 128, 6, 0, 0, - 2, 0, 0, 1, 128, 3, - 0, 255, 160, 5, 0, 0, - 3, 0, 0, 4, 224, 0, - 0, 0, 128, 0, 0, 170, - 128, 4, 0, 0, 4, 0, - 0, 3, 224, 0, 0, 228, - 144, 1, 0, 238, 160, 1, - 0, 228, 160, 6, 0, 0, - 2, 0, 0, 1, 128, 1, - 0, 255, 128, 5, 0, 0, - 3, 1, 0, 7, 128, 0, - 0, 0, 128, 1, 0, 228, - 128, 2, 0, 0, 3, 0, - 0, 15, 128, 1, 0, 228, - 128, 7, 0, 228, 161, 5, - 0, 0, 3, 0, 0, 7, - 128, 0, 0, 255, 128, 0, - 0, 228, 128, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 85, 128, 9, 0, 228, - 160, 4, 0, 0, 4, 1, - 0, 15, 128, 8, 0, 228, - 160, 0, 0, 0, 128, 1, - 0, 228, 128, 4, 0, 0, - 4, 1, 0, 15, 128, 10, - 0, 228, 160, 0, 0, 170, - 128, 1, 0, 228, 128, 4, - 0, 0, 4, 0, 0, 15, - 128, 11, 0, 228, 160, 0, - 0, 255, 128, 1, 0, 228, - 128, 4, 0, 0, 4, 0, - 0, 3, 192, 0, 0, 255, - 128, 0, 0, 228, 160, 0, - 0, 228, 128, 1, 0, 0, - 2, 0, 0, 12, 192, 0, - 0, 228, 128, 255, 255, 0, - 0, 83, 72, 68, 82, 132, - 2, 0, 0, 64, 0, 1, - 0, 161, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 0, 0, 0, 0, 8, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 1, - 0, 0, 0, 1, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 2, 0, 0, - 0, 4, 0, 0, 0, 95, - 0, 0, 3, 50, 16, 16, - 0, 0, 0, 0, 0, 103, - 0, 0, 4, 242, 32, 16, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 50, 32, 16, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 194, 32, 16, 0, 1, - 0, 0, 0, 104, 0, 0, - 2, 2, 0, 0, 0, 50, - 0, 0, 11, 50, 0, 16, - 0, 0, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 56, 0, 0, 8, 242, - 0, 16, 0, 1, 0, 0, - 0, 86, 5, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 5, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 4, - 0, 0, 0, 6, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 0, 0, 0, 8, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 14, 0, 0, - 7, 114, 0, 16, 0, 1, - 0, 0, 0, 70, 2, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 54, 0, 0, 5, 130, - 0, 16, 0, 1, 0, 0, - 0, 58, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, - 9, 50, 0, 16, 0, 0, - 0, 0, 0, 70, 0, 16, - 0, 0, 0, 0, 0, 70, - 128, 32, 128, 65, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 14, 0, 0, - 8, 194, 32, 16, 0, 1, - 0, 0, 0, 6, 4, 16, - 0, 0, 0, 0, 0, 166, - 142, 32, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 9, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 70, 142, 32, 128, 65, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 56, - 0, 0, 7, 114, 0, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 70, 2, 16, 0, 0, - 0, 0, 0, 56, 0, 0, - 8, 242, 0, 16, 0, 1, - 0, 0, 0, 86, 5, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 50, - 0, 0, 10, 242, 0, 16, - 0, 1, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 6, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 1, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 2, - 0, 0, 0, 166, 10, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 50, 0, 0, 10, 242, - 32, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 3, 0, 0, - 0, 246, 15, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 50, - 0, 0, 11, 50, 32, 16, - 0, 1, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 62, 0, 0, 1, 83, - 84, 65, 84, 116, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 14, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 148, 2, 0, 0, 3, - 0, 0, 0, 168, 0, 0, - 0, 3, 0, 0, 0, 28, - 0, 0, 0, 0, 4, 254, - 255, 0, 1, 0, 0, 96, - 2, 0, 0, 124, 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, 133, - 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, 0, 0, 0, - 0, 152, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 80, 101, 114, - 76, 97, 121, 101, 114, 0, - 80, 101, 114, 79, 99, 99, - 97, 115, 105, 111, 110, 97, - 108, 76, 97, 121, 101, 114, - 0, 80, 101, 114, 76, 97, - 121, 101, 114, 77, 97, 110, - 97, 103, 101, 114, 0, 124, - 0, 0, 0, 5, 0, 0, - 0, 240, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 133, - 0, 0, 0, 2, 0, 0, - 0, 220, 1, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, - 0, 0, 0, 1, 0, 0, - 0, 60, 2, 0, 0, 64, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 104, - 1, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 136, - 1, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 147, - 1, 0, 0, 32, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 157, - 1, 0, 0, 48, 0, 0, - 0, 4, 0, 0, 0, 0, - 0, 0, 0, 172, 1, 0, - 0, 0, 0, 0, 0, 188, - 1, 0, 0, 64, 0, 0, - 0, 64, 0, 0, 0, 2, - 0, 0, 0, 204, 1, 0, - 0, 0, 0, 0, 0, 118, - 84, 101, 120, 116, 117, 114, - 101, 67, 111, 111, 114, 100, - 115, 0, 171, 1, 0, 3, - 0, 1, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 118, 76, 97, 121, 101, - 114, 81, 117, 97, 100, 0, - 118, 77, 97, 115, 107, 81, - 117, 97, 100, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 0, 0, 3, 0, 1, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 12, 2, 0, 0, 0, - 0, 0, 0, 16, 0, 0, - 0, 2, 0, 0, 0, 32, - 2, 0, 0, 0, 0, 0, - 0, 48, 2, 0, 0, 16, - 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 32, - 2, 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, 0, - 0, 0, 0, 0, 0, 0, - 0, 102, 76, 97, 121, 101, - 114, 67, 111, 108, 111, 114, - 0, 84, 2, 0, 0, 0, - 0, 0, 0, 64, 0, 0, - 0, 2, 0, 0, 0, 204, - 1, 0, 0, 0, 0, 0, - 0, 109, 80, 114, 111, 106, - 101, 99, 116, 105, 111, 110, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 171, 73, - 83, 71, 78, 44, 0, 0, - 0, 1, 0, 0, 0, 8, - 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 3, - 3, 0, 0, 80, 79, 83, - 73, 84, 73, 79, 78, 0, - 171, 171, 171, 79, 83, 71, - 78, 104, 0, 0, 0, 3, - 0, 0, 0, 8, 0, 0, - 0, 80, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, - 0, 92, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 3, 12, 0, - 0, 92, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 12, 3, 0, - 0, 83, 86, 95, 80, 111, - 115, 105, 116, 105, 111, 110, - 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 171, 171, - 171, 83, 238, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 52, 8, 0, - 0, 68, 88, 66, 67, 1, - 74, 129, 243, 237, 178, 75, - 1, 68, 217, 73, 188, 217, - 60, 1, 254, 1, 0, 0, - 0, 52, 8, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 24, 2, 0, 0, 196, - 4, 0, 0, 64, 5, 0, - 0, 144, 7, 0, 0, 0, - 8, 0, 0, 65, 111, 110, - 57, 216, 1, 0, 0, 216, - 1, 0, 0, 0, 2, 255, - 255, 152, 1, 0, 0, 64, - 0, 0, 0, 1, 0, 52, - 0, 0, 0, 64, 0, 0, - 0, 64, 0, 4, 0, 36, - 0, 0, 0, 64, 0, 0, - 0, 0, 0, 1, 0, 1, - 0, 2, 0, 2, 0, 3, - 0, 3, 0, 0, 0, 3, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 255, - 255, 81, 0, 0, 5, 1, - 0, 15, 160, 115, 128, 0, - 191, 18, 131, 128, 189, 182, - 74, 204, 63, 205, 30, 80, - 63, 81, 0, 0, 5, 2, - 0, 15, 160, 103, 10, 149, - 63, 76, 26, 1, 64, 196, - 148, 200, 62, 0, 0, 128, - 63, 31, 0, 0, 2, 0, - 0, 0, 128, 0, 0, 15, - 176, 31, 0, 0, 2, 0, - 0, 0, 144, 0, 8, 15, - 160, 31, 0, 0, 2, 0, - 0, 0, 144, 1, 8, 15, - 160, 31, 0, 0, 2, 0, - 0, 0, 144, 2, 8, 15, - 160, 31, 0, 0, 2, 0, - 0, 0, 144, 3, 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, 2, - 8, 228, 160, 2, 0, 0, - 3, 0, 0, 1, 128, 1, - 0, 255, 128, 1, 0, 0, - 160, 5, 0, 0, 3, 0, - 0, 3, 128, 0, 0, 0, - 128, 1, 0, 238, 160, 2, - 0, 0, 3, 0, 0, 4, - 128, 0, 0, 255, 128, 1, - 0, 85, 160, 4, 0, 0, - 4, 0, 0, 2, 128, 0, - 0, 170, 128, 2, 0, 0, - 160, 0, 0, 85, 129, 4, - 0, 0, 4, 1, 0, 1, - 128, 0, 0, 170, 128, 2, - 0, 0, 160, 0, 0, 0, - 128, 1, 0, 0, 2, 2, - 0, 3, 128, 0, 0, 235, - 176, 66, 0, 0, 3, 3, - 0, 15, 128, 0, 0, 228, - 176, 1, 8, 228, 160, 66, - 0, 0, 3, 2, 0, 15, - 128, 2, 0, 228, 128, 3, - 8, 228, 160, 2, 0, 0, - 3, 0, 0, 1, 128, 3, - 0, 255, 128, 1, 0, 0, - 160, 4, 0, 0, 4, 1, - 0, 2, 128, 0, 0, 0, - 128, 2, 0, 170, 161, 0, - 0, 85, 128, 5, 0, 0, - 3, 0, 0, 1, 128, 0, - 0, 0, 128, 2, 0, 85, - 160, 4, 0, 0, 4, 1, - 0, 4, 128, 0, 0, 170, - 128, 2, 0, 0, 160, 0, - 0, 0, 128, 1, 0, 0, - 2, 1, 0, 8, 128, 2, - 0, 255, 160, 5, 0, 0, - 3, 0, 0, 15, 128, 1, - 0, 228, 128, 0, 0, 0, - 160, 5, 0, 0, 3, 0, - 0, 15, 128, 2, 0, 255, - 128, 0, 0, 228, 128, 1, - 0, 0, 2, 0, 8, 15, - 128, 0, 0, 228, 128, 255, - 255, 0, 0, 83, 72, 68, - 82, 164, 2, 0, 0, 64, - 0, 0, 0, 169, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 0, 0, 0, - 0, 4, 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, 1, - 0, 0, 0, 85, 85, 0, - 0, 88, 24, 0, 4, 0, - 112, 16, 0, 2, 0, 0, - 0, 85, 85, 0, 0, 88, - 24, 0, 4, 0, 112, 16, - 0, 3, 0, 0, 0, 85, - 85, 0, 0, 98, 16, 0, - 3, 50, 16, 16, 0, 1, - 0, 0, 0, 98, 16, 0, - 3, 194, 16, 16, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 242, 32, 16, 0, 0, - 0, 0, 0, 104, 0, 0, - 2, 3, 0, 0, 0, 69, - 0, 0, 9, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 16, 16, 0, 1, 0, 0, - 0, 70, 126, 16, 0, 2, - 0, 0, 0, 0, 96, 16, - 0, 0, 0, 0, 0, 0, - 0, 0, 7, 18, 0, 16, - 0, 0, 0, 0, 0, 58, - 0, 16, 0, 0, 0, 0, - 0, 1, 64, 0, 0, 115, - 128, 0, 191, 56, 0, 0, - 10, 50, 0, 16, 0, 0, - 0, 0, 0, 6, 0, 16, - 0, 0, 0, 0, 0, 2, - 64, 0, 0, 182, 74, 204, - 63, 205, 30, 80, 63, 0, - 0, 0, 0, 0, 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, 0, 0, 0, 7, 66, - 0, 16, 0, 0, 0, 0, - 0, 58, 0, 16, 0, 1, - 0, 0, 0, 1, 64, 0, - 0, 18, 131, 128, 189, 50, - 0, 0, 10, 34, 0, 16, - 0, 0, 0, 0, 0, 42, - 0, 16, 0, 0, 0, 0, - 0, 1, 64, 0, 0, 103, - 10, 149, 63, 26, 0, 16, - 128, 65, 0, 0, 0, 0, - 0, 0, 0, 50, 0, 0, - 9, 18, 0, 16, 0, 1, - 0, 0, 0, 42, 0, 16, - 0, 0, 0, 0, 0, 1, - 64, 0, 0, 103, 10, 149, - 63, 10, 0, 16, 0, 0, - 0, 0, 0, 69, 0, 0, - 9, 242, 0, 16, 0, 2, - 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, 0, - 0, 0, 0, 58, 0, 16, - 0, 2, 0, 0, 0, 1, - 64, 0, 0, 115, 128, 0, - 191, 50, 0, 0, 10, 34, - 0, 16, 0, 1, 0, 0, - 0, 10, 0, 16, 128, 65, - 0, 0, 0, 0, 0, 0, - 0, 1, 64, 0, 0, 196, - 148, 200, 62, 26, 0, 16, - 0, 0, 0, 0, 0, 56, - 0, 0, 7, 18, 0, 16, - 0, 0, 0, 0, 0, 10, - 0, 16, 0, 0, 0, 0, - 0, 1, 64, 0, 0, 76, - 26, 1, 64, 50, 0, 0, - 9, 66, 0, 16, 0, 1, - 0, 0, 0, 42, 0, 16, - 0, 0, 0, 0, 0, 1, - 64, 0, 0, 103, 10, 149, - 63, 10, 0, 16, 0, 0, - 0, 0, 0, 54, 0, 0, - 5, 130, 0, 16, 0, 1, - 0, 0, 0, 1, 64, 0, - 0, 0, 0, 128, 63, 56, - 0, 0, 8, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 6, 128, 32, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 69, 0, 0, 9, 242, - 0, 16, 0, 1, 0, 0, - 0, 230, 26, 16, 0, 1, - 0, 0, 0, 70, 126, 16, - 0, 3, 0, 0, 0, 0, - 96, 16, 0, 0, 0, 0, - 0, 56, 0, 0, 7, 242, - 32, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 246, 15, 16, - 0, 1, 0, 0, 0, 62, - 0, 0, 1, 83, 84, 65, - 84, 116, 0, 0, 0, 17, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 11, 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, 4, 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, 72, - 2, 0, 0, 1, 0, 0, - 0, 16, 1, 0, 0, 6, - 0, 0, 0, 28, 0, 0, - 0, 0, 4, 255, 255, 0, - 1, 0, 0, 20, 2, 0, - 0, 220, 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, 246, 0, 0, - 0, 2, 0, 0, 0, 5, - 0, 0, 0, 4, 0, 0, - 0, 255, 255, 255, 255, 0, - 0, 0, 0, 1, 0, 0, - 0, 12, 0, 0, 0, 249, - 0, 0, 0, 2, 0, 0, - 0, 5, 0, 0, 0, 4, - 0, 0, 0, 255, 255, 255, - 255, 1, 0, 0, 0, 1, - 0, 0, 0, 12, 0, 0, - 0, 253, 0, 0, 0, 2, - 0, 0, 0, 5, 0, 0, - 0, 4, 0, 0, 0, 255, - 255, 255, 255, 2, 0, 0, - 0, 1, 0, 0, 0, 12, - 0, 0, 0, 1, 1, 0, - 0, 2, 0, 0, 0, 5, - 0, 0, 0, 4, 0, 0, - 0, 255, 255, 255, 255, 3, - 0, 0, 0, 1, 0, 0, - 0, 12, 0, 0, 0, 7, - 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 76, 97, 121, 101, 114, - 84, 101, 120, 116, 117, 114, - 101, 83, 97, 109, 112, 108, - 101, 114, 76, 105, 110, 101, - 97, 114, 0, 116, 89, 0, - 116, 67, 98, 0, 116, 67, - 114, 0, 116, 77, 97, 115, - 107, 0, 80, 101, 114, 76, - 97, 121, 101, 114, 0, 7, - 1, 0, 0, 5, 0, 0, - 0, 40, 1, 0, 0, 128, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 160, - 1, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 176, 1, 0, - 0, 0, 0, 0, 0, 192, - 1, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 176, 1, 0, - 0, 0, 0, 0, 0, 203, - 1, 0, 0, 32, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 176, 1, 0, - 0, 0, 0, 0, 0, 213, - 1, 0, 0, 48, 0, 0, - 0, 4, 0, 0, 0, 2, - 0, 0, 0, 228, 1, 0, - 0, 0, 0, 0, 0, 244, - 1, 0, 0, 64, 0, 0, - 0, 64, 0, 0, 0, 0, - 0, 0, 0, 4, 2, 0, - 0, 0, 0, 0, 0, 118, - 84, 101, 120, 116, 117, 114, - 101, 67, 111, 111, 114, 100, - 115, 0, 171, 1, 0, 3, - 0, 1, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 118, 76, 97, 121, 101, - 114, 81, 117, 97, 100, 0, - 118, 77, 97, 115, 107, 81, - 117, 97, 100, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 0, 0, 3, 0, 1, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 171, 73, - 83, 71, 78, 104, 0, 0, - 0, 3, 0, 0, 0, 8, - 0, 0, 0, 80, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 15, - 0, 0, 0, 92, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 1, 0, 0, 0, 3, - 3, 0, 0, 92, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 1, 0, 0, 0, 12, - 12, 0, 0, 83, 86, 95, - 80, 111, 115, 105, 116, 105, - 111, 110, 0, 84, 69, 88, - 67, 79, 79, 82, 68, 0, - 171, 171, 171, 79, 83, 71, - 78, 44, 0, 0, 0, 1, - 0, 0, 0, 8, 0, 0, - 0, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, - 0, 83, 86, 95, 84, 97, - 114, 103, 101, 116, 0, 171, - 171, 183, 246, 0, 0, 0, - 0, 0, 0, 82, 101, 110, - 100, 101, 114, 67, 111, 109, - 112, 111, 110, 101, 110, 116, - 65, 108, 112, 104, 97, 76, - 97, 121, 101, 114, 77, 97, - 115, 107, 0, 4, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 255, - 255, 255, 255, 76, 8, 0, - 0, 68, 88, 66, 67, 190, - 117, 181, 57, 187, 108, 178, - 85, 11, 114, 197, 104, 54, - 155, 141, 115, 1, 0, 0, - 0, 76, 8, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 4, 2, 0, 0, 144, - 4, 0, 0, 12, 5, 0, - 0, 168, 7, 0, 0, 220, - 7, 0, 0, 65, 111, 110, - 57, 196, 1, 0, 0, 196, - 1, 0, 0, 0, 2, 254, - 255, 96, 1, 0, 0, 100, - 0, 0, 0, 5, 0, 36, - 0, 0, 0, 96, 0, 0, - 0, 96, 0, 0, 0, 36, - 0, 1, 0, 96, 0, 0, - 0, 0, 0, 3, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 4, 0, 2, 0, 4, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 1, 0, 6, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 1, 0, 7, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 4, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 254, - 255, 31, 0, 0, 2, 5, - 0, 0, 128, 0, 0, 15, - 144, 6, 0, 0, 2, 0, - 0, 1, 128, 3, 0, 170, - 160, 4, 0, 0, 4, 0, - 0, 6, 128, 0, 0, 208, - 144, 2, 0, 248, 160, 2, - 0, 208, 160, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 170, 128, 5, 0, 228, - 160, 4, 0, 0, 4, 1, - 0, 15, 128, 4, 0, 228, - 160, 0, 0, 85, 128, 1, - 0, 228, 128, 2, 0, 0, - 3, 1, 0, 15, 128, 1, - 0, 228, 128, 6, 0, 228, - 160, 2, 0, 0, 3, 0, - 0, 6, 128, 1, 0, 208, - 128, 3, 0, 208, 161, 5, - 0, 0, 3, 0, 0, 8, - 224, 0, 0, 0, 128, 0, - 0, 85, 128, 6, 0, 0, - 2, 0, 0, 1, 128, 3, - 0, 255, 160, 5, 0, 0, - 3, 0, 0, 4, 224, 0, - 0, 0, 128, 0, 0, 170, - 128, 4, 0, 0, 4, 0, - 0, 3, 224, 0, 0, 228, - 144, 1, 0, 238, 160, 1, - 0, 228, 160, 6, 0, 0, - 2, 0, 0, 1, 128, 1, - 0, 255, 128, 5, 0, 0, - 3, 1, 0, 7, 128, 0, - 0, 0, 128, 1, 0, 228, - 128, 2, 0, 0, 3, 0, - 0, 15, 128, 1, 0, 228, - 128, 7, 0, 228, 161, 5, - 0, 0, 3, 0, 0, 7, - 128, 0, 0, 255, 128, 0, - 0, 228, 128, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 85, 128, 9, 0, 228, - 160, 4, 0, 0, 4, 1, - 0, 15, 128, 8, 0, 228, - 160, 0, 0, 0, 128, 1, - 0, 228, 128, 4, 0, 0, - 4, 1, 0, 15, 128, 10, - 0, 228, 160, 0, 0, 170, - 128, 1, 0, 228, 128, 4, - 0, 0, 4, 0, 0, 15, - 128, 11, 0, 228, 160, 0, - 0, 255, 128, 1, 0, 228, - 128, 4, 0, 0, 4, 0, - 0, 3, 192, 0, 0, 255, - 128, 0, 0, 228, 160, 0, - 0, 228, 128, 1, 0, 0, - 2, 0, 0, 12, 192, 0, - 0, 228, 128, 255, 255, 0, - 0, 83, 72, 68, 82, 132, - 2, 0, 0, 64, 0, 1, - 0, 161, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 0, 0, 0, 0, 8, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 1, - 0, 0, 0, 1, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 2, 0, 0, - 0, 4, 0, 0, 0, 95, - 0, 0, 3, 50, 16, 16, - 0, 0, 0, 0, 0, 103, - 0, 0, 4, 242, 32, 16, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 50, 32, 16, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 194, 32, 16, 0, 1, - 0, 0, 0, 104, 0, 0, - 2, 2, 0, 0, 0, 50, - 0, 0, 11, 50, 0, 16, - 0, 0, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 56, 0, 0, 8, 242, - 0, 16, 0, 1, 0, 0, - 0, 86, 5, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 5, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 4, - 0, 0, 0, 6, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 0, 0, 0, 8, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 14, 0, 0, - 7, 114, 0, 16, 0, 1, - 0, 0, 0, 70, 2, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 54, 0, 0, 5, 130, - 0, 16, 0, 1, 0, 0, - 0, 58, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, - 9, 50, 0, 16, 0, 0, - 0, 0, 0, 70, 0, 16, - 0, 0, 0, 0, 0, 70, - 128, 32, 128, 65, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 14, 0, 0, - 8, 194, 32, 16, 0, 1, - 0, 0, 0, 6, 4, 16, - 0, 0, 0, 0, 0, 166, - 142, 32, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 9, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 70, 142, 32, 128, 65, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 56, - 0, 0, 7, 114, 0, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 70, 2, 16, 0, 0, - 0, 0, 0, 56, 0, 0, - 8, 242, 0, 16, 0, 1, - 0, 0, 0, 86, 5, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 50, - 0, 0, 10, 242, 0, 16, - 0, 1, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 6, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 1, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 2, - 0, 0, 0, 166, 10, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 50, 0, 0, 10, 242, - 32, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 3, 0, 0, - 0, 246, 15, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 50, - 0, 0, 11, 50, 32, 16, - 0, 1, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 62, 0, 0, 1, 83, - 84, 65, 84, 116, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 14, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 148, 2, 0, 0, 3, - 0, 0, 0, 168, 0, 0, - 0, 3, 0, 0, 0, 28, - 0, 0, 0, 0, 4, 254, - 255, 0, 1, 0, 0, 96, - 2, 0, 0, 124, 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, 133, - 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, 0, 0, 0, - 0, 152, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 80, 101, 114, - 76, 97, 121, 101, 114, 0, - 80, 101, 114, 79, 99, 99, - 97, 115, 105, 111, 110, 97, - 108, 76, 97, 121, 101, 114, - 0, 80, 101, 114, 76, 97, - 121, 101, 114, 77, 97, 110, - 97, 103, 101, 114, 0, 124, - 0, 0, 0, 5, 0, 0, - 0, 240, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 133, - 0, 0, 0, 2, 0, 0, - 0, 220, 1, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, - 0, 0, 0, 1, 0, 0, - 0, 60, 2, 0, 0, 64, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 104, - 1, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 136, - 1, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 147, - 1, 0, 0, 32, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 157, - 1, 0, 0, 48, 0, 0, - 0, 4, 0, 0, 0, 0, - 0, 0, 0, 172, 1, 0, - 0, 0, 0, 0, 0, 188, - 1, 0, 0, 64, 0, 0, - 0, 64, 0, 0, 0, 2, - 0, 0, 0, 204, 1, 0, - 0, 0, 0, 0, 0, 118, - 84, 101, 120, 116, 117, 114, - 101, 67, 111, 111, 114, 100, - 115, 0, 171, 1, 0, 3, - 0, 1, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 118, 76, 97, 121, 101, - 114, 81, 117, 97, 100, 0, - 118, 77, 97, 115, 107, 81, - 117, 97, 100, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 0, 0, 3, 0, 1, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 12, 2, 0, 0, 0, - 0, 0, 0, 16, 0, 0, - 0, 2, 0, 0, 0, 32, - 2, 0, 0, 0, 0, 0, - 0, 48, 2, 0, 0, 16, - 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 32, - 2, 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, 0, - 0, 0, 0, 0, 0, 0, - 0, 102, 76, 97, 121, 101, - 114, 67, 111, 108, 111, 114, - 0, 84, 2, 0, 0, 0, - 0, 0, 0, 64, 0, 0, - 0, 2, 0, 0, 0, 204, - 1, 0, 0, 0, 0, 0, - 0, 109, 80, 114, 111, 106, - 101, 99, 116, 105, 111, 110, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 171, 73, - 83, 71, 78, 44, 0, 0, - 0, 1, 0, 0, 0, 8, - 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 3, - 3, 0, 0, 80, 79, 83, - 73, 84, 73, 79, 78, 0, - 171, 171, 171, 79, 83, 71, - 78, 104, 0, 0, 0, 3, - 0, 0, 0, 8, 0, 0, - 0, 80, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, - 0, 92, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 3, 12, 0, - 0, 92, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 12, 3, 0, - 0, 83, 86, 95, 80, 111, - 115, 105, 116, 105, 111, 110, - 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 171, 171, - 171, 69, 255, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 160, 6, 0, - 0, 68, 88, 66, 67, 178, - 167, 73, 233, 167, 120, 251, - 206, 98, 157, 244, 246, 26, - 126, 89, 155, 1, 0, 0, - 0, 160, 6, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 124, 1, 0, 0, 52, - 3, 0, 0, 176, 3, 0, - 0, 228, 5, 0, 0, 84, - 6, 0, 0, 65, 111, 110, - 57, 60, 1, 0, 0, 60, - 1, 0, 0, 0, 2, 255, - 255, 0, 1, 0, 0, 60, - 0, 0, 0, 1, 0, 48, - 0, 0, 0, 60, 0, 0, - 0, 60, 0, 3, 0, 36, - 0, 0, 0, 60, 0, 0, - 0, 0, 0, 1, 0, 1, - 0, 2, 0, 2, 0, 0, - 0, 3, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 2, 255, 255, 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, 15, 176, 31, 0, 0, - 2, 0, 0, 0, 144, 0, - 8, 15, 160, 31, 0, 0, - 2, 0, 0, 0, 144, 1, - 8, 15, 160, 31, 0, 0, - 2, 0, 0, 0, 144, 2, - 8, 15, 160, 1, 0, 0, - 2, 0, 0, 3, 128, 0, - 0, 235, 176, 66, 0, 0, - 3, 0, 0, 15, 128, 0, - 0, 228, 128, 2, 8, 228, - 160, 5, 0, 0, 3, 0, - 0, 1, 128, 0, 0, 255, - 128, 0, 0, 0, 160, 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, 2, 0, 0, 3, 2, - 0, 15, 128, 1, 0, 228, - 128, 2, 0, 228, 129, 2, - 0, 0, 3, 2, 0, 15, - 128, 2, 0, 228, 128, 1, - 0, 0, 160, 1, 0, 0, - 2, 1, 0, 8, 128, 2, - 0, 85, 128, 5, 0, 0, - 3, 2, 0, 15, 128, 0, - 0, 0, 128, 2, 0, 228, - 128, 5, 0, 0, 3, 0, - 0, 15, 128, 0, 0, 0, - 128, 1, 0, 228, 128, 1, - 0, 0, 2, 0, 8, 15, - 128, 0, 0, 228, 128, 1, - 0, 0, 2, 1, 8, 15, - 128, 2, 0, 228, 128, 255, - 255, 0, 0, 83, 72, 68, - 82, 176, 1, 0, 0, 64, - 0, 0, 0, 108, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 0, 0, 0, - 0, 4, 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, 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, 98, - 16, 0, 3, 194, 16, 16, - 0, 1, 0, 0, 0, 101, - 0, 0, 3, 242, 32, 16, - 0, 0, 0, 0, 0, 101, - 0, 0, 3, 242, 32, 16, - 0, 1, 0, 0, 0, 104, - 0, 0, 2, 3, 0, 0, - 0, 69, 0, 0, 9, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 16, 16, 0, 1, - 0, 0, 0, 70, 126, 16, - 0, 1, 0, 0, 0, 0, - 96, 16, 0, 0, 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, 0, 0, 0, 8, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 128, 65, - 0, 0, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 0, 0, 0, - 10, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 0, 0, 0, 0, 2, - 64, 0, 0, 0, 0, 128, - 63, 0, 0, 128, 63, 0, - 0, 128, 63, 0, 0, 128, - 63, 54, 0, 0, 5, 130, - 0, 16, 0, 1, 0, 0, - 0, 26, 0, 16, 0, 0, - 0, 0, 0, 69, 0, 0, - 9, 242, 0, 16, 0, 2, - 0, 0, 0, 230, 26, 16, - 0, 1, 0, 0, 0, 70, - 126, 16, 0, 2, 0, 0, - 0, 0, 96, 16, 0, 0, - 0, 0, 0, 56, 0, 0, - 8, 18, 0, 16, 0, 2, - 0, 0, 0, 58, 0, 16, - 0, 2, 0, 0, 0, 10, - 128, 32, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 56, - 0, 0, 7, 242, 32, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 6, 0, 16, 0, 2, - 0, 0, 0, 56, 0, 0, - 7, 242, 32, 16, 0, 1, - 0, 0, 0, 70, 14, 16, - 0, 0, 0, 0, 0, 6, - 0, 16, 0, 2, 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, 4, 0, 0, 0, 5, - 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, 44, 2, 0, 0, 1, - 0, 0, 0, 244, 0, 0, - 0, 5, 0, 0, 0, 28, - 0, 0, 0, 0, 4, 255, - 255, 0, 1, 0, 0, 248, - 1, 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, 0, 0, 0, 0, 214, - 0, 0, 0, 2, 0, 0, - 0, 5, 0, 0, 0, 4, - 0, 0, 0, 255, 255, 255, - 255, 0, 0, 0, 0, 1, - 0, 0, 0, 12, 0, 0, - 0, 219, 0, 0, 0, 2, - 0, 0, 0, 5, 0, 0, - 0, 4, 0, 0, 0, 255, - 255, 255, 255, 1, 0, 0, - 0, 1, 0, 0, 0, 12, - 0, 0, 0, 229, 0, 0, - 0, 2, 0, 0, 0, 5, - 0, 0, 0, 4, 0, 0, - 0, 255, 255, 255, 255, 2, - 0, 0, 0, 1, 0, 0, - 0, 12, 0, 0, 0, 235, - 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, 76, 97, 121, 101, 114, - 84, 101, 120, 116, 117, 114, - 101, 83, 97, 109, 112, 108, - 101, 114, 76, 105, 110, 101, - 97, 114, 0, 116, 82, 71, - 66, 0, 116, 82, 71, 66, - 87, 104, 105, 116, 101, 0, - 116, 77, 97, 115, 107, 0, - 80, 101, 114, 76, 97, 121, - 101, 114, 0, 235, 0, 0, - 0, 5, 0, 0, 0, 12, - 1, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 132, 1, 0, - 0, 0, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 148, 1, 0, 0, 0, - 0, 0, 0, 164, 1, 0, - 0, 16, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 148, 1, 0, 0, 0, - 0, 0, 0, 175, 1, 0, - 0, 32, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 148, 1, 0, 0, 0, - 0, 0, 0, 185, 1, 0, - 0, 48, 0, 0, 0, 4, - 0, 0, 0, 2, 0, 0, - 0, 200, 1, 0, 0, 0, - 0, 0, 0, 216, 1, 0, - 0, 64, 0, 0, 0, 64, - 0, 0, 0, 0, 0, 0, - 0, 232, 1, 0, 0, 0, - 0, 0, 0, 118, 84, 101, - 120, 116, 117, 114, 101, 67, - 111, 111, 114, 100, 115, 0, - 171, 1, 0, 3, 0, 1, - 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 118, - 76, 97, 121, 101, 114, 81, - 117, 97, 100, 0, 118, 77, - 97, 115, 107, 81, 117, 97, - 100, 0, 102, 76, 97, 121, - 101, 114, 79, 112, 97, 99, - 105, 116, 121, 0, 171, 0, - 0, 3, 0, 1, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 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, 77, - 105, 99, 114, 111, 115, 111, - 102, 116, 32, 40, 82, 41, - 32, 72, 76, 83, 76, 32, - 83, 104, 97, 100, 101, 114, - 32, 67, 111, 109, 112, 105, - 108, 101, 114, 32, 54, 46, - 51, 46, 57, 54, 48, 48, - 46, 49, 54, 51, 56, 52, - 0, 171, 171, 73, 83, 71, - 78, 104, 0, 0, 0, 3, - 0, 0, 0, 8, 0, 0, - 0, 80, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, - 0, 92, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 3, 3, 0, - 0, 92, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 12, 12, 0, - 0, 83, 86, 95, 80, 111, - 115, 105, 116, 105, 111, 110, - 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 171, 171, - 171, 79, 83, 71, 78, 68, - 0, 0, 0, 2, 0, 0, - 0, 8, 0, 0, 0, 56, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 56, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 1, 0, 0, - 0, 15, 0, 0, 0, 83, - 86, 95, 84, 97, 114, 103, - 101, 116, 0, 171, 171, 169, - 7, 1, 0, 0, 0, 0, - 0, 82, 101, 110, 100, 101, - 114, 83, 111, 108, 105, 100, - 67, 111, 108, 111, 114, 76, - 97, 121, 101, 114, 77, 97, - 115, 107, 0, 4, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 255, - 255, 255, 255, 76, 8, 0, - 0, 68, 88, 66, 67, 190, - 117, 181, 57, 187, 108, 178, - 85, 11, 114, 197, 104, 54, - 155, 141, 115, 1, 0, 0, - 0, 76, 8, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 4, 2, 0, 0, 144, - 4, 0, 0, 12, 5, 0, - 0, 168, 7, 0, 0, 220, - 7, 0, 0, 65, 111, 110, - 57, 196, 1, 0, 0, 196, - 1, 0, 0, 0, 2, 254, - 255, 96, 1, 0, 0, 100, - 0, 0, 0, 5, 0, 36, - 0, 0, 0, 96, 0, 0, - 0, 96, 0, 0, 0, 36, - 0, 1, 0, 96, 0, 0, - 0, 0, 0, 3, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 4, 0, 2, 0, 4, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 1, 0, 6, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 1, 0, 7, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 4, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 254, - 255, 31, 0, 0, 2, 5, - 0, 0, 128, 0, 0, 15, - 144, 6, 0, 0, 2, 0, - 0, 1, 128, 3, 0, 170, - 160, 4, 0, 0, 4, 0, - 0, 6, 128, 0, 0, 208, - 144, 2, 0, 248, 160, 2, - 0, 208, 160, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 170, 128, 5, 0, 228, - 160, 4, 0, 0, 4, 1, - 0, 15, 128, 4, 0, 228, - 160, 0, 0, 85, 128, 1, - 0, 228, 128, 2, 0, 0, - 3, 1, 0, 15, 128, 1, - 0, 228, 128, 6, 0, 228, - 160, 2, 0, 0, 3, 0, - 0, 6, 128, 1, 0, 208, - 128, 3, 0, 208, 161, 5, - 0, 0, 3, 0, 0, 8, - 224, 0, 0, 0, 128, 0, - 0, 85, 128, 6, 0, 0, - 2, 0, 0, 1, 128, 3, - 0, 255, 160, 5, 0, 0, - 3, 0, 0, 4, 224, 0, - 0, 0, 128, 0, 0, 170, - 128, 4, 0, 0, 4, 0, - 0, 3, 224, 0, 0, 228, - 144, 1, 0, 238, 160, 1, - 0, 228, 160, 6, 0, 0, - 2, 0, 0, 1, 128, 1, - 0, 255, 128, 5, 0, 0, - 3, 1, 0, 7, 128, 0, - 0, 0, 128, 1, 0, 228, - 128, 2, 0, 0, 3, 0, - 0, 15, 128, 1, 0, 228, - 128, 7, 0, 228, 161, 5, - 0, 0, 3, 0, 0, 7, - 128, 0, 0, 255, 128, 0, - 0, 228, 128, 5, 0, 0, - 3, 1, 0, 15, 128, 0, - 0, 85, 128, 9, 0, 228, - 160, 4, 0, 0, 4, 1, - 0, 15, 128, 8, 0, 228, - 160, 0, 0, 0, 128, 1, - 0, 228, 128, 4, 0, 0, - 4, 1, 0, 15, 128, 10, - 0, 228, 160, 0, 0, 170, - 128, 1, 0, 228, 128, 4, - 0, 0, 4, 0, 0, 15, - 128, 11, 0, 228, 160, 0, - 0, 255, 128, 1, 0, 228, - 128, 4, 0, 0, 4, 0, - 0, 3, 192, 0, 0, 255, - 128, 0, 0, 228, 160, 0, - 0, 228, 128, 1, 0, 0, - 2, 0, 0, 12, 192, 0, - 0, 228, 128, 255, 255, 0, - 0, 83, 72, 68, 82, 132, - 2, 0, 0, 64, 0, 1, - 0, 161, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 0, 0, 0, 0, 8, - 0, 0, 0, 89, 0, 0, - 4, 70, 142, 32, 0, 1, - 0, 0, 0, 1, 0, 0, - 0, 89, 0, 0, 4, 70, - 142, 32, 0, 2, 0, 0, - 0, 4, 0, 0, 0, 95, - 0, 0, 3, 50, 16, 16, - 0, 0, 0, 0, 0, 103, - 0, 0, 4, 242, 32, 16, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 50, 32, 16, 0, 1, - 0, 0, 0, 101, 0, 0, - 3, 194, 32, 16, 0, 1, - 0, 0, 0, 104, 0, 0, - 2, 2, 0, 0, 0, 50, - 0, 0, 11, 50, 0, 16, - 0, 0, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 56, 0, 0, 8, 242, - 0, 16, 0, 1, 0, 0, - 0, 86, 5, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 5, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 4, - 0, 0, 0, 6, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 0, 0, 0, 8, 242, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 0, - 0, 0, 0, 70, 142, 32, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 14, 0, 0, - 7, 114, 0, 16, 0, 1, - 0, 0, 0, 70, 2, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 54, 0, 0, 5, 130, - 0, 16, 0, 1, 0, 0, - 0, 58, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, - 9, 50, 0, 16, 0, 0, - 0, 0, 0, 70, 0, 16, - 0, 0, 0, 0, 0, 70, - 128, 32, 128, 65, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 14, 0, 0, - 8, 194, 32, 16, 0, 1, - 0, 0, 0, 6, 4, 16, - 0, 0, 0, 0, 0, 166, - 142, 32, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 9, 242, 0, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 70, 142, 32, 128, 65, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 56, - 0, 0, 7, 114, 0, 16, - 0, 0, 0, 0, 0, 246, - 15, 16, 0, 0, 0, 0, - 0, 70, 2, 16, 0, 0, - 0, 0, 0, 56, 0, 0, - 8, 242, 0, 16, 0, 1, - 0, 0, 0, 86, 5, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 50, - 0, 0, 10, 242, 0, 16, - 0, 1, 0, 0, 0, 70, - 142, 32, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 6, - 0, 16, 0, 0, 0, 0, - 0, 70, 14, 16, 0, 1, - 0, 0, 0, 50, 0, 0, - 10, 242, 0, 16, 0, 1, - 0, 0, 0, 70, 142, 32, - 0, 2, 0, 0, 0, 2, - 0, 0, 0, 166, 10, 16, - 0, 0, 0, 0, 0, 70, - 14, 16, 0, 1, 0, 0, - 0, 50, 0, 0, 10, 242, - 32, 16, 0, 0, 0, 0, - 0, 70, 142, 32, 0, 2, - 0, 0, 0, 3, 0, 0, - 0, 246, 15, 16, 0, 0, - 0, 0, 0, 70, 14, 16, - 0, 1, 0, 0, 0, 50, - 0, 0, 11, 50, 32, 16, - 0, 1, 0, 0, 0, 70, - 16, 16, 0, 0, 0, 0, - 0, 230, 138, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 70, 128, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 62, 0, 0, 1, 83, - 84, 65, 84, 116, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 14, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 148, 2, 0, 0, 3, - 0, 0, 0, 168, 0, 0, - 0, 3, 0, 0, 0, 28, - 0, 0, 0, 0, 4, 254, - 255, 0, 1, 0, 0, 96, - 2, 0, 0, 124, 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, 133, - 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, 0, 0, 0, - 0, 152, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 80, 101, 114, - 76, 97, 121, 101, 114, 0, - 80, 101, 114, 79, 99, 99, - 97, 115, 105, 111, 110, 97, - 108, 76, 97, 121, 101, 114, - 0, 80, 101, 114, 76, 97, - 121, 101, 114, 77, 97, 110, - 97, 103, 101, 114, 0, 124, - 0, 0, 0, 5, 0, 0, - 0, 240, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 133, - 0, 0, 0, 2, 0, 0, - 0, 220, 1, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 152, - 0, 0, 0, 1, 0, 0, - 0, 60, 2, 0, 0, 64, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 104, - 1, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 136, - 1, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 147, - 1, 0, 0, 32, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 120, 1, 0, - 0, 0, 0, 0, 0, 157, - 1, 0, 0, 48, 0, 0, - 0, 4, 0, 0, 0, 0, - 0, 0, 0, 172, 1, 0, - 0, 0, 0, 0, 0, 188, - 1, 0, 0, 64, 0, 0, - 0, 64, 0, 0, 0, 2, - 0, 0, 0, 204, 1, 0, - 0, 0, 0, 0, 0, 118, - 84, 101, 120, 116, 117, 114, - 101, 67, 111, 111, 114, 100, - 115, 0, 171, 1, 0, 3, - 0, 1, 0, 4, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 118, 76, 97, 121, 101, - 114, 81, 117, 97, 100, 0, - 118, 77, 97, 115, 107, 81, - 117, 97, 100, 0, 102, 76, - 97, 121, 101, 114, 79, 112, - 97, 99, 105, 116, 121, 0, - 171, 0, 0, 3, 0, 1, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 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, 12, 2, 0, 0, 0, - 0, 0, 0, 16, 0, 0, - 0, 2, 0, 0, 0, 32, - 2, 0, 0, 0, 0, 0, - 0, 48, 2, 0, 0, 16, - 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 32, - 2, 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, 0, - 0, 0, 0, 0, 0, 0, - 0, 102, 76, 97, 121, 101, - 114, 67, 111, 108, 111, 114, - 0, 84, 2, 0, 0, 0, - 0, 0, 0, 64, 0, 0, - 0, 2, 0, 0, 0, 204, - 1, 0, 0, 0, 0, 0, - 0, 109, 80, 114, 111, 106, - 101, 99, 116, 105, 111, 110, - 0, 77, 105, 99, 114, 111, - 115, 111, 102, 116, 32, 40, - 82, 41, 32, 72, 76, 83, - 76, 32, 83, 104, 97, 100, - 101, 114, 32, 67, 111, 109, - 112, 105, 108, 101, 114, 32, - 54, 46, 51, 46, 57, 54, - 48, 48, 46, 49, 54, 51, - 56, 52, 0, 171, 171, 73, - 83, 71, 78, 44, 0, 0, - 0, 1, 0, 0, 0, 8, - 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 3, - 3, 0, 0, 80, 79, 83, - 73, 84, 73, 79, 78, 0, - 171, 171, 171, 79, 83, 71, - 78, 104, 0, 0, 0, 3, - 0, 0, 0, 8, 0, 0, - 0, 80, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 3, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, - 0, 92, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 3, 12, 0, - 0, 92, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 12, 3, 0, - 0, 83, 86, 95, 80, 111, - 115, 105, 116, 105, 111, 110, - 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 171, 171, - 171, 159, 14, 1, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 244, 3, 0, - 0, 68, 88, 66, 67, 238, - 234, 249, 25, 8, 157, 205, - 248, 243, 67, 9, 213, 110, - 126, 232, 189, 1, 0, 0, - 0, 244, 3, 0, 0, 6, - 0, 0, 0, 56, 0, 0, - 0, 204, 0, 0, 0, 112, - 1, 0, 0, 236, 1, 0, - 0, 80, 3, 0, 0, 192, - 3, 0, 0, 65, 111, 110, - 57, 140, 0, 0, 0, 140, - 0, 0, 0, 0, 2, 255, - 255, 88, 0, 0, 0, 52, - 0, 0, 0, 1, 0, 40, - 0, 0, 0, 52, 0, 0, - 0, 52, 0, 1, 0, 36, - 0, 0, 0, 52, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 1, 2, 255, - 255, 31, 0, 0, 2, 0, - 0, 0, 128, 0, 0, 15, - 176, 31, 0, 0, 2, 0, - 0, 0, 144, 0, 8, 15, - 160, 1, 0, 0, 2, 0, - 0, 3, 128, 0, 0, 235, - 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, 83, 72, 68, 82, 156, - 0, 0, 0, 64, 0, 0, - 0, 39, 0, 0, 0, 89, - 0, 0, 4, 70, 142, 32, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 90, 0, 0, - 3, 0, 96, 16, 0, 0, - 0, 0, 0, 88, 24, 0, - 4, 0, 112, 16, 0, 0, - 0, 0, 0, 85, 85, 0, - 0, 98, 16, 0, 3, 194, - 16, 16, 0, 1, 0, 0, - 0, 101, 0, 0, 3, 242, - 32, 16, 0, 0, 0, 0, - 0, 104, 0, 0, 2, 1, - 0, 0, 0, 69, 0, 0, - 9, 242, 0, 16, 0, 0, - 0, 0, 0, 230, 26, 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, 32, 16, 0, 0, - 0, 0, 0, 246, 15, 16, - 0, 0, 0, 0, 0, 70, - 142, 32, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 62, - 0, 0, 1, 83, 84, 65, - 84, 116, 0, 0, 0, 3, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 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, 92, - 1, 0, 0, 1, 0, 0, - 0, 176, 0, 0, 0, 3, - 0, 0, 0, 28, 0, 0, - 0, 0, 4, 255, 255, 0, - 1, 0, 0, 40, 1, 0, - 0, 124, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 150, 0, 0, - 0, 2, 0, 0, 0, 5, - 0, 0, 0, 4, 0, 0, - 0, 255, 255, 255, 255, 0, - 0, 0, 0, 1, 0, 0, - 0, 12, 0, 0, 0, 156, - 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, 76, 97, 121, 101, 114, - 84, 101, 120, 116, 117, 114, - 101, 83, 97, 109, 112, 108, - 101, 114, 76, 105, 110, 101, - 97, 114, 0, 116, 77, 97, - 115, 107, 0, 80, 101, 114, - 79, 99, 99, 97, 115, 105, - 111, 110, 97, 108, 76, 97, - 121, 101, 114, 0, 171, 156, - 0, 0, 0, 2, 0, 0, - 0, 200, 0, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 248, - 0, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 12, 1, 0, - 0, 0, 0, 0, 0, 28, - 1, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 0, 2, - 0, 0, 0, 12, 1, 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, 0, 0, 0, - 0, 0, 0, 0, 0, 102, - 76, 97, 121, 101, 114, 67, - 111, 108, 111, 114, 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, 0, 0, - 0, 92, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 3, 0, 0, 0, 1, - 0, 0, 0, 12, 12, 0, - 0, 83, 86, 95, 80, 111, - 115, 105, 116, 105, 111, 110, - 0, 84, 69, 88, 67, 79, - 79, 82, 68, 0, 171, 171, - 171, 79, 83, 71, 78, 44, - 0, 0, 0, 1, 0, 0, - 0, 8, 0, 0, 0, 32, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 83, - 86, 95, 84, 97, 114, 103, - 101, 116, 0, 171, 171, 3, - 23, 1, 0, 0, 0, 0, - 0, 4, 0, 0, 0, 128, - 0, 0, 0, 0, 0, 0, - 0, 5, 0, 0, 0, 255, - 255, 255, 255, 0, 0, 0, - 0, 48, 0, 0, 0, 20, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 63, - 0, 0, 0, 20, 0, 0, - 0, 0, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 74, 0, 0, - 0, 20, 0, 0, 0, 0, - 0, 0, 0, 32, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 118, 0, 0, 0, 90, - 0, 0, 0, 0, 0, 0, - 0, 48, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 169, - 0, 0, 0, 141, 0, 0, - 0, 0, 0, 0, 0, 64, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 185, 0, 0, - 0, 32, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 255, 255, 255, 255, 0, - 0, 0, 0, 204, 0, 0, - 0, 20, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 224, 0, 0, 0, 20, - 0, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 236, - 0, 0, 0, 64, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 255, 255, 255, - 255, 0, 0, 0, 0, 252, - 0, 0, 0, 141, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 47, 1, 0, - 0, 19, 1, 0, 0, 0, - 0, 0, 0, 255, 255, 255, - 255, 9, 0, 0, 0, 36, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 54, - 1, 0, 0, 37, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 66, 1, 0, - 0, 38, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 78, 1, 0, 0, 39, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 90, - 1, 0, 0, 40, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 102, 1, 0, - 0, 41, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 114, 1, 0, 0, 42, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 126, - 1, 0, 0, 43, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 138, 1, 0, - 0, 44, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 150, 1, 0, 0, 0, - 0, 0, 0, 162, 1, 0, - 0, 19, 1, 0, 0, 0, - 0, 0, 0, 255, 255, 255, - 255, 9, 0, 0, 0, 36, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 172, - 1, 0, 0, 37, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 184, 1, 0, - 0, 38, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 196, 1, 0, 0, 39, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 208, - 1, 0, 0, 40, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 220, 1, 0, - 0, 41, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 232, 1, 0, 0, 42, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 244, - 1, 0, 0, 43, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 2, 0, - 0, 44, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 12, 2, 0, 0, 0, - 0, 0, 0, 24, 2, 0, - 0, 19, 1, 0, 0, 0, - 0, 0, 0, 255, 255, 255, - 255, 5, 0, 0, 0, 36, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 36, - 2, 0, 0, 37, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 48, 2, 0, - 0, 37, 0, 0, 0, 1, - 0, 0, 0, 1, 0, 0, - 0, 60, 2, 0, 0, 44, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 72, - 2, 0, 0, 44, 0, 0, - 0, 1, 0, 0, 0, 1, - 0, 0, 0, 84, 2, 0, - 0, 0, 0, 0, 0, 96, - 2, 0, 0, 19, 1, 0, - 0, 0, 0, 0, 0, 255, - 255, 255, 255, 9, 0, 0, - 0, 36, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 116, 2, 0, 0, 37, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 128, - 2, 0, 0, 38, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 140, 2, 0, - 0, 39, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 152, 2, 0, 0, 40, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 164, - 2, 0, 0, 41, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 176, 2, 0, - 0, 42, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 188, 2, 0, 0, 43, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 200, - 2, 0, 0, 44, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 212, 2, 0, - 0, 0, 0, 0, 0, 12, - 3, 0, 0, 240, 2, 0, - 0, 0, 0, 0, 0, 255, - 255, 255, 255, 2, 0, 0, - 0, 19, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 22, 3, 0, 0, 13, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 34, - 3, 0, 0, 0, 0, 0, - 0, 84, 3, 0, 0, 56, - 3, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 0, - 0, 0, 0, 89, 3, 0, - 0, 56, 3, 0, 0, 0, - 0, 0, 0, 255, 255, 255, - 255, 0, 0, 0, 0, 92, - 3, 0, 0, 56, 3, 0, - 0, 0, 0, 0, 0, 255, - 255, 255, 255, 0, 0, 0, - 0, 96, 3, 0, 0, 56, - 3, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 0, - 0, 0, 0, 100, 3, 0, - 0, 56, 3, 0, 0, 0, - 0, 0, 0, 255, 255, 255, - 255, 0, 0, 0, 0, 110, - 3, 0, 0, 56, 3, 0, - 0, 0, 0, 0, 0, 255, - 255, 255, 255, 0, 0, 0, - 0, 157, 3, 0, 0, 129, - 3, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 3, - 0, 0, 0, 45, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 183, 3, 0, - 0, 46, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 195, 3, 0, 0, 47, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 207, - 3, 0, 0, 0, 0, 0, - 0, 219, 3, 0, 0, 129, - 3, 0, 0, 0, 0, 0, - 0, 255, 255, 255, 255, 3, - 0, 0, 0, 45, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 244, 3, 0, - 0, 46, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 4, 0, 0, 47, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 12, - 4, 0, 0, 0, 0, 0, - 0, 24, 4, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 45, 4, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 12, 3, 0, 0, 10, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 48, - 4, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 84, 4, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 47, 1, 0, 0, 6, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 236, - 11, 0, 0, 8, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 244, 11, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 120, 16, 0, 0, 128, - 16, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 45, - 4, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 12, - 3, 0, 0, 10, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 154, 16, 0, - 0, 11, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 190, 16, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 47, - 1, 0, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 86, 24, 0, - 0, 8, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 94, 24, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 226, - 28, 0, 0, 234, 28, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 45, 4, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 12, 3, 0, - 0, 10, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 0, 29, 0, 0, 11, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 36, - 29, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 47, 1, 0, - 0, 6, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 188, 36, 0, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 196, - 36, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 36, 41, 0, - 0, 44, 41, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 45, 4, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 12, 3, 0, 0, 10, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 69, - 41, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 105, 41, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 162, 1, 0, 0, 6, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 1, - 49, 0, 0, 8, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 9, 49, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 105, 53, 0, 0, 113, - 53, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 45, - 4, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 12, - 3, 0, 0, 10, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 140, 53, 0, - 0, 11, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 176, 53, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 47, - 1, 0, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 72, 61, 0, - 0, 8, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 80, 61, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 176, - 65, 0, 0, 184, 65, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 45, 4, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 12, 3, 0, - 0, 10, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 214, 65, 0, 0, 11, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 250, - 65, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 162, 1, 0, - 0, 6, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 146, 73, 0, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 154, - 73, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 250, 77, 0, - 0, 2, 78, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 45, 4, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 12, 3, 0, 0, 10, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 19, - 78, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 55, 78, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 47, 1, 0, 0, 6, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 207, - 85, 0, 0, 8, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 215, 85, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 71, 93, 0, 0, 79, - 93, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 45, - 4, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 12, - 3, 0, 0, 10, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 105, 93, 0, - 0, 11, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 141, 93, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 96, - 2, 0, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 37, 101, 0, - 0, 8, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 45, 101, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 13, - 107, 0, 0, 21, 107, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 45, 4, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 12, 3, 0, - 0, 10, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 43, 107, 0, 0, 11, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 79, - 107, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 47, 1, 0, - 0, 6, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 231, 114, 0, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 239, - 114, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 215, 117, 0, - 0, 223, 117, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 45, 4, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 12, 3, 0, 0, 10, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 240, - 117, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 20, 118, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 24, 2, 0, 0, 6, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 172, - 125, 0, 0, 8, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 180, 125, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 156, 128, 0, 0, 164, - 128, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 45, - 4, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 12, - 3, 0, 0, 10, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 195, 128, 0, - 0, 11, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 231, 128, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 24, - 2, 0, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 127, 136, 0, - 0, 8, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 135, 136, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 35, - 139, 0, 0, 43, 139, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 45, 4, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 12, 3, 0, - 0, 10, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 68, 139, 0, 0, 11, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 104, - 139, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 47, 1, 0, - 0, 6, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 196, 147, 0, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 204, - 147, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 40, 153, 0, - 0, 48, 153, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 45, 4, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 12, 3, 0, 0, 10, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 78, - 153, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 114, 153, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 47, 1, 0, 0, 6, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 206, - 161, 0, 0, 8, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 214, 161, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 118, 167, 0, 0, 126, - 167, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 45, - 4, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 12, - 3, 0, 0, 10, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 152, 167, 0, - 0, 11, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 188, 167, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 47, - 1, 0, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 24, 176, 0, - 0, 8, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 32, 176, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 88, - 181, 0, 0, 96, 181, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 45, 4, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 12, 3, 0, - 0, 10, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 124, 181, 0, 0, 11, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 160, - 181, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 47, 1, 0, - 0, 6, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 80, 190, 0, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 88, - 190, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 200, 195, 0, - 0, 208, 195, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 45, 4, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 12, 3, 0, 0, 10, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 237, - 195, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 17, 196, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 162, 1, 0, 0, 6, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 109, - 204, 0, 0, 8, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 117, 204, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 173, 209, 0, 0, 181, - 209, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 45, - 4, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 12, - 3, 0, 0, 10, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 212, 209, 0, - 0, 11, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 248, 209, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 47, - 1, 0, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 84, 218, 0, - 0, 8, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 92, 218, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 216, - 223, 0, 0, 224, 223, 0, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 45, 4, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 12, 3, 0, - 0, 10, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 2, 224, 0, 0, 11, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 38, - 224, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 162, 1, 0, - 0, 6, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 130, 232, 0, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 138, - 232, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 6, 238, 0, - 0, 14, 238, 0, 0, 1, - 0, 0, 0, 0, 0, 0, - 0, 45, 4, 0, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 12, 3, 0, 0, 10, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 35, - 238, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 71, 238, 0, - 0, 2, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, - 0, 47, 1, 0, 0, 6, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 163, - 246, 0, 0, 8, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 171, 246, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 239, 254, 0, 0, 247, - 254, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 45, - 4, 0, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 12, - 3, 0, 0, 10, 0, 0, - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 21, 255, 0, - 0, 11, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 57, 255, 0, 0, 2, - 0, 0, 0, 0, 0, 0, - 0, 2, 0, 0, 0, 96, - 2, 0, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 149, 7, 1, - 0, 8, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 157, 7, 1, 0, 7, - 0, 0, 0, 0, 0, 0, - 0, 7, 0, 0, 0, 77, - 14, 1, 0, 85, 14, 1, - 0, 1, 0, 0, 0, 0, - 0, 0, 0, 45, 4, 0, - 0, 7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 12, 3, 0, - 0, 10, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, - 0, 111, 14, 1, 0, 11, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 147, - 14, 1, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 2, - 0, 0, 0, 47, 1, 0, - 0, 6, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, - 0, 239, 22, 1, 0, 8, - 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0, 247, - 22, 1, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 7, - 0, 0, 0, 251, 26, 1, - 0 -}; diff --git a/gfx/layers/d3d10/PaintedLayerD3D10.cpp b/gfx/layers/d3d10/PaintedLayerD3D10.cpp deleted file mode 100644 index 887b79ada9f..00000000000 --- a/gfx/layers/d3d10/PaintedLayerD3D10.cpp +++ /dev/null @@ -1,478 +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 "mozilla/layers/PLayerTransaction.h" - -// This must occur *after* layers/PLayerTransaction.h to avoid -// typedefs conflicts. -#include "mozilla/ArrayUtils.h" - -#include "PaintedLayerD3D10.h" -#include "gfxPlatform.h" - -#include "gfxWindowsPlatform.h" -#ifdef CAIRO_HAS_D2D_SURFACE -#include "gfxD2DSurface.h" -#endif - -#include "../d3d9/Nv3DVUtils.h" -#include "gfxTeeSurface.h" -#include "gfxUtils.h" -#include "ReadbackLayer.h" -#include "ReadbackProcessor.h" - -#include "mozilla/Preferences.h" -#include "mozilla/gfx/2D.h" - -namespace mozilla { -namespace layers { - -using namespace mozilla::gfx; - -PaintedLayerD3D10::PaintedLayerD3D10(LayerManagerD3D10 *aManager) - : PaintedLayer(aManager, nullptr) - , LayerD3D10(aManager) - , mCurrentSurfaceMode(SurfaceMode::SURFACE_OPAQUE) -{ - mImplData = static_cast(this); -} - -PaintedLayerD3D10::~PaintedLayerD3D10() -{ -} - -void -PaintedLayerD3D10::InvalidateRegion(const nsIntRegion &aRegion) -{ - mInvalidRegion.Or(mInvalidRegion, aRegion); - mInvalidRegion.SimplifyOutward(20); - mValidRegion.Sub(mValidRegion, mInvalidRegion); -} - -void PaintedLayerD3D10::CopyRegion(ID3D10Texture2D* aSrc, const nsIntPoint &aSrcOffset, - ID3D10Texture2D* aDest, const nsIntPoint &aDestOffset, - const nsIntRegion &aCopyRegion, nsIntRegion* aValidRegion) -{ - nsIntRegion retainedRegion; - nsIntRegionRectIterator iter(aCopyRegion); - const nsIntRect *r; - while ((r = iter.Next())) { - // Calculate the retained rectangle's position on the old and the new - // surface. - D3D10_BOX box; - box.left = r->x - aSrcOffset.x; - box.top = r->y - aSrcOffset.y; - box.right = box.left + r->width; - box.bottom = box.top + r->height; - box.back = 1; - box.front = 0; - - device()->CopySubresourceRegion(aDest, 0, - r->x - aDestOffset.x, - r->y - aDestOffset.y, - 0, - aSrc, 0, - &box); - - retainedRegion.Or(retainedRegion, *r); - } - - // Areas which were valid and were retained are still valid - aValidRegion->And(*aValidRegion, retainedRegion); -} - -void -PaintedLayerD3D10::RenderLayer() -{ - if (!mTexture) { - return; - } - - SetEffectTransformAndOpacity(); - - ID3D10EffectTechnique *technique; - switch (mCurrentSurfaceMode) { - case SurfaceMode::SURFACE_COMPONENT_ALPHA: - technique = SelectShader(SHADER_COMPONENT_ALPHA | LoadMaskTexture()); - break; - case SurfaceMode::SURFACE_OPAQUE: - technique = SelectShader(SHADER_RGB | SHADER_PREMUL | LoadMaskTexture()); - break; - case SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA: - technique = SelectShader(SHADER_RGBA | SHADER_PREMUL | LoadMaskTexture()); - break; - default: - NS_ERROR("Unknown mode"); - return; - } - - nsIntRegionRectIterator iter(mVisibleRegion); - - const nsIntRect *iterRect; - if (mSRView) { - effect()->GetVariableByName("tRGB")->AsShaderResource()->SetResource(mSRView); - } - if (mSRViewOnWhite) { - effect()->GetVariableByName("tRGBWhite")->AsShaderResource()->SetResource(mSRViewOnWhite); - } - - while ((iterRect = iter.Next())) { - effect()->GetVariableByName("vLayerQuad")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)iterRect->x, - (float)iterRect->y, - (float)iterRect->width, - (float)iterRect->height) - ); - - effect()->GetVariableByName("vTextureCoords")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)(iterRect->x - mTextureRect.x) / (float)mTextureRect.width, - (float)(iterRect->y - mTextureRect.y) / (float)mTextureRect.height, - (float)iterRect->width / (float)mTextureRect.width, - (float)iterRect->height / (float)mTextureRect.height) - ); - - technique->GetPassByIndex(0)->Apply(0); - device()->Draw(4, 0); - } - - // Set back to default. - effect()->GetVariableByName("vTextureCoords")->AsVector()-> - SetFloatVector(ShaderConstantRectD3D10(0, 0, 1.0f, 1.0f)); -} - -void -PaintedLayerD3D10::Validate(ReadbackProcessor *aReadback) -{ - if (mVisibleRegion.IsEmpty()) { - return; - } - - if (FAILED(gfxWindowsPlatform::GetPlatform()->GetD3D10Device()->GetDeviceRemovedReason())) { - // Device removed, this will be discovered on the next rendering pass. - // Do no validate. - return; - } - - nsIntRect newTextureRect = mVisibleRegion.GetBounds(); - - SurfaceMode mode = GetSurfaceMode(); - if (mode == SurfaceMode::SURFACE_COMPONENT_ALPHA && - (!mParent || !mParent->SupportsComponentAlphaChildren())) { - mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA; - } - // If we have a transform that requires resampling of our texture, then - // we need to make sure we don't sample pixels that haven't been drawn. - // We clamp sample coordinates to the texture rect, but when the visible region - // doesn't fill the entire texture rect we need to make sure we draw all the - // pixels in the texture rect anyway in case they get sampled. - nsIntRegion neededRegion = mVisibleRegion; - if (!neededRegion.GetBounds().IsEqualInterior(newTextureRect) || - neededRegion.GetNumRects() > 1) { - if (MayResample()) { - neededRegion = newTextureRect; - if (mode == SurfaceMode::SURFACE_OPAQUE) { - // We're going to paint outside the visible region, but layout hasn't - // promised that it will paint opaquely there, so we'll have to - // treat this layer as transparent. - mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA; - } - } - } - mCurrentSurfaceMode = mode; - - VerifyContentType(mode); - - nsTArray readbackUpdates; - nsIntRegion readbackRegion; - if (aReadback && UsedForReadback()) { - aReadback->GetPaintedLayerUpdates(this, &readbackUpdates, &readbackRegion); - } - - if (mTexture) { - if (!mTextureRect.IsEqualInterior(newTextureRect)) { - nsRefPtr oldTexture = mTexture; - mTexture = nullptr; - nsRefPtr oldTextureOnWhite = mTextureOnWhite; - mTextureOnWhite = nullptr; - - nsIntRegion retainRegion = mTextureRect; - // Old visible region will become the region that is covered by both the - // old and the new visible region. - retainRegion.And(retainRegion, mVisibleRegion); - // No point in retaining parts which were not valid. - retainRegion.And(retainRegion, mValidRegion); - - CreateNewTextures(gfx::IntSize(newTextureRect.width, newTextureRect.height), mode); - - nsIntRect largeRect = retainRegion.GetLargestRectangle(); - - // If we had no hardware texture before, or have no retained area larger than - // the retention threshold, we're not retaining and are done here. - // If our texture creation failed this can mean a device reset is pending - // and we should silently ignore the failure. In the future when device - // failures are properly handled we should test for the type of failure - // and gracefully handle different failures. See bug 569081. - if (!oldTexture || !mTexture) { - mValidRegion.SetEmpty(); - } else { - CopyRegion(oldTexture, mTextureRect.TopLeft(), - mTexture, newTextureRect.TopLeft(), - retainRegion, &mValidRegion); - if (oldTextureOnWhite) { - CopyRegion(oldTextureOnWhite, mTextureRect.TopLeft(), - mTextureOnWhite, newTextureRect.TopLeft(), - retainRegion, &mValidRegion); - } - } - } - } - mTextureRect = newTextureRect; - - if (!mTexture || (mode == SurfaceMode::SURFACE_COMPONENT_ALPHA && !mTextureOnWhite)) { - CreateNewTextures(gfx::IntSize(newTextureRect.width, newTextureRect.height), mode); - mValidRegion.SetEmpty(); - } - - nsIntRegion drawRegion; - drawRegion.Sub(neededRegion, mValidRegion); - - if (!drawRegion.IsEmpty()) { - LayerManagerD3D10::CallbackInfo cbInfo = mD3DManager->GetCallbackInfo(); - if (!cbInfo.Callback) { - NS_ERROR("D3D10 should never need to update PaintedLayers in an empty transaction"); - return; - } - - DrawRegion(drawRegion, mode); - - if (readbackUpdates.Length() > 0) { - CD3D10_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM, - newTextureRect.width, newTextureRect.height, - 1, 1, 0, D3D10_USAGE_STAGING, - D3D10_CPU_ACCESS_READ); - - nsRefPtr readbackTexture; - HRESULT hr = device()->CreateTexture2D(&desc, nullptr, getter_AddRefs(readbackTexture)); - if (FAILED(hr)) { - LayerManagerD3D10::ReportFailure(NS_LITERAL_CSTRING("PaintedLayerD3D10::Validate(): Failed to create texture"), - hr); - return; - } - - device()->CopyResource(readbackTexture, mTexture); - - for (uint32_t i = 0; i < readbackUpdates.Length(); i++) { - mD3DManager->readbackManager()->PostTask(readbackTexture, - &readbackUpdates[i], - gfxPoint(newTextureRect.x, newTextureRect.y)); - } - } - - mValidRegion = neededRegion; - } -} - -void -PaintedLayerD3D10::LayerManagerDestroyed() -{ - mD3DManager = nullptr; -} - -Layer* -PaintedLayerD3D10::GetLayer() -{ - return this; -} - -void -PaintedLayerD3D10::VerifyContentType(SurfaceMode aMode) -{ - if (mDrawTarget) { - SurfaceFormat format = aMode != SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA ? - SurfaceFormat::B8G8R8X8 : SurfaceFormat::B8G8R8A8; - - if (format != mDrawTarget->GetFormat()) { - mDrawTarget = Factory::CreateDrawTargetForD3D10Texture(mTexture, format); - - if (!mDrawTarget) { - gfxWarning() << "Failed to create drawtarget for PaintedLayerD3D10."; - return; - } - - mValidRegion.SetEmpty(); - } - } - - if (aMode != SurfaceMode::SURFACE_COMPONENT_ALPHA && mTextureOnWhite) { - // If we've transitioned away from component alpha, we can delete those resources. - mSRViewOnWhite = nullptr; - mTextureOnWhite = nullptr; - mValidRegion.SetEmpty(); - } -} - -void -PaintedLayerD3D10::FillTexturesBlackWhite(const nsIntRegion& aRegion, const nsIntPoint& aOffset) -{ - if (mTexture && mTextureOnWhite) { - // It would be more optimal to draw the actual geometry, but more code - // and probably not worth the win here as this will often be a single - // rect. - nsRefPtr oldRT; - device()->OMGetRenderTargets(1, getter_AddRefs(oldRT), nullptr); - - nsRefPtr viewBlack; - nsRefPtr viewWhite; - device()->CreateRenderTargetView(mTexture, nullptr, getter_AddRefs(viewBlack)); - device()->CreateRenderTargetView(mTextureOnWhite, nullptr, getter_AddRefs(viewWhite)); - - D3D10_RECT oldScissor; - UINT numRects = 1; - device()->RSGetScissorRects(&numRects, &oldScissor); - - D3D10_TEXTURE2D_DESC desc; - mTexture->GetDesc(&desc); - - D3D10_RECT scissor = { 0, 0, desc.Width, desc.Height }; - device()->RSSetScissorRects(1, &scissor); - - mD3DManager->SetupInputAssembler(); - nsIntSize oldVP = mD3DManager->GetViewport(); - - mD3DManager->SetViewport(nsIntSize(desc.Width, desc.Height)); - - ID3D10RenderTargetView *views[2] = { viewBlack, viewWhite }; - device()->OMSetRenderTargets(2, views, nullptr); - - gfx3DMatrix transform; - transform.Translate(Point3D(-aOffset.x, -aOffset.y, 0)); - void* raw = &const_cast(transform)._11; - effect()->GetVariableByName("mLayerTransform")->SetRawValue(raw, 0, 64); - - ID3D10EffectTechnique *technique = - effect()->GetTechniqueByName("PrepareAlphaExtractionTextures"); - - nsIntRegionRectIterator iter(aRegion); - - const nsIntRect *iterRect; - while ((iterRect = iter.Next())) { - effect()->GetVariableByName("vLayerQuad")->AsVector()->SetFloatVector( - ShaderConstantRectD3D10( - (float)iterRect->x, - (float)iterRect->y, - (float)iterRect->width, - (float)iterRect->height) - ); - - technique->GetPassByIndex(0)->Apply(0); - device()->Draw(4, 0); - } - - views[0] = oldRT; - device()->OMSetRenderTargets(1, views, nullptr); - mD3DManager->SetViewport(oldVP); - device()->RSSetScissorRects(1, &oldScissor); - } -} - -void -PaintedLayerD3D10::DrawRegion(nsIntRegion &aRegion, SurfaceMode aMode) -{ - nsIntRect visibleRect = mVisibleRegion.GetBounds(); - - if (!mDrawTarget) { - return; - } - - aRegion.SimplifyOutwardByArea(100 * 100); - - if (aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA) { - FillTexturesBlackWhite(aRegion, visibleRect.TopLeft()); - } - - nsRefPtr context = new gfxContext(mDrawTarget); - - context->SetMatrix( - context->CurrentMatrix().Translate(-visibleRect.x, -visibleRect.y)); - if (aMode == SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA) { - nsIntRegionRectIterator iter(aRegion); - const nsIntRect *iterRect; - while ((iterRect = iter.Next())) { - mDrawTarget->ClearRect(Rect(iterRect->x, iterRect->y, iterRect->width, iterRect->height)); - } - } - - mDrawTarget->SetPermitSubpixelAA(!(mContentFlags & CONTENT_COMPONENT_ALPHA)); - - LayerManagerD3D10::CallbackInfo cbInfo = mD3DManager->GetCallbackInfo(); - cbInfo.Callback(this, context, aRegion, DrawRegionClip::DRAW, nsIntRegion(), cbInfo.CallbackData); -} - -void -PaintedLayerD3D10::CreateNewTextures(const gfx::IntSize &aSize, SurfaceMode aMode) -{ - if (aSize.width == 0 || aSize.height == 0) { - // Nothing to do. - return; - } - - CD3D10_TEXTURE2D_DESC desc(DXGI_FORMAT_B8G8R8A8_UNORM, aSize.width, aSize.height, 1, 1); - desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE; - desc.MiscFlags = D3D10_RESOURCE_MISC_GDI_COMPATIBLE; - HRESULT hr; - - if (!mTexture) { - hr = device()->CreateTexture2D(&desc, nullptr, getter_AddRefs(mTexture)); - - if (FAILED(hr)) { - NS_WARNING("Failed to create new texture for PaintedLayerD3D10!"); - return; - } - - hr = device()->CreateShaderResourceView(mTexture, nullptr, getter_AddRefs(mSRView)); - - if (FAILED(hr)) { - NS_WARNING("Failed to create shader resource view for PaintedLayerD3D10."); - } - - mDrawTarget = nullptr; - } - - if (aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA && !mTextureOnWhite) { - hr = device()->CreateTexture2D(&desc, nullptr, getter_AddRefs(mTextureOnWhite)); - - if (FAILED(hr)) { - NS_WARNING("Failed to create new texture for PaintedLayerD3D10!"); - return; - } - - hr = device()->CreateShaderResourceView(mTextureOnWhite, nullptr, getter_AddRefs(mSRViewOnWhite)); - - if (FAILED(hr)) { - NS_WARNING("Failed to create shader resource view for PaintedLayerD3D10."); - } - - mDrawTarget = nullptr; - } - - if (!mDrawTarget) { - if (aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA) { - mDrawTarget = Factory::CreateDualDrawTargetForD3D10Textures(mTexture, mTextureOnWhite, SurfaceFormat::B8G8R8X8); - } else { - mDrawTarget = Factory::CreateDrawTargetForD3D10Texture(mTexture, aMode != SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA ? - SurfaceFormat::B8G8R8X8 : SurfaceFormat::B8G8R8A8); - } - - if (!mDrawTarget) { - gfxWarning() << "Failed to create DrawTarget for PaintedLayerD3D10."; - return; - } - } -} - -} /* namespace layers */ -} /* namespace mozilla */ diff --git a/gfx/layers/d3d10/PaintedLayerD3D10.h b/gfx/layers/d3d10/PaintedLayerD3D10.h deleted file mode 100644 index c6d502d377b..00000000000 --- a/gfx/layers/d3d10/PaintedLayerD3D10.h +++ /dev/null @@ -1,73 +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_PAINTEDLAYERD3D10_H -#define GFX_PAINTEDLAYERD3D10_H - -#include "LayerManagerD3D10.h" - -namespace mozilla { -namespace layers { - -class PaintedLayerD3D10 : public PaintedLayer, - public LayerD3D10 -{ -public: - PaintedLayerD3D10(LayerManagerD3D10 *aManager); - virtual ~PaintedLayerD3D10(); - - void Validate(ReadbackProcessor *aReadback); - - /* PaintedLayer implementation */ - void InvalidateRegion(const nsIntRegion& aRegion); - - /* LayerD3D10 implementation */ - virtual Layer* GetLayer(); - virtual void RenderLayer(); - virtual void Validate() { Validate(nullptr); } - virtual void LayerManagerDestroyed(); - -private: - /* Texture with our surface data */ - nsRefPtr mTexture; - - /* Shader resource view for our texture */ - nsRefPtr mSRView; - - /* Texture for render-on-whitew when doing component alpha */ - nsRefPtr mTextureOnWhite; - - /* Shader resource view for our render-on-white texture */ - nsRefPtr mSRViewOnWhite; - - /* Area of layer currently stored in texture(s) */ - nsIntRect mTextureRect; - - /* Last surface mode set in Validate() */ - SurfaceMode mCurrentSurfaceMode; - - /* Checks if our D2D surface has the right content type */ - void VerifyContentType(SurfaceMode aMode); - - mozilla::RefPtr mDrawTarget; - - /* Have a region of our layer drawn */ - void DrawRegion(nsIntRegion &aRegion, SurfaceMode aMode); - - /* Create a new texture */ - void CreateNewTextures(const gfx::IntSize &aSize, SurfaceMode aMode); - - // Fill textures with opaque black and white in the specified region. - void FillTexturesBlackWhite(const nsIntRegion& aRegion, const nsIntPoint& aOffset); - - /* Copy a texture region */ - void CopyRegion(ID3D10Texture2D* aSrc, const nsIntPoint &aSrcOffset, - ID3D10Texture2D* aDest, const nsIntPoint &aDestOffset, - const nsIntRegion &aCopyRegion, nsIntRegion* aValidRegion); -}; - -} /* layers */ -} /* mozilla */ -#endif /* GFX_PAINTEDLAYERD3D10_H */ diff --git a/gfx/layers/d3d10/ReadbackLayerD3D10.h b/gfx/layers/d3d10/ReadbackLayerD3D10.h deleted file mode 100644 index a731304b02e..00000000000 --- a/gfx/layers/d3d10/ReadbackLayerD3D10.h +++ /dev/null @@ -1,33 +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_READBACKLAYERD3D10_H -#define GFX_READBACKLAYERD3D10_H - -#include "LayerManagerD3D10.h" -#include "ReadbackLayer.h" - -namespace mozilla { -namespace layers { - -class ReadbackLayerD3D10 : - public ReadbackLayer, - public LayerD3D10 -{ -public: - ReadbackLayerD3D10(LayerManagerD3D10 *aManager) - : ReadbackLayer(aManager, nullptr), - LayerD3D10(aManager) - { - mImplData = static_cast(this); - } - - virtual Layer* GetLayer() { return this; } - virtual void RenderLayer() {} -}; - -} /* layers */ -} /* mozilla */ -#endif /* GFX_READBACKLAYERD3D10_H */ diff --git a/gfx/layers/d3d10/ReadbackManagerD3D10.cpp b/gfx/layers/d3d10/ReadbackManagerD3D10.cpp deleted file mode 100644 index 650087615ad..00000000000 --- a/gfx/layers/d3d10/ReadbackManagerD3D10.cpp +++ /dev/null @@ -1,225 +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 "ReadbackManagerD3D10.h" -#include "ReadbackProcessor.h" -#include "ReadbackLayer.h" - -#include "nsIThread.h" -#include "nsThreadUtils.h" -#include "gfxImageSurface.h" -#include "gfxContext.h" - -namespace mozilla { -namespace layers { - -// Structure that contains the information required to execute a readback task, -// the only member accessed off the main thread here is mReadbackTexture. Since -// mLayer may be released only on the main thread this object should always be -// destroyed on the main thread! -struct ReadbackTask { - // The texture that we copied the contents of the paintedlayer to. - nsRefPtr mReadbackTexture; - // This exists purely to keep the ReadbackLayer alive for the lifetime of - // mUpdate. Note that this addref and release should occur -solely- on the - // main thread. - nsRefPtr mLayer; - ReadbackProcessor::Update mUpdate; - // The origin in PaintedLayer coordinates of mReadbackTexture. - gfxPoint mOrigin; - // mLayer->GetBackgroundOffset() when the task is created. We have - // to save this in the ReadbackTask because it might change before - // the update is delivered to the readback sink. - nsIntPoint mBackgroundOffset; -}; - -// This class is created and dispatched from the Readback thread but it must be -// destroyed by the main thread. -class ReadbackResultWriter MOZ_FINAL : public nsIRunnable -{ - ~ReadbackResultWriter() {} - NS_DECL_THREADSAFE_ISUPPORTS -public: - ReadbackResultWriter(ReadbackTask *aTask) : mTask(aTask) {} - - NS_IMETHODIMP Run() - { - ReadbackProcessor::Update *update = &mTask->mUpdate; - - if (!update->mLayer->GetSink()) { - // This can happen when a plugin is destroyed. - return NS_OK; - } - - nsIntPoint offset = mTask->mBackgroundOffset; - - D3D10_TEXTURE2D_DESC desc; - mTask->mReadbackTexture->GetDesc(&desc); - - D3D10_MAPPED_TEXTURE2D mappedTex; - // We know this map will immediately succeed, as we've already mapped this - // copied data on our task thread. - HRESULT hr = mTask->mReadbackTexture->Map(0, D3D10_MAP_READ, 0, &mappedTex); - - if (FAILED(hr)) { - // If this fails we're never going to get our PaintedLayer content. - update->mLayer->GetSink()->SetUnknown(update->mSequenceCounter); - return NS_OK; - } - - nsRefPtr sourceSurface = - new gfxImageSurface((unsigned char*)mappedTex.pData, - gfxIntSize(desc.Width, desc.Height), - mappedTex.RowPitch, - gfxImageFormat::RGB24); - - nsRefPtr ctx = - update->mLayer->GetSink()->BeginUpdate(update->mUpdateRect + offset, - update->mSequenceCounter); - - if (ctx) { - ctx->SetMatrix( - ctx->CurrentMatrix().Translate(offset.x, offset.y)); - ctx->SetSource(sourceSurface, gfxPoint(mTask->mOrigin.x, - mTask->mOrigin.y)); - ctx->Paint(); - - update->mLayer->GetSink()->EndUpdate(ctx, update->mUpdateRect + offset); - } - - mTask->mReadbackTexture->Unmap(0); - - return NS_OK; - } - -private: - nsAutoPtr mTask; -}; - -NS_IMPL_ISUPPORTS(ReadbackResultWriter, nsIRunnable) - -DWORD WINAPI StartTaskThread(void *aManager) -{ - static_cast(aManager)->ProcessTasks(); - - return 0; -} - -ReadbackManagerD3D10::ReadbackManagerD3D10() - : mRefCnt(0) -{ - ::InitializeCriticalSection(&mTaskMutex); - mShutdownEvent = ::CreateEventA(nullptr, FALSE, FALSE, nullptr); - mTaskSemaphore = ::CreateSemaphoreA(nullptr, 0, 1000000, nullptr); - mTaskThread = ::CreateThread(nullptr, 0, StartTaskThread, this, 0, 0); -} - -ReadbackManagerD3D10::~ReadbackManagerD3D10() -{ - ::SetEvent(mShutdownEvent); - - // This shouldn't take longer than 5 seconds, if it does we're going to choose - // to leak the thread and its synchronisation in favor of crashing or freezing - DWORD result = ::WaitForSingleObject(mTaskThread, 5000); - if (result != WAIT_TIMEOUT) { - ::DeleteCriticalSection(&mTaskMutex); - ::CloseHandle(mShutdownEvent); - ::CloseHandle(mTaskSemaphore); - ::CloseHandle(mTaskThread); - } else { - NS_RUNTIMEABORT("ReadbackManager: Task thread did not shutdown in 5 seconds."); - } -} - -void -ReadbackManagerD3D10::PostTask(ID3D10Texture2D *aTexture, void *aUpdate, const gfxPoint &aOrigin) -{ - ReadbackTask *task = new ReadbackTask; - task->mReadbackTexture = aTexture; - task->mUpdate = *static_cast(aUpdate); - task->mOrigin = aOrigin; - task->mLayer = task->mUpdate.mLayer; - task->mBackgroundOffset = task->mLayer->GetBackgroundLayerOffset(); - - ::EnterCriticalSection(&mTaskMutex); - mPendingReadbackTasks.AppendElement(task); - ::LeaveCriticalSection(&mTaskMutex); - - ::ReleaseSemaphore(mTaskSemaphore, 1, nullptr); -} - -HRESULT -ReadbackManagerD3D10::QueryInterface(REFIID riid, void **ppvObject) -{ - if (!ppvObject) { - return E_POINTER; - } - - if (riid == IID_IUnknown) { - *ppvObject = this; - } else { - return E_NOINTERFACE; - } - - return S_OK; -} - -ULONG -ReadbackManagerD3D10::AddRef() -{ - NS_ASSERTION(NS_IsMainThread(), - "ReadbackManagerD3D10 should only be refcounted on main thread."); - return ++mRefCnt; -} - -ULONG -ReadbackManagerD3D10::Release() -{ - NS_ASSERTION(NS_IsMainThread(), - "ReadbackManagerD3D10 should only be refcounted on main thread."); - ULONG newRefCnt = --mRefCnt; - if (!newRefCnt) { - mRefCnt++; - delete this; - } - return newRefCnt; -} - -void -ReadbackManagerD3D10::ProcessTasks() -{ - HANDLE handles[] = { mTaskSemaphore, mShutdownEvent }; - - while (true) { - DWORD result = ::WaitForMultipleObjects(2, handles, FALSE, INFINITE); - if (result != WAIT_OBJECT_0) { - return; - } - - ::EnterCriticalSection(&mTaskMutex); - if (mPendingReadbackTasks.Length() == 0) { - NS_RUNTIMEABORT("Trying to read from an empty array, bad bad bad"); - } - ReadbackTask *nextReadbackTask = mPendingReadbackTasks[0].forget(); - mPendingReadbackTasks.RemoveElementAt(0); - ::LeaveCriticalSection(&mTaskMutex); - - // We want to block here until the texture contents are available, the - // easiest thing is to simply map and unmap. - D3D10_MAPPED_TEXTURE2D mappedTex; - nextReadbackTask->mReadbackTexture->Map(0, D3D10_MAP_READ, 0, &mappedTex); - nextReadbackTask->mReadbackTexture->Unmap(0); - - // We can only send the update to the sink on the main thread, so post an - // event there to do so. Ownership of the task is passed from - // mPendingReadbackTasks to ReadbackResultWriter here. - nsCOMPtr thread = do_GetMainThread(); - thread->Dispatch(new ReadbackResultWriter(nextReadbackTask), - nsIEventTarget::DISPATCH_NORMAL); - } -} - -} -} diff --git a/gfx/layers/d3d10/ReadbackManagerD3D10.h b/gfx/layers/d3d10/ReadbackManagerD3D10.h deleted file mode 100644 index 5aa5113746f..00000000000 --- a/gfx/layers/d3d10/ReadbackManagerD3D10.h +++ /dev/null @@ -1,75 +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_READBACKMANAGERD3D10_H -#define GFX_READBACKMANAGERD3D10_H - -#include -#include - -#include "nsTArray.h" -#include "nsAutoPtr.h" -#include "gfxPoint.h" - -namespace mozilla { -namespace layers { - -DWORD WINAPI StartTaskThread(void *aManager); - -struct ReadbackTask; - -class ReadbackManagerD3D10 MOZ_FINAL : public IUnknown -{ -public: - ReadbackManagerD3D10(); - ~ReadbackManagerD3D10(); - - /** - * Tell the readback manager to post a readback task. - * - * @param aTexture D3D10_USAGE_STAGING texture that will contain the data that - * was readback. - * @param aUpdate ReadbackProcessor::Update object. This is a void pointer - * since we cannot forward declare a nested class, and do not - * export ReadbackProcessor.h - * @param aOrigin Origin of the aTexture surface in the PaintedLayer - * coordinate system. - */ - void PostTask(ID3D10Texture2D *aTexture, void *aUpdate, const gfxPoint &aOrigin); - - virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, - void **ppvObject); - virtual ULONG STDMETHODCALLTYPE AddRef(void); - virtual ULONG STDMETHODCALLTYPE Release(void); - -private: - friend DWORD WINAPI StartTaskThread(void *aManager); - - void ProcessTasks(); - - // The invariant maintained by |mTaskSemaphore| is that the readback thread - // will awaken from WaitForMultipleObjects() at least once per readback - // task enqueued by the main thread. Since the readback thread processes - // exactly one task per wakeup (with one exception), no tasks are lost. The - // exception is when the readback thread is shut down, which orphans the - // remaining tasks, on purpose. - HANDLE mTaskSemaphore; - // Event signaled when the task thread should shutdown - HANDLE mShutdownEvent; - // Handle to the task thread - HANDLE mTaskThread; - - // FiFo list of readback tasks that are to be executed. Access is synchronized - // by mTaskMutex. - CRITICAL_SECTION mTaskMutex; - nsTArray> mPendingReadbackTasks; - - ULONG mRefCnt; -}; - -} -} - -#endif /* GFX_READBACKMANAGERD3D10_H */ diff --git a/gfx/layers/d3d10/genshaders.sh b/gfx/layers/d3d10/genshaders.sh deleted file mode 100644 index 6cd82bcb87b..00000000000 --- a/gfx/layers/d3d10/genshaders.sh +++ /dev/null @@ -1,5 +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/. - -fxc LayerManagerD3D10.fx -nologo -FhLayerManagerD3D10Effect.h -Tfx_4_0 diff --git a/gfx/layers/ipc/ShadowLayerUtils.h b/gfx/layers/ipc/ShadowLayerUtils.h index acbc1bfb97c..868dd78431f 100644 --- a/gfx/layers/ipc/ShadowLayerUtils.h +++ b/gfx/layers/ipc/ShadowLayerUtils.h @@ -13,10 +13,6 @@ #include "SurfaceTypes.h" #include "mozilla/WidgetUtils.h" -#if defined(MOZ_ENABLE_D3D10_LAYER) -# include "mozilla/layers/ShadowLayerUtilsD3D10.h" -#endif - #if defined(XP_MACOSX) #define MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS #endif diff --git a/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp b/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp deleted file mode 100644 index 9dbd596e4a0..00000000000 --- a/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * vim: sw=2 ts=8 et : - */ -/* 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 -#include - -#include "mozilla/gfx/Point.h" -#include "mozilla/layers/LayerManagerComposite.h" -#include "mozilla/layers/PLayerTransaction.h" -#include "ShadowLayers.h" - -using namespace mozilla::gl; - -namespace mozilla { -namespace layers { - - -/*static*/ void -ShadowLayerForwarder::PlatformSyncBeforeUpdate() -{ -} - -/*static*/ bool -LayerManagerComposite::SupportsDirectTexturing() -{ - return true; -} - -/*static*/ void -LayerManagerComposite::PlatformSyncBeforeReplyUpdate() -{ -} - -bool -GetDescriptor(ID3D10Texture2D* aTexture, SurfaceDescriptorD3D10* aDescr) -{ - NS_ABORT_IF_FALSE(aTexture && aDescr, "Params must be nonnull"); - - HRESULT hr; - IDXGIResource* dr = nullptr; - hr = aTexture->QueryInterface(__uuidof(IDXGIResource), (void**)&dr); - if (!SUCCEEDED(hr) || !dr) - return false; - - hr = dr->GetSharedHandle(reinterpret_cast(&aDescr->handle())); - return !!SUCCEEDED(hr); -} - -already_AddRefed -OpenForeign(ID3D10Device* aDevice, const SurfaceDescriptorD3D10& aDescr) -{ - HRESULT hr; - ID3D10Texture2D* tex = nullptr; - hr = aDevice->OpenSharedResource(reinterpret_cast(aDescr.handle()), - __uuidof(ID3D10Texture2D), - (void**)&tex); - if (!SUCCEEDED(hr) || !tex) - return nullptr; - - return nsRefPtr(tex).forget(); -} - -} // namespace layers -} // namespace mozilla diff --git a/gfx/layers/ipc/ShadowLayerUtilsD3D10.h b/gfx/layers/ipc/ShadowLayerUtilsD3D10.h deleted file mode 100644 index b90269ec973..00000000000 --- a/gfx/layers/ipc/ShadowLayerUtilsD3D10.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * vim: sw=2 ts=8 et : - */ -/* 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_layers_ShadowLayerUtilsD3D10_h -#define mozilla_layers_ShadowLayerUtilsD3D10_h - -#define MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS - -struct ID3D10Device; -struct ID3D10Texture2D; - -namespace mozilla { -namespace layers { - -class SurfaceDescriptorD3D10; - -/** - * Write into |aDescr| a cross-process descriptor of |aTexture|, if - * possible. Return true iff |aDescr| was successfully set. - */ -bool -GetDescriptor(ID3D10Texture2D* aTexture, SurfaceDescriptorD3D10* aDescr); - -already_AddRefed -OpenForeign(ID3D10Device* aDevice, const SurfaceDescriptorD3D10& aDescr); - -} // namespace layers -} // namespace mozilla - -#endif // mozilla_layers_ShadowLayerUtilsD3D10_h diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index a494834525d..fd3f6389e82 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -66,26 +66,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'd3d9/Nv3DVUtils.cpp', ] if CONFIG['MOZ_ENABLE_D3D10_LAYER']: - EXPORTS += [ - 'd3d10/LayerManagerD3D10.h', - 'd3d10/ReadbackManagerD3D10.h', - ] EXPORTS.mozilla.layers += [ 'd3d11/CompositorD3D11.h', 'd3d11/ReadbackManagerD3D11.h', 'd3d11/TextureD3D11.h', - 'ipc/ShadowLayerUtilsD3D10.h', ] UNIFIED_SOURCES += [ - 'd3d10/CanvasLayerD3D10.cpp', - 'd3d10/ColorLayerD3D10.cpp', - 'd3d10/ContainerLayerD3D10.cpp', - 'd3d10/ImageLayerD3D10.cpp', - 'd3d10/LayerManagerD3D10.cpp', - 'd3d10/PaintedLayerD3D10.cpp', - 'd3d10/ReadbackManagerD3D10.cpp', 'd3d11/TextureD3D11.cpp', - 'ipc/ShadowLayerUtilsD3D10.cpp', ] SOURCES += [ 'd3d11/CompositorD3D11.cpp', From 3519d0640aac5140b180a7162bc0dc2b99e84fea Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 21 Jan 2015 19:23:28 -0800 Subject: [PATCH 041/106] Bug 1123527 - Fix syntax error when NS_COORD_IS_FLOAT is defined. r=dholbert. cppcheck found this. --HG-- extra : rebase_source : 6a83556a8baaa24546eeb28d35ad63f4ffd275bd --- gfx/src/nsCoord.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/src/nsCoord.h b/gfx/src/nsCoord.h index 8dff58c9767..c38aba054dc 100644 --- a/gfx/src/nsCoord.h +++ b/gfx/src/nsCoord.h @@ -213,8 +213,8 @@ NSCoordSaturatingSubtract(nscoord a, nscoord b, // Cap the result, in case we're dealing with numbers near nscoord_MAX return std::min(nscoord_MAX, a - b); } - } #endif + } } inline float NSCoordToFloat(nscoord aCoord) { From f9762593c7c18f80cbb7947e195ab635be168141 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 21 Jan 2015 20:54:07 -0800 Subject: [PATCH 042/106] Bug 1123527 - Fix syntax errors when DEBUG_LAYOUT is defined. r=dholbert. cppcheck found this. --HG-- extra : rebase_source : a9ca28dc5a333d303390550bd57ae40627e2dec0 --- layout/xul/nsBoxFrame.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layout/xul/nsBoxFrame.cpp b/layout/xul/nsBoxFrame.cpp index 0e5070f01be..d489026ae3b 100644 --- a/layout/xul/nsBoxFrame.cpp +++ b/layout/xul/nsBoxFrame.cpp @@ -1436,7 +1436,7 @@ nsBoxFrame::PaintXULDebugBackground(nsRenderingContext& aRenderingContext, int32_t appUnitsPerDevPixel = PresContext()->AppUnitsPerDevPixel(); ColorPattern color(ToDeviceColor(isHorizontal ? Color(0.f, 0.f, 1.f, 1.f) : - Color(1.f, 0.f, 0.f, 1.f)); + Color(1.f, 0.f, 0.f, 1.f))); DrawTarget* drawTarget = aRenderingContext.GetDrawTarget(); @@ -1466,13 +1466,14 @@ nsBoxFrame::PaintXULDebugBackground(nsRenderingContext& aRenderingContext, // place a green border around us. if (NS_SUBTREE_DIRTY(this)) { nsRect dirty(inner); - ColorPattern green(ToDeviceColor(Color0.f, 1.f, 0.f, 1.f))); + ColorPattern green(ToDeviceColor(Color(0.f, 1.f, 0.f, 1.f))); drawTarget->StrokeRect(NSRectToRect(dirty, appUnitsPerDevPixel), green); } } void nsBoxFrame::PaintXULDebugOverlay(DrawTarget& aDrawTarget, nsPoint aPt) +{ nsMargin border; GetBorder(border); From 0bd784b1eeeb192fdedf32af0e7922fe774c491c Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 21 Jan 2015 22:21:31 -0800 Subject: [PATCH 043/106] Bug 1123527 - Fix syntax error when ERR_REPORTING_SYSLOG is defined. r=jesup. cppcheck found this. --HG-- extra : rebase_source : c4af7125c6cda75876832ce0e01ee70f86e2b03d --- netwerk/srtp/src/crypto/kernel/err.c | 1 + 1 file changed, 1 insertion(+) diff --git a/netwerk/srtp/src/crypto/kernel/err.c b/netwerk/srtp/src/crypto/kernel/err.c index dac10fad7c2..3237965abd4 100644 --- a/netwerk/srtp/src/crypto/kernel/err.c +++ b/netwerk/srtp/src/crypto/kernel/err.c @@ -136,6 +136,7 @@ err_report(int priority, char *format, ...) { } vsyslog(syslogpri, format, args); + } #endif va_end(args); } From 4e9790d2282b60459fdc4baf647846d4a671660e Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Thu, 22 Jan 2015 20:00:18 -0800 Subject: [PATCH 044/106] Bug 1123090 - Pass URLs loaded during CreateWindow to content process (r=bent) --- dom/ipc/PBrowser.ipdl | 2 +- dom/ipc/TabChild.cpp | 8 +++++++- dom/ipc/TabParent.cpp | 36 ++++++++++++++++++++++-------------- dom/ipc/TabParent.h | 28 +++++++++++++++++++--------- 4 files changed, 49 insertions(+), 25 deletions(-) diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index 9edd374ba77..5da05d2a2fb 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -132,7 +132,7 @@ parent: nsString aName, nsString aFeatures, nsString aBaseURI) - returns (bool windowOpened, FrameScriptInfo[] frameScripts); + returns (bool windowOpened, FrameScriptInfo[] frameScripts, nsCString urlToLoad); sync SyncMessage(nsString aMessage, ClonedMessageData aData, CpowEntry[] aCpows, Principal aPrincipal) diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 069007b5c57..fdb04476074 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1520,6 +1520,7 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener, nsString name(aName); nsAutoCString features(aFeatures); nsTArray frameScripts; + nsCString urlToLoad; if (aIframeMoz) { newChild->SendBrowserFrameOpenWindow(this, url, name, @@ -1559,7 +1560,8 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener, name, NS_ConvertUTF8toUTF16(features), NS_ConvertUTF8toUTF16(baseURIString), aWindowIsNew, - &frameScripts)) { + &frameScripts, + &urlToLoad)) { return NS_ERROR_NOT_AVAILABLE; } } @@ -1592,6 +1594,10 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener, } } + if (!urlToLoad.IsEmpty()) { + newChild->RecvLoadURL(urlToLoad); + } + nsCOMPtr win = do_GetInterface(newChild->WebNavigation()); win.forget(aReturn); return NS_OK; diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 1e1cbbd7437..def22ab56c4 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -273,7 +273,7 @@ TabParent::TabParent(nsIContentParent* aManager, , mChromeFlags(aChromeFlags) , mInitedByParent(false) , mTabId(aTabId) - , mSkipLoad(false) + , mCreatingWindow(false) { MOZ_ASSERT(aManager); } @@ -454,17 +454,21 @@ TabParent::RecvEvent(const RemoteDOMEvent& aEvent) struct MOZ_STACK_CLASS TabParent::AutoUseNewTab MOZ_FINAL { public: - AutoUseNewTab(TabParent* aNewTab, bool* aWindowIsNew) - : mNewTab(aNewTab), mWindowIsNew(aWindowIsNew) + AutoUseNewTab(TabParent* aNewTab, bool* aWindowIsNew, nsCString* aURLToLoad) + : mNewTab(aNewTab), mWindowIsNew(aWindowIsNew), mURLToLoad(aURLToLoad) { MOZ_ASSERT(!TabParent::sNextTabParent); + MOZ_ASSERT(!aNewTab->mCreatingWindow); + TabParent::sNextTabParent = aNewTab; - aNewTab->mSkipLoad = true; + aNewTab->mCreatingWindow = true; + aNewTab->mDelayedURL.Truncate(); } ~AutoUseNewTab() { - mNewTab->mSkipLoad = false; + mNewTab->mCreatingWindow = false; + *mURLToLoad = mNewTab->mDelayedURL; if (TabParent::sNextTabParent) { MOZ_ASSERT(TabParent::sNextTabParent == mNewTab); @@ -476,6 +480,7 @@ public: private: TabParent* mNewTab; bool* mWindowIsNew; + nsCString* mURLToLoad; }; bool @@ -489,7 +494,8 @@ TabParent::RecvCreateWindow(PBrowserParent* aNewTab, const nsString& aFeatures, const nsString& aBaseURI, bool* aWindowIsNew, - InfallibleTArray* aFrameScripts) + InfallibleTArray* aFrameScripts, + nsCString* aURLToLoad) { // We always expect to open a new window here. If we don't, it's an error. *aWindowIsNew = true; @@ -530,7 +536,7 @@ TabParent::RecvCreateWindow(PBrowserParent* aNewTab, params->SetReferrer(aBaseURI); params->SetIsPrivate(isPrivate); - AutoUseNewTab aunt(newTab, aWindowIsNew); + AutoUseNewTab aunt(newTab, aWindowIsNew, aURLToLoad); nsCOMPtr frameLoaderOwner; mBrowserDOMWindow->OpenURIInFrame(nullptr, params, @@ -564,7 +570,7 @@ TabParent::RecvCreateWindow(PBrowserParent* aNewTab, nsCOMPtr window; - AutoUseNewTab aunt(newTab, aWindowIsNew); + AutoUseNewTab aunt(newTab, aWindowIsNew, aURLToLoad); rv = pwwatch->OpenWindow2(parent, finalURIString.get(), NS_ConvertUTF16toUTF8(aName).get(), @@ -601,7 +607,7 @@ bool TabParent::SendLoadRemoteScript(const nsString& aURL, const bool& aRunInGlobalScope) { - if (mSkipLoad) { + if (mCreatingWindow) { mDelayedFrameScripts.AppendElement(FrameScriptInfo(aURL, aRunInGlobalScope)); return true; } @@ -615,11 +621,6 @@ TabParent::LoadURL(nsIURI* aURI) { MOZ_ASSERT(aURI); - if (mSkipLoad) { - // Don't send the message if the child wants to load its own URL. - return; - } - if (mIsDestroyed) { return; } @@ -627,6 +628,13 @@ TabParent::LoadURL(nsIURI* aURI) nsCString spec; aURI->GetSpec(spec); + if (mCreatingWindow) { + // Don't send the message if the child wants to load its own URL. + MOZ_ASSERT(mDelayedURL.IsEmpty()); + mDelayedURL = spec; + return; + } + if (!mShown) { NS_WARNING(nsPrintfCString("TabParent::LoadURL(%s) called before " "Show(). Ignoring LoadURL.\n", diff --git a/dom/ipc/TabParent.h b/dom/ipc/TabParent.h index f6908b99bd1..b516291dbe4 100644 --- a/dom/ipc/TabParent.h +++ b/dom/ipc/TabParent.h @@ -144,7 +144,8 @@ public: const nsString& aFeatures, const nsString& aBaseURI, bool* aWindowIsNew, - InfallibleTArray* aFrameScripts) MOZ_OVERRIDE; + InfallibleTArray* aFrameScripts, + nsCString* aURLToLoad) MOZ_OVERRIDE; virtual bool RecvSyncMessage(const nsString& aMessage, const ClonedMessageData& aData, InfallibleTArray&& aCpows, @@ -489,14 +490,23 @@ private: static TabParent* sNextTabParent; // When loading a new tab or window via window.open, the child is - // responsible for loading the URL it wants into the new - // TabChild. Simultaneously, though, the parent sends a LoadURL message to - // every new PBrowser (usually for about:blank). This message usually - // arrives after the child has started to load the URL it wants, and - // overrides it. To prevent this, we set mSkipLoad to true when creating the - // new tab. This flag prevents the unwanted LoadURL message from being sent - // by the parent. - bool mSkipLoad; + // responsible for loading the URL it wants into the new TabChild. When the + // parent receives the CreateWindow message, though, it sends a LoadURL + // message, usually for about:blank. It's important for the about:blank load + // to get processed because the Firefox frontend expects every new window to + // immediately start loading something (see bug 1123090). However, we want + // the child to process the LoadURL message before it returns from + // ProvideWindow so that the URL sent from the parent doesn't override the + // child's URL. This is not possible using our IPC mechanisms. To solve the + // problem, we skip sending the LoadURL message in the parent and instead + // return the URL as a result from CreateWindow. The child simulates + // receiving a LoadURL message before returning from ProvideWindow. + // + // The mCreatingWindow flag is set while dispatching CreateWindow. During + // that time, any LoadURL calls are skipped and the URL is stored in + // mSkippedURL. + bool mCreatingWindow; + nsCString mDelayedURL; // When loading a new tab or window via window.open, we want to ensure that // frame scripts for that tab are loaded before any scripts start to run in From 72bdc7e0df8de8a817c0e7026907d40de3a8f727 Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Thu, 22 Jan 2015 20:00:19 -0800 Subject: [PATCH 045/106] Bug 1123461 - Make a real interface for js/ipc (r=dvander) --- dom/base/moz.build | 1 - dom/base/nsFrameLoader.cpp | 2 +- dom/base/nsFrameMessageManager.cpp | 3 +- dom/bindings/BindingUtils.cpp | 3 +- dom/bindings/moz.build | 1 - dom/ipc/CPOWManagerGetter.h | 4 +- dom/ipc/ContentBridgeChild.cpp | 9 ++- dom/ipc/ContentBridgeChild.h | 2 +- dom/ipc/ContentBridgeParent.cpp | 9 ++- dom/ipc/ContentBridgeParent.h | 2 +- dom/ipc/ContentChild.cpp | 9 ++- dom/ipc/ContentChild.h | 2 +- dom/ipc/ContentParent.cpp | 7 +- dom/ipc/ContentParent.h | 2 +- dom/ipc/TabChild.cpp | 1 - dom/ipc/TabParent.cpp | 2 +- dom/ipc/moz.build | 1 - dom/ipc/nsIContentChild.cpp | 9 +-- dom/ipc/nsIContentParent.cpp | 10 +-- js/ipc/CrossProcessObjectWrappers.h | 89 ++++++++++++++++++++++++ js/ipc/JavaScriptChild.cpp | 17 +++++ js/ipc/JavaScriptParent.cpp | 17 +++++ js/ipc/JavaScriptShared.cpp | 12 ++++ js/ipc/JavaScriptShared.h | 16 +---- js/ipc/WrapperOwner.h | 16 +---- js/ipc/moz.build | 4 ++ js/xpconnect/src/XPCComponents.cpp | 2 +- js/xpconnect/src/XPCConvert.cpp | 2 +- js/xpconnect/src/XPCJSID.cpp | 2 +- js/xpconnect/src/XPCWrappedJS.cpp | 2 +- js/xpconnect/src/XPCWrappedJSClass.cpp | 2 +- js/xpconnect/src/moz.build | 1 - js/xpconnect/wrappers/AccessCheck.cpp | 2 +- js/xpconnect/wrappers/WrapperFactory.cpp | 2 +- js/xpconnect/wrappers/moz.build | 1 - 35 files changed, 179 insertions(+), 87 deletions(-) create mode 100644 js/ipc/CrossProcessObjectWrappers.h diff --git a/dom/base/moz.build b/dom/base/moz.build index 464a6a6147c..c3ba9c10684 100644 --- a/dom/base/moz.build +++ b/dom/base/moz.build @@ -403,7 +403,6 @@ LOCAL_INCLUDES += [ '/dom/xslt/xpath', '/dom/xul', '/image/src', - '/js/ipc', '/js/xpconnect/src', '/js/xpconnect/wrappers', '/layout/base', diff --git a/dom/base/nsFrameLoader.cpp b/dom/base/nsFrameLoader.cpp index d782137e512..13e7f23897c 100644 --- a/dom/base/nsFrameLoader.cpp +++ b/dom/base/nsFrameLoader.cpp @@ -80,6 +80,7 @@ #include "mozilla/Preferences.h" #include "mozilla/unused.h" #include "mozilla/dom/Element.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/layout/RenderFrameParent.h" #include "nsIAppsService.h" #include "GeckoProfiler.h" @@ -88,7 +89,6 @@ #include "mozilla/dom/HTMLIFrameElement.h" #include "mozilla/dom/SVGIFrameElement.h" #include "nsSandboxFlags.h" -#include "JavaScriptParent.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/dom/StructuredCloneUtils.h" diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp index fb6c6dbe280..d7f35dcfd74 100644 --- a/dom/base/nsFrameMessageManager.cpp +++ b/dom/base/nsFrameMessageManager.cpp @@ -37,9 +37,8 @@ #include "mozilla/dom/StructuredCloneUtils.h" #include "mozilla/dom/ipc/BlobChild.h" #include "mozilla/dom/ipc/BlobParent.h" -#include "JavaScriptChild.h" -#include "JavaScriptParent.h" #include "mozilla/dom/DOMStringList.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "nsPrintfCString.h" #include "nsXULAppAPI.h" #include diff --git a/dom/bindings/BindingUtils.cpp b/dom/bindings/BindingUtils.cpp index e477e08a9b0..31450674d41 100644 --- a/dom/bindings/BindingUtils.cpp +++ b/dom/bindings/BindingUtils.cpp @@ -9,8 +9,6 @@ #include #include -#include "JavaScriptParent.h" - #include "mozilla/DebugOnly.h" #include "mozilla/FloatingPoint.h" #include "mozilla/Assertions.h" @@ -43,6 +41,7 @@ #include "mozilla/dom/HTMLEmbedElementBinding.h" #include "mozilla/dom/HTMLAppletElementBinding.h" #include "mozilla/dom/Promise.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "WorkerPrivate.h" #include "nsDOMClassInfo.h" diff --git a/dom/bindings/moz.build b/dom/bindings/moz.build index 6e1c5db2b71..747fec2a7ee 100644 --- a/dom/bindings/moz.build +++ b/dom/bindings/moz.build @@ -58,7 +58,6 @@ LOCAL_INCLUDES += [ '/dom/xslt/base', '/dom/xslt/xpath', '/dom/xul', - '/js/ipc', '/js/xpconnect/src', '/js/xpconnect/wrappers', '/layout/style', diff --git a/dom/ipc/CPOWManagerGetter.h b/dom/ipc/CPOWManagerGetter.h index ad16cda3475..c58d355843e 100644 --- a/dom/ipc/CPOWManagerGetter.h +++ b/dom/ipc/CPOWManagerGetter.h @@ -10,14 +10,14 @@ namespace mozilla { namespace jsipc { -class JavaScriptShared; +class CPOWManager; } /* namespace jsipc */ namespace dom { class CPOWManagerGetter { public: - virtual mozilla::jsipc::JavaScriptShared* GetCPOWManager() = 0; + virtual mozilla::jsipc::CPOWManager* GetCPOWManager() = 0; }; } /* namespace dom */ diff --git a/dom/ipc/ContentBridgeChild.cpp b/dom/ipc/ContentBridgeChild.cpp index b3ea951cb52..16077c97489 100644 --- a/dom/ipc/ContentBridgeChild.cpp +++ b/dom/ipc/ContentBridgeChild.cpp @@ -10,8 +10,8 @@ #include "mozilla/dom/StructuredCloneUtils.h" #include "mozilla/dom/TabChild.h" #include "mozilla/dom/ipc/BlobChild.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/ipc/InputStreamUtils.h" -#include "JavaScriptChild.h" using namespace base; using namespace mozilla::ipc; @@ -100,14 +100,13 @@ ContentBridgeChild::SendPBrowserConstructor(PBrowserChild* aActor, // This implementation is identical to ContentChild::GetCPOWManager but we can't // move it to nsIContentChild because it calls ManagedPJavaScriptChild() which // only exists in PContentChild and PContentBridgeChild. -jsipc::JavaScriptShared* +jsipc::CPOWManager* ContentBridgeChild::GetCPOWManager() { if (ManagedPJavaScriptChild().Length()) { - return static_cast(ManagedPJavaScriptChild()[0]); + return CPOWManagerFor(ManagedPJavaScriptChild()[0]); } - JavaScriptChild* actor = static_cast(SendPJavaScriptConstructor()); - return actor; + return CPOWManagerFor(SendPJavaScriptConstructor()); } mozilla::jsipc::PJavaScriptChild * diff --git a/dom/ipc/ContentBridgeChild.h b/dom/ipc/ContentBridgeChild.h index ede302fae4c..1e7844cf8f2 100644 --- a/dom/ipc/ContentBridgeChild.h +++ b/dom/ipc/ContentBridgeChild.h @@ -36,7 +36,7 @@ public: SendPBlobConstructor(PBlobChild* actor, const BlobConstructorParams& aParams) MOZ_OVERRIDE; - jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE; + jsipc::CPOWManager* GetCPOWManager() MOZ_OVERRIDE; virtual bool SendPBrowserConstructor(PBrowserChild* aActor, const TabId& aTabId, diff --git a/dom/ipc/ContentBridgeParent.cpp b/dom/ipc/ContentBridgeParent.cpp index 2d98c9710a9..216dde0f9bf 100644 --- a/dom/ipc/ContentBridgeParent.cpp +++ b/dom/ipc/ContentBridgeParent.cpp @@ -6,7 +6,7 @@ #include "mozilla/dom/ContentBridgeParent.h" #include "mozilla/dom/TabParent.h" -#include "JavaScriptParent.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "nsXULAppAPI.h" using namespace base; @@ -154,14 +154,13 @@ ContentBridgeParent::DeallocPBrowserParent(PBrowserParent* aParent) // This implementation is identical to ContentParent::GetCPOWManager but we can't // move it to nsIContentParent because it calls ManagedPJavaScriptParent() which // only exists in PContentParent and PContentBridgeParent. -jsipc::JavaScriptShared* +jsipc::CPOWManager* ContentBridgeParent::GetCPOWManager() { if (ManagedPJavaScriptParent().Length()) { - return static_cast(ManagedPJavaScriptParent()[0]); + return CPOWManagerFor(ManagedPJavaScriptParent()[0]); } - JavaScriptParent* actor = static_cast(SendPJavaScriptConstructor()); - return actor; + return CPOWManagerFor(SendPJavaScriptConstructor()); } } // namespace dom diff --git a/dom/ipc/ContentBridgeParent.h b/dom/ipc/ContentBridgeParent.h index e9d3e9a2194..4dc784afe1f 100644 --- a/dom/ipc/ContentBridgeParent.h +++ b/dom/ipc/ContentBridgeParent.h @@ -41,7 +41,7 @@ public: const bool& aIsForApp, const bool& aIsForBrowser) MOZ_OVERRIDE; - jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE; + jsipc::CPOWManager* GetCPOWManager() MOZ_OVERRIDE; virtual ContentParentId ChildID() MOZ_OVERRIDE { diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 4df3de57377..6cc156fc801 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -41,6 +41,7 @@ #include "mozilla/ipc/FileDescriptorUtils.h" #include "mozilla/ipc/GeckoChildProcessHost.h" #include "mozilla/ipc/TestShellChild.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/layers/ImageBridgeChild.h" #include "mozilla/layers/PCompositorChild.h" @@ -163,7 +164,6 @@ #include "nsIPrincipal.h" #include "nsDeviceStorage.h" #include "AudioChannelService.h" -#include "JavaScriptChild.h" #include "mozilla/dom/DataStoreService.h" #include "mozilla/dom/telephony/PTelephonyChild.h" #include "mozilla/dom/time/DateCacheCleaner.h" @@ -1403,14 +1403,13 @@ ContentChild::DeallocPTestShellChild(PTestShellChild* shell) return true; } -jsipc::JavaScriptShared* +jsipc::CPOWManager* ContentChild::GetCPOWManager() { if (ManagedPJavaScriptChild().Length()) { - return static_cast(ManagedPJavaScriptChild()[0]); + return CPOWManagerFor(ManagedPJavaScriptChild()[0]); } - JavaScriptChild* actor = static_cast(SendPJavaScriptConstructor()); - return actor; + return CPOWManagerFor(SendPJavaScriptConstructor()); } bool diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index 0e76e01059c..cf9b7e7434b 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -209,7 +209,7 @@ public: virtual PTestShellChild* AllocPTestShellChild() MOZ_OVERRIDE; virtual bool DeallocPTestShellChild(PTestShellChild*) MOZ_OVERRIDE; virtual bool RecvPTestShellConstructor(PTestShellChild*) MOZ_OVERRIDE; - jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE; + jsipc::CPOWManager* GetCPOWManager() MOZ_OVERRIDE; PMobileConnectionChild* SendPMobileConnectionConstructor(PMobileConnectionChild* aActor, diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 7ecbf3c5fb3..77e0a0f80bc 100755 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -67,6 +67,7 @@ #include "mozilla/ipc/PFileDescriptorSetParent.h" #include "mozilla/ipc/TestShellParent.h" #include "mozilla/ipc/InputStreamUtils.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/layers/CompositorParent.h" #include "mozilla/layers/ImageBridgeParent.h" #include "mozilla/layers/SharedBufferManagerParent.h" @@ -178,8 +179,6 @@ using namespace mozilla::system; #include "BluetoothService.h" #endif -#include "JavaScriptParent.h" - #include "mozilla/RemoteSpellCheckEngineParent.h" #ifdef MOZ_B2G_FM @@ -1996,11 +1995,11 @@ ContentParent::NotifyTabDestroyed(PBrowserParent* aTab, } } -jsipc::JavaScriptShared* +jsipc::CPOWManager* ContentParent::GetCPOWManager() { if (ManagedPJavaScriptParent().Length()) { - return static_cast(ManagedPJavaScriptParent()[0]); + return CPOWManagerFor(ManagedPJavaScriptParent()[0]); } return nullptr; } diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index c2bb0570586..7e486f7c671 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -189,7 +189,7 @@ public: TestShellParent* CreateTestShell(); bool DestroyTestShell(TestShellParent* aTestShell); TestShellParent* GetTestShellSingleton(); - jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE; + jsipc::CPOWManager* GetCPOWManager() MOZ_OVERRIDE; static TabId AllocateTabId(const TabId& aOpenerTabId, diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index fdb04476074..71e895451a8 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -75,7 +75,6 @@ #include "PuppetWidget.h" #include "StructuredCloneUtils.h" #include "nsViewportInfo.h" -#include "JavaScriptChild.h" #include "nsILoadContext.h" #include "ipc/nsGUIEventIPC.h" #include "mozilla/gfx/Matrix.h" diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index def22ab56c4..9e860dfb9ad 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -18,6 +18,7 @@ #include "mozilla/EventStateManager.h" #include "mozilla/Hal.h" #include "mozilla/ipc/DocumentRendererParent.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/layers/CompositorParent.h" #include "mozilla/layers/InputAPZContext.h" #include "mozilla/layout/RenderFrameParent.h" @@ -65,7 +66,6 @@ #include "PermissionMessageUtils.h" #include "StructuredCloneUtils.h" #include "ColorPickerParent.h" -#include "JavaScriptParent.h" #include "FilePickerParent.h" #include "TabChild.h" #include "LoadContext.h" diff --git a/dom/ipc/moz.build b/dom/ipc/moz.build index 9ed23bb8ec0..15ccd291fbe 100644 --- a/dom/ipc/moz.build +++ b/dom/ipc/moz.build @@ -130,7 +130,6 @@ LOCAL_INCLUDES += [ '/extensions/cookie', '/extensions/spellcheck/src', '/hal/sandbox', - '/js/ipc', '/layout/base', '/netwerk/base', '/toolkit/xre', diff --git a/dom/ipc/nsIContentChild.cpp b/dom/ipc/nsIContentChild.cpp index bcbedc01803..afcd7f2baa1 100644 --- a/dom/ipc/nsIContentChild.cpp +++ b/dom/ipc/nsIContentChild.cpp @@ -15,7 +15,6 @@ #include "mozilla/dom/ipc/BlobChild.h" #include "mozilla/ipc/InputStreamUtils.h" -#include "JavaScriptChild.h" #include "nsIJSRuntimeService.h" #include "nsPrintfCString.h" @@ -35,17 +34,13 @@ nsIContentChild::AllocPJavaScriptChild() svc->GetRuntime(&rt); NS_ENSURE_TRUE(svc, nullptr); - nsAutoPtr child(new JavaScriptChild(rt)); - if (!child->init()) { - return nullptr; - } - return child.forget(); + return NewJavaScriptChild(rt); } bool nsIContentChild::DeallocPJavaScriptChild(PJavaScriptChild* aChild) { - static_cast(aChild)->decref(); + ReleaseJavaScriptChild(aChild); return true; } diff --git a/dom/ipc/nsIContentParent.cpp b/dom/ipc/nsIContentParent.cpp index 93e567875de..8fcbafb882c 100644 --- a/dom/ipc/nsIContentParent.cpp +++ b/dom/ipc/nsIContentParent.cpp @@ -15,9 +15,9 @@ #include "mozilla/dom/StructuredCloneUtils.h" #include "mozilla/dom/TabParent.h" #include "mozilla/dom/ipc/BlobParent.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/unused.h" -#include "JavaScriptParent.h" #include "nsFrameMessageManager.h" #include "nsIJSRuntimeService.h" #include "nsPrintfCString.h" @@ -57,17 +57,13 @@ nsIContentParent::AllocPJavaScriptParent() svc->GetRuntime(&rt); NS_ENSURE_TRUE(svc, nullptr); - nsAutoPtr parent(new JavaScriptParent(rt)); - if (!parent->init()) { - return nullptr; - } - return parent.forget(); + return NewJavaScriptParent(rt); } bool nsIContentParent::DeallocPJavaScriptParent(PJavaScriptParent* aParent) { - static_cast(aParent)->decref(); + ReleaseJavaScriptParent(aParent); return true; } diff --git a/js/ipc/CrossProcessObjectWrappers.h b/js/ipc/CrossProcessObjectWrappers.h new file mode 100644 index 00000000000..2412d694895 --- /dev/null +++ b/js/ipc/CrossProcessObjectWrappers.h @@ -0,0 +1,89 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * vim: set ts=8 sw=4 et tw=80: + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_jsipc_CrossProcessObjectWrappers_h__ +#define mozilla_jsipc_CrossProcessObjectWrappers_h__ + +#include "js/TypeDecls.h" +#include "mozilla/jsipc/JavaScriptTypes.h" +#include "nsID.h" +#include "nsFrameMessageManager.h" +#include "nsString.h" +#include "nsTArray.h" + +namespace mozilla { + +namespace dom { +class CPOWManagerGetter; +} + +namespace jsipc { + +class PJavaScriptParent; +class PJavaScriptChild; + +class CPOWManager +{ + public: + virtual bool Unwrap(JSContext *cx, + const InfallibleTArray &aCpows, + JS::MutableHandleObject objp) = 0; + + virtual bool Wrap(JSContext *cx, + JS::HandleObject aObj, + InfallibleTArray *outCpows) = 0; +}; + +class CpowIdHolder : public CpowHolder +{ + public: + CpowIdHolder(dom::CPOWManagerGetter *managerGetter, const InfallibleTArray &cpows); + + bool ToObject(JSContext *cx, JS::MutableHandleObject objp); + + private: + CPOWManager *js_; + const InfallibleTArray &cpows_; +}; + +CPOWManager* +CPOWManagerFor(PJavaScriptParent* aParent); + +CPOWManager* +CPOWManagerFor(PJavaScriptChild* aChild); + +bool +IsCPOW(JSObject *obj); + +bool +IsWrappedCPOW(JSObject *obj); + +nsresult +InstanceOf(JSObject *obj, const nsID *id, bool *bp); + +bool +DOMInstanceOf(JSContext *cx, JSObject *obj, int prototypeID, int depth, bool *bp); + +void +GetWrappedCPOWTag(JSObject *obj, nsACString &out); + +PJavaScriptParent * +NewJavaScriptParent(JSRuntime *rt); + +void +ReleaseJavaScriptParent(PJavaScriptParent *parent); + +PJavaScriptChild * +NewJavaScriptChild(JSRuntime *rt); + +void +ReleaseJavaScriptChild(PJavaScriptChild *child); + +} // namespace jsipc +} // namespace mozilla + +#endif // mozilla_jsipc_CrossProcessObjectWrappers_h__ diff --git a/js/ipc/JavaScriptChild.cpp b/js/ipc/JavaScriptChild.cpp index 1ed45d1f1db..1a8f6d53b71 100644 --- a/js/ipc/JavaScriptChild.cpp +++ b/js/ipc/JavaScriptChild.cpp @@ -64,3 +64,20 @@ JavaScriptChild::scopeForTargetObjects() // scope so that they can benefit from XrayWrappers in the child. return xpc::PrivilegedJunkScope(); } + +PJavaScriptChild * +mozilla::jsipc::NewJavaScriptChild(JSRuntime *rt) +{ + JavaScriptChild *child = new JavaScriptChild(rt); + if (!child->init()) { + delete child; + return nullptr; + } + return child; +} + +void +mozilla::jsipc::ReleaseJavaScriptChild(PJavaScriptChild *child) +{ + static_cast(child)->decref(); +} diff --git a/js/ipc/JavaScriptParent.cpp b/js/ipc/JavaScriptParent.cpp index 3411c537bc5..b1b1f39d47d 100644 --- a/js/ipc/JavaScriptParent.cpp +++ b/js/ipc/JavaScriptParent.cpp @@ -76,3 +76,20 @@ JavaScriptParent::CloneProtocol(Channel* aChannel, ProtocolCloneContext* aCtx) } return actor.forget(); } + +PJavaScriptParent * +mozilla::jsipc::NewJavaScriptParent(JSRuntime *rt) +{ + JavaScriptParent *parent = new JavaScriptParent(rt); + if (!parent->init()) { + delete parent; + return nullptr; + } + return parent; +} + +void +mozilla::jsipc::ReleaseJavaScriptParent(PJavaScriptParent *parent) +{ + static_cast(parent)->decref(); +} diff --git a/js/ipc/JavaScriptShared.cpp b/js/ipc/JavaScriptShared.cpp index c5537e05af8..8dc9855ac16 100644 --- a/js/ipc/JavaScriptShared.cpp +++ b/js/ipc/JavaScriptShared.cpp @@ -757,3 +757,15 @@ JavaScriptShared::Wrap(JSContext *cx, HandleObject aObj, InfallibleTArray(aParent); +} + +CPOWManager* +mozilla::jsipc::CPOWManagerFor(PJavaScriptChild* aChild) +{ + return static_cast(aChild); +} diff --git a/js/ipc/JavaScriptShared.h b/js/ipc/JavaScriptShared.h index fb381680b94..77c71c0083e 100644 --- a/js/ipc/JavaScriptShared.h +++ b/js/ipc/JavaScriptShared.h @@ -9,9 +9,9 @@ #define mozilla_jsipc_JavaScriptShared_h__ #include "mozilla/dom/DOMTypes.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/jsipc/PJavaScript.h" #include "nsJSUtils.h" -#include "nsFrameMessageManager.h" namespace mozilla { @@ -65,18 +65,6 @@ class ObjectId { class JavaScriptShared; -class CpowIdHolder : public CpowHolder -{ - public: - CpowIdHolder(dom::CPOWManagerGetter *managerGetter, const InfallibleTArray &cpows); - - bool ToObject(JSContext *cx, JS::MutableHandleObject objp); - - private: - JavaScriptShared *js_; - const InfallibleTArray &cpows_; -}; - // DefaultHasher requires that T coerce to an integral type. We could make // ObjectId do that, but doing so would weaken our type invariants, so we just // reimplement it manually. @@ -144,7 +132,7 @@ class ObjectToIdMap class Logging; -class JavaScriptShared +class JavaScriptShared : public CPOWManager { public: explicit JavaScriptShared(JSRuntime *rt); diff --git a/js/ipc/WrapperOwner.h b/js/ipc/WrapperOwner.h index d95b1d9a2cf..3c378e941a4 100644 --- a/js/ipc/WrapperOwner.h +++ b/js/ipc/WrapperOwner.h @@ -10,6 +10,7 @@ #include "JavaScriptShared.h" #include "mozilla/ipc/ProtocolUtils.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "js/Class.h" #include "jsproxy.h" @@ -149,21 +150,6 @@ class WrapperOwner : public virtual JavaScriptShared ReturnStatus *rs, bool *instanceof) = 0; }; -bool -IsCPOW(JSObject *obj); - -bool -IsWrappedCPOW(JSObject *obj); - -nsresult -InstanceOf(JSObject *obj, const nsID *id, bool *bp); - -bool -DOMInstanceOf(JSContext *cx, JSObject *obj, int prototypeID, int depth, bool *bp); - -void -GetWrappedCPOWTag(JSObject *obj, nsACString &out); - } // jsipc } // mozilla diff --git a/js/ipc/moz.build b/js/ipc/moz.build index 404795f9d66..1bffb416755 100644 --- a/js/ipc/moz.build +++ b/js/ipc/moz.build @@ -26,6 +26,10 @@ FINAL_LIBRARY = 'xul' DEFINES['BIN_SUFFIX'] = '"%s"' % CONFIG['BIN_SUFFIX'] +EXPORTS.mozilla.jsipc = [ + 'CrossProcessObjectWrappers.h', +] + LOCAL_INCLUDES += [ '/dom/base', '/js/ipc', diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp index 6af61cbdd8e..4390efb0083 100644 --- a/js/xpconnect/src/XPCComponents.cpp +++ b/js/xpconnect/src/XPCComponents.cpp @@ -13,10 +13,10 @@ #include "nsJSUtils.h" #include "mozJSComponentLoader.h" #include "nsContentUtils.h" -#include "JavaScriptParent.h" #include "jsfriendapi.h" #include "js/StructuredClone.h" #include "mozilla/Attributes.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/Preferences.h" #include "nsJSEnvironment.h" #include "mozilla/TimeStamp.h" diff --git a/js/xpconnect/src/XPCConvert.cpp b/js/xpconnect/src/XPCConvert.cpp index 40379f9b199..1d0d48edb47 100644 --- a/js/xpconnect/src/XPCConvert.cpp +++ b/js/xpconnect/src/XPCConvert.cpp @@ -21,11 +21,11 @@ #include "jsfriendapi.h" #include "js/CharacterEncoding.h" #include "jsprf.h" -#include "JavaScriptParent.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/DOMException.h" #include "mozilla/dom/PrimitiveConversions.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" using namespace xpc; using namespace mozilla; diff --git a/js/xpconnect/src/XPCJSID.cpp b/js/xpconnect/src/XPCJSID.cpp index a8d7d24bd5c..71e018da10e 100644 --- a/js/xpconnect/src/XPCJSID.cpp +++ b/js/xpconnect/src/XPCJSID.cpp @@ -9,7 +9,7 @@ #include "xpcprivate.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/Attributes.h" -#include "JavaScriptParent.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/StaticPtr.h" using namespace mozilla::dom; diff --git a/js/xpconnect/src/XPCWrappedJS.cpp b/js/xpconnect/src/XPCWrappedJS.cpp index f4d569e8bcd..ba5386a3eb8 100644 --- a/js/xpconnect/src/XPCWrappedJS.cpp +++ b/js/xpconnect/src/XPCWrappedJS.cpp @@ -8,10 +8,10 @@ #include "xpcprivate.h" #include "jsprf.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "nsCCUncollectableMarker.h" #include "nsContentUtils.h" #include "nsThreadUtils.h" -#include "JavaScriptParent.h" using namespace mozilla; diff --git a/js/xpconnect/src/XPCWrappedJSClass.cpp b/js/xpconnect/src/XPCWrappedJSClass.cpp index 1474aec1302..5f5db108314 100644 --- a/js/xpconnect/src/XPCWrappedJSClass.cpp +++ b/js/xpconnect/src/XPCWrappedJSClass.cpp @@ -13,11 +13,11 @@ #include "nsWrapperCache.h" #include "AccessCheck.h" #include "nsJSUtils.h" -#include "JavaScriptParent.h" #include "mozilla/Attributes.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/DOMException.h" #include "mozilla/dom/DOMExceptionBinding.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "jsapi.h" #include "jsfriendapi.h" diff --git a/js/xpconnect/src/moz.build b/js/xpconnect/src/moz.build index bcb089b1d60..4afe4dd15c7 100644 --- a/js/xpconnect/src/moz.build +++ b/js/xpconnect/src/moz.build @@ -66,7 +66,6 @@ LOCAL_INCLUDES += [ '/dom/html', '/dom/svg', '/dom/workers', - '/js/ipc', '/layout/base', '/layout/style', '/xpcom/reflect/xptinfo', diff --git a/js/xpconnect/wrappers/AccessCheck.cpp b/js/xpconnect/wrappers/AccessCheck.cpp index 7cd922a4c41..4e0ae7151cf 100644 --- a/js/xpconnect/wrappers/AccessCheck.cpp +++ b/js/xpconnect/wrappers/AccessCheck.cpp @@ -8,7 +8,6 @@ #include "nsJSPrincipals.h" #include "nsGlobalWindow.h" -#include "JavaScriptParent.h" #include "XPCWrapper.h" #include "XrayWrapper.h" @@ -17,6 +16,7 @@ #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/LocationBinding.h" #include "mozilla/dom/WindowBinding.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "nsIDOMWindowCollection.h" #include "nsJSUtils.h" diff --git a/js/xpconnect/wrappers/WrapperFactory.cpp b/js/xpconnect/wrappers/WrapperFactory.cpp index 0d8eee539c7..9768f669f7f 100644 --- a/js/xpconnect/wrappers/WrapperFactory.cpp +++ b/js/xpconnect/wrappers/WrapperFactory.cpp @@ -16,8 +16,8 @@ #include "xpcprivate.h" #include "XPCMaps.h" #include "mozilla/dom/BindingUtils.h" -#include "JavaScriptParent.h" #include "jsfriendapi.h" +#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/Likely.h" #include "nsContentUtils.h" #include "nsXULAppAPI.h" diff --git a/js/xpconnect/wrappers/moz.build b/js/xpconnect/wrappers/moz.build index 33bb86edff8..d6a8c1c2e9f 100644 --- a/js/xpconnect/wrappers/moz.build +++ b/js/xpconnect/wrappers/moz.build @@ -39,6 +39,5 @@ FINAL_LIBRARY = 'xul' LOCAL_INCLUDES += [ '../../../dom/base', '../src', - '/js/ipc', ] From d4364ab812459b036fe93cf7fe65cf7971bf72d4 Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Thu, 22 Jan 2015 20:00:19 -0800 Subject: [PATCH 046/106] Bug 1123461 - Rename CpowIdHolder to CrossProcessCpowHolder (r=dvander) --- dom/ipc/ContentChild.cpp | 2 +- dom/ipc/TabChild.cpp | 2 +- dom/ipc/TabParent.cpp | 6 +++--- dom/ipc/nsIContentChild.cpp | 2 +- dom/ipc/nsIContentParent.cpp | 6 +++--- js/ipc/CrossProcessObjectWrappers.h | 5 +++-- js/ipc/JavaScriptShared.cpp | 5 +++-- 7 files changed, 15 insertions(+), 13 deletions(-) diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 6cc156fc801..21021a9426d 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -1910,7 +1910,7 @@ ContentChild::RecvAsyncMessage(const nsString& aMsg, nsRefPtr cpm = nsFrameMessageManager::sChildProcessManager; if (cpm) { StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForChild(aData); - CpowIdHolder cpows(this, aCpows); + CrossProcessCpowHolder cpows(this, aCpows); cpm->ReceiveMessage(static_cast(cpm.get()), aMsg, false, &cloneData, &cpows, aPrincipal, nullptr); } diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 71e895451a8..8103b6c457c 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -3008,7 +3008,7 @@ TabChild::RecvAsyncMessage(const nsString& aMessage, StructuredCloneData cloneData = UnpackClonedMessageDataForChild(aData); nsRefPtr mm = static_cast(mTabChildGlobal->mMessageManager.get()); - CpowIdHolder cpows(Manager(), aCpows); + CrossProcessCpowHolder cpows(Manager(), aCpows); mm->ReceiveMessage(static_cast(mTabChildGlobal), aMessage, false, &cloneData, &cpows, aPrincipal, nullptr); } diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 9e860dfb9ad..a8c4f9a70a5 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -1348,7 +1348,7 @@ TabParent::RecvSyncMessage(const nsString& aMessage, } StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CpowIdHolder cpows(Manager(), aCpows); + CrossProcessCpowHolder cpows(Manager(), aCpows); return ReceiveMessage(aMessage, true, &cloneData, &cpows, aPrincipal, aJSONRetVal); } @@ -1370,7 +1370,7 @@ TabParent::RecvRpcMessage(const nsString& aMessage, } StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CpowIdHolder cpows(Manager(), aCpows); + CrossProcessCpowHolder cpows(Manager(), aCpows); return ReceiveMessage(aMessage, true, &cloneData, &cpows, aPrincipal, aJSONRetVal); } @@ -1391,7 +1391,7 @@ TabParent::RecvAsyncMessage(const nsString& aMessage, } StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CpowIdHolder cpows(Manager(), aCpows); + CrossProcessCpowHolder cpows(Manager(), aCpows); return ReceiveMessage(aMessage, false, &cloneData, &cpows, aPrincipal, nullptr); } diff --git a/dom/ipc/nsIContentChild.cpp b/dom/ipc/nsIContentChild.cpp index afcd7f2baa1..25acddea293 100644 --- a/dom/ipc/nsIContentChild.cpp +++ b/dom/ipc/nsIContentChild.cpp @@ -116,7 +116,7 @@ nsIContentChild::RecvAsyncMessage(const nsString& aMsg, nsRefPtr cpm = nsFrameMessageManager::sChildProcessManager; if (cpm) { StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForChild(aData); - CpowIdHolder cpows(this, aCpows); + CrossProcessCpowHolder cpows(this, aCpows); cpm->ReceiveMessage(static_cast(cpm.get()), aMsg, false, &cloneData, &cpows, aPrincipal, nullptr); } diff --git a/dom/ipc/nsIContentParent.cpp b/dom/ipc/nsIContentParent.cpp index 8fcbafb882c..bfd1631c671 100644 --- a/dom/ipc/nsIContentParent.cpp +++ b/dom/ipc/nsIContentParent.cpp @@ -193,7 +193,7 @@ nsIContentParent::RecvSyncMessage(const nsString& aMsg, nsRefPtr ppm = mMessageManager; if (ppm) { StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CpowIdHolder cpows(this, aCpows); + CrossProcessCpowHolder cpows(this, aCpows); ppm->ReceiveMessage(static_cast(ppm.get()), aMsg, true, &cloneData, &cpows, aPrincipal, aRetvals); } @@ -220,7 +220,7 @@ nsIContentParent::RecvRpcMessage(const nsString& aMsg, nsRefPtr ppm = mMessageManager; if (ppm) { StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CpowIdHolder cpows(this, aCpows); + CrossProcessCpowHolder cpows(this, aCpows); ppm->ReceiveMessage(static_cast(ppm.get()), aMsg, true, &cloneData, &cpows, aPrincipal, aRetvals); } @@ -246,7 +246,7 @@ nsIContentParent::RecvAsyncMessage(const nsString& aMsg, nsRefPtr ppm = mMessageManager; if (ppm) { StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CpowIdHolder cpows(this, aCpows); + CrossProcessCpowHolder cpows(this, aCpows); ppm->ReceiveMessage(static_cast(ppm.get()), aMsg, false, &cloneData, &cpows, aPrincipal, nullptr); } diff --git a/js/ipc/CrossProcessObjectWrappers.h b/js/ipc/CrossProcessObjectWrappers.h index 2412d694895..d1c68a3b27b 100644 --- a/js/ipc/CrossProcessObjectWrappers.h +++ b/js/ipc/CrossProcessObjectWrappers.h @@ -38,10 +38,11 @@ class CPOWManager InfallibleTArray *outCpows) = 0; }; -class CpowIdHolder : public CpowHolder +class CrossProcessCpowHolder : public CpowHolder { public: - CpowIdHolder(dom::CPOWManagerGetter *managerGetter, const InfallibleTArray &cpows); + CrossProcessCpowHolder(dom::CPOWManagerGetter *managerGetter, + const InfallibleTArray &cpows); bool ToObject(JSContext *cx, JS::MutableHandleObject objp); diff --git a/js/ipc/JavaScriptShared.cpp b/js/ipc/JavaScriptShared.cpp index 8dc9855ac16..e56b99b9301 100644 --- a/js/ipc/JavaScriptShared.cpp +++ b/js/ipc/JavaScriptShared.cpp @@ -672,7 +672,8 @@ JavaScriptShared::fromObjectOrNullVariant(JSContext *cx, ObjectOrNullVariant obj return fromObjectVariant(cx, objVar.get_ObjectVariant()); } -CpowIdHolder::CpowIdHolder(dom::CPOWManagerGetter *managerGetter, const InfallibleTArray &cpows) +CrossProcessCpowHolder::CrossProcessCpowHolder(dom::CPOWManagerGetter *managerGetter, + const InfallibleTArray &cpows) : js_(nullptr), cpows_(cpows) { @@ -682,7 +683,7 @@ CpowIdHolder::CpowIdHolder(dom::CPOWManagerGetter *managerGetter, const Infallib } bool -CpowIdHolder::ToObject(JSContext *cx, JS::MutableHandleObject objp) +CrossProcessCpowHolder::ToObject(JSContext *cx, JS::MutableHandleObject objp) { if (!cpows_.Length()) return true; From 2b08898cbba551522bbcfc11e935f8067c20ac27 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Thu, 22 Jan 2015 19:56:49 -0800 Subject: [PATCH 047/106] Bug 1087723: Make JS callers of ios.newChannel call ios.newChannel2 in addon-sdk/ (r=erikvold) --- addon-sdk/source/app-extension/bootstrap.js | 10 ++++++++- addon-sdk/source/lib/sdk/io/data.js | 10 ++++++++- addon-sdk/source/lib/sdk/net/url.js | 24 +++++++++++++++++---- addon-sdk/source/lib/sdk/url.js | 11 ++++++++-- addon-sdk/source/lib/toolkit/loader.js | 9 +++++++- 5 files changed, 55 insertions(+), 9 deletions(-) diff --git a/addon-sdk/source/app-extension/bootstrap.js b/addon-sdk/source/app-extension/bootstrap.js index e31c75f84c4..49d0f97373e 100644 --- a/addon-sdk/source/app-extension/bootstrap.js +++ b/addon-sdk/source/app-extension/bootstrap.js @@ -50,7 +50,15 @@ function setResourceSubstitution(domain, uri) { function readURI(uri) { let ioservice = Cc['@mozilla.org/network/io-service;1']. getService(Ci.nsIIOService); - let channel = ioservice.newChannel(uri, 'UTF-8', null); + + let channel = ioservice.newChannel2(uri, + 'UTF-8', + null, + null, // aLoadingNode + systemPrincipal, + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); let stream = channel.open(); let cstream = Cc['@mozilla.org/intl/converter-input-stream;1']. diff --git a/addon-sdk/source/lib/sdk/io/data.js b/addon-sdk/source/lib/sdk/io/data.js index fcb8b5cfa57..57e80f2ce77 100644 --- a/addon-sdk/source/lib/sdk/io/data.js +++ b/addon-sdk/source/lib/sdk/io/data.js @@ -15,6 +15,7 @@ const IOService = Cc["@mozilla.org/network/io-service;1"]. const { deprecateFunction } = require('../util/deprecate'); const { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm"); +const { Services } = Cu.import("resource://gre/modules/Services.jsm"); const FaviconService = Cc["@mozilla.org/browser/favicon-service;1"]. getService(Ci.nsIFaviconService); @@ -51,7 +52,14 @@ exports.getFaviconURIForLocation = getFaviconURIForLocation; * @returns {String} */ function getChromeURIContent(chromeURI) { - let channel = IOService.newChannel(chromeURI, null, null); + let channel = IOService.newChannel2(chromeURI, + null, + null, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); let input = channel.open(); let stream = Cc["@mozilla.org/binaryinputstream;1"]. createInstance(Ci.nsIBinaryInputStream); diff --git a/addon-sdk/source/lib/sdk/net/url.js b/addon-sdk/source/lib/sdk/net/url.js index 9ee6f47909b..84f19c6d5f4 100644 --- a/addon-sdk/source/lib/sdk/net/url.js +++ b/addon-sdk/source/lib/sdk/net/url.js @@ -8,11 +8,13 @@ module.metadata = { "stability": "experimental" }; -const { Cu, components } = require("chrome"); +const { Ci, Cu, components } = require("chrome"); + const { defer } = require("../core/promise"); const { merge } = require("../util/object"); const { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm", {}); +const { Services } = Cu.import("resource://gre/modules/Services.jsm", {}); /** * Reads a URI and returns a promise. @@ -33,12 +35,19 @@ function readURI(uri, options) { options = options || {}; let charset = options.charset || 'UTF-8'; - let channel = NetUtil.newChannel(uri, charset, null); + let channel = NetUtil.newChannel2(uri, + charset, + null, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); let { promise, resolve, reject } = defer(); try { - NetUtil.asyncFetch(channel, function (stream, result) { + NetUtil.asyncFetch2(channel, function (stream, result) { if (components.isSuccessCode(result)) { let count = stream.available(); let data = NetUtil.readInputStreamToString(stream, count, { charset : charset }); @@ -74,7 +83,14 @@ exports.readURI = readURI; function readURISync(uri, charset) { charset = typeof charset === "string" ? charset : "UTF-8"; - let channel = NetUtil.newChannel(uri, charset, null); + let channel = NetUtil.newChannel2(uri, + charset, + null, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); let stream = channel.open(); let count = stream.available(); diff --git a/addon-sdk/source/lib/sdk/url.js b/addon-sdk/source/lib/sdk/url.js index 9cbc3a0cd72..7bcf00e549d 100644 --- a/addon-sdk/source/lib/sdk/url.js +++ b/addon-sdk/source/lib/sdk/url.js @@ -7,7 +7,7 @@ module.metadata = { "stability": "experimental" }; -const { Cc, Ci, Cr } = require("chrome"); +const { Cc, Ci, Cr, Cu } = require("chrome"); const { Class } = require("./core/heritage"); const base64 = require("./base64"); @@ -23,6 +23,8 @@ var resProt = ios.getProtocolHandler("resource") var URLParser = Cc["@mozilla.org/network/url-parser;1?auth=no"] .getService(Ci.nsIURLParser); +const { Services } = Cu.import("resource://gre/modules/Services.jsm"); + function newURI(uriStr, base) { try { let baseURI = base ? ios.newURI(base, null, null) : null; @@ -64,7 +66,12 @@ let toFilename = exports.toFilename = function toFilename(url) { if (uri.scheme == "resource") uri = newURI(resolveResourceURI(uri)); if (uri.scheme == "chrome") { - var channel = ios.newChannelFromURI(uri); + var channel = ios.newChannelFromURI2(uri, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); try { channel = channel.QueryInterface(Ci.nsIFileChannel); return channel.file.path; diff --git a/addon-sdk/source/lib/toolkit/loader.js b/addon-sdk/source/lib/toolkit/loader.js index 049aa8d230f..70a89b1c46f 100644 --- a/addon-sdk/source/lib/toolkit/loader.js +++ b/addon-sdk/source/lib/toolkit/loader.js @@ -172,7 +172,14 @@ function serializeStack(frames) { exports.serializeStack = serializeStack; function readURI(uri) { - let stream = NetUtil.newChannel(uri, 'UTF-8', null).open(); + let stream = NetUtil.newChannel2(uri, + 'UTF-8', + null, + null, // aLoadingNode + systemPrincipal, + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER).open(); let count = stream.available(); let data = NetUtil.readInputStreamToString(stream, count, { charset: 'UTF-8' From a3122c8ef6fca81dd6104f204a7147132e84e3d4 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Thu, 22 Jan 2015 19:57:45 -0800 Subject: [PATCH 048/106] Bug 1087723: Make JS callers of ios.newChannel call ios.newChannel2 in addon-sdk/ - tests (r=erikvold) --- addon-sdk/source/lib/sdk/test/tmp-file.js | 13 +++++++++++-- .../l10n-properties/app-extension/bootstrap.js | 10 +++++++++- .../app-extension/bootstrap.js | 10 +++++++++- addon-sdk/source/test/test-private-browsing.js | 9 ++++++++- addon-sdk/source/test/test-xpcom.js | 16 +++++++++++++--- 5 files changed, 50 insertions(+), 8 deletions(-) diff --git a/addon-sdk/source/lib/sdk/test/tmp-file.js b/addon-sdk/source/lib/sdk/test/tmp-file.js index 634d2f1bf31..a055c661bf5 100644 --- a/addon-sdk/source/lib/sdk/test/tmp-file.js +++ b/addon-sdk/source/lib/sdk/test/tmp-file.js @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -const { Cc, Ci } = require("chrome"); +const { Cc, Ci, Cu } = require("chrome"); const system = require("sdk/system"); const file = require("sdk/io/file"); @@ -12,6 +12,8 @@ const unload = require("sdk/system/unload"); // Retrieve the path to the OS temporary directory: const tmpDir = require("sdk/system").pathFor("TmpD"); +const { Services } = Cu.import("resource://gre/modules/Services.jsm"); + // List of all tmp file created let files = []; @@ -33,7 +35,14 @@ unload.when(function () { // `uri` and returns content string. Read in binary mode. function readBinaryURI(uri) { let ioservice = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); - let channel = ioservice.newChannel(uri, "UTF-8", null); + let channel = ioservice.newChannel2(uri, + "UTF-8", + null, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); let stream = Cc["@mozilla.org/binaryinputstream;1"]. createInstance(Ci.nsIBinaryInputStream); stream.setInputStream(channel.open()); diff --git a/addon-sdk/source/test/addons/l10n-properties/app-extension/bootstrap.js b/addon-sdk/source/test/addons/l10n-properties/app-extension/bootstrap.js index 6bb014a1397..7ed453f031e 100644 --- a/addon-sdk/source/test/addons/l10n-properties/app-extension/bootstrap.js +++ b/addon-sdk/source/test/addons/l10n-properties/app-extension/bootstrap.js @@ -26,6 +26,7 @@ const appInfo = Cc["@mozilla.org/xre/app-info;1"]. const vc = Cc["@mozilla.org/xpcom/version-comparator;1"]. getService(Ci.nsIVersionComparator); +const { Services } = Cu.import("resource://gre/modules/Services.jsm"); const REASON = [ 'unknown', 'startup', 'shutdown', 'enable', 'disable', 'install', 'uninstall', 'upgrade', 'downgrade' ]; @@ -42,7 +43,14 @@ let nukeTimer = null; function readURI(uri) { let ioservice = Cc['@mozilla.org/network/io-service;1']. getService(Ci.nsIIOService); - let channel = ioservice.newChannel(uri, 'UTF-8', null); + let channel = ioservice.newChannel2(uri, + 'UTF-8', + null, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); let stream = channel.open(); let cstream = Cc['@mozilla.org/intl/converter-input-stream;1']. diff --git a/addon-sdk/source/test/addons/simple-prefs-regression/app-extension/bootstrap.js b/addon-sdk/source/test/addons/simple-prefs-regression/app-extension/bootstrap.js index 6bb014a1397..7ed453f031e 100644 --- a/addon-sdk/source/test/addons/simple-prefs-regression/app-extension/bootstrap.js +++ b/addon-sdk/source/test/addons/simple-prefs-regression/app-extension/bootstrap.js @@ -26,6 +26,7 @@ const appInfo = Cc["@mozilla.org/xre/app-info;1"]. const vc = Cc["@mozilla.org/xpcom/version-comparator;1"]. getService(Ci.nsIVersionComparator); +const { Services } = Cu.import("resource://gre/modules/Services.jsm"); const REASON = [ 'unknown', 'startup', 'shutdown', 'enable', 'disable', 'install', 'uninstall', 'upgrade', 'downgrade' ]; @@ -42,7 +43,14 @@ let nukeTimer = null; function readURI(uri) { let ioservice = Cc['@mozilla.org/network/io-service;1']. getService(Ci.nsIIOService); - let channel = ioservice.newChannel(uri, 'UTF-8', null); + let channel = ioservice.newChannel2(uri, + 'UTF-8', + null, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); let stream = channel.open(); let cstream = Cc['@mozilla.org/intl/converter-input-stream;1']. diff --git a/addon-sdk/source/test/test-private-browsing.js b/addon-sdk/source/test/test-private-browsing.js index c1d19260514..0e5754ef87b 100644 --- a/addon-sdk/source/test/test-private-browsing.js +++ b/addon-sdk/source/test/test-private-browsing.js @@ -66,7 +66,14 @@ exports.testIsPrivateBrowsingFalseDefault = function(assert) { }; exports.testNSIPrivateBrowsingChannel = function(assert) { - let channel = Services.io.newChannel("about:blank", null, null); + let channel = Services.io.newChannel2("about:blank", + null, + null, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); channel.QueryInterface(Ci.nsIPrivateBrowsingChannel); assert.equal(isPrivate(channel), false, 'isPrivate detects non-private channels'); channel.setPrivate(true); diff --git a/addon-sdk/source/test/test-xpcom.js b/addon-sdk/source/test/test-xpcom.js index 17c7f1cd378..38e42a4283c 100644 --- a/addon-sdk/source/test/test-xpcom.js +++ b/addon-sdk/source/test/test-xpcom.js @@ -132,10 +132,15 @@ function testRegister(assert, text) { var ios = Cc["@mozilla.org/network/io-service;1"]. getService(Ci.nsIIOService); - var channel = ios.newChannel( + var channel = ios.newChannel2( "data:text/plain;charset=utf-8," + text, null, - null + null, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER ); channel.originalURI = aURI; @@ -162,7 +167,12 @@ function testRegister(assert, text) { ); var aboutURI = ios.newURI("about:boop", null, null); - var channel = ios.newChannelFromURI(aboutURI); + var channel = ios.newChannelFromURI2(aboutURI, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); var iStream = channel.open(); var siStream = Cc['@mozilla.org/scriptableinputstream;1'] .createInstance(Ci.nsIScriptableInputStream); From 6c843dd2d010aaadfbf68caf238e68c3bf1669af Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 22 Jan 2015 22:22:19 -0500 Subject: [PATCH 049/106] Bug 611103 - Part 2: Handle the edge case where the BR element is the only child of a block element; r=bzbarsky The test for bug 1119503 examines this edge case. --- dom/base/nsDocumentEncoder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dom/base/nsDocumentEncoder.cpp b/dom/base/nsDocumentEncoder.cpp index 12fdcceaa06..f3d83af6dce 100644 --- a/dom/base/nsDocumentEncoder.cpp +++ b/dom/base/nsDocumentEncoder.cpp @@ -330,8 +330,10 @@ IsInvisibleBreak(nsINode *aNode) { } // If the BRFrame has caused a visible line break, it should have a next - // sibling. - return !frame->GetNextSibling(); + // sibling, or otherwise no siblings and a non-zero height. + bool visible = frame->GetNextSibling() || + (!frame->GetPrevSibling() && frame->GetRect().Height() != 0); + return !visible; } nsresult From c954b38f5fcb91340705c254e1a4f9147b883ca7 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sat, 17 Jan 2015 14:16:11 -0500 Subject: [PATCH 050/106] Bug 1122936 - Make nsPlainTextSerializer final; r=bzbarsky --- dom/base/nsPlainTextSerializer.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dom/base/nsPlainTextSerializer.h b/dom/base/nsPlainTextSerializer.h index 5688fed5d99..479272a76ad 100644 --- a/dom/base/nsPlainTextSerializer.h +++ b/dom/base/nsPlainTextSerializer.h @@ -32,7 +32,7 @@ class Element; } // namespace dom } // namespace mozilla -class nsPlainTextSerializer : public nsIContentSerializer +class nsPlainTextSerializer MOZ_FINAL : public nsIContentSerializer { public: nsPlainTextSerializer(); @@ -67,8 +67,8 @@ public: NS_IMETHOD AppendDocumentStart(nsIDocument *aDocument, nsAString& aStr) MOZ_OVERRIDE; -protected: - virtual ~nsPlainTextSerializer(); +private: + ~nsPlainTextSerializer(); nsresult GetAttributeValue(nsIAtom* aName, nsString& aValueRet); void AddToLine(const char16_t* aStringToAdd, int32_t aLength); @@ -114,10 +114,9 @@ protected: bool ShouldReplaceContainerWithPlaceholder(nsIAtom* aTag); -private: bool IsElementPreformatted(mozilla::dom::Element* aElement); -protected: +private: nsString mCurrentLine; uint32_t mHeadLevel; bool mAtFirstColumn; From ca93eb90097a683678b00052aa616287fafd8c13 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 16 Jan 2015 09:09:55 -0500 Subject: [PATCH 051/106] Bug 1119099 - Use fallible allocation in nsTextEditRules::TruncateInsertionIfNeeded; r=roc --- editor/libeditor/nsTextEditRules.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/editor/libeditor/nsTextEditRules.cpp b/editor/libeditor/nsTextEditRules.cpp index ec317be0de9..2da4bc29c68 100644 --- a/editor/libeditor/nsTextEditRules.cpp +++ b/editor/libeditor/nsTextEditRules.cpp @@ -1198,7 +1198,9 @@ nsTextEditRules::TruncateInsertionIfNeeded(Selection* aSelection, if (!aSelection || !aInString || !aOutString) {return NS_ERROR_NULL_POINTER;} nsresult res = NS_OK; - *aOutString = *aInString; + if (!aOutString->Assign(*aInString, mozilla::fallible_t())) { + return NS_ERROR_OUT_OF_MEMORY; + } if (aTruncated) { *aTruncated = false; } @@ -1233,6 +1235,8 @@ nsTextEditRules::TruncateInsertionIfNeeded(Selection* aSelection, const int32_t resultingDocLength = docLength - selectionLength - oldCompStrLength; if (resultingDocLength >= aMaxLength) { + // This call is guaranteed to reduce the capacity of the string, so it + // cannot cause an OOM. aOutString->Truncate(); if (aTruncated) { *aTruncated = true; @@ -1253,6 +1257,8 @@ nsTextEditRules::TruncateInsertionIfNeeded(Selection* aSelection, } // XXX What should we do if we're removing IVS and its preceding // character won't be removed? + // This call is guaranteed to reduce the capacity of the string, so it + // cannot cause an OOM. aOutString->Truncate(newLength); if (aTruncated) { *aTruncated = true; From 596b7336be48e673f4078c14b1f816ca99ca53e6 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 22 Jan 2015 23:18:26 -0500 Subject: [PATCH 052/106] Bug 1122988 - Mark nsIWidget::mLastChild/mPrevSibling as non-owning; r=roc --- widget/nsIWidget.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index 4a77cd6d029..b016abab050 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -2214,9 +2214,9 @@ protected: // lastchild pointers are weak, which is fine as long as they are // maintained properly. nsCOMPtr mFirstChild; - nsIWidget* mLastChild; + nsIWidget* MOZ_NON_OWNING_REF mLastChild; nsCOMPtr mNextSibling; - nsIWidget* mPrevSibling; + nsIWidget* MOZ_NON_OWNING_REF mPrevSibling; // When Destroy() is called, the sub class should set this true. bool mOnDestroyCalled; nsWindowType mWindowType; From 071e1054b57323842c68f36e385a862e9005ad9e Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 16 Jan 2015 13:40:13 -0500 Subject: [PATCH 053/106] Bug 1122786 - Make nsTextEditorState::mTextListener an nsRefPtr; r=roc --- dom/html/nsTextEditorState.cpp | 6 ++---- dom/html/nsTextEditorState.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dom/html/nsTextEditorState.cpp b/dom/html/nsTextEditorState.cpp index 5f4a3c8f06e..92f748c46b8 100644 --- a/dom/html/nsTextEditorState.cpp +++ b/dom/html/nsTextEditorState.cpp @@ -979,7 +979,6 @@ nsTextEditorState::nsTextEditorState(nsITextControlElement* aOwningElement) : mTextCtrlElement(aOwningElement), mRestoringSelection(nullptr), mBoundFrame(nullptr), - mTextListener(nullptr), mEverInited(false), mEditorInitialized(false), mInitializing(false), @@ -1012,7 +1011,7 @@ nsTextEditorState::Clear() // for us. DestroyEditor(); } - NS_IF_RELEASE(mTextListener); + mTextListener = nullptr; } void nsTextEditorState::Unlink() @@ -1125,8 +1124,8 @@ nsTextEditorState::BindToFrame(nsTextControlFrame* aFrame) // Create a SelectionController mSelCon = new nsTextInputSelectionImpl(frameSel, shell, rootNode); + MOZ_ASSERT(!mTextListener, "Should not overwrite the object"); mTextListener = new nsTextInputListener(mTextCtrlElement); - NS_ADDREF(mTextListener); mTextListener->SetFrame(mBoundFrame); mSelCon->SetDisplaySelection(nsISelectionController::SELECTION_ON); @@ -1647,7 +1646,6 @@ nsTextEditorState::UnbindFromFrame(nsTextControlFrame* aFrame) TrustedEventsAtSystemGroupBubble()); } - NS_RELEASE(mTextListener); mTextListener = nullptr; } diff --git a/dom/html/nsTextEditorState.h b/dom/html/nsTextEditorState.h index ab1d37171dc..bf43a7831ca 100644 --- a/dom/html/nsTextEditorState.h +++ b/dom/html/nsTextEditorState.h @@ -276,7 +276,7 @@ private: nsCOMPtr mRootNode; nsCOMPtr mPlaceholderDiv; nsTextControlFrame* mBoundFrame; - nsTextInputListener* mTextListener; + nsRefPtr mTextListener; nsAutoPtr mValue; nsRefPtr mMutationObserver; mutable nsString mCachedValue; // Caches non-hard-wrapped value on a multiline control. From 11e2841d004268964691ce783985cb9daf6f9690 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 22 Jan 2015 23:22:52 -0500 Subject: [PATCH 054/106] Backed out changeset 6d56dfa4e845 (bug 934502) for SM(ggc) failures. --- js/src/jit/CodeGenerator.cpp | 25 ++++- js/src/jit/Ion.cpp | 4 +- js/src/jit/IonCode.h | 8 +- js/src/jit/JitFrames.cpp | 70 ++++++------- js/src/jit/JitFrames.h | 10 +- js/src/jit/LIR.h | 108 ++++++++++----------- js/src/jit/LinearScan.cpp | 23 +---- js/src/jit/Safepoints.cpp | 91 +++++++---------- js/src/jit/Safepoints.h | 15 +-- js/src/jit/shared/CodeGenerator-shared.cpp | 19 +++- js/src/jit/shared/CodeGenerator-shared.h | 6 ++ 11 files changed, 184 insertions(+), 195 deletions(-) diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index e35d90ceaa2..0956b80a2bc 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -2076,6 +2076,10 @@ CodeGenerator::visitStackArgT(LStackArgT *lir) masm.storeValue(ValueTypeFromMIRType(argType), ToRegister(arg), dest); else masm.storeValue(*(arg->toConstant()), dest); + + uint32_t slot = StackOffsetToSlot(stack_offset); + MOZ_ASSERT(slot - 1u < graph.totalSlotCount()); + masm.propagateOOM(pushedArgumentSlots_.append(slot)); } void @@ -2088,6 +2092,10 @@ CodeGenerator::visitStackArgV(LStackArgV *lir) int32_t stack_offset = StackOffsetOfPassedArg(argslot); masm.storeValue(val, Address(StackPointer, stack_offset)); + + uint32_t slot = StackOffsetToSlot(stack_offset); + MOZ_ASSERT(slot - 1u < graph.totalSlotCount()); + masm.propagateOOM(pushedArgumentSlots_.append(slot)); } void @@ -2656,6 +2664,8 @@ CodeGenerator::visitCallNative(LCallNative *call) // Move the StackPointer back to its original location, unwinding the native exit frame. masm.adjustStack(NativeExitFrameLayout::Size() - unusedStack); MOZ_ASSERT(masm.framePushed() == initialStack); + + dropArguments(call->numStackArgs() + 1); } static void @@ -2785,6 +2795,8 @@ CodeGenerator::visitCallDOMNative(LCallDOMNative *call) // Move the StackPointer back to its original location, unwinding the native exit frame. masm.adjustStack(IonDOMMethodExitFrameLayout::Size() - unusedStack); MOZ_ASSERT(masm.framePushed() == initialStack); + + dropArguments(call->numStackArgs() + 1); } typedef bool (*GetIntrinsicValueFn)(JSContext *cx, HandlePropertyName, MutableHandleValue); @@ -2901,6 +2913,8 @@ CodeGenerator::visitCallGeneric(LCallGeneric *call) masm.loadValue(Address(StackPointer, unusedStack), JSReturnOperand); masm.bind(¬Primitive); } + + dropArguments(call->numStackArgs() + 1); } void @@ -2967,6 +2981,8 @@ CodeGenerator::visitCallKnown(LCallKnown *call) masm.loadValue(Address(StackPointer, unusedStack), JSReturnOperand); masm.bind(¬Primitive); } + + dropArguments(call->numStackArgs() + 1); } void @@ -3803,6 +3819,11 @@ CodeGenerator::generateBody() if (counts) blockCounts->visitInstruction(*iter); + if (iter->safepoint() && pushedArgumentSlots_.length()) { + if (!markArgumentSlots(iter->safepoint())) + return false; + } + #ifdef CHECK_OSIPOINT_REGISTERS if (iter->safepoint()) resetOsiPointRegs(iter->safepoint()); @@ -3831,6 +3852,7 @@ CodeGenerator::generateBody() #endif } + MOZ_ASSERT(pushedArgumentSlots_.empty()); return true; } @@ -7109,7 +7131,6 @@ CodeGenerator::link(JSContext *cx, types::CompilerConstraintList *constraints) if (warmUpCount > script->getWarmUpCount()) script->incWarmUpCounter(warmUpCount - script->getWarmUpCount()); - uint32_t argumentSlots = (gen->info().nargs() + 1) * sizeof(Value); uint32_t scriptFrameSize = frameClass_ == FrameSizeClass::None() ? frameDepth_ : FrameSizeClass::FromDepth(frameDepth_).frameSize(); @@ -7121,7 +7142,7 @@ CodeGenerator::link(JSContext *cx, types::CompilerConstraintList *constraints) IonScript *ionScript = IonScript::New(cx, recompileInfo, - graph.totalSlotCount(), argumentSlots, scriptFrameSize, + graph.totalSlotCount(), scriptFrameSize, snapshots_.listSize(), snapshots_.RVATableSize(), recovers_.size(), bailouts_.length(), graph.numConstants(), safepointIndices_.length(), osiIndices_.length(), diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index bae8336a0e8..d0ce623ec8c 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -738,7 +738,7 @@ IonScript::IonScript() IonScript * IonScript::New(JSContext *cx, types::RecompileInfo recompileInfo, - uint32_t frameSlots, uint32_t argumentSlots, uint32_t frameSize, + uint32_t frameSlots, uint32_t frameSize, size_t snapshotsListSize, size_t snapshotsRVATableSize, size_t recoversSize, size_t bailoutEntries, size_t constants, size_t safepointIndices, @@ -827,8 +827,6 @@ IonScript::New(JSContext *cx, types::RecompileInfo recompileInfo, offsetCursor += paddedBackedgeSize; script->frameSlots_ = frameSlots; - script->argumentSlots_ = argumentSlots; - script->frameSize_ = frameSize; script->recompileInfo_ = recompileInfo; diff --git a/js/src/jit/IonCode.h b/js/src/jit/IonCode.h index 803f87cec42..848281dfc49 100644 --- a/js/src/jit/IonCode.h +++ b/js/src/jit/IonCode.h @@ -225,9 +225,6 @@ struct IonScript // Number of bytes this function reserves on the stack. uint32_t frameSlots_; - // Number of bytes used passed in as formal arguments or |this|. - uint32_t argumentSlots_; - // Frame size is the value that can be added to the StackPointer along // with the frame prefix to get a valid JitFrameLayout. uint32_t frameSize_; @@ -329,7 +326,7 @@ struct IonScript IonScript(); static IonScript *New(JSContext *cx, types::RecompileInfo recompileInfo, - uint32_t frameSlots, uint32_t argumentSlots, uint32_t frameSize, + uint32_t frameLocals, uint32_t frameSize, size_t snapshotsListSize, size_t snapshotsRVATableSize, size_t recoversSize, size_t bailoutEntries, size_t constants, size_t safepointIndexEntries, @@ -465,9 +462,6 @@ struct IonScript uint32_t frameSlots() const { return frameSlots_; } - uint32_t argumentSlots() const { - return argumentSlots_; - } uint32_t frameSize() const { return frameSize_; } diff --git a/js/src/jit/JitFrames.cpp b/js/src/jit/JitFrames.cpp index dc587fa732b..38d76e0a322 100644 --- a/js/src/jit/JitFrames.cpp +++ b/js/src/jit/JitFrames.cpp @@ -939,14 +939,6 @@ MarkCalleeToken(JSTracer *trc, CalleeToken token) } } -uintptr_t * -JitFrameLayout::slotRef(SafepointSlotEntry where) -{ - if (where.stack) - return (uintptr_t *)((uint8_t *)this - where.slot); - return (uintptr_t *)((uint8_t *)argv() + where.slot); -} - #ifdef JS_NUNBOX32 static inline uintptr_t ReadAllocation(const JitFrameIterator &frame, const LAllocation *a) @@ -955,29 +947,31 @@ ReadAllocation(const JitFrameIterator &frame, const LAllocation *a) Register reg = a->toGeneralReg()->reg(); return frame.machineState().read(reg); } - return *frame.jsFrame()->slotRef(SafepointSlotEntry(a)); + if (a->isStackSlot()) { + uint32_t slot = a->toStackSlot()->slot(); + return *frame.jsFrame()->slotRef(slot); + } + uint32_t index = a->toArgument()->index(); + uint8_t *argv = reinterpret_cast(frame.jsFrame()->argv()); + return *reinterpret_cast(argv + index); } #endif static void -MarkExtraActualArguments(JSTracer *trc, const JitFrameIterator &frame) +MarkFrameAndActualArguments(JSTracer *trc, const JitFrameIterator &frame) { - // Mark any extra actual arguments for an Ion frame. Marking of |this| and - // the formal arguments is taken care of by the frame's safepoint/snapshot. + // The trampoline produced by |generateEnterJit| is pushing |this| on the + // stack, as requested by |setEnterJitData|. Thus, this function is also + // used for marking the |this| value of the top-level frame. JitFrameLayout *layout = frame.jsFrame(); - if (!CalleeTokenIsFunction(layout->calleeToken())) { - MOZ_ASSERT(frame.numActualArgs() == 0); - return; - } - size_t nargs = frame.numActualArgs(); - size_t nformals = CalleeTokenToFunction(layout->calleeToken())->nargs(); + MOZ_ASSERT_IF(!CalleeTokenIsFunction(layout->calleeToken()), nargs == 0); - // Trace actual arguments. Note + 1 for thisv. + // Trace function arguments. Note + 1 for thisv. Value *argv = layout->argv(); - for (size_t i = nformals + 1; i < nargs + 1; i++) + for (size_t i = 0; i < nargs + 1; i++) gc::MarkValueRoot(trc, &argv[i], "ion-argv"); } @@ -988,9 +982,16 @@ WriteAllocation(const JitFrameIterator &frame, const LAllocation *a, uintptr_t v if (a->isGeneralReg()) { Register reg = a->toGeneralReg()->reg(); frame.machineState().write(reg, value); - } else { - *frame.jsFrame()->slotRef(SafepointSlotEntry(a)) = value; + return; } + if (a->isStackSlot()) { + uint32_t slot = a->toStackSlot()->slot(); + *frame.jsFrame()->slotRef(slot) = value; + return; + } + uint32_t index = a->toArgument()->index(); + uint8_t *argv = reinterpret_cast(frame.jsFrame()->argv()); + *reinterpret_cast(argv + index) = value; } #endif @@ -1011,7 +1012,7 @@ MarkIonJSFrame(JSTracer *trc, const JitFrameIterator &frame) ionScript = frame.ionScriptFromCalleeToken(); } - MarkExtraActualArguments(trc, frame); + MarkFrameAndActualArguments(trc, frame); const SafepointIndex *si = ionScript->getSafepointIndex(frame.returnAddressToFp()); @@ -1019,15 +1020,14 @@ MarkIonJSFrame(JSTracer *trc, const JitFrameIterator &frame) // Scan through slots which contain pointers (or on punboxing systems, // actual values). - SafepointSlotEntry entry; - - while (safepoint.getGcSlot(&entry)) { - uintptr_t *ref = layout->slotRef(entry); + uint32_t slot; + while (safepoint.getGcSlot(&slot)) { + uintptr_t *ref = layout->slotRef(slot); gc::MarkGCThingRoot(trc, reinterpret_cast(ref), "ion-gc-slot"); } - while (safepoint.getValueSlot(&entry)) { - Value *v = (Value *)layout->slotRef(entry); + while (safepoint.getValueSlot(&slot)) { + Value *v = (Value *)layout->slotRef(slot); gc::MarkValueRoot(trc, v, "ion-gc-slot"); } @@ -1070,7 +1070,7 @@ MarkBailoutFrame(JSTracer *trc, const JitFrameIterator &frame) // We have to mark the list of actual arguments, as only formal arguments // are represented in the Snapshot. - MarkExtraActualArguments(trc, frame); + MarkFrameAndActualArguments(trc, frame); // Under a bailout, do not have a Safepoint to only iterate over GC-things. // Thus we use a SnapshotIterator to trace all the locations which would be @@ -1128,16 +1128,16 @@ UpdateIonJSFrameForMinorGC(JSTracer *trc, const JitFrameIterator &frame) } // Skip to the right place in the safepoint - SafepointSlotEntry entry; - while (safepoint.getGcSlot(&entry)); - while (safepoint.getValueSlot(&entry)); + uint32_t slot; + while (safepoint.getGcSlot(&slot)); + while (safepoint.getValueSlot(&slot)); #ifdef JS_NUNBOX32 LAllocation type, payload; while (safepoint.getNunboxSlot(&type, &payload)); #endif - while (safepoint.getSlotsOrElementsSlot(&entry)) { - HeapSlot **slots = reinterpret_cast(layout->slotRef(entry)); + while (safepoint.getSlotsOrElementsSlot(&slot)) { + HeapSlot **slots = reinterpret_cast(layout->slotRef(slot)); nursery.forwardBufferPointer(slots); } } diff --git a/js/src/jit/JitFrames.h b/js/src/jit/JitFrames.h index 6f231d8696d..9c13dbb0fd2 100644 --- a/js/src/jit/JitFrames.h +++ b/js/src/jit/JitFrames.h @@ -13,7 +13,6 @@ #include "jsfun.h" #include "jit/JitFrameIterator.h" -#include "jit/Safepoints.h" namespace js { namespace jit { @@ -401,10 +400,11 @@ class JitFrameLayout : public CommonFrameLayout return numActualArgs_; } - // Computes a reference to a stack or argument slot, where a slot is a - // distance from the base frame pointer, as would be used for LStackSlot - // or LArgument. - uintptr_t *slotRef(SafepointSlotEntry where); + // Computes a reference to a slot, where a slot is a distance from the base + // frame pointer (as would be used for LStackSlot). + uintptr_t *slotRef(uint32_t slot) { + return (uintptr_t *)((uint8_t *)this - slot); + } static inline size_t Size() { return sizeof(JitFrameLayout); diff --git a/js/src/jit/LIR.h b/js/src/jit/LIR.h index 7d00a8a1334..91afe734ce9 100644 --- a/js/src/jit/LIR.h +++ b/js/src/jit/LIR.h @@ -164,7 +164,6 @@ class LAllocation : public TempObject bool isMemory() const { return isStackSlot() || isArgument(); } - inline uint32_t memorySlot() const; inline LUse *toUse(); inline const LUse *toUse() const; inline const LGeneralReg *toGeneralReg() const; @@ -361,22 +360,15 @@ class LStackSlot : public LAllocation class LArgument : public LAllocation { public: - explicit LArgument(uint32_t index) + explicit LArgument(int32_t index) : LAllocation(ARGUMENT_SLOT, index) { } - uint32_t index() const { + int32_t index() const { return data(); } }; -inline uint32_t -LAllocation::memorySlot() const -{ - MOZ_ASSERT(isMemory()); - return isStackSlot() ? toStackSlot()->slot() : toArgument()->index(); -} - // Represents storage for a definition. class LDefinition { @@ -1240,22 +1232,6 @@ class LSnapshot : public TempObject void rewriteRecoveredInput(LUse input); }; -struct SafepointSlotEntry { - // Flag indicating whether this is a slot in the stack or argument space. - uint32_t stack:1; - - // Byte offset of the slot, as in LStackSlot or LArgument. - uint32_t slot:31; - - SafepointSlotEntry() { } - SafepointSlotEntry(bool stack, uint32_t slot) - : stack(stack), slot(slot) - { } - explicit SafepointSlotEntry(const LAllocation *a) - : stack(a->isStackSlot()), slot(a->memorySlot()) - { } -}; - struct SafepointNunboxEntry { uint32_t typeVreg; LAllocation type; @@ -1269,11 +1245,10 @@ struct SafepointNunboxEntry { class LSafepoint : public TempObject { - typedef SafepointSlotEntry SlotEntry; typedef SafepointNunboxEntry NunboxEntry; public: - typedef Vector SlotList; + typedef Vector SlotList; typedef Vector NunboxList; private: @@ -1308,14 +1283,14 @@ class LSafepoint : public TempObject // Assembler buffer displacement to OSI point's call location. uint32_t osiCallPointOffset_; - // List of slots which have gcthing pointers. + // List of stack slots which have gcthing pointers. SlotList gcSlots_; - // List of slots which have Values. + // List of stack slots which have Values. SlotList valueSlots_; #ifdef JS_NUNBOX32 - // List of registers (in liveRegs) and slots which contain pieces of Values. + // List of registers (in liveRegs) and stack slots which contain pieces of Values. NunboxList nunboxParts_; #elif JS_PUNBOX64 // The subset of liveRegs which have Values. @@ -1325,7 +1300,7 @@ class LSafepoint : public TempObject // The subset of liveRegs which contains pointers to slots/elements. GeneralRegisterSet slotsOrElementsRegs_; - // List of slots which have slots/elements pointers. + // List of stack slots which have slots/elements pointers. SlotList slotsOrElementsSlots_; public: @@ -1372,8 +1347,8 @@ class LSafepoint : public TempObject GeneralRegisterSet gcRegs() const { return gcRegs_; } - bool addGcSlot(bool stack, uint32_t slot) { - bool result = gcSlots_.append(SlotEntry(stack, slot)); + bool addGcSlot(uint32_t slot) { + bool result = gcSlots_.append(slot); if (result) assertInvariants(); return result; @@ -1392,15 +1367,15 @@ class LSafepoint : public TempObject slotsOrElementsRegs_.addUnchecked(reg); assertInvariants(); } - bool addSlotsOrElementsSlot(bool stack, uint32_t slot) { - bool result = slotsOrElementsSlots_.append(SlotEntry(stack, slot)); + bool addSlotsOrElementsSlot(uint32_t slot) { + bool result = slotsOrElementsSlots_.append(slot); if (result) assertInvariants(); return result; } bool addSlotsOrElementsPointer(LAllocation alloc) { - if (alloc.isMemory()) - return addSlotsOrElementsSlot(alloc.isStackSlot(), alloc.memorySlot()); + if (alloc.isStackSlot()) + return addSlotsOrElementsSlot(alloc.toStackSlot()->slot()); MOZ_ASSERT(alloc.isRegister()); addSlotsOrElementsRegister(alloc.toRegister().gpr()); assertInvariants(); @@ -1409,17 +1384,19 @@ class LSafepoint : public TempObject bool hasSlotsOrElementsPointer(LAllocation alloc) const { if (alloc.isRegister()) return slotsOrElementsRegs().has(alloc.toRegister().gpr()); - for (size_t i = 0; i < slotsOrElementsSlots_.length(); i++) { - const SlotEntry &entry = slotsOrElementsSlots_[i]; - if (entry.stack == alloc.isStackSlot() && entry.slot == alloc.memorySlot()) - return true; + if (alloc.isStackSlot()) { + for (size_t i = 0; i < slotsOrElementsSlots_.length(); i++) { + if (slotsOrElementsSlots_[i] == alloc.toStackSlot()->slot()) + return true; + } + return false; } return false; } bool addGcPointer(LAllocation alloc) { - if (alloc.isMemory()) - return addGcSlot(alloc.isStackSlot(), alloc.memorySlot()); + if (alloc.isStackSlot()) + return addGcSlot(alloc.toStackSlot()->slot()); if (alloc.isRegister()) addGcRegister(alloc.toRegister().gpr()); assertInvariants(); @@ -1429,16 +1406,19 @@ class LSafepoint : public TempObject bool hasGcPointer(LAllocation alloc) const { if (alloc.isRegister()) return gcRegs().has(alloc.toRegister().gpr()); - MOZ_ASSERT(alloc.isMemory()); - for (size_t i = 0; i < gcSlots_.length(); i++) { - if (gcSlots_[i].stack == alloc.isStackSlot() && gcSlots_[i].slot == alloc.memorySlot()) - return true; + if (alloc.isStackSlot()) { + for (size_t i = 0; i < gcSlots_.length(); i++) { + if (gcSlots_[i] == alloc.toStackSlot()->slot()) + return true; + } + return false; } - return false; + MOZ_ASSERT(alloc.isArgument()); + return true; } - bool addValueSlot(bool stack, uint32_t slot) { - bool result = valueSlots_.append(SlotEntry(stack, slot)); + bool addValueSlot(uint32_t slot) { + bool result = valueSlots_.append(slot); if (result) assertInvariants(); return result; @@ -1447,9 +1427,9 @@ class LSafepoint : public TempObject return valueSlots_; } - bool hasValueSlot(bool stack, uint32_t slot) const { + bool hasValueSlot(uint32_t slot) const { for (size_t i = 0; i < valueSlots_.length(); i++) { - if (valueSlots_[i].stack == stack && valueSlots_[i].slot == slot) + if (valueSlots_[i] == slot) return true; } return false; @@ -1514,7 +1494,9 @@ class LSafepoint : public TempObject #ifdef DEBUG bool hasNunboxPayload(LAllocation payload) const { - if (payload.isMemory() && hasValueSlot(payload.isStackSlot(), payload.memorySlot())) + if (payload.isArgument()) + return true; + if (payload.isStackSlot() && hasValueSlot(payload.toStackSlot()->slot())) return true; for (size_t i = 0; i < nunboxParts_.length(); i++) { if (nunboxParts_[i].payload == payload) @@ -1545,15 +1527,25 @@ class LSafepoint : public TempObject addValueRegister(reg); return true; } - if (hasValueSlot(alloc.isStackSlot(), alloc.memorySlot())) - return true; - return addValueSlot(alloc.isStackSlot(), alloc.memorySlot()); + if (alloc.isStackSlot()) { + uint32_t slot = alloc.toStackSlot()->slot(); + for (size_t i = 0; i < valueSlots().length(); i++) { + if (valueSlots()[i] == slot) + return true; + } + return addValueSlot(slot); + } + MOZ_ASSERT(alloc.isArgument()); + return true; } bool hasBoxedValue(LAllocation alloc) const { if (alloc.isRegister()) return valueRegs().has(alloc.toRegister().gpr()); - return hasValueSlot(alloc.isStackSlot(), alloc.memorySlot()); + if (alloc.isStackSlot()) + return hasValueSlot(alloc.toStackSlot()->slot()); + MOZ_ASSERT(alloc.isArgument()); + return true; } #endif // JS_PUNBOX64 diff --git a/js/src/jit/LinearScan.cpp b/js/src/jit/LinearScan.cpp index 154cff9242f..e5f4b7aaf1e 100644 --- a/js/src/jit/LinearScan.cpp +++ b/js/src/jit/LinearScan.cpp @@ -484,21 +484,6 @@ LinearScanAllocator::isSpilledAt(LiveInterval *interval, CodePosition pos) bool LinearScanAllocator::populateSafepoints() { - // Populate all safepoints with this/argument slots. These are never changed - // by the allocator and are not necessarily populated by the code below. - size_t nargs = graph.getBlock(0)->mir()->info().nargs(); - for (size_t i = 0; i < graph.numSafepoints(); i++) { - LSafepoint *safepoint = graph.getSafepoint(i)->safepoint(); - - if (!safepoint->addValueSlot(/* stack = */ false, THIS_FRAME_ARGSLOT * sizeof(Value))) - return false; - - for (size_t j = 0; j < nargs; j++) { - if (!safepoint->addValueSlot(/* stack = */ false, (j + 1) * sizeof(Value))) - return false; - } - } - size_t firstSafepoint = 0; for (uint32_t i = 0; i < vregs.numVirtualRegisters(); i++) { @@ -548,7 +533,7 @@ LinearScanAllocator::populateSafepoints() safepoint->addSlotsOrElementsRegister(a->toGeneralReg()->reg()); if (isSpilledAt(interval, inputOf(ins))) { - if (!safepoint->addSlotsOrElementsSlot(true, reg->canonicalSpillSlot())) + if (!safepoint->addSlotsOrElementsSlot(reg->canonicalSpillSlot())) return false; } } else if (!IsNunbox(reg)) { @@ -573,12 +558,12 @@ LinearScanAllocator::populateSafepoints() if (isSpilledAt(interval, inputOf(ins))) { #ifdef JS_PUNBOX64 if (reg->type() == LDefinition::BOX) { - if (!safepoint->addValueSlot(true, reg->canonicalSpillSlot())) + if (!safepoint->addValueSlot(reg->canonicalSpillSlot())) return false; } else #endif { - if (!safepoint->addGcSlot(true, reg->canonicalSpillSlot())) + if (!safepoint->addGcSlot(reg->canonicalSpillSlot())) return false; } } @@ -613,7 +598,7 @@ LinearScanAllocator::populateSafepoints() // contiguously, so simply keep track of the base slot. uint32_t payloadSlot = payload->canonicalSpillSlot(); uint32_t slot = BaseOfNunboxSlot(LDefinition::PAYLOAD, payloadSlot); - if (!safepoint->addValueSlot(true, slot)) + if (!safepoint->addValueSlot(slot)) return false; } diff --git a/js/src/jit/Safepoints.cpp b/js/src/jit/Safepoints.cpp index 71ece3d2c09..7f3e341e000 100644 --- a/js/src/jit/Safepoints.cpp +++ b/js/src/jit/Safepoints.cpp @@ -17,15 +17,14 @@ using namespace jit; using mozilla::FloorLog2; -SafepointWriter::SafepointWriter(uint32_t slotCount, uint32_t argumentCount) - : frameSlots_((slotCount / sizeof(intptr_t)) + 1), // Stack slot counts are inclusive. - argumentSlots_(argumentCount / sizeof(intptr_t)) +SafepointWriter::SafepointWriter(uint32_t slotCount) + : frameSlots_(slotCount / sizeof(intptr_t)) { } bool SafepointWriter::init(TempAllocator &alloc) { - return frameSlots_.init(alloc) && argumentSlots_.init(alloc); + return frameSlots_.init(alloc); } uint32_t @@ -130,34 +129,26 @@ SafepointWriter::writeGcRegs(LSafepoint *safepoint) } static void -WriteBitset(const BitSet &set, CompactBufferWriter &stream) +MapSlotsToBitset(BitSet &set, CompactBufferWriter &stream, uint32_t nslots, uint32_t *slots) { + set.clear(); + + for (uint32_t i = 0; i < nslots; i++) { + // Slots are represented at a distance from |fp|. We divide by the + // pointer size, since we only care about pointer-sized/aligned slots + // here. Since the stack grows down, this means slots start at index 1, + // so we subtract 1 to pack the bitset. + MOZ_ASSERT(slots[i] % sizeof(intptr_t) == 0); + MOZ_ASSERT(slots[i] / sizeof(intptr_t) > 0); + set.insert(slots[i] / sizeof(intptr_t) - 1); + } + size_t count = set.rawLength(); const uint32_t *words = set.raw(); for (size_t i = 0; i < count; i++) stream.writeUnsigned(words[i]); } -static void -MapSlotsToBitset(BitSet &stackSet, BitSet &argumentSet, - CompactBufferWriter &stream, const LSafepoint::SlotList &slots) -{ - stackSet.clear(); - argumentSet.clear(); - - for (uint32_t i = 0; i < slots.length(); i++) { - // Slots are represented at a distance from |fp|. We divide by the - // pointer size, since we only care about pointer-sized/aligned slots - // here. - MOZ_ASSERT(slots[i].slot % sizeof(intptr_t) == 0); - size_t index = slots[i].slot / sizeof(intptr_t); - (slots[i].stack ? stackSet : argumentSet).insert(index); - } - - WriteBitset(stackSet, stream); - WriteBitset(argumentSet, stream); -} - void SafepointWriter::writeGcSlots(LSafepoint *safepoint) { @@ -168,7 +159,10 @@ SafepointWriter::writeGcSlots(LSafepoint *safepoint) JitSpew(JitSpew_Safepoints, " gc slot: %d", slots[i]); #endif - MapSlotsToBitset(frameSlots_, argumentSlots_, stream_, slots); + MapSlotsToBitset(frameSlots_, + stream_, + slots.length(), + slots.begin()); } void @@ -179,12 +173,10 @@ SafepointWriter::writeSlotsOrElementsSlots(LSafepoint *safepoint) stream_.writeUnsigned(slots.length()); for (uint32_t i = 0; i < slots.length(); i++) { - if (!slots[i].stack) - MOZ_CRASH(); #ifdef DEBUG - JitSpew(JitSpew_Safepoints, " slots/elements slot: %d", slots[i].slot); + JitSpew(JitSpew_Safepoints, " slots/elements slot: %d", slots[i]); #endif - stream_.writeUnsigned(slots[i].slot); + stream_.writeUnsigned(slots[i]); } } @@ -198,7 +190,7 @@ SafepointWriter::writeValueSlots(LSafepoint *safepoint) JitSpew(JitSpew_Safepoints, " gc value: %d", slots[i]); #endif - MapSlotsToBitset(frameSlots_, argumentSlots_, stream_, slots); + MapSlotsToBitset(frameSlots_, stream_, slots.length(), slots.begin()); } #if defined(DEBUG) && defined(JS_NUNBOX32) @@ -392,8 +384,7 @@ SafepointWriter::endEntry() SafepointReader::SafepointReader(IonScript *script, const SafepointIndex *si) : stream_(script->safepoints() + si->safepointOffset(), script->safepoints() + script->safepointsSize()), - frameSlots_((script->frameSlots() / sizeof(intptr_t)) + 1), // Stack slot counts are inclusive. - argumentSlots_(script->argumentSlots() / sizeof(intptr_t)) + frameSlots_(script->frameSlots() / sizeof(intptr_t)) { osiCallPointOffset_ = stream_.readUnsigned(); @@ -434,23 +425,15 @@ SafepointReader::advanceFromGcRegs() { currentSlotChunk_ = 0; nextSlotChunkNumber_ = 0; - currentSlotsAreStack_ = true; } bool -SafepointReader::getSlotFromBitmap(SafepointSlotEntry *entry) +SafepointReader::getSlotFromBitmap(uint32_t *slot) { while (currentSlotChunk_ == 0) { // Are there any more chunks to read? - if (currentSlotsAreStack_) { - if (nextSlotChunkNumber_ == BitSet::RawLengthForBits(frameSlots_)) { - nextSlotChunkNumber_ = 0; - currentSlotsAreStack_ = false; - continue; - } - } else if (nextSlotChunkNumber_ == BitSet::RawLengthForBits(argumentSlots_)) { + if (nextSlotChunkNumber_ == BitSet::RawLengthForBits(frameSlots_)) return false; - } // Yes, read the next chunk. currentSlotChunk_ = stream_.readUnsigned(); @@ -462,17 +445,17 @@ SafepointReader::getSlotFromBitmap(SafepointSlotEntry *entry) uint32_t bit = FloorLog2(currentSlotChunk_); currentSlotChunk_ &= ~(1 << bit); - // Return the slot, and re-scale it by the pointer size, reversing the - // transformation in MapSlotsToBitset. - entry->stack = currentSlotsAreStack_; - entry->slot = (((nextSlotChunkNumber_ - 1) * BitSet::BitsPerWord) + bit) * sizeof(intptr_t); + // Return the slot, taking care to add 1 back in since it was subtracted + // when added in the original bitset, and re-scale it by the pointer size, + // reversing the transformation in MapSlotsToBitset. + *slot = (((nextSlotChunkNumber_ - 1) * BitSet::BitsPerWord) + bit + 1) * sizeof(intptr_t); return true; } bool -SafepointReader::getGcSlot(SafepointSlotEntry *entry) +SafepointReader::getGcSlot(uint32_t *slot) { - if (getSlotFromBitmap(entry)) + if (getSlotFromBitmap(slot)) return true; advanceFromGcSlots(); return false; @@ -484,13 +467,12 @@ SafepointReader::advanceFromGcSlots() // No, reset the counter. currentSlotChunk_ = 0; nextSlotChunkNumber_ = 0; - currentSlotsAreStack_ = true; } bool -SafepointReader::getValueSlot(SafepointSlotEntry *entry) +SafepointReader::getValueSlot(uint32_t *slot) { - if (getSlotFromBitmap(entry)) + if (getSlotFromBitmap(slot)) return true; advanceFromValueSlots(); return false; @@ -549,11 +531,10 @@ SafepointReader::advanceFromNunboxSlots() } bool -SafepointReader::getSlotsOrElementsSlot(SafepointSlotEntry *entry) +SafepointReader::getSlotsOrElementsSlot(uint32_t *slot) { if (!slotsOrElementsSlotsRemaining_--) return false; - entry->stack = true; - entry->slot = stream_.readUnsigned(); + *slot = stream_.readUnsigned(); return true; } diff --git a/js/src/jit/Safepoints.h b/js/src/jit/Safepoints.h index e0cb4b6275b..46a32aa92cd 100644 --- a/js/src/jit/Safepoints.h +++ b/js/src/jit/Safepoints.h @@ -14,9 +14,7 @@ namespace js { namespace jit { -struct SafepointSlotEntry; struct SafepointNunboxEntry; - class LAllocation; class LSafepoint; @@ -26,10 +24,9 @@ class SafepointWriter { CompactBufferWriter stream_; BitSet frameSlots_; - BitSet argumentSlots_; public: - explicit SafepointWriter(uint32_t slotCount, uint32_t argumentCount); + explicit SafepointWriter(uint32_t slotCount); bool init(TempAllocator &alloc); private: @@ -64,9 +61,7 @@ class SafepointReader { CompactBufferReader stream_; uint32_t frameSlots_; - uint32_t argumentSlots_; uint32_t currentSlotChunk_; - bool currentSlotsAreStack_; uint32_t nextSlotChunkNumber_; uint32_t osiCallPointOffset_; GeneralRegisterSet gcSpills_; @@ -82,7 +77,7 @@ class SafepointReader void advanceFromGcSlots(); void advanceFromValueSlots(); void advanceFromNunboxSlots(); - bool getSlotFromBitmap(SafepointSlotEntry *entry); + bool getSlotFromBitmap(uint32_t *slot); public: SafepointReader(IonScript *script, const SafepointIndex *si); @@ -110,17 +105,17 @@ class SafepointReader uint32_t osiReturnPointOffset() const; // Returns true if a slot was read, false if there are no more slots. - bool getGcSlot(SafepointSlotEntry *entry); + bool getGcSlot(uint32_t *slot); // Returns true if a slot was read, false if there are no more value slots. - bool getValueSlot(SafepointSlotEntry *entry); + bool getValueSlot(uint32_t *slot); // Returns true if a nunbox slot was read, false if there are no more // nunbox slots. bool getNunboxSlot(LAllocation *type, LAllocation *payload); // Returns true if a slot was read, false if there are no more slots. - bool getSlotsOrElementsSlot(SafepointSlotEntry *entry); + bool getSlotsOrElementsSlot(uint32_t *slot); }; } // namespace jit diff --git a/js/src/jit/shared/CodeGenerator-shared.cpp b/js/src/jit/shared/CodeGenerator-shared.cpp index 90f920f71fa..68647c8984d 100644 --- a/js/src/jit/shared/CodeGenerator-shared.cpp +++ b/js/src/jit/shared/CodeGenerator-shared.cpp @@ -52,7 +52,7 @@ CodeGeneratorShared::CodeGeneratorShared(MIRGenerator *gen, LIRGraph *graph, Mac pushedArgs_(0), #endif lastOsiPointOffset_(0), - safepoints_(graph->totalSlotCount(), (gen->info().nargs() + 1) * sizeof(Value)), + safepoints_(graph->totalSlotCount()), nativeToBytecodeMap_(nullptr), nativeToBytecodeMapSize_(0), nativeToBytecodeTableOffset_(0), @@ -269,6 +269,7 @@ ToStackIndex(LAllocation *a) MOZ_ASSERT(a->toStackSlot()->slot() >= 1); return a->toStackSlot()->slot(); } + MOZ_ASSERT(-int32_t(sizeof(JitFrameLayout)) <= a->toArgument()->index()); return -int32_t(sizeof(JitFrameLayout) + a->toArgument()->index()); } @@ -1205,6 +1206,22 @@ CodeGeneratorShared::emitPreBarrier(Address address) masm.patchableCallPreBarrier(address, MIRType_Value); } +void +CodeGeneratorShared::dropArguments(unsigned argc) +{ + pushedArgumentSlots_.shrinkBy(argc); +} + +bool +CodeGeneratorShared::markArgumentSlots(LSafepoint *safepoint) +{ + for (size_t i = 0; i < pushedArgumentSlots_.length(); i++) { + if (!safepoint->addValueSlot(pushedArgumentSlots_[i])) + return false; + } + return true; +} + Label * CodeGeneratorShared::labelForBackedgeWithImplicitCheck(MBasicBlock *mir) { diff --git a/js/src/jit/shared/CodeGenerator-shared.h b/js/src/jit/shared/CodeGenerator-shared.h index afa21bee00b..a2255d8cf99 100644 --- a/js/src/jit/shared/CodeGenerator-shared.h +++ b/js/src/jit/shared/CodeGenerator-shared.h @@ -85,6 +85,9 @@ class CodeGeneratorShared : public LElementVisitor // Vector of information about generated polymorphic inline caches. js::Vector cacheList_; + // List of stack slots that have been pushed as arguments to an MCall. + js::Vector pushedArgumentSlots_; + // Patchable backedges generated for loops. Vector patchableBackedges_; @@ -145,6 +148,9 @@ class CodeGeneratorShared : public LElementVisitor typedef js::Vector SafepointIndices; + bool markArgumentSlots(LSafepoint *safepoint); + void dropArguments(unsigned argc); + protected: #ifdef CHECK_OSIPOINT_REGISTERS // See js_JitOptions.checkOsiPointRegisters. We set this here to avoid From 966aabba4dacc701689810925f962137389d1019 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 15 Jan 2015 16:47:56 -0500 Subject: [PATCH 055/106] Bug 1120233 - Ensure that the delete command will stay enabled for password fields; r=roc --- .../content/test/general/test_contextmenu.html | 2 +- editor/libeditor/nsEditor.cpp | 6 ++++++ editor/libeditor/nsEditorCommands.cpp | 2 +- editor/libeditor/nsPlaintextEditor.cpp | 16 ++++++++++++---- editor/libeditor/nsPlaintextEditor.h | 7 ++++++- editor/libeditor/tests/test_bug1067255.html | 2 ++ editor/nsIEditor.idl | 13 ++++++++----- 7 files changed, 36 insertions(+), 12 deletions(-) diff --git a/browser/base/content/test/general/test_contextmenu.html b/browser/base/content/test/general/test_contextmenu.html index fe121736378..5af25c22acd 100644 --- a/browser/base/content/test/general/test_contextmenu.html +++ b/browser/base/content/test/general/test_contextmenu.html @@ -653,7 +653,7 @@ function runTest(testNum) { "context-cut", false, "context-copy", false, "context-paste", null, // ignore clipboard state - "context-delete", false, + "context-delete", true, "---", null, "context-selectall", true, "---", null, diff --git a/editor/libeditor/nsEditor.cpp b/editor/libeditor/nsEditor.cpp index 4bc6cb9c4cf..4aeda8b1479 100644 --- a/editor/libeditor/nsEditor.cpp +++ b/editor/libeditor/nsEditor.cpp @@ -1133,6 +1133,12 @@ nsEditor::CanCopy(bool *aCanCut) return NS_ERROR_NOT_IMPLEMENTED; } +NS_IMETHODIMP +nsEditor::CanDelete(bool *aCanDelete) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + NS_IMETHODIMP nsEditor::Paste(int32_t aSelectionType) { diff --git a/editor/libeditor/nsEditorCommands.cpp b/editor/libeditor/nsEditorCommands.cpp index a9576ab6c0a..dd7f87af181 100644 --- a/editor/libeditor/nsEditorCommands.cpp +++ b/editor/libeditor/nsEditorCommands.cpp @@ -590,7 +590,7 @@ nsDeleteCommand::IsCommandEnabled(const char *aCommandName, NS_ENSURE_SUCCESS(rv, rv); if (!nsCRT::strcmp("cmd_delete", aCommandName) && *outCmdEnabled) { - rv = editor->CanCut(outCmdEnabled); + rv = editor->CanDelete(outCmdEnabled); NS_ENSURE_SUCCESS(rv, rv); } diff --git a/editor/libeditor/nsPlaintextEditor.cpp b/editor/libeditor/nsPlaintextEditor.cpp index 08c053c2e6f..ae4906af49f 100644 --- a/editor/libeditor/nsPlaintextEditor.cpp +++ b/editor/libeditor/nsPlaintextEditor.cpp @@ -1153,14 +1153,15 @@ nsPlaintextEditor::Redo(uint32_t aCount) } bool -nsPlaintextEditor::CanCutOrCopy() +nsPlaintextEditor::CanCutOrCopy(PasswordFieldAllowed aPasswordFieldAllowed) { nsRefPtr selection = GetSelection(); if (!selection) { return false; } - if (IsPasswordEditor()) + if (aPasswordFieldAllowed == ePasswordFieldNotAllowed && + IsPasswordEditor()) return false; return !selection->Collapsed(); @@ -1198,7 +1199,7 @@ NS_IMETHODIMP nsPlaintextEditor::Cut() NS_IMETHODIMP nsPlaintextEditor::CanCut(bool *aCanCut) { NS_ENSURE_ARG_POINTER(aCanCut); - *aCanCut = IsModifiable() && CanCutOrCopy(); + *aCanCut = IsModifiable() && CanCutOrCopy(ePasswordFieldNotAllowed); return NS_OK; } @@ -1211,7 +1212,14 @@ NS_IMETHODIMP nsPlaintextEditor::Copy() NS_IMETHODIMP nsPlaintextEditor::CanCopy(bool *aCanCopy) { NS_ENSURE_ARG_POINTER(aCanCopy); - *aCanCopy = CanCutOrCopy(); + *aCanCopy = CanCutOrCopy(ePasswordFieldNotAllowed); + return NS_OK; +} + +NS_IMETHODIMP nsPlaintextEditor::CanDelete(bool *aCanDelete) +{ + NS_ENSURE_ARG_POINTER(aCanDelete); + *aCanDelete = IsModifiable() && CanCutOrCopy(ePasswordFieldAllowed); return NS_OK; } diff --git a/editor/libeditor/nsPlaintextEditor.h b/editor/libeditor/nsPlaintextEditor.h index 89de1deb2db..3f900e6ba78 100644 --- a/editor/libeditor/nsPlaintextEditor.h +++ b/editor/libeditor/nsPlaintextEditor.h @@ -96,6 +96,7 @@ public: NS_IMETHOD CanCut(bool *aCanCut) MOZ_OVERRIDE; NS_IMETHOD Copy() MOZ_OVERRIDE; NS_IMETHOD CanCopy(bool *aCanCopy) MOZ_OVERRIDE; + NS_IMETHOD CanDelete(bool *aCanDelete) MOZ_OVERRIDE; NS_IMETHOD Paste(int32_t aSelectionType) MOZ_OVERRIDE; NS_IMETHOD CanPaste(int32_t aSelectionType, bool *aCanPaste) MOZ_OVERRIDE; NS_IMETHOD PasteTransferable(nsITransferable *aTransferable) MOZ_OVERRIDE; @@ -203,7 +204,11 @@ protected: /* small utility routine to test the eEditorReadonly bit */ bool IsModifiable(); - bool CanCutOrCopy(); + enum PasswordFieldAllowed { + ePasswordFieldAllowed, + ePasswordFieldNotAllowed + }; + bool CanCutOrCopy(PasswordFieldAllowed aPasswordFieldAllowed); bool FireClipboardEvent(int32_t aType, int32_t aSelectionType); bool UpdateMetaCharset(nsIDOMDocument* aDocument, diff --git a/editor/libeditor/tests/test_bug1067255.html b/editor/libeditor/tests/test_bug1067255.html index c91dbb3e8cb..5840404ab8a 100644 --- a/editor/libeditor/tests/test_bug1067255.html +++ b/editor/libeditor/tests/test_bug1067255.html @@ -34,12 +34,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1067255 ok(editor1.canCopy(), "can copy, text"); ok(editor1.canCut(), "can cut, text"); + ok(editor1.canDelete(), "can delete, text"); password.focus(); password.select(); ok(!editor2.canCopy(), "can copy, password"); ok(!editor2.canCut(), "can cut, password"); + ok(editor1.canDelete(), "can delete, password"); SimpleTest.finish(); } diff --git a/editor/nsIEditor.idl b/editor/nsIEditor.idl index 250a2b18584..79a36614a91 100644 --- a/editor/nsIEditor.idl +++ b/editor/nsIEditor.idl @@ -21,8 +21,7 @@ interface nsIEditActionListener; interface nsIInlineSpellChecker; interface nsITransferable; -[scriptable, uuid(a1ddae68-35d0-11e4-9329-cb55463f21c9)] - +[scriptable, uuid(094be624-f0bf-400f-89e2-6a84baab9474)] interface nsIEditor : nsISupports { %{C++ @@ -305,18 +304,22 @@ interface nsIEditor : nsISupports * collapsed selection. */ boolean canCut(); - + /** copy the currently selected text, putting it into the OS clipboard * What if no text is selected? * What about mixed selections? * What are the clipboard formats? */ void copy(); - + /** Can we copy? True if we have a non-collapsed selection. */ boolean canCopy(); - + + /** Can we delete? True if we have a non-collapsed selection. + */ + boolean canDelete(); + /** paste the text in the OS clipboard at the cursor position, replacing * the selected text (if any) */ From c1eabd6c72151250b7b797ca93798a4227587467 Mon Sep 17 00:00:00 2001 From: Shu-yu Guo Date: Thu, 22 Jan 2015 20:34:04 -0800 Subject: [PATCH 056/106] Bug 1124121 - Handle the stack check VM calls in debug mode OSR. (r=jandem) --- .../tests/debug/execution-observability-04.js | 21 ++++++ .../tests/debug/execution-observability-05.js | 23 ++++++ js/src/jit/BaselineCompiler.cpp | 19 ++--- js/src/jit/BaselineDebugModeOSR.cpp | 75 ++++++++++++++++--- js/src/jit/BaselineIC.h | 31 ++++---- js/src/jit/BaselineJIT.cpp | 15 ++++ js/src/jit/BaselineJIT.h | 1 + js/src/jit/shared/BaselineCompiler-shared.cpp | 5 +- js/src/jit/shared/BaselineCompiler-shared.h | 9 ++- 9 files changed, 155 insertions(+), 44 deletions(-) create mode 100644 js/src/jit-test/tests/debug/execution-observability-04.js create mode 100644 js/src/jit-test/tests/debug/execution-observability-05.js diff --git a/js/src/jit-test/tests/debug/execution-observability-04.js b/js/src/jit-test/tests/debug/execution-observability-04.js new file mode 100644 index 00000000000..472820b3f6a --- /dev/null +++ b/js/src/jit-test/tests/debug/execution-observability-04.js @@ -0,0 +1,21 @@ +// Test that we can do debug mode OSR from the interrupt handler. + +var global = this; +var hits = 0; +setInterruptCallback(function() { + print("Interrupt!"); + hits++; + var g = newGlobal(); + g.parent = global; + g.eval("var dbg = new Debugger(parent); dbg.onEnterFrame = function(frame) {};"); + return true; +}); + +function f(x) { + if (x > 200) + return; + interruptIf(x == 100); + f(x + 1); +} +f(0); +assertEq(hits, 1); diff --git a/js/src/jit-test/tests/debug/execution-observability-05.js b/js/src/jit-test/tests/debug/execution-observability-05.js new file mode 100644 index 00000000000..ba0a3efa69c --- /dev/null +++ b/js/src/jit-test/tests/debug/execution-observability-05.js @@ -0,0 +1,23 @@ +// Test that we can do debug mode OSR from the interrupt handler through an +// on->off->on cycle. + +var global = this; +var hits = 0; +setInterruptCallback(function() { + print("Interrupt!"); + hits++; + var g = newGlobal(); + g.parent = global; + g.eval("var dbg = new Debugger(parent); dbg.onEnterFrame = function(frame) {};"); + g.eval("dbg.removeDebuggee(parent);"); + return true; +}); + +function f(x) { + if (x > 200) + return; + interruptIf(x == 100); + f(x + 1); +} +f(0); +assertEq(hits, 1); diff --git a/js/src/jit/BaselineCompiler.cpp b/js/src/jit/BaselineCompiler.cpp index 01edc4b48b5..18997cad903 100644 --- a/js/src/jit/BaselineCompiler.cpp +++ b/js/src/jit/BaselineCompiler.cpp @@ -559,6 +559,10 @@ BaselineCompiler::emitStackCheck(bool earlyCheck) if (!callVMNonOp(CheckOverRecursedWithExtraInfo, phase)) return false; + icEntries_.back().setFakeKind(earlyCheck + ? ICEntry::Kind_EarlyStackCheck + : ICEntry::Kind_StackCheck); + masm.bind(&skipCall); return true; } @@ -580,7 +584,7 @@ BaselineCompiler::emitDebugPrologue() return false; // Fix up the fake ICEntry appended by callVM for on-stack recompilation. - icEntries_.back().setForDebugPrologue(); + icEntries_.back().setFakeKind(ICEntry::Kind_DebugPrologue); // If the stub returns |true|, we have to return the value stored in the // frame's return value slot. @@ -770,12 +774,7 @@ BaselineCompiler::emitDebugTrap() #endif // Add an IC entry for the return offset -> pc mapping. - ICEntry icEntry(script->pcToOffset(pc), ICEntry::Kind_DebugTrap); - icEntry.setReturnOffset(CodeOffsetLabel(masm.currentOffset())); - if (!icEntries_.append(icEntry)) - return false; - - return true; + return appendICEntry(ICEntry::Kind_DebugTrap, masm.currentOffset()); } #ifdef JS_TRACE_LOGGING @@ -3139,7 +3138,7 @@ BaselineCompiler::emitReturn() return false; // Fix up the fake ICEntry appended by callVM for on-stack recompilation. - icEntries_.back().setForDebugEpilogue(); + icEntries_.back().setFakeKind(ICEntry::Kind_DebugEpilogue); masm.loadValue(frame.addressOfReturnValue(), JSReturnOperand); } @@ -3632,9 +3631,7 @@ BaselineCompiler::emit_JSOP_RESUME() masm.callAndPushReturnAddress(&genStart); // Add an IC entry so the return offset -> pc mapping works. - ICEntry icEntry(script->pcToOffset(pc), ICEntry::Kind_Op); - icEntry.setReturnOffset(CodeOffsetLabel(masm.currentOffset())); - if (!icEntries_.append(icEntry)) + if (!appendICEntry(ICEntry::Kind_Op, masm.currentOffset())) return false; masm.jump(&returnTarget); diff --git a/js/src/jit/BaselineDebugModeOSR.cpp b/js/src/jit/BaselineDebugModeOSR.cpp index 060082ce98f..c3199f0c934 100644 --- a/js/src/jit/BaselineDebugModeOSR.cpp +++ b/js/src/jit/BaselineDebugModeOSR.cpp @@ -99,6 +99,8 @@ struct DebugModeOSREntry bool needsRecompileInfo() const { return frameKind == ICEntry::Kind_CallVM || + frameKind == ICEntry::Kind_StackCheck || + frameKind == ICEntry::Kind_EarlyStackCheck || frameKind == ICEntry::Kind_DebugTrap || frameKind == ICEntry::Kind_DebugPrologue || frameKind == ICEntry::Kind_DebugEpilogue; @@ -293,6 +295,10 @@ ICEntryKindToString(ICEntry::Kind kind) return "non-op IC"; case ICEntry::Kind_CallVM: return "callVM"; + case ICEntry::Kind_StackCheck: + return "stack check"; + case ICEntry::Kind_EarlyStackCheck: + return "early stack check"; case ICEntry::Kind_DebugTrap: return "debug trap"; case ICEntry::Kind_DebugPrologue: @@ -348,6 +354,7 @@ PatchBaselineFramesForDebugMode(JSContext *cx, const Debugger::ExecutionObservab // A. From a "can call" stub. // B. From a VM call. // H. From inside HandleExceptionBaseline. + // I. From inside the interrupt handler via the prologue stack check. // // On to Off: // - All the ways above. @@ -356,10 +363,10 @@ PatchBaselineFramesForDebugMode(JSContext *cx, const Debugger::ExecutionObservab // E. From the debug epilogue. // // Off to On to Off: - // F. Undo case B above on previously patched yet unpopped frames. + // F. Undo case B or I above on previously patched yet unpopped frames. // // On to Off to On: - // G. Undo cases B, C, D, or E above on previously patched yet unpopped + // G. Undo cases B, C, D, E, or I above on previously patched yet unpopped // frames. // // In general, we patch the return address from the VM call to return to a @@ -438,23 +445,27 @@ PatchBaselineFramesForDebugMode(JSContext *cx, const Debugger::ExecutionObservab // Cases F and G above. // - // We undo a previous recompile by handling cases B, C, D, and E - // like normal, except that we retrieved the pc information via + // We undo a previous recompile by handling cases B, C, D, E, or I + // like normal, except that we retrieve the pc information via // the previous OSR debug info stashed on the frame. BaselineDebugModeOSRInfo *info = iter.baselineFrame()->getDebugModeOSRInfo(); if (info) { MOZ_ASSERT(info->pc == pc); MOZ_ASSERT(info->frameKind == kind); - // Case G, might need to undo B, C, D, or E. + // Case G, might need to undo B, C, D, E, or I. MOZ_ASSERT_IF(script->baselineScript()->hasDebugInstrumentation(), kind == ICEntry::Kind_CallVM || + kind == ICEntry::Kind_StackCheck || + kind == ICEntry::Kind_EarlyStackCheck || kind == ICEntry::Kind_DebugTrap || kind == ICEntry::Kind_DebugPrologue || kind == ICEntry::Kind_DebugEpilogue); - // Case F, should only need to undo case B. + // Case F, should only need to undo case B or I. MOZ_ASSERT_IF(!script->baselineScript()->hasDebugInstrumentation(), - kind == ICEntry::Kind_CallVM); + kind == ICEntry::Kind_CallVM || + kind == ICEntry::Kind_StackCheck || + kind == ICEntry::Kind_EarlyStackCheck); // We will have allocated a new recompile info, so delete the // existing one. @@ -483,6 +494,20 @@ PatchBaselineFramesForDebugMode(JSContext *cx, const Debugger::ExecutionObservab break; } + case ICEntry::Kind_StackCheck: + case ICEntry::Kind_EarlyStackCheck: { + // Case I above. + // + // Patching mechanism is identical to a CallVM. This is + // handled especially only because the stack check VM call is + // part of the prologue, and not tied an opcode. + bool earlyCheck = kind == ICEntry::Kind_EarlyStackCheck; + ICEntry &stackCheckEntry = bl->stackCheckICEntry(earlyCheck); + recompInfo->resumeAddr = bl->returnAddressForIC(stackCheckEntry); + popFrameReg = false; + break; + } + case ICEntry::Kind_DebugTrap: // Case C above. // @@ -906,6 +931,35 @@ HasForcedReturn(BaselineDebugModeOSRInfo *info, bool rv) return false; } +static inline bool +IsReturningFromCallVM(BaselineDebugModeOSRInfo *info) +{ + // Keep this in sync with EmitBranchIsReturningFromCallVM. + // + // The stack check entries are returns from a callVM, but have a special + // kind because they do not exist in a 1-1 relationship with a pc offset. + return info->frameKind == ICEntry::Kind_CallVM || + info->frameKind == ICEntry::Kind_StackCheck || + info->frameKind == ICEntry::Kind_EarlyStackCheck; +} + +static void +EmitBranchICEntryKind(MacroAssembler &masm, Register entry, ICEntry::Kind kind, Label *label) +{ + masm.branch32(MacroAssembler::Equal, + Address(entry, offsetof(BaselineDebugModeOSRInfo, frameKind)), + Imm32(kind), label); +} + +static void +EmitBranchIsReturningFromCallVM(MacroAssembler &masm, Register entry, Label *label) +{ + // Keep this in sync with IsReturningFromCallVM. + EmitBranchICEntryKind(masm, entry, ICEntry::Kind_CallVM, label); + EmitBranchICEntryKind(masm, entry, ICEntry::Kind_StackCheck, label); + EmitBranchICEntryKind(masm, entry, ICEntry::Kind_EarlyStackCheck, label); +} + static void SyncBaselineDebugModeOSRInfo(BaselineFrame *frame, Value *vp, bool rv) { @@ -927,7 +981,7 @@ SyncBaselineDebugModeOSRInfo(BaselineFrame *frame, Value *vp, bool rv) // // In the case of returning from a callVM, we don't need to restore R0 and // R1 ourself since we'll return into code that does it if needed. - if (info->frameKind != ICEntry::Kind_CallVM) { + if (!IsReturningFromCallVM(info)) { unsigned numUnsynced = info->slotInfo.numUnsynced(); MOZ_ASSERT(numUnsynced <= 2); if (numUnsynced > 0) @@ -1072,10 +1126,7 @@ JitRuntime::generateBaselineDebugModeOSRHandler(JSContext *cx, uint32_t *noFrame // Emit two tails for the case of returning from a callVM and all other // cases, as the state we need to restore differs depending on the case. Label returnFromCallVM, end; - masm.branch32(MacroAssembler::Equal, - Address(temp, offsetof(BaselineDebugModeOSRInfo, frameKind)), - Imm32(ICEntry::Kind_CallVM), - &returnFromCallVM); + EmitBranchIsReturningFromCallVM(masm, temp, &returnFromCallVM); EmitBaselineDebugModeOSRHandlerTail(masm, temp, /* returnFromCallVM = */ false); masm.jump(&end); diff --git a/js/src/jit/BaselineIC.h b/js/src/jit/BaselineIC.h index 8da23b04f56..5a85c5ec8bd 100644 --- a/js/src/jit/BaselineIC.h +++ b/js/src/jit/BaselineIC.h @@ -212,7 +212,7 @@ class ICEntry uint32_t returnOffset_; // The PC of this IC's bytecode op within the JSScript. - uint32_t pcOffset_ : 29; + uint32_t pcOffset_ : 28; public: enum Kind { @@ -229,6 +229,13 @@ class ICEntry // the prologue). Kind_NonOpCallVM, + // A fake IC entry for returning from a callVM to the interrupt + // handler via the over-recursion check on function entry. + Kind_StackCheck, + + // As above, but for the early check. See emitStackCheck. + Kind_EarlyStackCheck, + // A fake IC entry for returning from DebugTrapHandler. Kind_DebugTrap, @@ -242,7 +249,7 @@ class ICEntry private: // What this IC is for. - Kind kind_ : 3; + Kind kind_ : 4; // Set the kind and asserts that it's sane. void setKind(Kind kind) { @@ -255,10 +262,10 @@ class ICEntry ICEntry(uint32_t pcOffset, Kind kind) : firstStub_(nullptr), returnOffset_(), pcOffset_(pcOffset) { - // The offset must fit in at least 29 bits, since we shave off 3 for + // The offset must fit in at least 28 bits, since we shave off 4 for // the Kind enum. MOZ_ASSERT(pcOffset_ == pcOffset); - JS_STATIC_ASSERT(BaselineScript::MAX_JSSCRIPT_LENGTH < 0x1fffffffu); + JS_STATIC_ASSERT(BaselineScript::MAX_JSSCRIPT_LENGTH <= (1u << 28) - 1); MOZ_ASSERT(pcOffset <= BaselineScript::MAX_JSSCRIPT_LENGTH); setKind(kind); } @@ -289,23 +296,15 @@ class ICEntry Kind kind() const { // MSVC compiles enums as signed. - return (Kind)(kind_ & 0x7); + return Kind(kind_ & 0xf); } bool isForOp() const { return kind() == Kind_Op; } - void setForDebugPrologue() { - MOZ_ASSERT(kind() == Kind_CallVM); - setKind(Kind_DebugPrologue); - } - void setForDebugEpilogue() { - MOZ_ASSERT(kind() == Kind_CallVM); - setKind(Kind_DebugEpilogue); - } - void setForNonOpCallVM() { - MOZ_ASSERT(kind() == Kind_CallVM); - setKind(Kind_NonOpCallVM); + void setFakeKind(Kind kind) { + MOZ_ASSERT(kind != Kind_Op && kind != Kind_NonOp); + setKind(kind); } bool hasStub() const { diff --git a/js/src/jit/BaselineJIT.cpp b/js/src/jit/BaselineJIT.cpp index 2765e393827..0270da9f259 100644 --- a/js/src/jit/BaselineJIT.cpp +++ b/js/src/jit/BaselineJIT.cpp @@ -626,6 +626,21 @@ BaselineScript::callVMEntryFromPCOffset(uint32_t pcOffset) MOZ_CRASH("Invalid PC offset for callVM entry."); } +ICEntry & +BaselineScript::stackCheckICEntry(bool earlyCheck) +{ + // The stack check will always be at offset 0, so just do a linear search + // from the beginning. This is only needed for debug mode OSR, when + // patching a frame that has invoked a Debugger hook via the interrupt + // handler via the stack check, which is part of the prologue. + ICEntry::Kind kind = earlyCheck ? ICEntry::Kind_EarlyStackCheck : ICEntry::Kind_StackCheck; + for (size_t i = 0; i < numICEntries() && icEntry(i).pcOffset() == 0; i++) { + if (icEntry(i).kind() == kind) + return icEntry(i); + } + MOZ_CRASH("No stack check ICEntry found."); +} + ICEntry & BaselineScript::icEntryFromReturnAddress(uint8_t *returnAddr) { diff --git a/js/src/jit/BaselineJIT.h b/js/src/jit/BaselineJIT.h index b0a5218b9ba..171bef3efdd 100644 --- a/js/src/jit/BaselineJIT.h +++ b/js/src/jit/BaselineJIT.h @@ -353,6 +353,7 @@ struct BaselineScript ICEntry &icEntryFromPCOffset(uint32_t pcOffset); ICEntry &icEntryFromPCOffset(uint32_t pcOffset, ICEntry *prevLookedUpEntry); ICEntry &callVMEntryFromPCOffset(uint32_t pcOffset); + ICEntry &stackCheckICEntry(bool earlyCheck); ICEntry &icEntryFromReturnAddress(uint8_t *returnAddr); uint8_t *returnAddressForIC(const ICEntry &ent); diff --git a/js/src/jit/shared/BaselineCompiler-shared.cpp b/js/src/jit/shared/BaselineCompiler-shared.cpp index 5d75980e962..b0b0073a1af 100644 --- a/js/src/jit/shared/BaselineCompiler-shared.cpp +++ b/js/src/jit/shared/BaselineCompiler-shared.cpp @@ -125,8 +125,5 @@ BaselineCompilerShared::callVM(const VMFunction &fun, CallVMPhase phase) // Add a fake ICEntry (without stubs), so that the return offset to // pc mapping works. - ICEntry entry(script->pcToOffset(pc), ICEntry::Kind_CallVM); - entry.setReturnOffset(CodeOffsetLabel(callOffset)); - - return icEntries_.append(entry); + return appendICEntry(ICEntry::Kind_CallVM, callOffset); } diff --git a/js/src/jit/shared/BaselineCompiler-shared.h b/js/src/jit/shared/BaselineCompiler-shared.h index 425597865d7..65a623ac929 100644 --- a/js/src/jit/shared/BaselineCompiler-shared.h +++ b/js/src/jit/shared/BaselineCompiler-shared.h @@ -92,6 +92,13 @@ class BaselineCompilerShared return &vecEntry; } + // Append an ICEntry without a stub. + bool appendICEntry(ICEntry::Kind kind, uint32_t returnOffset) { + ICEntry entry(script->pcToOffset(pc), kind); + entry.setReturnOffset(CodeOffsetLabel(returnOffset)); + return icEntries_.append(entry); + } + bool addICLoadLabel(CodeOffsetLabel label) { MOZ_ASSERT(!icEntries_.empty()); ICLoadLabel loadLabel; @@ -145,7 +152,7 @@ class BaselineCompilerShared bool callVMNonOp(const VMFunction &fun, CallVMPhase phase=POST_INITIALIZE) { if (!callVM(fun, phase)) return false; - icEntries_.back().setForNonOpCallVM(); + icEntries_.back().setFakeKind(ICEntry::Kind_NonOpCallVM); return true; } From aac1875ad803888623441a9b8602eea8596211b0 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Fri, 23 Jan 2015 08:29:36 +1100 Subject: [PATCH 057/106] Bug 1124029 - Fix 64bit shift warning in imgFrame. r=tn --HG-- extra : rebase_source : 9d59de8b12bd00fc9ed6169b6bb60070f4868670 extra : source : cd0da193d6229fe4e7c57950aa42929164eb1f7d --- image/src/imgFrame.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/src/imgFrame.h b/image/src/imgFrame.h index 5c808aab652..e7ef6d38d2d 100644 --- a/image/src/imgFrame.h +++ b/image/src/imgFrame.h @@ -295,7 +295,7 @@ private: // methods uint32_t PaletteDataLength() const { - return mPaletteDepth ? (1 << mPaletteDepth) * sizeof(uint32_t) + return mPaletteDepth ? (size_t(1) << mPaletteDepth) * sizeof(uint32_t) : 0; } From 79b052ef1c09042b79a2206237f7f3ef3fa656fd Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Fri, 23 Jan 2015 08:29:36 +1100 Subject: [PATCH 058/106] Bug 1124029 - Fix unsigned/signed mismatch in MathAlgorithms. r=waldo --HG-- extra : rebase_source : d4ddeacc763ebe9266ad40d4c63f343033b16490 extra : source : 7ca6aa20529ebc304c14c1e21160fd65816415b3 --- mfbt/MathAlgorithms.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mfbt/MathAlgorithms.h b/mfbt/MathAlgorithms.h index 99185ed59b6..a1a74408052 100644 --- a/mfbt/MathAlgorithms.h +++ b/mfbt/MathAlgorithms.h @@ -382,7 +382,7 @@ public: static uint_fast8_t compute(const T aValue) { // Check for <= 1 to avoid the == 0 undefined case. - return aValue <= 1 ? 0 : 64 - CountLeadingZeroes64(aValue - 1); + return aValue <= 1 ? 0u : 64u - CountLeadingZeroes64(aValue - 1); } }; From 604504d9624ea1eef98237c30d1a0653064cec82 Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Thu, 22 Jan 2015 21:04:33 -0800 Subject: [PATCH 059/106] Backed out 3 changesets (bug 1123461, bug 1123090) for windows build bustage Backed out changeset 2c442905d0af (bug 1123461) Backed out changeset d7aa4c72ebab (bug 1123461) Backed out changeset 8bb689ec8086 (bug 1123090) --- dom/base/moz.build | 1 + dom/base/nsFrameLoader.cpp | 2 +- dom/base/nsFrameMessageManager.cpp | 3 +- dom/bindings/BindingUtils.cpp | 3 +- dom/bindings/moz.build | 1 + dom/ipc/CPOWManagerGetter.h | 4 +- dom/ipc/ContentBridgeChild.cpp | 9 +-- dom/ipc/ContentBridgeChild.h | 2 +- dom/ipc/ContentBridgeParent.cpp | 9 +-- dom/ipc/ContentBridgeParent.h | 2 +- dom/ipc/ContentChild.cpp | 11 +-- dom/ipc/ContentChild.h | 2 +- dom/ipc/ContentParent.cpp | 7 +- dom/ipc/ContentParent.h | 2 +- dom/ipc/PBrowser.ipdl | 2 +- dom/ipc/TabChild.cpp | 11 +-- dom/ipc/TabParent.cpp | 44 +++++------- dom/ipc/TabParent.h | 28 +++----- dom/ipc/moz.build | 1 + dom/ipc/nsIContentChild.cpp | 11 ++- dom/ipc/nsIContentParent.cpp | 16 +++-- js/ipc/CrossProcessObjectWrappers.h | 90 ------------------------ js/ipc/JavaScriptChild.cpp | 17 ----- js/ipc/JavaScriptParent.cpp | 17 ----- js/ipc/JavaScriptShared.cpp | 17 +---- js/ipc/JavaScriptShared.h | 16 ++++- js/ipc/WrapperOwner.h | 16 ++++- js/ipc/moz.build | 4 -- js/xpconnect/src/XPCComponents.cpp | 2 +- js/xpconnect/src/XPCConvert.cpp | 2 +- js/xpconnect/src/XPCJSID.cpp | 2 +- js/xpconnect/src/XPCWrappedJS.cpp | 2 +- js/xpconnect/src/XPCWrappedJSClass.cpp | 2 +- js/xpconnect/src/moz.build | 1 + js/xpconnect/wrappers/AccessCheck.cpp | 2 +- js/xpconnect/wrappers/WrapperFactory.cpp | 2 +- js/xpconnect/wrappers/moz.build | 1 + 37 files changed, 123 insertions(+), 241 deletions(-) delete mode 100644 js/ipc/CrossProcessObjectWrappers.h diff --git a/dom/base/moz.build b/dom/base/moz.build index c3ba9c10684..464a6a6147c 100644 --- a/dom/base/moz.build +++ b/dom/base/moz.build @@ -403,6 +403,7 @@ LOCAL_INCLUDES += [ '/dom/xslt/xpath', '/dom/xul', '/image/src', + '/js/ipc', '/js/xpconnect/src', '/js/xpconnect/wrappers', '/layout/base', diff --git a/dom/base/nsFrameLoader.cpp b/dom/base/nsFrameLoader.cpp index 13e7f23897c..d782137e512 100644 --- a/dom/base/nsFrameLoader.cpp +++ b/dom/base/nsFrameLoader.cpp @@ -80,7 +80,6 @@ #include "mozilla/Preferences.h" #include "mozilla/unused.h" #include "mozilla/dom/Element.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/layout/RenderFrameParent.h" #include "nsIAppsService.h" #include "GeckoProfiler.h" @@ -89,6 +88,7 @@ #include "mozilla/dom/HTMLIFrameElement.h" #include "mozilla/dom/SVGIFrameElement.h" #include "nsSandboxFlags.h" +#include "JavaScriptParent.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/dom/StructuredCloneUtils.h" diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp index d7f35dcfd74..fb6c6dbe280 100644 --- a/dom/base/nsFrameMessageManager.cpp +++ b/dom/base/nsFrameMessageManager.cpp @@ -37,8 +37,9 @@ #include "mozilla/dom/StructuredCloneUtils.h" #include "mozilla/dom/ipc/BlobChild.h" #include "mozilla/dom/ipc/BlobParent.h" +#include "JavaScriptChild.h" +#include "JavaScriptParent.h" #include "mozilla/dom/DOMStringList.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "nsPrintfCString.h" #include "nsXULAppAPI.h" #include diff --git a/dom/bindings/BindingUtils.cpp b/dom/bindings/BindingUtils.cpp index 31450674d41..e477e08a9b0 100644 --- a/dom/bindings/BindingUtils.cpp +++ b/dom/bindings/BindingUtils.cpp @@ -9,6 +9,8 @@ #include #include +#include "JavaScriptParent.h" + #include "mozilla/DebugOnly.h" #include "mozilla/FloatingPoint.h" #include "mozilla/Assertions.h" @@ -41,7 +43,6 @@ #include "mozilla/dom/HTMLEmbedElementBinding.h" #include "mozilla/dom/HTMLAppletElementBinding.h" #include "mozilla/dom/Promise.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "WorkerPrivate.h" #include "nsDOMClassInfo.h" diff --git a/dom/bindings/moz.build b/dom/bindings/moz.build index 747fec2a7ee..6e1c5db2b71 100644 --- a/dom/bindings/moz.build +++ b/dom/bindings/moz.build @@ -58,6 +58,7 @@ LOCAL_INCLUDES += [ '/dom/xslt/base', '/dom/xslt/xpath', '/dom/xul', + '/js/ipc', '/js/xpconnect/src', '/js/xpconnect/wrappers', '/layout/style', diff --git a/dom/ipc/CPOWManagerGetter.h b/dom/ipc/CPOWManagerGetter.h index c58d355843e..ad16cda3475 100644 --- a/dom/ipc/CPOWManagerGetter.h +++ b/dom/ipc/CPOWManagerGetter.h @@ -10,14 +10,14 @@ namespace mozilla { namespace jsipc { -class CPOWManager; +class JavaScriptShared; } /* namespace jsipc */ namespace dom { class CPOWManagerGetter { public: - virtual mozilla::jsipc::CPOWManager* GetCPOWManager() = 0; + virtual mozilla::jsipc::JavaScriptShared* GetCPOWManager() = 0; }; } /* namespace dom */ diff --git a/dom/ipc/ContentBridgeChild.cpp b/dom/ipc/ContentBridgeChild.cpp index 16077c97489..b3ea951cb52 100644 --- a/dom/ipc/ContentBridgeChild.cpp +++ b/dom/ipc/ContentBridgeChild.cpp @@ -10,8 +10,8 @@ #include "mozilla/dom/StructuredCloneUtils.h" #include "mozilla/dom/TabChild.h" #include "mozilla/dom/ipc/BlobChild.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/ipc/InputStreamUtils.h" +#include "JavaScriptChild.h" using namespace base; using namespace mozilla::ipc; @@ -100,13 +100,14 @@ ContentBridgeChild::SendPBrowserConstructor(PBrowserChild* aActor, // This implementation is identical to ContentChild::GetCPOWManager but we can't // move it to nsIContentChild because it calls ManagedPJavaScriptChild() which // only exists in PContentChild and PContentBridgeChild. -jsipc::CPOWManager* +jsipc::JavaScriptShared* ContentBridgeChild::GetCPOWManager() { if (ManagedPJavaScriptChild().Length()) { - return CPOWManagerFor(ManagedPJavaScriptChild()[0]); + return static_cast(ManagedPJavaScriptChild()[0]); } - return CPOWManagerFor(SendPJavaScriptConstructor()); + JavaScriptChild* actor = static_cast(SendPJavaScriptConstructor()); + return actor; } mozilla::jsipc::PJavaScriptChild * diff --git a/dom/ipc/ContentBridgeChild.h b/dom/ipc/ContentBridgeChild.h index 1e7844cf8f2..ede302fae4c 100644 --- a/dom/ipc/ContentBridgeChild.h +++ b/dom/ipc/ContentBridgeChild.h @@ -36,7 +36,7 @@ public: SendPBlobConstructor(PBlobChild* actor, const BlobConstructorParams& aParams) MOZ_OVERRIDE; - jsipc::CPOWManager* GetCPOWManager() MOZ_OVERRIDE; + jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE; virtual bool SendPBrowserConstructor(PBrowserChild* aActor, const TabId& aTabId, diff --git a/dom/ipc/ContentBridgeParent.cpp b/dom/ipc/ContentBridgeParent.cpp index 216dde0f9bf..2d98c9710a9 100644 --- a/dom/ipc/ContentBridgeParent.cpp +++ b/dom/ipc/ContentBridgeParent.cpp @@ -6,7 +6,7 @@ #include "mozilla/dom/ContentBridgeParent.h" #include "mozilla/dom/TabParent.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" +#include "JavaScriptParent.h" #include "nsXULAppAPI.h" using namespace base; @@ -154,13 +154,14 @@ ContentBridgeParent::DeallocPBrowserParent(PBrowserParent* aParent) // This implementation is identical to ContentParent::GetCPOWManager but we can't // move it to nsIContentParent because it calls ManagedPJavaScriptParent() which // only exists in PContentParent and PContentBridgeParent. -jsipc::CPOWManager* +jsipc::JavaScriptShared* ContentBridgeParent::GetCPOWManager() { if (ManagedPJavaScriptParent().Length()) { - return CPOWManagerFor(ManagedPJavaScriptParent()[0]); + return static_cast(ManagedPJavaScriptParent()[0]); } - return CPOWManagerFor(SendPJavaScriptConstructor()); + JavaScriptParent* actor = static_cast(SendPJavaScriptConstructor()); + return actor; } } // namespace dom diff --git a/dom/ipc/ContentBridgeParent.h b/dom/ipc/ContentBridgeParent.h index 4dc784afe1f..e9d3e9a2194 100644 --- a/dom/ipc/ContentBridgeParent.h +++ b/dom/ipc/ContentBridgeParent.h @@ -41,7 +41,7 @@ public: const bool& aIsForApp, const bool& aIsForBrowser) MOZ_OVERRIDE; - jsipc::CPOWManager* GetCPOWManager() MOZ_OVERRIDE; + jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE; virtual ContentParentId ChildID() MOZ_OVERRIDE { diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 21021a9426d..4df3de57377 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -41,7 +41,6 @@ #include "mozilla/ipc/FileDescriptorUtils.h" #include "mozilla/ipc/GeckoChildProcessHost.h" #include "mozilla/ipc/TestShellChild.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/layers/ImageBridgeChild.h" #include "mozilla/layers/PCompositorChild.h" @@ -164,6 +163,7 @@ #include "nsIPrincipal.h" #include "nsDeviceStorage.h" #include "AudioChannelService.h" +#include "JavaScriptChild.h" #include "mozilla/dom/DataStoreService.h" #include "mozilla/dom/telephony/PTelephonyChild.h" #include "mozilla/dom/time/DateCacheCleaner.h" @@ -1403,13 +1403,14 @@ ContentChild::DeallocPTestShellChild(PTestShellChild* shell) return true; } -jsipc::CPOWManager* +jsipc::JavaScriptShared* ContentChild::GetCPOWManager() { if (ManagedPJavaScriptChild().Length()) { - return CPOWManagerFor(ManagedPJavaScriptChild()[0]); + return static_cast(ManagedPJavaScriptChild()[0]); } - return CPOWManagerFor(SendPJavaScriptConstructor()); + JavaScriptChild* actor = static_cast(SendPJavaScriptConstructor()); + return actor; } bool @@ -1910,7 +1911,7 @@ ContentChild::RecvAsyncMessage(const nsString& aMsg, nsRefPtr cpm = nsFrameMessageManager::sChildProcessManager; if (cpm) { StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForChild(aData); - CrossProcessCpowHolder cpows(this, aCpows); + CpowIdHolder cpows(this, aCpows); cpm->ReceiveMessage(static_cast(cpm.get()), aMsg, false, &cloneData, &cpows, aPrincipal, nullptr); } diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index cf9b7e7434b..0e76e01059c 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -209,7 +209,7 @@ public: virtual PTestShellChild* AllocPTestShellChild() MOZ_OVERRIDE; virtual bool DeallocPTestShellChild(PTestShellChild*) MOZ_OVERRIDE; virtual bool RecvPTestShellConstructor(PTestShellChild*) MOZ_OVERRIDE; - jsipc::CPOWManager* GetCPOWManager() MOZ_OVERRIDE; + jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE; PMobileConnectionChild* SendPMobileConnectionConstructor(PMobileConnectionChild* aActor, diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 77e0a0f80bc..7ecbf3c5fb3 100755 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -67,7 +67,6 @@ #include "mozilla/ipc/PFileDescriptorSetParent.h" #include "mozilla/ipc/TestShellParent.h" #include "mozilla/ipc/InputStreamUtils.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/layers/CompositorParent.h" #include "mozilla/layers/ImageBridgeParent.h" #include "mozilla/layers/SharedBufferManagerParent.h" @@ -179,6 +178,8 @@ using namespace mozilla::system; #include "BluetoothService.h" #endif +#include "JavaScriptParent.h" + #include "mozilla/RemoteSpellCheckEngineParent.h" #ifdef MOZ_B2G_FM @@ -1995,11 +1996,11 @@ ContentParent::NotifyTabDestroyed(PBrowserParent* aTab, } } -jsipc::CPOWManager* +jsipc::JavaScriptShared* ContentParent::GetCPOWManager() { if (ManagedPJavaScriptParent().Length()) { - return CPOWManagerFor(ManagedPJavaScriptParent()[0]); + return static_cast(ManagedPJavaScriptParent()[0]); } return nullptr; } diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 7e486f7c671..c2bb0570586 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -189,7 +189,7 @@ public: TestShellParent* CreateTestShell(); bool DestroyTestShell(TestShellParent* aTestShell); TestShellParent* GetTestShellSingleton(); - jsipc::CPOWManager* GetCPOWManager() MOZ_OVERRIDE; + jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE; static TabId AllocateTabId(const TabId& aOpenerTabId, diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index 5da05d2a2fb..9edd374ba77 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -132,7 +132,7 @@ parent: nsString aName, nsString aFeatures, nsString aBaseURI) - returns (bool windowOpened, FrameScriptInfo[] frameScripts, nsCString urlToLoad); + returns (bool windowOpened, FrameScriptInfo[] frameScripts); sync SyncMessage(nsString aMessage, ClonedMessageData aData, CpowEntry[] aCpows, Principal aPrincipal) diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 8103b6c457c..069007b5c57 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -75,6 +75,7 @@ #include "PuppetWidget.h" #include "StructuredCloneUtils.h" #include "nsViewportInfo.h" +#include "JavaScriptChild.h" #include "nsILoadContext.h" #include "ipc/nsGUIEventIPC.h" #include "mozilla/gfx/Matrix.h" @@ -1519,7 +1520,6 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener, nsString name(aName); nsAutoCString features(aFeatures); nsTArray frameScripts; - nsCString urlToLoad; if (aIframeMoz) { newChild->SendBrowserFrameOpenWindow(this, url, name, @@ -1559,8 +1559,7 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener, name, NS_ConvertUTF8toUTF16(features), NS_ConvertUTF8toUTF16(baseURIString), aWindowIsNew, - &frameScripts, - &urlToLoad)) { + &frameScripts)) { return NS_ERROR_NOT_AVAILABLE; } } @@ -1593,10 +1592,6 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener, } } - if (!urlToLoad.IsEmpty()) { - newChild->RecvLoadURL(urlToLoad); - } - nsCOMPtr win = do_GetInterface(newChild->WebNavigation()); win.forget(aReturn); return NS_OK; @@ -3008,7 +3003,7 @@ TabChild::RecvAsyncMessage(const nsString& aMessage, StructuredCloneData cloneData = UnpackClonedMessageDataForChild(aData); nsRefPtr mm = static_cast(mTabChildGlobal->mMessageManager.get()); - CrossProcessCpowHolder cpows(Manager(), aCpows); + CpowIdHolder cpows(Manager(), aCpows); mm->ReceiveMessage(static_cast(mTabChildGlobal), aMessage, false, &cloneData, &cpows, aPrincipal, nullptr); } diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index a8c4f9a70a5..1e1cbbd7437 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -18,7 +18,6 @@ #include "mozilla/EventStateManager.h" #include "mozilla/Hal.h" #include "mozilla/ipc/DocumentRendererParent.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/layers/CompositorParent.h" #include "mozilla/layers/InputAPZContext.h" #include "mozilla/layout/RenderFrameParent.h" @@ -66,6 +65,7 @@ #include "PermissionMessageUtils.h" #include "StructuredCloneUtils.h" #include "ColorPickerParent.h" +#include "JavaScriptParent.h" #include "FilePickerParent.h" #include "TabChild.h" #include "LoadContext.h" @@ -273,7 +273,7 @@ TabParent::TabParent(nsIContentParent* aManager, , mChromeFlags(aChromeFlags) , mInitedByParent(false) , mTabId(aTabId) - , mCreatingWindow(false) + , mSkipLoad(false) { MOZ_ASSERT(aManager); } @@ -454,21 +454,17 @@ TabParent::RecvEvent(const RemoteDOMEvent& aEvent) struct MOZ_STACK_CLASS TabParent::AutoUseNewTab MOZ_FINAL { public: - AutoUseNewTab(TabParent* aNewTab, bool* aWindowIsNew, nsCString* aURLToLoad) - : mNewTab(aNewTab), mWindowIsNew(aWindowIsNew), mURLToLoad(aURLToLoad) + AutoUseNewTab(TabParent* aNewTab, bool* aWindowIsNew) + : mNewTab(aNewTab), mWindowIsNew(aWindowIsNew) { MOZ_ASSERT(!TabParent::sNextTabParent); - MOZ_ASSERT(!aNewTab->mCreatingWindow); - TabParent::sNextTabParent = aNewTab; - aNewTab->mCreatingWindow = true; - aNewTab->mDelayedURL.Truncate(); + aNewTab->mSkipLoad = true; } ~AutoUseNewTab() { - mNewTab->mCreatingWindow = false; - *mURLToLoad = mNewTab->mDelayedURL; + mNewTab->mSkipLoad = false; if (TabParent::sNextTabParent) { MOZ_ASSERT(TabParent::sNextTabParent == mNewTab); @@ -480,7 +476,6 @@ public: private: TabParent* mNewTab; bool* mWindowIsNew; - nsCString* mURLToLoad; }; bool @@ -494,8 +489,7 @@ TabParent::RecvCreateWindow(PBrowserParent* aNewTab, const nsString& aFeatures, const nsString& aBaseURI, bool* aWindowIsNew, - InfallibleTArray* aFrameScripts, - nsCString* aURLToLoad) + InfallibleTArray* aFrameScripts) { // We always expect to open a new window here. If we don't, it's an error. *aWindowIsNew = true; @@ -536,7 +530,7 @@ TabParent::RecvCreateWindow(PBrowserParent* aNewTab, params->SetReferrer(aBaseURI); params->SetIsPrivate(isPrivate); - AutoUseNewTab aunt(newTab, aWindowIsNew, aURLToLoad); + AutoUseNewTab aunt(newTab, aWindowIsNew); nsCOMPtr frameLoaderOwner; mBrowserDOMWindow->OpenURIInFrame(nullptr, params, @@ -570,7 +564,7 @@ TabParent::RecvCreateWindow(PBrowserParent* aNewTab, nsCOMPtr window; - AutoUseNewTab aunt(newTab, aWindowIsNew, aURLToLoad); + AutoUseNewTab aunt(newTab, aWindowIsNew); rv = pwwatch->OpenWindow2(parent, finalURIString.get(), NS_ConvertUTF16toUTF8(aName).get(), @@ -607,7 +601,7 @@ bool TabParent::SendLoadRemoteScript(const nsString& aURL, const bool& aRunInGlobalScope) { - if (mCreatingWindow) { + if (mSkipLoad) { mDelayedFrameScripts.AppendElement(FrameScriptInfo(aURL, aRunInGlobalScope)); return true; } @@ -621,6 +615,11 @@ TabParent::LoadURL(nsIURI* aURI) { MOZ_ASSERT(aURI); + if (mSkipLoad) { + // Don't send the message if the child wants to load its own URL. + return; + } + if (mIsDestroyed) { return; } @@ -628,13 +627,6 @@ TabParent::LoadURL(nsIURI* aURI) nsCString spec; aURI->GetSpec(spec); - if (mCreatingWindow) { - // Don't send the message if the child wants to load its own URL. - MOZ_ASSERT(mDelayedURL.IsEmpty()); - mDelayedURL = spec; - return; - } - if (!mShown) { NS_WARNING(nsPrintfCString("TabParent::LoadURL(%s) called before " "Show(). Ignoring LoadURL.\n", @@ -1348,7 +1340,7 @@ TabParent::RecvSyncMessage(const nsString& aMessage, } StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CrossProcessCpowHolder cpows(Manager(), aCpows); + CpowIdHolder cpows(Manager(), aCpows); return ReceiveMessage(aMessage, true, &cloneData, &cpows, aPrincipal, aJSONRetVal); } @@ -1370,7 +1362,7 @@ TabParent::RecvRpcMessage(const nsString& aMessage, } StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CrossProcessCpowHolder cpows(Manager(), aCpows); + CpowIdHolder cpows(Manager(), aCpows); return ReceiveMessage(aMessage, true, &cloneData, &cpows, aPrincipal, aJSONRetVal); } @@ -1391,7 +1383,7 @@ TabParent::RecvAsyncMessage(const nsString& aMessage, } StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CrossProcessCpowHolder cpows(Manager(), aCpows); + CpowIdHolder cpows(Manager(), aCpows); return ReceiveMessage(aMessage, false, &cloneData, &cpows, aPrincipal, nullptr); } diff --git a/dom/ipc/TabParent.h b/dom/ipc/TabParent.h index b516291dbe4..f6908b99bd1 100644 --- a/dom/ipc/TabParent.h +++ b/dom/ipc/TabParent.h @@ -144,8 +144,7 @@ public: const nsString& aFeatures, const nsString& aBaseURI, bool* aWindowIsNew, - InfallibleTArray* aFrameScripts, - nsCString* aURLToLoad) MOZ_OVERRIDE; + InfallibleTArray* aFrameScripts) MOZ_OVERRIDE; virtual bool RecvSyncMessage(const nsString& aMessage, const ClonedMessageData& aData, InfallibleTArray&& aCpows, @@ -490,23 +489,14 @@ private: static TabParent* sNextTabParent; // When loading a new tab or window via window.open, the child is - // responsible for loading the URL it wants into the new TabChild. When the - // parent receives the CreateWindow message, though, it sends a LoadURL - // message, usually for about:blank. It's important for the about:blank load - // to get processed because the Firefox frontend expects every new window to - // immediately start loading something (see bug 1123090). However, we want - // the child to process the LoadURL message before it returns from - // ProvideWindow so that the URL sent from the parent doesn't override the - // child's URL. This is not possible using our IPC mechanisms. To solve the - // problem, we skip sending the LoadURL message in the parent and instead - // return the URL as a result from CreateWindow. The child simulates - // receiving a LoadURL message before returning from ProvideWindow. - // - // The mCreatingWindow flag is set while dispatching CreateWindow. During - // that time, any LoadURL calls are skipped and the URL is stored in - // mSkippedURL. - bool mCreatingWindow; - nsCString mDelayedURL; + // responsible for loading the URL it wants into the new + // TabChild. Simultaneously, though, the parent sends a LoadURL message to + // every new PBrowser (usually for about:blank). This message usually + // arrives after the child has started to load the URL it wants, and + // overrides it. To prevent this, we set mSkipLoad to true when creating the + // new tab. This flag prevents the unwanted LoadURL message from being sent + // by the parent. + bool mSkipLoad; // When loading a new tab or window via window.open, we want to ensure that // frame scripts for that tab are loaded before any scripts start to run in diff --git a/dom/ipc/moz.build b/dom/ipc/moz.build index 15ccd291fbe..9ed23bb8ec0 100644 --- a/dom/ipc/moz.build +++ b/dom/ipc/moz.build @@ -130,6 +130,7 @@ LOCAL_INCLUDES += [ '/extensions/cookie', '/extensions/spellcheck/src', '/hal/sandbox', + '/js/ipc', '/layout/base', '/netwerk/base', '/toolkit/xre', diff --git a/dom/ipc/nsIContentChild.cpp b/dom/ipc/nsIContentChild.cpp index 25acddea293..bcbedc01803 100644 --- a/dom/ipc/nsIContentChild.cpp +++ b/dom/ipc/nsIContentChild.cpp @@ -15,6 +15,7 @@ #include "mozilla/dom/ipc/BlobChild.h" #include "mozilla/ipc/InputStreamUtils.h" +#include "JavaScriptChild.h" #include "nsIJSRuntimeService.h" #include "nsPrintfCString.h" @@ -34,13 +35,17 @@ nsIContentChild::AllocPJavaScriptChild() svc->GetRuntime(&rt); NS_ENSURE_TRUE(svc, nullptr); - return NewJavaScriptChild(rt); + nsAutoPtr child(new JavaScriptChild(rt)); + if (!child->init()) { + return nullptr; + } + return child.forget(); } bool nsIContentChild::DeallocPJavaScriptChild(PJavaScriptChild* aChild) { - ReleaseJavaScriptChild(aChild); + static_cast(aChild)->decref(); return true; } @@ -116,7 +121,7 @@ nsIContentChild::RecvAsyncMessage(const nsString& aMsg, nsRefPtr cpm = nsFrameMessageManager::sChildProcessManager; if (cpm) { StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForChild(aData); - CrossProcessCpowHolder cpows(this, aCpows); + CpowIdHolder cpows(this, aCpows); cpm->ReceiveMessage(static_cast(cpm.get()), aMsg, false, &cloneData, &cpows, aPrincipal, nullptr); } diff --git a/dom/ipc/nsIContentParent.cpp b/dom/ipc/nsIContentParent.cpp index bfd1631c671..93e567875de 100644 --- a/dom/ipc/nsIContentParent.cpp +++ b/dom/ipc/nsIContentParent.cpp @@ -15,9 +15,9 @@ #include "mozilla/dom/StructuredCloneUtils.h" #include "mozilla/dom/TabParent.h" #include "mozilla/dom/ipc/BlobParent.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/unused.h" +#include "JavaScriptParent.h" #include "nsFrameMessageManager.h" #include "nsIJSRuntimeService.h" #include "nsPrintfCString.h" @@ -57,13 +57,17 @@ nsIContentParent::AllocPJavaScriptParent() svc->GetRuntime(&rt); NS_ENSURE_TRUE(svc, nullptr); - return NewJavaScriptParent(rt); + nsAutoPtr parent(new JavaScriptParent(rt)); + if (!parent->init()) { + return nullptr; + } + return parent.forget(); } bool nsIContentParent::DeallocPJavaScriptParent(PJavaScriptParent* aParent) { - ReleaseJavaScriptParent(aParent); + static_cast(aParent)->decref(); return true; } @@ -193,7 +197,7 @@ nsIContentParent::RecvSyncMessage(const nsString& aMsg, nsRefPtr ppm = mMessageManager; if (ppm) { StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CrossProcessCpowHolder cpows(this, aCpows); + CpowIdHolder cpows(this, aCpows); ppm->ReceiveMessage(static_cast(ppm.get()), aMsg, true, &cloneData, &cpows, aPrincipal, aRetvals); } @@ -220,7 +224,7 @@ nsIContentParent::RecvRpcMessage(const nsString& aMsg, nsRefPtr ppm = mMessageManager; if (ppm) { StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CrossProcessCpowHolder cpows(this, aCpows); + CpowIdHolder cpows(this, aCpows); ppm->ReceiveMessage(static_cast(ppm.get()), aMsg, true, &cloneData, &cpows, aPrincipal, aRetvals); } @@ -246,7 +250,7 @@ nsIContentParent::RecvAsyncMessage(const nsString& aMsg, nsRefPtr ppm = mMessageManager; if (ppm) { StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForParent(aData); - CrossProcessCpowHolder cpows(this, aCpows); + CpowIdHolder cpows(this, aCpows); ppm->ReceiveMessage(static_cast(ppm.get()), aMsg, false, &cloneData, &cpows, aPrincipal, nullptr); } diff --git a/js/ipc/CrossProcessObjectWrappers.h b/js/ipc/CrossProcessObjectWrappers.h deleted file mode 100644 index d1c68a3b27b..00000000000 --- a/js/ipc/CrossProcessObjectWrappers.h +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * vim: set ts=8 sw=4 et tw=80: - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef mozilla_jsipc_CrossProcessObjectWrappers_h__ -#define mozilla_jsipc_CrossProcessObjectWrappers_h__ - -#include "js/TypeDecls.h" -#include "mozilla/jsipc/JavaScriptTypes.h" -#include "nsID.h" -#include "nsFrameMessageManager.h" -#include "nsString.h" -#include "nsTArray.h" - -namespace mozilla { - -namespace dom { -class CPOWManagerGetter; -} - -namespace jsipc { - -class PJavaScriptParent; -class PJavaScriptChild; - -class CPOWManager -{ - public: - virtual bool Unwrap(JSContext *cx, - const InfallibleTArray &aCpows, - JS::MutableHandleObject objp) = 0; - - virtual bool Wrap(JSContext *cx, - JS::HandleObject aObj, - InfallibleTArray *outCpows) = 0; -}; - -class CrossProcessCpowHolder : public CpowHolder -{ - public: - CrossProcessCpowHolder(dom::CPOWManagerGetter *managerGetter, - const InfallibleTArray &cpows); - - bool ToObject(JSContext *cx, JS::MutableHandleObject objp); - - private: - CPOWManager *js_; - const InfallibleTArray &cpows_; -}; - -CPOWManager* -CPOWManagerFor(PJavaScriptParent* aParent); - -CPOWManager* -CPOWManagerFor(PJavaScriptChild* aChild); - -bool -IsCPOW(JSObject *obj); - -bool -IsWrappedCPOW(JSObject *obj); - -nsresult -InstanceOf(JSObject *obj, const nsID *id, bool *bp); - -bool -DOMInstanceOf(JSContext *cx, JSObject *obj, int prototypeID, int depth, bool *bp); - -void -GetWrappedCPOWTag(JSObject *obj, nsACString &out); - -PJavaScriptParent * -NewJavaScriptParent(JSRuntime *rt); - -void -ReleaseJavaScriptParent(PJavaScriptParent *parent); - -PJavaScriptChild * -NewJavaScriptChild(JSRuntime *rt); - -void -ReleaseJavaScriptChild(PJavaScriptChild *child); - -} // namespace jsipc -} // namespace mozilla - -#endif // mozilla_jsipc_CrossProcessObjectWrappers_h__ diff --git a/js/ipc/JavaScriptChild.cpp b/js/ipc/JavaScriptChild.cpp index 1a8f6d53b71..1ed45d1f1db 100644 --- a/js/ipc/JavaScriptChild.cpp +++ b/js/ipc/JavaScriptChild.cpp @@ -64,20 +64,3 @@ JavaScriptChild::scopeForTargetObjects() // scope so that they can benefit from XrayWrappers in the child. return xpc::PrivilegedJunkScope(); } - -PJavaScriptChild * -mozilla::jsipc::NewJavaScriptChild(JSRuntime *rt) -{ - JavaScriptChild *child = new JavaScriptChild(rt); - if (!child->init()) { - delete child; - return nullptr; - } - return child; -} - -void -mozilla::jsipc::ReleaseJavaScriptChild(PJavaScriptChild *child) -{ - static_cast(child)->decref(); -} diff --git a/js/ipc/JavaScriptParent.cpp b/js/ipc/JavaScriptParent.cpp index b1b1f39d47d..3411c537bc5 100644 --- a/js/ipc/JavaScriptParent.cpp +++ b/js/ipc/JavaScriptParent.cpp @@ -76,20 +76,3 @@ JavaScriptParent::CloneProtocol(Channel* aChannel, ProtocolCloneContext* aCtx) } return actor.forget(); } - -PJavaScriptParent * -mozilla::jsipc::NewJavaScriptParent(JSRuntime *rt) -{ - JavaScriptParent *parent = new JavaScriptParent(rt); - if (!parent->init()) { - delete parent; - return nullptr; - } - return parent; -} - -void -mozilla::jsipc::ReleaseJavaScriptParent(PJavaScriptParent *parent) -{ - static_cast(parent)->decref(); -} diff --git a/js/ipc/JavaScriptShared.cpp b/js/ipc/JavaScriptShared.cpp index e56b99b9301..c5537e05af8 100644 --- a/js/ipc/JavaScriptShared.cpp +++ b/js/ipc/JavaScriptShared.cpp @@ -672,8 +672,7 @@ JavaScriptShared::fromObjectOrNullVariant(JSContext *cx, ObjectOrNullVariant obj return fromObjectVariant(cx, objVar.get_ObjectVariant()); } -CrossProcessCpowHolder::CrossProcessCpowHolder(dom::CPOWManagerGetter *managerGetter, - const InfallibleTArray &cpows) +CpowIdHolder::CpowIdHolder(dom::CPOWManagerGetter *managerGetter, const InfallibleTArray &cpows) : js_(nullptr), cpows_(cpows) { @@ -683,7 +682,7 @@ CrossProcessCpowHolder::CrossProcessCpowHolder(dom::CPOWManagerGetter *managerGe } bool -CrossProcessCpowHolder::ToObject(JSContext *cx, JS::MutableHandleObject objp) +CpowIdHolder::ToObject(JSContext *cx, JS::MutableHandleObject objp) { if (!cpows_.Length()) return true; @@ -758,15 +757,3 @@ JavaScriptShared::Wrap(JSContext *cx, HandleObject aObj, InfallibleTArray(aParent); -} - -CPOWManager* -mozilla::jsipc::CPOWManagerFor(PJavaScriptChild* aChild) -{ - return static_cast(aChild); -} diff --git a/js/ipc/JavaScriptShared.h b/js/ipc/JavaScriptShared.h index 77c71c0083e..fb381680b94 100644 --- a/js/ipc/JavaScriptShared.h +++ b/js/ipc/JavaScriptShared.h @@ -9,9 +9,9 @@ #define mozilla_jsipc_JavaScriptShared_h__ #include "mozilla/dom/DOMTypes.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/jsipc/PJavaScript.h" #include "nsJSUtils.h" +#include "nsFrameMessageManager.h" namespace mozilla { @@ -65,6 +65,18 @@ class ObjectId { class JavaScriptShared; +class CpowIdHolder : public CpowHolder +{ + public: + CpowIdHolder(dom::CPOWManagerGetter *managerGetter, const InfallibleTArray &cpows); + + bool ToObject(JSContext *cx, JS::MutableHandleObject objp); + + private: + JavaScriptShared *js_; + const InfallibleTArray &cpows_; +}; + // DefaultHasher requires that T coerce to an integral type. We could make // ObjectId do that, but doing so would weaken our type invariants, so we just // reimplement it manually. @@ -132,7 +144,7 @@ class ObjectToIdMap class Logging; -class JavaScriptShared : public CPOWManager +class JavaScriptShared { public: explicit JavaScriptShared(JSRuntime *rt); diff --git a/js/ipc/WrapperOwner.h b/js/ipc/WrapperOwner.h index 3c378e941a4..d95b1d9a2cf 100644 --- a/js/ipc/WrapperOwner.h +++ b/js/ipc/WrapperOwner.h @@ -10,7 +10,6 @@ #include "JavaScriptShared.h" #include "mozilla/ipc/ProtocolUtils.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "js/Class.h" #include "jsproxy.h" @@ -150,6 +149,21 @@ class WrapperOwner : public virtual JavaScriptShared ReturnStatus *rs, bool *instanceof) = 0; }; +bool +IsCPOW(JSObject *obj); + +bool +IsWrappedCPOW(JSObject *obj); + +nsresult +InstanceOf(JSObject *obj, const nsID *id, bool *bp); + +bool +DOMInstanceOf(JSContext *cx, JSObject *obj, int prototypeID, int depth, bool *bp); + +void +GetWrappedCPOWTag(JSObject *obj, nsACString &out); + } // jsipc } // mozilla diff --git a/js/ipc/moz.build b/js/ipc/moz.build index 1bffb416755..404795f9d66 100644 --- a/js/ipc/moz.build +++ b/js/ipc/moz.build @@ -26,10 +26,6 @@ FINAL_LIBRARY = 'xul' DEFINES['BIN_SUFFIX'] = '"%s"' % CONFIG['BIN_SUFFIX'] -EXPORTS.mozilla.jsipc = [ - 'CrossProcessObjectWrappers.h', -] - LOCAL_INCLUDES += [ '/dom/base', '/js/ipc', diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp index 4390efb0083..6af61cbdd8e 100644 --- a/js/xpconnect/src/XPCComponents.cpp +++ b/js/xpconnect/src/XPCComponents.cpp @@ -13,10 +13,10 @@ #include "nsJSUtils.h" #include "mozJSComponentLoader.h" #include "nsContentUtils.h" +#include "JavaScriptParent.h" #include "jsfriendapi.h" #include "js/StructuredClone.h" #include "mozilla/Attributes.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/Preferences.h" #include "nsJSEnvironment.h" #include "mozilla/TimeStamp.h" diff --git a/js/xpconnect/src/XPCConvert.cpp b/js/xpconnect/src/XPCConvert.cpp index 1d0d48edb47..40379f9b199 100644 --- a/js/xpconnect/src/XPCConvert.cpp +++ b/js/xpconnect/src/XPCConvert.cpp @@ -21,11 +21,11 @@ #include "jsfriendapi.h" #include "js/CharacterEncoding.h" #include "jsprf.h" +#include "JavaScriptParent.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/DOMException.h" #include "mozilla/dom/PrimitiveConversions.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" using namespace xpc; using namespace mozilla; diff --git a/js/xpconnect/src/XPCJSID.cpp b/js/xpconnect/src/XPCJSID.cpp index 71e018da10e..a8d7d24bd5c 100644 --- a/js/xpconnect/src/XPCJSID.cpp +++ b/js/xpconnect/src/XPCJSID.cpp @@ -9,7 +9,7 @@ #include "xpcprivate.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/Attributes.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" +#include "JavaScriptParent.h" #include "mozilla/StaticPtr.h" using namespace mozilla::dom; diff --git a/js/xpconnect/src/XPCWrappedJS.cpp b/js/xpconnect/src/XPCWrappedJS.cpp index ba5386a3eb8..f4d569e8bcd 100644 --- a/js/xpconnect/src/XPCWrappedJS.cpp +++ b/js/xpconnect/src/XPCWrappedJS.cpp @@ -8,10 +8,10 @@ #include "xpcprivate.h" #include "jsprf.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "nsCCUncollectableMarker.h" #include "nsContentUtils.h" #include "nsThreadUtils.h" +#include "JavaScriptParent.h" using namespace mozilla; diff --git a/js/xpconnect/src/XPCWrappedJSClass.cpp b/js/xpconnect/src/XPCWrappedJSClass.cpp index 5f5db108314..1474aec1302 100644 --- a/js/xpconnect/src/XPCWrappedJSClass.cpp +++ b/js/xpconnect/src/XPCWrappedJSClass.cpp @@ -13,11 +13,11 @@ #include "nsWrapperCache.h" #include "AccessCheck.h" #include "nsJSUtils.h" +#include "JavaScriptParent.h" #include "mozilla/Attributes.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/DOMException.h" #include "mozilla/dom/DOMExceptionBinding.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "jsapi.h" #include "jsfriendapi.h" diff --git a/js/xpconnect/src/moz.build b/js/xpconnect/src/moz.build index 4afe4dd15c7..bcb089b1d60 100644 --- a/js/xpconnect/src/moz.build +++ b/js/xpconnect/src/moz.build @@ -66,6 +66,7 @@ LOCAL_INCLUDES += [ '/dom/html', '/dom/svg', '/dom/workers', + '/js/ipc', '/layout/base', '/layout/style', '/xpcom/reflect/xptinfo', diff --git a/js/xpconnect/wrappers/AccessCheck.cpp b/js/xpconnect/wrappers/AccessCheck.cpp index 4e0ae7151cf..7cd922a4c41 100644 --- a/js/xpconnect/wrappers/AccessCheck.cpp +++ b/js/xpconnect/wrappers/AccessCheck.cpp @@ -8,6 +8,7 @@ #include "nsJSPrincipals.h" #include "nsGlobalWindow.h" +#include "JavaScriptParent.h" #include "XPCWrapper.h" #include "XrayWrapper.h" @@ -16,7 +17,6 @@ #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/LocationBinding.h" #include "mozilla/dom/WindowBinding.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "nsIDOMWindowCollection.h" #include "nsJSUtils.h" diff --git a/js/xpconnect/wrappers/WrapperFactory.cpp b/js/xpconnect/wrappers/WrapperFactory.cpp index 9768f669f7f..0d8eee539c7 100644 --- a/js/xpconnect/wrappers/WrapperFactory.cpp +++ b/js/xpconnect/wrappers/WrapperFactory.cpp @@ -16,8 +16,8 @@ #include "xpcprivate.h" #include "XPCMaps.h" #include "mozilla/dom/BindingUtils.h" +#include "JavaScriptParent.h" #include "jsfriendapi.h" -#include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/Likely.h" #include "nsContentUtils.h" #include "nsXULAppAPI.h" diff --git a/js/xpconnect/wrappers/moz.build b/js/xpconnect/wrappers/moz.build index d6a8c1c2e9f..33bb86edff8 100644 --- a/js/xpconnect/wrappers/moz.build +++ b/js/xpconnect/wrappers/moz.build @@ -39,5 +39,6 @@ FINAL_LIBRARY = 'xul' LOCAL_INCLUDES += [ '../../../dom/base', '../src', + '/js/ipc', ] From a27875f30d98d126213ff530bd8bc20d9e257a34 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 22 Jan 2015 21:22:10 -0800 Subject: [PATCH 060/106] Bug 1122403 - IonMonkey: Fix folding of unsigned Div and Mod r=nbp --- js/src/jit/MIR.cpp | 10 ++++-- js/src/jsapi-tests/testJitFoldsTo.cpp | 50 +++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/js/src/jit/MIR.cpp b/js/src/jit/MIR.cpp index d762b934d9d..4751506d305 100644 --- a/js/src/jit/MIR.cpp +++ b/js/src/jit/MIR.cpp @@ -144,10 +144,16 @@ EvaluateConstantOperands(TempAllocator &alloc, MBinaryInstruction *ins, bool *pt ret.setNumber(lhs.toNumber() * rhs.toNumber()); break; case MDefinition::Op_Div: - ret.setNumber(NumberDiv(lhs.toNumber(), rhs.toNumber())); + if (ins->toDiv()->isUnsigned()) + ret.setInt32(rhs.isInt32(0) ? 0 : uint32_t(lhs.toInt32()) / uint32_t(rhs.toInt32())); + else + ret.setNumber(NumberDiv(lhs.toNumber(), rhs.toNumber())); break; case MDefinition::Op_Mod: - ret.setNumber(NumberMod(lhs.toNumber(), rhs.toNumber())); + if (ins->toMod()->isUnsigned()) + ret.setInt32(rhs.isInt32(0) ? 0 : uint32_t(lhs.toInt32()) % uint32_t(rhs.toInt32())); + else + ret.setNumber(NumberMod(lhs.toNumber(), rhs.toNumber())); break; default: MOZ_CRASH("NYI"); diff --git a/js/src/jsapi-tests/testJitFoldsTo.cpp b/js/src/jsapi-tests/testJitFoldsTo.cpp index 88c2479608b..6598e53f2d0 100644 --- a/js/src/jsapi-tests/testJitFoldsTo.cpp +++ b/js/src/jsapi-tests/testJitFoldsTo.cpp @@ -201,3 +201,53 @@ BEGIN_TEST(testJitNotNotTest) return true; } END_TEST(testJitNotNotTest) + +BEGIN_TEST(testJitFoldsTo_UnsignedDiv) +{ + MinimalFunc func; + MBasicBlock *block = func.createEntryBlock(); + + // return 1.0 / 0xffffffff + MConstant *c0 = MConstant::New(func.alloc, Int32Value(1)); + block->add(c0); + MConstant *c1 = MConstant::New(func.alloc, Int32Value(0xffffffff)); + block->add(c1); + MDiv *div = MDiv::NewAsmJS(func.alloc, c0, c1, MIRType_Int32, /*unsignd=*/true); + block->add(div); + MReturn *ret = MReturn::New(func.alloc, div); + block->end(ret); + + if (!func.runGVN()) + return false; + + // Test that the div got folded to 0. + MConstant *op = ret->getOperand(0)->toConstant(); + CHECK(mozilla::NumbersAreIdentical(op->value().toNumber(), 0.0)); + return true; +} +END_TEST(testJitFoldsTo_UnsignedDiv) + +BEGIN_TEST(testJitFoldsTo_UnsignedMod) +{ + MinimalFunc func; + MBasicBlock *block = func.createEntryBlock(); + + // return 1.0 % 0xffffffff + MConstant *c0 = MConstant::New(func.alloc, Int32Value(1)); + block->add(c0); + MConstant *c1 = MConstant::New(func.alloc, Int32Value(0xffffffff)); + block->add(c1); + MMod *mod = MMod::NewAsmJS(func.alloc, c0, c1, MIRType_Int32, /*unsignd=*/true); + block->add(mod); + MReturn *ret = MReturn::New(func.alloc, mod); + block->end(ret); + + if (!func.runGVN()) + return false; + + // Test that the mod got folded to 1. + MConstant *op = ret->getOperand(0)->toConstant(); + CHECK(mozilla::NumbersAreIdentical(op->value().toNumber(), 1.0)); + return true; +} +END_TEST(testJitFoldsTo_UnsignedMod) From 78c5bea5dbcbba8b11bb524db590765019528c26 Mon Sep 17 00:00:00 2001 From: Seth Fowler Date: Thu, 22 Jan 2015 21:37:22 -0800 Subject: [PATCH 061/106] Bug 850197 - Mark layout/reftests/svg/as-image/list-simple-1.html random everywhere. r=me --- layout/reftests/svg/as-image/reftest.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/reftests/svg/as-image/reftest.list b/layout/reftests/svg/as-image/reftest.list index c2534abb668..504298d9bc5 100644 --- a/layout/reftests/svg/as-image/reftest.list +++ b/layout/reftests/svg/as-image/reftest.list @@ -127,7 +127,7 @@ skip-if(B2G) == img-fragment-2a.html img-fragment-2-ref.html # bug 773482 skip-if(B2G) == img-fragment-2b.html img-fragment-2-ref.html # bug 773482 skip-if(B2G) == img-fragment-2c.html img-fragment-2-ref.html # bug 773482 -fuzzy-if(B2G,68,4) random-if(winWidget||cocoaWidget) == list-simple-1.html list-simple-1-ref.html +fuzzy-if(B2G,68,4) random == list-simple-1.html list-simple-1-ref.html == svg-image-simple-1.svg lime100x100.svg == svg-image-simple-2.svg lime100x100.svg From ad6e9a36cc70738bf96971fbdc3182733746c493 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sat, 17 Jan 2015 18:50:09 -0500 Subject: [PATCH 062/106] Bug 1109968 - Make all links in editable regions unfocusable; r=roc The content inside an editable region is either editable itself, or is inside a contenteditable="false" subtree. In the first case, it should not be focusable since it is editable. In the second case, it should not be focusable since the entire non-editable region is treated as a special single entity for the purposes of selection and caret movement, and having something focusable in the middle of such a subtree breaks that model. --- dom/html/HTMLAnchorElement.cpp | 16 ++++++++++++- layout/base/tests/bug1109968-1-ref.html | 17 ++++++++++++++ layout/base/tests/bug1109968-1.html | 23 +++++++++++++++++++ layout/base/tests/bug1109968-2-ref.html | 17 ++++++++++++++ layout/base/tests/bug1109968-2.html | 23 +++++++++++++++++++ layout/base/tests/mochitest.ini | 4 ++++ .../base/tests/test_reftests_with_caret.html | 2 ++ 7 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 layout/base/tests/bug1109968-1-ref.html create mode 100644 layout/base/tests/bug1109968-1.html create mode 100644 layout/base/tests/bug1109968-2-ref.html create mode 100644 layout/base/tests/bug1109968-2.html diff --git a/dom/html/HTMLAnchorElement.cpp b/dom/html/HTMLAnchorElement.cpp index 0672b45aeaa..139ad2e8dfc 100644 --- a/dom/html/HTMLAnchorElement.cpp +++ b/dom/html/HTMLAnchorElement.cpp @@ -193,6 +193,18 @@ HTMLAnchorElement::UnbindFromTree(bool aDeep, bool aNullParent) nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent); } +static bool +IsNodeInEditableRegion(nsINode* aNode) +{ + while (aNode) { + if (aNode->IsEditable()) { + return true; + } + aNode = aNode->GetParent(); + } + return false; +} + bool HTMLAnchorElement::IsHTMLFocusable(bool aWithMouse, bool *aIsFocusable, int32_t *aTabIndex) @@ -214,7 +226,9 @@ HTMLAnchorElement::IsHTMLFocusable(bool aWithMouse, } } - if (IsEditable()) { + // Links that are in an editable region should never be focusable, even if + // they are in a contenteditable="false" region. + if (IsNodeInEditableRegion(this)) { if (aTabIndex) { *aTabIndex = -1; } diff --git a/layout/base/tests/bug1109968-1-ref.html b/layout/base/tests/bug1109968-1-ref.html new file mode 100644 index 00000000000..28bcf608a73 --- /dev/null +++ b/layout/base/tests/bug1109968-1-ref.html @@ -0,0 +1,17 @@ + + +
foobaz
+ + + diff --git a/layout/base/tests/bug1109968-1.html b/layout/base/tests/bug1109968-1.html new file mode 100644 index 00000000000..a8d0d216fa8 --- /dev/null +++ b/layout/base/tests/bug1109968-1.html @@ -0,0 +1,23 @@ + + + + + +
foobaz
+ + + diff --git a/layout/base/tests/bug1109968-2-ref.html b/layout/base/tests/bug1109968-2-ref.html new file mode 100644 index 00000000000..9638c35b331 --- /dev/null +++ b/layout/base/tests/bug1109968-2-ref.html @@ -0,0 +1,17 @@ + + +
foo
bar
+ + + diff --git a/layout/base/tests/bug1109968-2.html b/layout/base/tests/bug1109968-2.html new file mode 100644 index 00000000000..159311ad39a --- /dev/null +++ b/layout/base/tests/bug1109968-2.html @@ -0,0 +1,23 @@ + + + + + +
foo
bar
+ + + diff --git a/layout/base/tests/mochitest.ini b/layout/base/tests/mochitest.ini index 62e6c04cfbb..8538c1a8d13 100644 --- a/layout/base/tests/mochitest.ini +++ b/layout/base/tests/mochitest.ini @@ -55,6 +55,10 @@ support-files = bug644768.html bug1061468.html bug1061468-ref.html + bug1109968-1-ref.html + bug1109968-1.html + bug1109968-2-ref.html + bug1109968-2.html [test_preserve3d_sorting_hit_testing.html] [test_after_paint_pref.html] diff --git a/layout/base/tests/test_reftests_with_caret.html b/layout/base/tests/test_reftests_with_caret.html index d3680d1099f..e43042093c7 100644 --- a/layout/base/tests/test_reftests_with_caret.html +++ b/layout/base/tests/test_reftests_with_caret.html @@ -109,6 +109,8 @@ var tests = [ [ 'bug613807-1.html' , 'bug613807-1-ref.html' ] , [ 'bug1082486-1.html', 'bug1082486-1-ref.html'] , [ 'bug1082486-2.html', 'bug1082486-2-ref.html'] , + [ 'bug1109968-1.html', 'bug1109968-1-ref.html'] , + [ 'bug1109968-2.html', 'bug1109968-2-ref.html'] , // The following test cases are all involving with one sending // synthesizeKey(), the other without. They ought to be failed // when touch caret preference on. Test them with preference off. From 0ca85f0b94b3ba80377ea9f9f196c5a270f441ea Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 22 Jan 2015 21:26:21 -0800 Subject: [PATCH 063/106] Bug 1122322 (follow-up) - Fix busted paths in worker memory reporter. r=bent. --HG-- extra : rebase_source : c191acaa96ff7fd3d973eb542a56e7b96efb7466 --- dom/workers/WorkerPrivate.cpp | 24 +++++++++++++++++++++--- js/xpconnect/src/XPCJSRuntime.cpp | 3 +-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 08b4e01408a..8f2d8f469e3 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -1729,6 +1729,14 @@ private: bool mIsOffline; }; +#ifdef DEBUG +static bool +StartsWithExplicit(nsACString& s) +{ + return StringBeginsWith(s, NS_LITERAL_CSTRING("explicit/")); +} +#endif + class WorkerJSRuntimeStats : public JS::RuntimeStats { const nsACString& mRtPath; @@ -1761,6 +1769,9 @@ public: xpc::ZoneStatsExtras* extras = new xpc::ZoneStatsExtras; extras->pathPrefix = mRtPath; extras->pathPrefix += nsPrintfCString("zone(0x%p)/", (void *)aZone); + + MOZ_ASSERT(StartsWithExplicit(extras->pathPrefix)); + aZoneStats->extra = extras; } @@ -1787,6 +1798,9 @@ public: // This should never be used when reporting with workers (hence the "?!"). extras->domPathPrefix.AssignLiteral("explicit/workers/?!/"); + MOZ_ASSERT(StartsWithExplicit(extras->jsPathPrefix)); + MOZ_ASSERT(StartsWithExplicit(extras->domPathPrefix)); + extras->location = nullptr; aCompartmentStats->extra = extras; @@ -2081,15 +2095,14 @@ public: AssertIsOnMainThread(); // Assumes that WorkerJSRuntimeStats will hold a reference to |path|, and - // not a copy, as TryToMapAddon() may later modify if. + // not a copy, as TryToMapAddon() may later modify it. nsCString path; WorkerJSRuntimeStats rtStats(path); { MutexAutoLock lock(mMutex); - if (!mWorkerPrivate || - !mWorkerPrivate->BlockAndCollectRuntimeStats(&rtStats, aAnonymize)) { + if (!mWorkerPrivate) { // Returning NS_OK here will effectively report 0 memory. return NS_OK; } @@ -2113,6 +2126,11 @@ public: path.AppendPrintf(", 0x%p)/", static_cast(mWorkerPrivate)); TryToMapAddon(path); + + if (!mWorkerPrivate->BlockAndCollectRuntimeStats(&rtStats, aAnonymize)) { + // Returning NS_OK here will effectively report 0 memory. + return NS_OK; + } } return xpc::ReportJSRuntimeExplicitTreeStats(rtStats, path, diff --git a/js/xpconnect/src/XPCJSRuntime.cpp b/js/xpconnect/src/XPCJSRuntime.cpp index 46cfdde1c5e..03ded81f927 100644 --- a/js/xpconnect/src/XPCJSRuntime.cpp +++ b/js/xpconnect/src/XPCJSRuntime.cpp @@ -2702,8 +2702,7 @@ class OrphanReporter : public JS::ObjectPrivateVisitor static bool StartsWithExplicit(nsACString& s) { - const char* e = "explicit/"; - return Substring(s, 0, strlen(e)).Equals(e); + return StringBeginsWith(s, NS_LITERAL_CSTRING("explicit/")); } #endif From 927b5992518a03617c2ba9d408fdd6076ac03e8f Mon Sep 17 00:00:00 2001 From: Bill McCloskey Date: Thu, 22 Jan 2015 20:00:18 -0800 Subject: [PATCH 064/106] Bug 1123090 - Pass URLs loaded during CreateWindow to content process (r=bent) --- dom/ipc/PBrowser.ipdl | 2 +- dom/ipc/TabChild.cpp | 8 +++++++- dom/ipc/TabParent.cpp | 36 ++++++++++++++++++++++-------------- dom/ipc/TabParent.h | 28 +++++++++++++++++++--------- 4 files changed, 49 insertions(+), 25 deletions(-) diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index 9edd374ba77..5da05d2a2fb 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -132,7 +132,7 @@ parent: nsString aName, nsString aFeatures, nsString aBaseURI) - returns (bool windowOpened, FrameScriptInfo[] frameScripts); + returns (bool windowOpened, FrameScriptInfo[] frameScripts, nsCString urlToLoad); sync SyncMessage(nsString aMessage, ClonedMessageData aData, CpowEntry[] aCpows, Principal aPrincipal) diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 069007b5c57..fdb04476074 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1520,6 +1520,7 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener, nsString name(aName); nsAutoCString features(aFeatures); nsTArray frameScripts; + nsCString urlToLoad; if (aIframeMoz) { newChild->SendBrowserFrameOpenWindow(this, url, name, @@ -1559,7 +1560,8 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener, name, NS_ConvertUTF8toUTF16(features), NS_ConvertUTF8toUTF16(baseURIString), aWindowIsNew, - &frameScripts)) { + &frameScripts, + &urlToLoad)) { return NS_ERROR_NOT_AVAILABLE; } } @@ -1592,6 +1594,10 @@ TabChild::ProvideWindowCommon(nsIDOMWindow* aOpener, } } + if (!urlToLoad.IsEmpty()) { + newChild->RecvLoadURL(urlToLoad); + } + nsCOMPtr win = do_GetInterface(newChild->WebNavigation()); win.forget(aReturn); return NS_OK; diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 1e1cbbd7437..def22ab56c4 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -273,7 +273,7 @@ TabParent::TabParent(nsIContentParent* aManager, , mChromeFlags(aChromeFlags) , mInitedByParent(false) , mTabId(aTabId) - , mSkipLoad(false) + , mCreatingWindow(false) { MOZ_ASSERT(aManager); } @@ -454,17 +454,21 @@ TabParent::RecvEvent(const RemoteDOMEvent& aEvent) struct MOZ_STACK_CLASS TabParent::AutoUseNewTab MOZ_FINAL { public: - AutoUseNewTab(TabParent* aNewTab, bool* aWindowIsNew) - : mNewTab(aNewTab), mWindowIsNew(aWindowIsNew) + AutoUseNewTab(TabParent* aNewTab, bool* aWindowIsNew, nsCString* aURLToLoad) + : mNewTab(aNewTab), mWindowIsNew(aWindowIsNew), mURLToLoad(aURLToLoad) { MOZ_ASSERT(!TabParent::sNextTabParent); + MOZ_ASSERT(!aNewTab->mCreatingWindow); + TabParent::sNextTabParent = aNewTab; - aNewTab->mSkipLoad = true; + aNewTab->mCreatingWindow = true; + aNewTab->mDelayedURL.Truncate(); } ~AutoUseNewTab() { - mNewTab->mSkipLoad = false; + mNewTab->mCreatingWindow = false; + *mURLToLoad = mNewTab->mDelayedURL; if (TabParent::sNextTabParent) { MOZ_ASSERT(TabParent::sNextTabParent == mNewTab); @@ -476,6 +480,7 @@ public: private: TabParent* mNewTab; bool* mWindowIsNew; + nsCString* mURLToLoad; }; bool @@ -489,7 +494,8 @@ TabParent::RecvCreateWindow(PBrowserParent* aNewTab, const nsString& aFeatures, const nsString& aBaseURI, bool* aWindowIsNew, - InfallibleTArray* aFrameScripts) + InfallibleTArray* aFrameScripts, + nsCString* aURLToLoad) { // We always expect to open a new window here. If we don't, it's an error. *aWindowIsNew = true; @@ -530,7 +536,7 @@ TabParent::RecvCreateWindow(PBrowserParent* aNewTab, params->SetReferrer(aBaseURI); params->SetIsPrivate(isPrivate); - AutoUseNewTab aunt(newTab, aWindowIsNew); + AutoUseNewTab aunt(newTab, aWindowIsNew, aURLToLoad); nsCOMPtr frameLoaderOwner; mBrowserDOMWindow->OpenURIInFrame(nullptr, params, @@ -564,7 +570,7 @@ TabParent::RecvCreateWindow(PBrowserParent* aNewTab, nsCOMPtr window; - AutoUseNewTab aunt(newTab, aWindowIsNew); + AutoUseNewTab aunt(newTab, aWindowIsNew, aURLToLoad); rv = pwwatch->OpenWindow2(parent, finalURIString.get(), NS_ConvertUTF16toUTF8(aName).get(), @@ -601,7 +607,7 @@ bool TabParent::SendLoadRemoteScript(const nsString& aURL, const bool& aRunInGlobalScope) { - if (mSkipLoad) { + if (mCreatingWindow) { mDelayedFrameScripts.AppendElement(FrameScriptInfo(aURL, aRunInGlobalScope)); return true; } @@ -615,11 +621,6 @@ TabParent::LoadURL(nsIURI* aURI) { MOZ_ASSERT(aURI); - if (mSkipLoad) { - // Don't send the message if the child wants to load its own URL. - return; - } - if (mIsDestroyed) { return; } @@ -627,6 +628,13 @@ TabParent::LoadURL(nsIURI* aURI) nsCString spec; aURI->GetSpec(spec); + if (mCreatingWindow) { + // Don't send the message if the child wants to load its own URL. + MOZ_ASSERT(mDelayedURL.IsEmpty()); + mDelayedURL = spec; + return; + } + if (!mShown) { NS_WARNING(nsPrintfCString("TabParent::LoadURL(%s) called before " "Show(). Ignoring LoadURL.\n", diff --git a/dom/ipc/TabParent.h b/dom/ipc/TabParent.h index f6908b99bd1..b516291dbe4 100644 --- a/dom/ipc/TabParent.h +++ b/dom/ipc/TabParent.h @@ -144,7 +144,8 @@ public: const nsString& aFeatures, const nsString& aBaseURI, bool* aWindowIsNew, - InfallibleTArray* aFrameScripts) MOZ_OVERRIDE; + InfallibleTArray* aFrameScripts, + nsCString* aURLToLoad) MOZ_OVERRIDE; virtual bool RecvSyncMessage(const nsString& aMessage, const ClonedMessageData& aData, InfallibleTArray&& aCpows, @@ -489,14 +490,23 @@ private: static TabParent* sNextTabParent; // When loading a new tab or window via window.open, the child is - // responsible for loading the URL it wants into the new - // TabChild. Simultaneously, though, the parent sends a LoadURL message to - // every new PBrowser (usually for about:blank). This message usually - // arrives after the child has started to load the URL it wants, and - // overrides it. To prevent this, we set mSkipLoad to true when creating the - // new tab. This flag prevents the unwanted LoadURL message from being sent - // by the parent. - bool mSkipLoad; + // responsible for loading the URL it wants into the new TabChild. When the + // parent receives the CreateWindow message, though, it sends a LoadURL + // message, usually for about:blank. It's important for the about:blank load + // to get processed because the Firefox frontend expects every new window to + // immediately start loading something (see bug 1123090). However, we want + // the child to process the LoadURL message before it returns from + // ProvideWindow so that the URL sent from the parent doesn't override the + // child's URL. This is not possible using our IPC mechanisms. To solve the + // problem, we skip sending the LoadURL message in the parent and instead + // return the URL as a result from CreateWindow. The child simulates + // receiving a LoadURL message before returning from ProvideWindow. + // + // The mCreatingWindow flag is set while dispatching CreateWindow. During + // that time, any LoadURL calls are skipped and the URL is stored in + // mSkippedURL. + bool mCreatingWindow; + nsCString mDelayedURL; // When loading a new tab or window via window.open, we want to ensure that // frame scripts for that tab are loaded before any scripts start to run in From 674aea744bf1ac7c2c698f131f8c5c2d36979f9d Mon Sep 17 00:00:00 2001 From: Bob Owen Date: Fri, 23 Jan 2015 08:32:20 +0000 Subject: [PATCH 065/106] Bug 1123245 Part 1: Enable an open sandbox on Windows NPAPI processes. r=josh, r=tabraldes --- dom/plugins/ipc/PluginProcessChild.cpp | 14 +++++++++++++ ipc/glue/GeckoChildProcessHost.cpp | 18 +++++++---------- .../win/src/sandboxbroker/sandboxBroker.cpp | 20 ++++++++++++++++--- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/dom/plugins/ipc/PluginProcessChild.cpp b/dom/plugins/ipc/PluginProcessChild.cpp index 3dc2610cd6e..8075e695d98 100644 --- a/dom/plugins/ipc/PluginProcessChild.cpp +++ b/dom/plugins/ipc/PluginProcessChild.cpp @@ -12,6 +12,7 @@ #include "base/command_line.h" #include "base/string_util.h" #include "chrome/common/chrome_switches.h" +#include "nsDebugImpl.h" #if defined(XP_MACOSX) #include "nsCocoaFeatures.h" @@ -23,6 +24,10 @@ extern "C" CGError CGSSetDebugOptions(int options); #ifdef XP_WIN #include bool ShouldProtectPluginCurrentDirectory(char16ptr_t pluginFilePath); +#if defined(MOZ_SANDBOX) +#define TARGET_SANDBOX_EXPORTS +#include "mozilla/sandboxTarget.h" +#endif #endif using mozilla::ipc::IOThreadChild; @@ -49,6 +54,8 @@ namespace plugins { bool PluginProcessChild::Init() { + nsDebugImpl::SetMultiprocessMode("NPAPI"); + #if defined(XP_MACOSX) // Remove the trigger for "dyld interposing" that we added in // GeckoChildProcessHost::PerformAsyncLaunchInternal(), in the host @@ -117,6 +124,13 @@ PluginProcessChild::Init() } pluginFilename = WideToUTF8(values[0]); + +#if defined(MOZ_SANDBOX) + // This is probably the earliest we would want to start the sandbox. + // As we attempt to tighten the sandbox, we may need to consider moving this + // to later in the plugin initialization. + mozilla::SandboxTarget::Instance()->StartSandbox(); +#endif #else # error Sorry #endif diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp index 6e7733f2449..efdee877c63 100644 --- a/ipc/glue/GeckoChildProcessHost.cpp +++ b/ipc/glue/GeckoChildProcessHost.cpp @@ -800,7 +800,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector& aExt } } -#if defined(XP_WIN) +#if defined(XP_WIN) && defined(MOZ_SANDBOX) bool shouldSandboxCurrentProcess = false; switch (mProcessType) { case GeckoProcessType_Content: @@ -813,10 +813,11 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector& aExt #endif // MOZ_CONTENT_SANDBOX break; case GeckoProcessType_Plugin: - // XXX: We don't sandbox this process type yet - // mSandboxBroker.SetSecurityLevelForPluginProcess(); - // cmdLine.AppendLooseValue(UTF8ToWide("-sandbox")); - // shouldSandboxCurrentProcess = true; + if (!PR_GetEnv("MOZ_DISABLE_NPAPI_SANDBOX")) { + mSandboxBroker.SetSecurityLevelForPluginProcess(); + cmdLine.AppendLooseValue(UTF8ToWide("-sandbox")); + shouldSandboxCurrentProcess = true; + } break; case GeckoProcessType_IPDLUnitTest: // XXX: We don't sandbox this process type yet @@ -825,13 +826,11 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector& aExt // shouldSandboxCurrentProcess = true; break; case GeckoProcessType_GMPlugin: -#ifdef MOZ_SANDBOX if (!PR_GetEnv("MOZ_DISABLE_GMP_SANDBOX")) { mSandboxBroker.SetSecurityLevelForGMPlugin(); cmdLine.AppendLooseValue(UTF8ToWide("-sandbox")); shouldSandboxCurrentProcess = true; } -#endif break; case GeckoProcessType_Default: default: @@ -839,7 +838,6 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector& aExt break; }; -#ifdef MOZ_SANDBOX if (shouldSandboxCurrentProcess) { for (auto it = mAllowedFilesRead.begin(); it != mAllowedFilesRead.end(); @@ -847,9 +845,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector& aExt mSandboxBroker.AllowReadFile(it->c_str()); } } -#endif - -#endif // XP_WIN +#endif // XP_WIN && MOZ_SANDBOX // Add the application directory path (-appdir path) AddAppDirToCommandLine(cmdLine); diff --git a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp index d7e962c028e..a612d6e831a 100644 --- a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp +++ b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp @@ -123,11 +123,25 @@ SandboxBroker::SetSecurityLevelForPluginProcess() return false; } - auto result = mPolicy->SetJobLevel(sandbox::JOB_NONE, 0); + auto result = mPolicy->SetJobLevel(sandbox::JOB_NONE, + 0 /* ui_exceptions */); bool ret = (sandbox::SBOX_ALL_OK == result); - result = mPolicy->SetTokenLevel(sandbox::USER_UNPROTECTED, - sandbox::USER_UNPROTECTED); + + result = mPolicy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS, + sandbox::USER_RESTRICTED_SAME_ACCESS); ret = ret && (sandbox::SBOX_ALL_OK == result); + + result = mPolicy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_MEDIUM); + ret = ret && (sandbox::SBOX_ALL_OK == result); + + // Add the policy for the client side of a pipe. It is just a file + // in the \pipe\ namespace. We restrict it to pipes that start with + // "chrome." so the sandboxed process cannot connect to system services. + result = mPolicy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, + sandbox::TargetPolicy::FILES_ALLOW_ANY, + L"\\??\\pipe\\chrome.*"); + ret = ret && (sandbox::SBOX_ALL_OK == result); + return ret; } From b9c17ba63ae230f33c1a710a3c4812d93d86b210 Mon Sep 17 00:00:00 2001 From: Bob Owen Date: Fri, 23 Jan 2015 08:32:21 +0000 Subject: [PATCH 066/106] Bug 1123245 Part 2: Use the USER_NON_ADMIN access token level for Windows NPAPI processes. r=tabraldes --- security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp index a612d6e831a..bd3e2f9da2f 100644 --- a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp +++ b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp @@ -128,7 +128,7 @@ SandboxBroker::SetSecurityLevelForPluginProcess() bool ret = (sandbox::SBOX_ALL_OK == result); result = mPolicy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS, - sandbox::USER_RESTRICTED_SAME_ACCESS); + sandbox::USER_NON_ADMIN); ret = ret && (sandbox::SBOX_ALL_OK == result); result = mPolicy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_MEDIUM); From 0ab45dda9a024ec8e219d4958c91f9e2d52ec2a3 Mon Sep 17 00:00:00 2001 From: Bob Owen Date: Fri, 23 Jan 2015 08:32:21 +0000 Subject: [PATCH 067/106] Bug 1123245 Part 3: Add prefs for the Windows NPAPI process sandbox. r=bsmedberg --- browser/app/profile/firefox.js | 6 ++++++ dom/plugins/ipc/PluginModuleParent.cpp | 12 +++++++++++- dom/plugins/ipc/PluginProcessParent.cpp | 12 +++++++++++- dom/plugins/ipc/PluginProcessParent.h | 5 ++++- ipc/glue/GeckoChildProcessHost.cpp | 4 +++- ipc/glue/GeckoChildProcessHost.h | 5 +++++ 6 files changed, 40 insertions(+), 4 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index ba731ce60c9..f6395019d68 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1182,6 +1182,12 @@ pref("browser.tabs.remote.desktopbehavior", true); // This will require a restart. pref("security.sandbox.windows.log", false); +// Controls whether the Windows NPAPI plugin process is sandboxed by default. +// To get a different setting for a particular plugin replace "default", with +// the plugin's nice file name, see: nsPluginTag::GetNiceFileName. +pref("dom.ipc.plugins.sandbox.default", false); +pref("dom.ipc.plugins.sandbox.flash", false); + #if defined(MOZ_CONTENT_SANDBOX) // This controls whether the Windows content process sandbox is using a more // strict sandboxing policy. This will require a restart. diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp index 98acf02d893..0f8d7511a7c 100755 --- a/dom/plugins/ipc/PluginModuleParent.cpp +++ b/dom/plugins/ipc/PluginModuleParent.cpp @@ -391,11 +391,21 @@ PluginModuleChromeParent::LoadModule(const char* aFilePath, uint32_t aPluginId, { PLUGIN_LOG_DEBUG_FUNCTION; + bool enableSandbox = false; +#if defined(XP_WIN) && defined(MOZ_SANDBOX) + nsAutoCString sandboxPref("dom.ipc.plugins.sandbox."); + sandboxPref.Append(aPluginTag->GetNiceFileName()); + if (NS_FAILED(Preferences::GetBool(sandboxPref.get(), &enableSandbox))) { + enableSandbox = Preferences::GetBool("dom.ipc.plugins.sandbox.default"); + } +#endif + nsAutoPtr parent(new PluginModuleChromeParent(aFilePath, aPluginId)); UniquePtr onLaunchedRunnable(new LaunchedTask(parent)); parent->mSubprocess->SetCallRunnableImmediately(!parent->mIsStartingAsync); TimeStamp launchStart = TimeStamp::Now(); - bool launched = parent->mSubprocess->Launch(Move(onLaunchedRunnable)); + bool launched = parent->mSubprocess->Launch(Move(onLaunchedRunnable), + enableSandbox); if (!launched) { // We never reached open parent->mShutdown = true; diff --git a/dom/plugins/ipc/PluginProcessParent.cpp b/dom/plugins/ipc/PluginProcessParent.cpp index 66c2d346384..c02c80ace56 100644 --- a/dom/plugins/ipc/PluginProcessParent.cpp +++ b/dom/plugins/ipc/PluginProcessParent.cpp @@ -43,8 +43,18 @@ PluginProcessParent::~PluginProcessParent() } bool -PluginProcessParent::Launch(mozilla::UniquePtr aLaunchCompleteTask) +PluginProcessParent::Launch(mozilla::UniquePtr aLaunchCompleteTask, + bool aEnableSandbox) { +#if defined(XP_WIN) && defined(MOZ_SANDBOX) + mEnableNPAPISandbox = aEnableSandbox; +#else + if (aEnableSandbox) { + MOZ_ASSERT(false, + "Can't enable an NPAPI process sandbox for platform/build."); + } +#endif + ProcessArchitecture currentArchitecture = base::GetCurrentProcessArchitecture(); uint32_t containerArchitectures = GetSupportedArchitecturesForProcessType(GeckoProcessType_Plugin); diff --git a/dom/plugins/ipc/PluginProcessParent.h b/dom/plugins/ipc/PluginProcessParent.h index 7ba63112882..003d7fc6572 100644 --- a/dom/plugins/ipc/PluginProcessParent.h +++ b/dom/plugins/ipc/PluginProcessParent.h @@ -50,8 +50,11 @@ public: * * @param aLaunchCompleteTask Task that is executed on the main * thread once the asynchonous launch has completed. + * @param aEnableSandbox Enables a process sandbox if one is available for + * this platform/build. Will assert if true passed and one is not available. */ - bool Launch(UniquePtr aLaunchCompleteTask = UniquePtr()); + bool Launch(UniquePtr aLaunchCompleteTask = UniquePtr(), + bool aEnableSandbox = false); void Delete(); diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp index efdee877c63..4a3e8d28610 100644 --- a/ipc/glue/GeckoChildProcessHost.cpp +++ b/ipc/glue/GeckoChildProcessHost.cpp @@ -97,6 +97,7 @@ GeckoChildProcessHost::GeckoChildProcessHost(GeckoProcessType aProcessType, mDelegate(nullptr), #if defined(MOZ_SANDBOX) && defined(XP_WIN) mEnableSandboxLogging(false), + mEnableNPAPISandbox(false), #if defined(MOZ_CONTENT_SANDBOX) mMoreStrictContentSandbox(false), #endif @@ -813,7 +814,8 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector& aExt #endif // MOZ_CONTENT_SANDBOX break; case GeckoProcessType_Plugin: - if (!PR_GetEnv("MOZ_DISABLE_NPAPI_SANDBOX")) { + if (mEnableNPAPISandbox && + !PR_GetEnv("MOZ_DISABLE_NPAPI_SANDBOX")) { mSandboxBroker.SetSecurityLevelForPluginProcess(); cmdLine.AppendLooseValue(UTF8ToWide("-sandbox")); shouldSandboxCurrentProcess = true; diff --git a/ipc/glue/GeckoChildProcessHost.h b/ipc/glue/GeckoChildProcessHost.h index d5917de0197..a32397e9797 100644 --- a/ipc/glue/GeckoChildProcessHost.h +++ b/ipc/glue/GeckoChildProcessHost.h @@ -172,6 +172,11 @@ protected: SandboxBroker mSandboxBroker; std::vector mAllowedFilesRead; bool mEnableSandboxLogging; + + // XXX: Bug 1124167: We should get rid of the process specific logic for + // sandboxing in this class at some point. Unfortunately it will take a bit + // of reorganizing so I don't think this patch is the right time. + bool mEnableNPAPISandbox; #if defined(MOZ_CONTENT_SANDBOX) bool mMoreStrictContentSandbox; #endif From 6091c10e20e22612a174ebd68d536a92cde2133a Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Fri, 23 Jan 2015 10:04:45 +0100 Subject: [PATCH 068/106] Backed out changeset af45a728fdb3 (bug 1114040) for e10s-m1 perma failures on a CLOSED TREE --- .../sessionstore/ContentRestore.jsm | 4 ++-- .../components/sessionstore/SessionStore.jsm | 23 +++++++++++++------ .../content/content-sessionStore.js | 4 ++++ 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/browser/components/sessionstore/ContentRestore.jsm b/browser/components/sessionstore/ContentRestore.jsm index 786f28e01da..7df9496fbca 100644 --- a/browser/components/sessionstore/ContentRestore.jsm +++ b/browser/components/sessionstore/ContentRestore.jsm @@ -422,8 +422,8 @@ ProgressListener.prototype = { }, onStateChange: function(webProgress, request, stateFlags, status) { - if (webProgress.isTopLevel && - stateFlags & Ci.nsIWebProgressListener.STATE_STOP && + if (stateFlags & Ci.nsIWebProgressListener.STATE_STOP && + stateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK && stateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) { this.callback(); } diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm index b30c4a5441b..c61e677cfd1 100644 --- a/browser/components/sessionstore/SessionStore.jsm +++ b/browser/components/sessionstore/SessionStore.jsm @@ -61,12 +61,14 @@ const FMM_MESSAGES = [ // time; if we did it before, the load would overwrite it. "SessionStore:restoreTabContentStarted", - // All network loads for a restoring tab are done, so we should - // consider restoring another tab in the queue. The document has - // been restored, and forms have been filled. We trigger - // SSTabRestored at this time. + // All network loads for a restoring tab are done, so we should consider + // restoring another tab in the queue. "SessionStore:restoreTabContentComplete", + // The document has been restored, so the restore is done. We trigger + // SSTabRestored at this time. + "SessionStore:restoreDocumentComplete", + // A tab that is being restored was reloaded. We call restoreTabContent to // finish restoring it right away. "SessionStore:reloadPendingTab", @@ -688,15 +690,22 @@ let SessionStoreInternal = { Services.obs.notifyObservers(browser, NOTIFY_TAB_RESTORED, null); } + if (tab) { + SessionStoreInternal._resetLocalTabRestoringState(tab); + SessionStoreInternal.restoreNextTab(); + } + } + break; + case "SessionStore:restoreDocumentComplete": + if (this.isCurrentEpoch(browser, aMessage.data.epoch)) { + // Document has been restored. Delete all the state associated + // with it and trigger SSTabRestored. let tab = browser.__SS_restore_tab; delete browser.__SS_restore_data; delete browser.__SS_restore_tab; delete browser.__SS_data; - SessionStoreInternal._resetLocalTabRestoringState(tab); - SessionStoreInternal.restoreNextTab(); - this._sendTabRestoredNotification(tab); } break; diff --git a/browser/components/sessionstore/content/content-sessionStore.js b/browser/components/sessionstore/content/content-sessionStore.js index f8d3df8e0cd..cb85f876676 100644 --- a/browser/components/sessionstore/content/content-sessionStore.js +++ b/browser/components/sessionstore/content/content-sessionStore.js @@ -97,6 +97,9 @@ let EventListener = { // Restore the form data and scroll position. gContentRestore.restoreDocument(); + + // Ask SessionStore.jsm to trigger SSTabRestored. + sendAsyncMessage("SessionStore:restoreDocumentComplete", {epoch: epoch}); } }; @@ -149,6 +152,7 @@ let MessageListener = { if (!didStartLoad) { // Pretend that the load succeeded so that event handlers fire correctly. sendAsyncMessage("SessionStore:restoreTabContentComplete", {epoch: epoch}); + sendAsyncMessage("SessionStore:restoreDocumentComplete", {epoch: epoch}); } break; case "SessionStore:resetRestore": From 57e5a10eae736505f6b6b53a9282ebc5fad24c2c Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Fri, 23 Jan 2015 18:43:46 +0900 Subject: [PATCH 069/106] Bug 512407 - Support Windows Location API. r=jdm,jmathies --- dom/geolocation/moz.build | 10 +- dom/geolocation/nsGeolocation.cpp | 10 + .../windows/WindowsLocationProvider.cpp | 198 ++++++++++++++++++ dom/system/windows/WindowsLocationProvider.h | 31 +++ dom/system/windows/moz.build | 1 + toolkit/library/moz.build | 1 + 6 files changed, 249 insertions(+), 2 deletions(-) create mode 100644 dom/system/windows/WindowsLocationProvider.cpp create mode 100644 dom/system/windows/WindowsLocationProvider.h diff --git a/dom/geolocation/moz.build b/dom/geolocation/moz.build index b05857bd0ce..ba34983a4c2 100644 --- a/dom/geolocation/moz.build +++ b/dom/geolocation/moz.build @@ -10,9 +10,12 @@ EXPORTS += [ 'nsGeoPositionIPCSerialiser.h', ] +SOURCES += [ + 'nsGeolocation.cpp', +] + UNIFIED_SOURCES += [ 'nsGeoGridFuzzer.cpp', - 'nsGeolocation.cpp', 'nsGeolocationSettings.cpp', 'nsGeoPosition.cpp', ] @@ -45,4 +48,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': LOCAL_INCLUDES += [ '/dom/system/mac', ] - +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': + LOCAL_INCLUDES += [ + '/dom/system/windows', + ] diff --git a/dom/geolocation/nsGeolocation.cpp b/dom/geolocation/nsGeolocation.cpp index efb12caa3a9..15206e80522 100644 --- a/dom/geolocation/nsGeolocation.cpp +++ b/dom/geolocation/nsGeolocation.cpp @@ -49,6 +49,10 @@ class nsIPrincipal; #include "CoreLocationLocationProvider.h" #endif +#ifdef XP_WIN +#include "WindowsLocationProvider.h" +#endif + // Some limit to the number of get or watch geolocation requests // that a window can make. #define MAX_GEO_REQUESTS_PER_WINDOW 1500 @@ -810,6 +814,12 @@ nsresult nsGeolocationService::Init() } #endif +#ifdef XP_WIN + if (Preferences::GetBool("geo.provider.ms-windows-location", false)) { + mProvider = new WindowsLocationProvider(); + } +#endif + if (Preferences::GetBool("geo.provider.use_mls", false)) { mProvider = do_CreateInstance("@mozilla.org/geolocation/mls-provider;1"); } diff --git a/dom/system/windows/WindowsLocationProvider.cpp b/dom/system/windows/WindowsLocationProvider.cpp new file mode 100644 index 00000000000..041837302f6 --- /dev/null +++ b/dom/system/windows/WindowsLocationProvider.cpp @@ -0,0 +1,198 @@ +/* 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 "WindowsLocationProvider.h" +#include "nsGeoPosition.h" +#include "nsIDOMGeoPositionError.h" +#include "prtime.h" + +#include + +namespace mozilla { +namespace dom { + +class LocationEvent MOZ_FINAL : public ILocationEvents +{ +public: + LocationEvent(nsIGeolocationUpdate* aCallback) + : mCallback(aCallback), mCount(0) { + } + + // IUnknown interface + STDMETHODIMP_(ULONG) AddRef() MOZ_OVERRIDE; + STDMETHODIMP_(ULONG) Release() MOZ_OVERRIDE; + STDMETHODIMP QueryInterface(REFIID iid, void** ppv) MOZ_OVERRIDE; + + // ILocationEvents interface + STDMETHODIMP OnStatusChanged(REFIID aReportType, + LOCATION_REPORT_STATUS aStatus) MOZ_OVERRIDE; + STDMETHODIMP OnLocationChanged(REFIID aReportType, + ILocationReport *aReport) MOZ_OVERRIDE; + +private: + nsCOMPtr mCallback; + ULONG mCount; +}; + +STDMETHODIMP_(ULONG) +LocationEvent::AddRef() +{ + return InterlockedIncrement(&mCount); +} + +STDMETHODIMP_(ULONG) +LocationEvent::Release() +{ + ULONG count = InterlockedDecrement(&mCount); + if (!count) { + delete this; + return 0; + } + return count; +} + +STDMETHODIMP +LocationEvent::QueryInterface(REFIID iid, void** ppv) +{ + if (iid == IID_IUnknown) { + *ppv = static_cast(this); + } else if (iid == IID_ILocationEvents) { + *ppv = static_cast(this); + } else { + return E_NOINTERFACE; + } + AddRef(); + return S_OK; +} + + +STDMETHODIMP +LocationEvent::OnStatusChanged(REFIID aReportType, + LOCATION_REPORT_STATUS aStatus) +{ + if (aReportType != IID_ILatLongReport) { + return S_OK; + } + + uint16_t err; + switch (aStatus) { + case REPORT_ACCESS_DENIED: + err = nsIDOMGeoPositionError::PERMISSION_DENIED; + break; + case REPORT_ERROR: + err = nsIDOMGeoPositionError::POSITION_UNAVAILABLE; + break; + default: + return S_OK; + } + + mCallback->NotifyError(err); + return S_OK; +} + +STDMETHODIMP +LocationEvent::OnLocationChanged(REFIID aReportType, + ILocationReport *aReport) +{ + if (aReportType != IID_ILatLongReport) { + return S_OK; + } + + nsRefPtr latLongReport; + if (FAILED(aReport->QueryInterface(IID_ILatLongReport, + getter_AddRefs(latLongReport)))) { + return E_FAIL; + } + + DOUBLE latitude = 0.0; + latLongReport->GetLatitude(&latitude); + + DOUBLE longitude = 0.0; + latLongReport->GetLongitude(&longitude); + + DOUBLE alt = 0.0; + latLongReport->GetAltitude(&alt); + + DOUBLE herror = 0.0; + latLongReport->GetErrorRadius(&herror); + + DOUBLE verror = 0.0; + latLongReport->GetAltitudeError(&verror); + + nsRefPtr position = + new nsGeoPosition(latitude, longitude, alt, herror, verror, 0.0, 0.0, + PR_Now()); + mCallback->Update(position); + + return S_OK; +} + +NS_IMPL_ISUPPORTS(WindowsLocationProvider, nsIGeolocationProvider) + +WindowsLocationProvider::WindowsLocationProvider() +{ +} + +NS_IMETHODIMP +WindowsLocationProvider::Startup() +{ + nsRefPtr location; + if (FAILED(::CoCreateInstance(CLSID_Location, nullptr, CLSCTX_INPROC_SERVER, + IID_ILocation, + getter_AddRefs(location)))) { + return NS_ERROR_FAILURE; + } + + IID reportTypes[] = { IID_ILatLongReport }; + if (FAILED(location->RequestPermissions(nullptr, reportTypes, 1, FALSE))) { + return NS_ERROR_FAILURE; + } + + mLocation = location; + return NS_OK; +} + +NS_IMETHODIMP +WindowsLocationProvider::Watch(nsIGeolocationUpdate* aCallback) +{ + nsRefPtr event = new LocationEvent(aCallback); + if (FAILED(mLocation->RegisterForReport(event, IID_ILatLongReport, 0))) { + return NS_ERROR_FAILURE; + } + return NS_OK; +} + +NS_IMETHODIMP +WindowsLocationProvider::Shutdown() +{ + if (mLocation) { + mLocation->UnregisterForReport(IID_ILatLongReport); + mLocation = nullptr; + } + + return NS_OK; +} + +NS_IMETHODIMP +WindowsLocationProvider::SetHighAccuracy(bool enable) +{ + if (!mLocation) { + return NS_ERROR_FAILURE; + } + + LOCATION_DESIRED_ACCURACY desiredAccuracy; + if (enable) { + desiredAccuracy = LOCATION_DESIRED_ACCURACY_HIGH; + } else { + desiredAccuracy = LOCATION_DESIRED_ACCURACY_DEFAULT; + } + if (FAILED(mLocation->SetDesiredAccuracy(IID_ILatLongReport, + desiredAccuracy))) { + return NS_ERROR_FAILURE; + } + return NS_OK; +} + +} // namespace dom +} // namespace mozilla diff --git a/dom/system/windows/WindowsLocationProvider.h b/dom/system/windows/WindowsLocationProvider.h new file mode 100644 index 00000000000..3a9a9c85be7 --- /dev/null +++ b/dom/system/windows/WindowsLocationProvider.h @@ -0,0 +1,31 @@ +/* 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_dom_WindowsLocationProvider_h__ +#define mozilla_dom_WindowsLocationProvider_h__ + +#include "nsAutoPtr.h" +#include "nsIGeolocationProvider.h" + +#include + +namespace mozilla { +namespace dom { + +class WindowsLocationProvider MOZ_FINAL : public nsIGeolocationProvider +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIGEOLOCATIONPROVIDER + + WindowsLocationProvider(); + +private: + nsRefPtr mLocation; +}; + +} // namespace dom +} // namespace mozilla + +#endif // mozilla_dom_WindowsLocationProvider_h__ diff --git a/dom/system/windows/moz.build b/dom/system/windows/moz.build index 005959aa3fc..178cd7a8266 100644 --- a/dom/system/windows/moz.build +++ b/dom/system/windows/moz.build @@ -6,6 +6,7 @@ SOURCES += [ 'nsHapticFeedback.cpp', + 'WindowsLocationProvider.cpp' ] FAIL_ON_WARNINGS = True diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build index 6de05965321..40f9a39ec0f 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build @@ -350,6 +350,7 @@ if CONFIG['OS_ARCH'] == 'WINNT': 'wbemuuid', 'wintrust', 'wtsapi32', + 'locationapi' ] if CONFIG['ACCESSIBILITY']: OS_LIBS += [ From 3a3d8f2cbc1e8c6d12c3960e2c42a38cd94dee32 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 09:55:57 +0000 Subject: [PATCH 070/106] Bug 1124738 - Fix rooting hazard in CClosure::Create() r=sfink --- js/src/ctypes/CTypes.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp index 971b2241979..99445162da4 100644 --- a/js/src/ctypes/CTypes.cpp +++ b/js/src/ctypes/CTypes.cpp @@ -6090,12 +6090,6 @@ CClosure::Create(JSContext* cx, MOZ_ASSERT(!fninfo->mIsVariadic); MOZ_ASSERT(GetABICode(fninfo->mABI) != ABI_WINAPI); - AutoPtr cinfo(cx->new_(JS_GetRuntime(cx))); - if (!cinfo) { - JS_ReportOutOfMemory(cx); - return nullptr; - } - // Get the prototype of the FunctionType object, of class CTypeProto, // which stores our JSContext for use with the closure. RootedObject proto(cx); @@ -6105,12 +6099,13 @@ CClosure::Create(JSContext* cx, MOZ_ASSERT(CType::IsCTypeProto(proto)); // Get a JSContext for use with the closure. - cinfo->cx = js::DefaultJSContext(JS_GetRuntime(cx)); + JSContext *closeureCx = js::DefaultJSContext(JS_GetRuntime(cx)); // Prepare the error sentinel value. It's important to do this now, because // we might be unable to convert the value to the proper type. If so, we want // the caller to know about it _now_, rather than some uncertain time in the // future when the error sentinel is actually needed. + mozilla::UniquePtr errResult; if (!errVal.isUndefined()) { // Make sure the callback returns something. @@ -6125,24 +6120,32 @@ CClosure::Create(JSContext* cx, // Allocate a buffer for the return value. size_t rvSize = CType::GetSize(fninfo->mReturnType); - cinfo->errResult = result->zone()->pod_malloc(rvSize); - if (!cinfo->errResult) + errResult = result->zone()->make_pod_array(rvSize); + if (!errResult) return nullptr; // Do the value conversion. This might fail, in which case we throw. - if (!ImplicitConvert(cx, errVal, fninfo->mReturnType, cinfo->errResult, - false, nullptr)) + if (!ImplicitConvert(cx, errVal, fninfo->mReturnType, errResult.get(), false, nullptr)) return nullptr; - } else { - cinfo->errResult = nullptr; + } + + ClosureInfo* cinfo = cx->new_(JS_GetRuntime(cx)); + if (!cinfo) { + JS_ReportOutOfMemory(cx); + return nullptr; } // Copy the important bits of context into cinfo. + cinfo->cx = closeureCx; + cinfo->errResult = errResult.release(); cinfo->closureObj = result; cinfo->typeObj = typeObj; cinfo->thisObj = thisObj; cinfo->jsfnObj = fnObj; + // Stash the ClosureInfo struct on our new object. + JS_SetReservedSlot(result, SLOT_CLOSUREINFO, PRIVATE_TO_JSVAL(cinfo)); + // Create an ffi_closure object and initialize it. void* code; cinfo->closure = @@ -6153,15 +6156,12 @@ CClosure::Create(JSContext* cx, } ffi_status status = ffi_prep_closure_loc(cinfo->closure, &fninfo->mCIF, - CClosure::ClosureStub, cinfo.get(), code); + CClosure::ClosureStub, cinfo, code); if (status != FFI_OK) { JS_ReportError(cx, "couldn't create closure - libffi error"); return nullptr; } - // Stash the ClosureInfo struct on our new object. - JS_SetReservedSlot(result, SLOT_CLOSUREINFO, PRIVATE_TO_JSVAL(cinfo.forget())); - // Casting between void* and a function pointer is forbidden in C and C++. // Do it via an integral type. *fnptr = reinterpret_cast(reinterpret_cast(code)); From 08f03696a51b32c200bd6b981ad2914e0a04fef6 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Thu, 22 Jan 2015 14:11:12 +0000 Subject: [PATCH 071/106] Bug 1124195 - Replace use of AutoPtr with mozilla::UniquePtr r=sfink --- js/src/ctypes/CTypes.cpp | 46 +++++++++++++++++----------------------- js/src/ctypes/CTypes.h | 41 ++++++----------------------------- 2 files changed, 26 insertions(+), 61 deletions(-) diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp index 99445162da4..ecedba74b9f 100644 --- a/js/src/ctypes/CTypes.cpp +++ b/js/src/ctypes/CTypes.cpp @@ -2583,7 +2583,7 @@ ImplicitConvert(JSContext* cx, // Convert into an intermediate, in case of failure. size_t elementSize = CType::GetSize(baseType); size_t arraySize = elementSize * targetLength; - AutoPtr intermediate(cx->pod_malloc(arraySize)); + auto intermediate = cx->make_pod_array(arraySize); if (!intermediate) { JS_ReportAllocationOverflow(cx); return false; @@ -2648,7 +2648,7 @@ ImplicitConvert(JSContext* cx, // Convert into an intermediate, in case of failure. size_t structSize = CType::GetSize(targetType); - AutoPtr intermediate(cx->pod_malloc(structSize)); + auto intermediate = cx->make_pod_array(structSize); if (!intermediate) { JS_ReportAllocationOverflow(cx); return false; @@ -3632,7 +3632,7 @@ CType::GetFFIType(JSContext* cx, JSObject* obj) return static_cast(slot.toPrivate()); } - AutoPtr result; + UniquePtrFFIType result; switch (CType::GetTypeCode(obj)) { case TYPE_array: result = ArrayType::BuildFFIType(cx, obj); @@ -3649,7 +3649,7 @@ CType::GetFFIType(JSContext* cx, JSObject* obj) if (!result) return nullptr; JS_SetReservedSlot(obj, SLOT_FFITYPE, PRIVATE_TO_JSVAL(result.get())); - return result.forget(); + return result.release(); } JSString* @@ -4496,7 +4496,7 @@ ArrayType::GetLength(JSObject* obj) return Convert(length.toDouble()); } -ffi_type* +UniquePtrFFIType ArrayType::BuildFFIType(JSContext* cx, JSObject* obj) { MOZ_ASSERT(CType::IsCType(obj)); @@ -4517,7 +4517,7 @@ ArrayType::BuildFFIType(JSContext* cx, JSObject* obj) // values. It would be nice to not do all the work of setting up 'elements', // but some libffi platforms currently require that it be meaningful. I'm // looking at you, x86_64. - AutoPtr ffiType(cx->new_()); + auto ffiType = cx->make_unique(); if (!ffiType) { JS_ReportOutOfMemory(cx); return nullptr; @@ -4536,7 +4536,7 @@ ArrayType::BuildFFIType(JSContext* cx, JSObject* obj) ffiType->elements[i] = ffiBaseType; ffiType->elements[length] = nullptr; - return ffiType.forget(); + return Move(ffiType); } bool @@ -4880,7 +4880,7 @@ StructType::DefineInternal(JSContext* cx, JSObject* typeObj_, JSObject* fieldsOb // its constituents. (We cannot simply stash the hash in a reserved slot now // to get GC safety for free, since if anything in this function fails we // do not want to mutate 'typeObj'.) - AutoPtr fields(cx->new_()); + auto fields = cx->make_unique(); if (!fields || !fields->init(len)) { JS_ReportOutOfMemory(cx); return false; @@ -4973,7 +4973,7 @@ StructType::DefineInternal(JSContext* cx, JSObject* typeObj_, JSObject* fieldsOb if (!SizeTojsval(cx, structSize, &sizeVal)) return false; - JS_SetReservedSlot(typeObj, SLOT_FIELDINFO, PRIVATE_TO_JSVAL(fields.forget())); + JS_SetReservedSlot(typeObj, SLOT_FIELDINFO, PRIVATE_TO_JSVAL(fields.release())); JS_SetReservedSlot(typeObj, SLOT_SIZE, sizeVal); JS_SetReservedSlot(typeObj, SLOT_ALIGN, INT_TO_JSVAL(structAlign)); @@ -4983,7 +4983,7 @@ StructType::DefineInternal(JSContext* cx, JSObject* typeObj_, JSObject* fieldsOb return true; } -ffi_type* +UniquePtrFFIType StructType::BuildFFIType(JSContext* cx, JSObject* obj) { MOZ_ASSERT(CType::IsCType(obj)); @@ -4996,20 +4996,21 @@ StructType::BuildFFIType(JSContext* cx, JSObject* obj) size_t structSize = CType::GetSize(obj); size_t structAlign = CType::GetAlignment(obj); - AutoPtr ffiType(cx->new_()); + auto ffiType = cx->make_unique(); if (!ffiType) { JS_ReportOutOfMemory(cx); return nullptr; } ffiType->type = FFI_TYPE_STRUCT; - AutoPtr elements; + size_t count = len != 0 ? len + 1 : 2; + auto elements = cx->make_pod_array(count); + if (!elements) { + JS_ReportOutOfMemory(cx); + return nullptr; + } + if (len != 0) { - elements = cx->pod_malloc(len + 1); - if (!elements) { - JS_ReportOutOfMemory(cx); - return nullptr; - } elements[len] = nullptr; for (FieldInfoHash::Range r = fields->all(); !r.empty(); r.popFront()) { @@ -5019,21 +5020,15 @@ StructType::BuildFFIType(JSContext* cx, JSObject* obj) return nullptr; elements[entry.value().mIndex] = fieldType; } - } else { // Represent an empty struct as having a size of 1 byte, just like C++. MOZ_ASSERT(structSize == 1); MOZ_ASSERT(structAlign == 1); - elements = cx->pod_malloc(2); - if (!elements) { - JS_ReportOutOfMemory(cx); - return nullptr; - } elements[0] = &ffi_type_uint8; elements[1] = nullptr; } - ffiType->elements = elements.get(); + ffiType->elements = elements.release(); #ifdef DEBUG // Perform a sanity check: the result of our struct size and alignment @@ -5055,8 +5050,7 @@ StructType::BuildFFIType(JSContext* cx, JSObject* obj) ffiType->alignment = structAlign; #endif - elements.forget(); - return ffiType.forget(); + return Move(ffiType); } bool diff --git a/js/src/ctypes/CTypes.h b/js/src/ctypes/CTypes.h index dee4a5cd109..a530c6889aa 100644 --- a/js/src/ctypes/CTypes.h +++ b/js/src/ctypes/CTypes.h @@ -6,6 +6,8 @@ #ifndef ctypes_CTypes_h #define ctypes_CTypes_h +#include "mozilla/UniquePtr.h" + #include "ffi.h" #include "jsalloc.h" #include "prlink.h" @@ -22,39 +24,6 @@ namespace ctypes { ** Utility classes *******************************************************************************/ -// Class that takes ownership of a pointer T*, and calls cx->delete_() or -// cx->array_delete() upon destruction. -template -class AutoPtr { -private: - typedef AutoPtr self_type; - -public: - AutoPtr() : mPtr(nullptr) { } - explicit AutoPtr(T* ptr) : mPtr(ptr) { } - ~AutoPtr() { js_delete(mPtr); } - - T* operator->() { return mPtr; } - bool operator!() { return mPtr == nullptr; } - T& operator[](size_t i) { return *(mPtr + i); } - // Note: we cannot safely provide an 'operator T*()', since this would allow - // the compiler to perform implicit conversion from one AutoPtr to another - // via the constructor AutoPtr(T*). - - T* get() { return mPtr; } - void set(T* other) { MOZ_ASSERT(mPtr == nullptr); mPtr = other; } - T* forget() { T* result = mPtr; mPtr = nullptr; return result; } - - self_type& operator=(T* rhs) { mPtr = rhs; return *this; } - -private: - // Do not allow copy construction or assignment from another AutoPtr. - AutoPtr(AutoPtr&); - self_type& operator=(AutoPtr& rhs); - - T* mPtr; -}; - // Container class for Vector, using SystemAllocPolicy. template class Array : public Vector @@ -472,6 +441,8 @@ namespace PointerType { JSObject* GetBaseType(JSObject* obj); } +typedef mozilla::UniquePtr> UniquePtrFFIType; + namespace ArrayType { JSObject* CreateInternal(JSContext* cx, HandleObject baseType, size_t length, bool lengthDefined); @@ -479,7 +450,7 @@ namespace ArrayType { JSObject* GetBaseType(JSObject* obj); size_t GetLength(JSObject* obj); bool GetSafeLength(JSObject* obj, size_t* result); - ffi_type* BuildFFIType(JSContext* cx, JSObject* obj); + UniquePtrFFIType BuildFFIType(JSContext* cx, JSObject* obj); } namespace StructType { @@ -488,7 +459,7 @@ namespace StructType { const FieldInfoHash* GetFieldInfo(JSObject* obj); const FieldInfo* LookupField(JSContext* cx, JSObject* obj, JSFlatString *name); JSObject* BuildFieldsArray(JSContext* cx, JSObject* obj); - ffi_type* BuildFFIType(JSContext* cx, JSObject* obj); + UniquePtrFFIType BuildFFIType(JSContext* cx, JSObject* obj); } namespace FunctionType { From f71d69c0ad079c9c18e0d7c2b75350a3d2d6016a Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 09:55:58 +0000 Subject: [PATCH 072/106] Bug 1124603 - Fix out of bounds array access starting parallel update tasks r=terrence --- js/src/jsgc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 7cfca76cd79..3edb858e1bc 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -2537,8 +2537,8 @@ GCRuntime::updateAllCellPointersParallel(MovingTracer *trc) const size_t minTasks = 2; const size_t maxTasks = 8; - unsigned taskCount = Min(Max(HelperThreadState().cpuCount / 2, minTasks), - maxTasks) + 1; + unsigned taskCount = Min(Max(HelperThreadState().cpuCount / 2, minTasks) + 1, + maxTasks); UpdateCellPointersTask updateTasks[maxTasks]; ArenasToUpdate fgArenas(rt, ArenasToUpdate::FOREGROUND); From c7b25039b9bd57cd2360c235e76e96eb1dbbc435 Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Fri, 23 Jan 2015 10:59:02 +0100 Subject: [PATCH 073/106] Bug 1124659 - Make quit() shell function throw for codes other than 0-127 to help fuzzing. r=jorendorff --HG-- extra : rebase_source : 9c1c68fcdb6c527e85ec84748a3bc7d841a24b9c --- js/src/shell/js.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 59a6ef3a5f2..ae5597e723c 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -1651,8 +1651,21 @@ Quit(JSContext *cx, unsigned argc, jsval *vp) #endif CallArgs args = CallArgsFromVp(argc, vp); - JS_ConvertArguments(cx, args, "/ i", &gExitCode); + int32_t code; + if (!ToInt32(cx, args.get(0), &code)) + return false; + // The fuzzers check the shell's exit code and assume a value >= 128 means + // the process crashed (for instance, SIGSEGV will result in code 139). On + // POSIX platforms, the exit code is 8-bit and negative values can also + // result in an exit code >= 128. We restrict the value to range [0, 127] to + // avoid false positives. + if (code < 0 || code >= 128) { + JS_ReportError(cx, "quit exit code should be in range 0-127"); + return false; + } + + gExitCode = code; gQuitting = true; return false; } From db0ae5439b5c0cef7170751b21cb40b8aaf6ac0c Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Fri, 23 Jan 2015 19:21:35 +0900 Subject: [PATCH 074/106] Bug 1120512 - Test all property descriptors in js::TestIntegrityLevel. r=jorendorff --- .../tests/proxy/testTestIntegrityLevel.js | 16 ++++++++ js/src/jsobj.cpp | 40 +++++++++++-------- 2 files changed, 40 insertions(+), 16 deletions(-) create mode 100644 js/src/jit-test/tests/proxy/testTestIntegrityLevel.js diff --git a/js/src/jit-test/tests/proxy/testTestIntegrityLevel.js b/js/src/jit-test/tests/proxy/testTestIntegrityLevel.js new file mode 100644 index 00000000000..f938b9912f0 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testTestIntegrityLevel.js @@ -0,0 +1,16 @@ +// isSealed/isFrozen should call getOwnPropertyDescriptor for all properties. + +var log = []; +var target = Object.preventExtensions({a: 1, b: 2, c: 3}); +var p = new Proxy(target, { + getOwnPropertyDescriptor(t, id) { + log.push(id); + return Object.getOwnPropertyDescriptor(t, id); + } +}); +assertEq(Object.isSealed(p), false); +assertEq(log.sort().join(''), 'abc'); + +log.length = 0; +assertEq(Object.isFrozen(p), false); +assertEq(log.sort().join(''), 'abc'); diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index e6c1fd854fe..3dbe324f77c 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -1144,30 +1144,38 @@ js::TestIntegrityLevel(JSContext *cx, HandleObject obj, IntegrityLevel level, bo if (!GetPropertyKeys(cx, obj, JSITER_HIDDEN | JSITER_OWNONLY | JSITER_SYMBOLS, &props)) return false; - // Steps 9-11. The spec does not permit stopping as soon as we find out the - // answer is false, so we are cheating a little here (bug 1120512). + // Steps 9-10. + bool configurable = false; + bool writable = false; + + // Steps 11. RootedId id(cx); for (size_t i = 0, len = props.length(); i < len; i++) { id = props[i]; - unsigned attrs; - if (!GetPropertyAttributes(cx, obj, id, &attrs)) + // Steps 11.a-b. + Rooted desc(cx); + if (!GetOwnPropertyDescriptor(cx, obj, id, &desc)) return false; - // If the property is configurable, this object is neither sealed nor - // frozen. If the property is a writable data property, this object is - // not frozen. - if (!(attrs & JSPROP_PERMANENT) || - (level == IntegrityLevel::Frozen && - !(attrs & (JSPROP_READONLY | JSPROP_GETTER | JSPROP_SETTER)))) - { - *result = false; - return true; - } + // Step 11.c. + if (!desc.object()) + continue; + + // Step 11.c.i. + if (!desc.isPermanent()) + configurable = true; + + // Step 11.c.ii. + if (desc.isDataDescriptor() && desc.isWritable()) + writable = true; } - // All properties checked out. This object is sealed/frozen. - *result = true; + // Steps 12-14. + if (level == IntegrityLevel::Frozen && writable) + *result = false; + else + *result = !configurable; return true; } From 4fbb3ceb4a2308f83bad4f64fc39c616814a9fdf Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Fri, 23 Jan 2015 19:21:37 +0900 Subject: [PATCH 075/106] Bug 1122334 - Part 1: Support ES7 comprehension syntax with multiple ComprehensionIf in Reflect.parse. r=jorendorff --- js/src/jsast.tbl | 1 + js/src/jsreflect.cpp | 101 ++++++++++++------ .../tests/js1_8_5/extensions/reflect-parse.js | 67 +++++++++++- 3 files changed, 137 insertions(+), 32 deletions(-) diff --git a/js/src/jsast.tbl b/js/src/jsast.tbl index e139ea19828..2bb89f636f0 100644 --- a/js/src/jsast.tbl +++ b/js/src/jsast.tbl @@ -67,6 +67,7 @@ ASTDEF(AST_EXPORT_BATCH_SPEC, "ExportBatchSpecifier", "exportBatch ASTDEF(AST_CASE, "SwitchCase", "switchCase") ASTDEF(AST_CATCH, "CatchClause", "catchClause") ASTDEF(AST_COMP_BLOCK, "ComprehensionBlock", "comprehensionBlock") +ASTDEF(AST_COMP_IF, "ComprehensionIf", "comprehensionIf") ASTDEF(AST_ARRAY_PATT, "ArrayPattern", "arrayPattern") ASTDEF(AST_OBJECT_PATT, "ObjectPattern", "objectPattern") diff --git a/js/src/jsreflect.cpp b/js/src/jsreflect.cpp index bc27caf117f..7fe609bde7e 100644 --- a/js/src/jsreflect.cpp +++ b/js/src/jsreflect.cpp @@ -668,6 +668,7 @@ class NodeBuilder bool comprehensionBlock(HandleValue patt, HandleValue src, bool isForEach, bool isForOf, TokenPos *pos, MutableHandleValue dst); + bool comprehensionIf(HandleValue test, TokenPos *pos, MutableHandleValue dst); bool comprehensionExpression(HandleValue body, NodeVector &blocks, HandleValue filter, bool isLegacy, TokenPos *pos, MutableHandleValue dst); @@ -1409,6 +1410,18 @@ NodeBuilder::comprehensionBlock(HandleValue patt, HandleValue src, bool isForEac dst); } +bool +NodeBuilder::comprehensionIf(HandleValue test, TokenPos *pos, MutableHandleValue dst) +{ + RootedValue cb(cx, callbacks[AST_COMP_IF]); + if (!cb.isNull()) + return callback(cb, test, pos, dst); + + return newNode(AST_COMP_IF, pos, + "test", test, + dst); +} + bool NodeBuilder::comprehensionExpression(HandleValue body, NodeVector &blocks, HandleValue filter, bool isLegacy, TokenPos *pos, MutableHandleValue dst) @@ -1795,6 +1808,7 @@ class ASTSerializer bool functionBody(ParseNode *pn, TokenPos *pos, MutableHandleValue dst); bool comprehensionBlock(ParseNode *pn, MutableHandleValue dst); + bool comprehensionIf(ParseNode *pn, MutableHandleValue dst); bool comprehension(ParseNode *pn, MutableHandleValue dst); bool generatorExpression(ParseNode *pn, MutableHandleValue dst); @@ -2607,6 +2621,17 @@ ASTSerializer::comprehensionBlock(ParseNode *pn, MutableHandleValue dst) builder.comprehensionBlock(patt, src, isForEach, isForOf, &in->pn_pos, dst); } +bool +ASTSerializer::comprehensionIf(ParseNode *pn, MutableHandleValue dst) +{ + LOCAL_ASSERT(pn->isKind(PNK_IF)); + LOCAL_ASSERT(!pn->pn_kid3); + + RootedValue patt(cx); + return pattern(pn->pn_kid1, &patt) && + builder.comprehensionIf(patt, &pn->pn_pos, dst); +} + bool ASTSerializer::comprehension(ParseNode *pn, MutableHandleValue dst) { @@ -2619,24 +2644,32 @@ ASTSerializer::comprehension(ParseNode *pn, MutableHandleValue dst) LOCAL_ASSERT(next->isKind(PNK_FOR)); NodeVector blocks(cx); - - while (next->isKind(PNK_FOR)) { - RootedValue block(cx); - if (!comprehensionBlock(next, &block) || !blocks.append(block)) - return false; - next = next->pn_right; - } - RootedValue filter(cx, MagicValue(JS_SERIALIZE_NO_NODE)); - - if (next->isKind(PNK_IF)) { - if (!optExpression(next->pn_kid1, &filter)) - return false; - next = next->pn_kid2; - } else if (next->isKind(PNK_STATEMENTLIST) && next->pn_count == 0) { - /* FoldConstants optimized away the push. */ - NodeVector empty(cx); - return builder.arrayExpression(empty, &pn->pn_pos, dst); + while (true) { + if (next->isKind(PNK_FOR)) { + RootedValue block(cx); + if (!comprehensionBlock(next, &block) || !blocks.append(block)) + return false; + next = next->pn_right; + } else if (next->isKind(PNK_IF)) { + if (isLegacy) { + MOZ_ASSERT(filter.isMagic(JS_SERIALIZE_NO_NODE)); + if (!optExpression(next->pn_kid1, &filter)) + return false; + } else { + // ES7 comprehension can contain multiple ComprehensionIfs. + RootedValue compif(cx); + if (!comprehensionIf(next, &compif) || !blocks.append(compif)) + return false; + } + next = next->pn_kid2; + } else if (next->isKind(PNK_STATEMENTLIST) && next->pn_count == 0) { + /* FoldConstants optimized away the push. */ + NodeVector empty(cx); + return builder.arrayExpression(empty, &pn->pn_pos, dst); + } else { + break; + } } LOCAL_ASSERT(next->isKind(PNK_ARRAYPUSH)); @@ -2658,20 +2691,28 @@ ASTSerializer::generatorExpression(ParseNode *pn, MutableHandleValue dst) LOCAL_ASSERT(next->isKind(PNK_FOR)); NodeVector blocks(cx); - - while (next->isKind(PNK_FOR)) { - RootedValue block(cx); - if (!comprehensionBlock(next, &block) || !blocks.append(block)) - return false; - next = next->pn_right; - } - RootedValue filter(cx, MagicValue(JS_SERIALIZE_NO_NODE)); - - if (next->isKind(PNK_IF)) { - if (!optExpression(next->pn_kid1, &filter)) - return false; - next = next->pn_kid2; + while (true) { + if (next->isKind(PNK_FOR)) { + RootedValue block(cx); + if (!comprehensionBlock(next, &block) || !blocks.append(block)) + return false; + next = next->pn_right; + } else if (next->isKind(PNK_IF)) { + if (isLegacy) { + MOZ_ASSERT(filter.isMagic(JS_SERIALIZE_NO_NODE)); + if (!optExpression(next->pn_kid1, &filter)) + return false; + } else { + // ES7 comprehension can contain multiple ComprehensionIfs. + RootedValue compif(cx); + if (!comprehensionIf(next, &compif) || !blocks.append(compif)) + return false; + } + next = next->pn_kid2; + } else { + break; + } } LOCAL_ASSERT(next->isKind(PNK_SEMI) && diff --git a/js/src/tests/js1_8_5/extensions/reflect-parse.js b/js/src/tests/js1_8_5/extensions/reflect-parse.js index d3cade96f0e..928ab90e271 100644 --- a/js/src/tests/js1_8_5/extensions/reflect-parse.js +++ b/js/src/tests/js1_8_5/extensions/reflect-parse.js @@ -99,8 +99,18 @@ function taggedTemplate(tagPart, templatePart) Pattern({ type: "TaggedTemplate", arguments : templatePart }) function template(raw, cooked, ...args) Pattern([{ type: "CallSiteObject", raw: raw, cooked: cooked}, ...args]) -function compExpr(body, blocks, filter, style) Pattern({ type: "ComprehensionExpression", body, blocks, filter, style }) -function genExpr(body, blocks, filter, style) Pattern({ type: "GeneratorExpression", body, blocks, filter, style }) +function compExpr(body, blocks, filter, style) { + if (style == "legacy" || !filter) + return Pattern({ type: "ComprehensionExpression", body, blocks, filter, style }); + else + return Pattern({ type: "ComprehensionExpression", body, blocks: blocks.concat(compIf(filter)), filter: null, style }); +} +function genExpr(body, blocks, filter, style) { + if (style == "legacy" || !filter) + return Pattern({ type: "GeneratorExpression", body, blocks, filter, style }); + else + return Pattern({ type: "GeneratorExpression", body, blocks: blocks.concat(compIf(filter)), filter: null, style }); +} function graphExpr(idx, body) Pattern({ type: "GraphExpression", index: idx, expression: body }) function letExpr(head, body) Pattern({ type: "LetExpression", head: head, body: body }) function idxExpr(idx) Pattern({ type: "GraphIndexExpression", index: idx }) @@ -108,6 +118,7 @@ function idxExpr(idx) Pattern({ type: "GraphIndexExpression", index: idx }) function compBlock(left, right) Pattern({ type: "ComprehensionBlock", left: left, right: right, each: false, of: false }) function compEachBlock(left, right) Pattern({ type: "ComprehensionBlock", left: left, right: right, each: true, of: false }) function compOfBlock(left, right) Pattern({ type: "ComprehensionBlock", left: left, right: right, each: false, of: true }) +function compIf(test) Pattern({ type: "ComprehensionIf", test: test }) function arrPatt(elts) Pattern({ type: "ArrayPattern", elements: elts }) function objPatt(elts) Pattern({ type: "ObjectPattern", properties: elts }) @@ -919,6 +930,32 @@ assertLegacyAndModernArrayComp("[ [x,y,z] for (x of foo) for (y of bar) for (z o [compOfBlock(ident("x"), ident("foo")), compOfBlock(ident("y"), ident("bar")), compOfBlock(ident("z"), ident("baz"))], ident("p")); +// Modern comprehensions with multiple ComprehensionIf. + +assertExpr("[for (x of foo) x]", + compExpr(ident("x"), [compOfBlock(ident("x"), ident("foo"))], null, "modern")); +assertExpr("[for (x of foo) if (c1) x]", + compExpr(ident("x"), [compOfBlock(ident("x"), ident("foo")), + compIf(ident("c1"))], null, "modern")); +assertExpr("[for (x of foo) if (c1) if (c2) x]", + compExpr(ident("x"), [compOfBlock(ident("x"), ident("foo")), + compIf(ident("c1")), compIf(ident("c2"))], null, "modern")); + +assertExpr("[for (x of foo) if (c1) for (y of bar) x]", + compExpr(ident("x"), [compOfBlock(ident("x"), ident("foo")), + compIf(ident("c1")), + compOfBlock(ident("y"), ident("bar"))], null, "modern")); +assertExpr("[for (x of foo) if (c1) for (y of bar) if (c2) x]", + compExpr(ident("x"), [compOfBlock(ident("x"), ident("foo")), + compIf(ident("c1")), + compOfBlock(ident("y"), ident("bar")), + compIf(ident("c2"))], null, "modern")); +assertExpr("[for (x of foo) if (c1) if (c2) for (y of bar) if (c3) if (c4) x]", + compExpr(ident("x"), [compOfBlock(ident("x"), ident("foo")), + compIf(ident("c1")), compIf(ident("c2")), + compOfBlock(ident("y"), ident("bar")), + compIf(ident("c3")), compIf(ident("c4"))], null, "modern")); + // generator expressions assertExpr("( x for (x in foo))", @@ -991,6 +1028,32 @@ assertLegacyAndModernGenExpr("( [x,y,z] for (x of foo) for (y of bar) for (z of [compOfBlock(ident("x"), ident("foo")), compOfBlock(ident("y"), ident("bar")), compOfBlock(ident("z"), ident("baz"))], ident("p")); +// Modern generator comprehension with multiple ComprehensionIf. + +assertExpr("(for (x of foo) x)", + genExpr(ident("x"), [compOfBlock(ident("x"), ident("foo"))], null, "modern")); +assertExpr("(for (x of foo) if (c1) x)", + genExpr(ident("x"), [compOfBlock(ident("x"), ident("foo")), + compIf(ident("c1"))], null, "modern")); +assertExpr("(for (x of foo) if (c1) if (c2) x)", + genExpr(ident("x"), [compOfBlock(ident("x"), ident("foo")), + compIf(ident("c1")), compIf(ident("c2"))], null, "modern")); + +assertExpr("(for (x of foo) if (c1) for (y of bar) x)", + genExpr(ident("x"), [compOfBlock(ident("x"), ident("foo")), + compIf(ident("c1")), + compOfBlock(ident("y"), ident("bar"))], null, "modern")); +assertExpr("(for (x of foo) if (c1) for (y of bar) if (c2) x)", + genExpr(ident("x"), [compOfBlock(ident("x"), ident("foo")), + compIf(ident("c1")), + compOfBlock(ident("y"), ident("bar")), + compIf(ident("c2"))], null, "modern")); +assertExpr("(for (x of foo) if (c1) if (c2) for (y of bar) if (c3) if (c4) x)", + genExpr(ident("x"), [compOfBlock(ident("x"), ident("foo")), + compIf(ident("c1")), compIf(ident("c2")), + compOfBlock(ident("y"), ident("bar")), + compIf(ident("c3")), compIf(ident("c4"))], null, "modern")); + // NOTE: it would be good to test generator expressions both with and without upvars, just like functions above. From bba2cf6e803dab7757ef4ad06ead8aaba311ac1c Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Fri, 23 Jan 2015 19:21:39 +0900 Subject: [PATCH 076/106] Bug 1122334 - Part 2: Remove FoldConstants checking code from ASTSerializer::comprehension in Reflect.parse. r=jorendorff --- js/src/jsreflect.cpp | 4 ---- js/src/tests/js1_8_5/extensions/reflect-parse.js | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/js/src/jsreflect.cpp b/js/src/jsreflect.cpp index 7fe609bde7e..6d7880e12eb 100644 --- a/js/src/jsreflect.cpp +++ b/js/src/jsreflect.cpp @@ -2663,10 +2663,6 @@ ASTSerializer::comprehension(ParseNode *pn, MutableHandleValue dst) return false; } next = next->pn_kid2; - } else if (next->isKind(PNK_STATEMENTLIST) && next->pn_count == 0) { - /* FoldConstants optimized away the push. */ - NodeVector empty(cx); - return builder.arrayExpression(empty, &pn->pn_pos, dst); } else { break; } diff --git a/js/src/tests/js1_8_5/extensions/reflect-parse.js b/js/src/tests/js1_8_5/extensions/reflect-parse.js index 928ab90e271..3c49aac34df 100644 --- a/js/src/tests/js1_8_5/extensions/reflect-parse.js +++ b/js/src/tests/js1_8_5/extensions/reflect-parse.js @@ -956,6 +956,12 @@ assertExpr("[for (x of foo) if (c1) if (c2) for (y of bar) if (c3) if (c4) x]", compOfBlock(ident("y"), ident("bar")), compIf(ident("c3")), compIf(ident("c4"))], null, "modern")); +assertExpr("[for (x of y) if (false) for (z of w) if (0) x]", + compExpr(ident("x"), [compOfBlock(ident("x"), ident("y")), + compIf(lit(false)), + compOfBlock(ident("z"), ident("w")), + compIf(lit(0))], null, "modern")); + // generator expressions assertExpr("( x for (x in foo))", From 7e4dfb99c1736e66efe2216ed44fc1c420cd1c9e Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Fri, 23 Jan 2015 19:21:41 +0900 Subject: [PATCH 077/106] Bug 1096376 - Disallow duplicated parameter when rest parameter is present in non-strict mode. r=jorendorff --- js/src/frontend/Parser.cpp | 10 +++++++++- .../ecma_6/Function/rest-has-duplicated.js | 17 +++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 js/src/tests/ecma_6/Function/rest-has-duplicated.js diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index a57ae246481..099512ef37a 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -1626,6 +1626,7 @@ Parser::functionArguments(FunctionSyntaxKind kind, FunctionType ty bool hasDefaults = false; Node duplicatedArg = null(); Node list = null(); + bool disallowDuplicateArgs = false; if (type == Getter) { report(ParseError, false, null(), JSMSG_ACCESSOR_WRONG_ARGS, "getter", "no", "s"); @@ -1647,6 +1648,7 @@ Parser::functionArguments(FunctionSyntaxKind kind, FunctionType ty case TOK_LC: { /* See comment below in the TOK_NAME case. */ + disallowDuplicateArgs = true; if (duplicatedArg) { report(ParseError, false, duplicatedArg, JSMSG_BAD_DUP_ARGS); return false; @@ -1719,6 +1721,12 @@ Parser::functionArguments(FunctionSyntaxKind kind, FunctionType ty report(ParseError, false, null(), JSMSG_NO_REST_NAME); return false; } + disallowDuplicateArgs = true; + if (duplicatedArg) { + // Has duplicated args before the rest parameter. + report(ParseError, false, duplicatedArg, JSMSG_BAD_DUP_ARGS); + return false; + } goto TOK_NAME; } @@ -1729,7 +1737,6 @@ Parser::functionArguments(FunctionSyntaxKind kind, FunctionType ty funbox->setStart(tokenStream); RootedPropertyName name(context, tokenStream.currentName()); - bool disallowDuplicateArgs = funbox->hasDestructuringArgs || hasDefaults; if (!defineArg(funcpn, name, disallowDuplicateArgs, &duplicatedArg)) return false; @@ -1747,6 +1754,7 @@ Parser::functionArguments(FunctionSyntaxKind kind, FunctionType ty report(ParseError, false, null(), JSMSG_REST_WITH_DEFAULT); return false; } + disallowDuplicateArgs = true; if (duplicatedArg) { report(ParseError, false, duplicatedArg, JSMSG_BAD_DUP_ARGS); return false; diff --git a/js/src/tests/ecma_6/Function/rest-has-duplicated.js b/js/src/tests/ecma_6/Function/rest-has-duplicated.js new file mode 100644 index 00000000000..67577ab4e34 --- /dev/null +++ b/js/src/tests/ecma_6/Function/rest-has-duplicated.js @@ -0,0 +1,17 @@ +// Make sure duplicated name is allowed in non-strict. +function f0(a, a) { +} + +// SyntaxError should be thrown if rest parameter name is duplicated. +assertThrowsInstanceOf(() => eval(` +function f1(a, ...a) { +} +`), SyntaxError); + +// SyntaxError should be thrown if there is a duplicated parameter. +assertThrowsInstanceOf(() => eval(` +function f2(a, a, ...b) { +} +`), SyntaxError); + +reportCompare(0, 0, 'ok'); From 3451f6624a3036ae3e52c37247c89f99ec34fe02 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 10:23:56 +0000 Subject: [PATCH 078/106] Bug 1107639 - Allow two phase construction of PersistentRooted r=terrence --- js/public/RootingAPI.h | 74 +++++++++++++++------ js/src/jsapi-tests/testPersistentRooted.cpp | 39 +++++++++++ js/src/jsgc.cpp | 20 ++++-- 3 files changed, 108 insertions(+), 25 deletions(-) diff --git a/js/public/RootingAPI.h b/js/public/RootingAPI.h index 8fe10725172..99d3923226d 100644 --- a/js/public/RootingAPI.h +++ b/js/public/RootingAPI.h @@ -1070,7 +1070,9 @@ MutableHandle::MutableHandle(PersistentRooted *root) * These roots can be used in heap-allocated data structures, so they are not * associated with any particular JSContext or stack. They are registered with * the JSRuntime itself, without locking, so they require a full JSContext to be - * constructed, not one of its more restricted superclasses. + * initialized, not one of its more restricted superclasses. Initialization may + * take place on construction, or in two phases if the no-argument constructor + * is called followed by init(). * * Note that you must not use an PersistentRooted in an object owned by a JS * object: @@ -1096,40 +1098,43 @@ MutableHandle::MutableHandle(PersistentRooted *root) * marked when the object itself is marked. */ template -class PersistentRooted : private mozilla::LinkedListElement > { +class PersistentRooted : private mozilla::LinkedListElement> { + typedef mozilla::LinkedListElement> Base; + friend class mozilla::LinkedList; friend class mozilla::LinkedListElement; friend struct js::gc::PersistentRootedMarker; + friend void js::gc::FinishPersistentRootedChains(JSRuntime *rt); + void registerWithRuntime(JSRuntime *rt) { + MOZ_ASSERT(!initialized()); JS::shadow::Runtime *srt = JS::shadow::Runtime::asShadowRuntime(rt); srt->getPersistentRootedList().insertBack(this); } public: - explicit PersistentRooted(JSContext *cx) : ptr(js::GCMethods::initial()) - { - registerWithRuntime(js::GetRuntime(cx)); + PersistentRooted() : ptr(js::GCMethods::initial()) {} + + explicit PersistentRooted(JSContext *cx) { + init(cx); } - PersistentRooted(JSContext *cx, T initial) : ptr(initial) - { - registerWithRuntime(js::GetRuntime(cx)); + PersistentRooted(JSContext *cx, T initial) { + init(cx, initial); } - explicit PersistentRooted(JSRuntime *rt) : ptr(js::GCMethods::initial()) - { - registerWithRuntime(rt); + explicit PersistentRooted(JSRuntime *rt) { + init(rt); } - PersistentRooted(JSRuntime *rt, T initial) : ptr(initial) - { - registerWithRuntime(rt); + PersistentRooted(JSRuntime *rt, T initial) { + init(rt, initial); } PersistentRooted(const PersistentRooted &rhs) - : mozilla::LinkedListElement >(), + : mozilla::LinkedListElement>(), ptr(rhs.ptr) { /* @@ -1143,6 +1148,37 @@ class PersistentRooted : private mozilla::LinkedListElement const_cast(rhs).setNext(this); } + bool initialized() { + return Base::isInList(); + } + + void init(JSContext *cx) { + init(cx, js::GCMethods::initial()); + } + + void init(JSContext *cx, T initial) + { + ptr = initial; + registerWithRuntime(js::GetRuntime(cx)); + } + + void init(JSRuntime *rt) { + init(rt, js::GCMethods::initial()); + } + + void init(JSRuntime *rt, T initial) + { + ptr = initial; + registerWithRuntime(rt); + } + + void reset() { + if (initialized()) { + set(js::GCMethods::initial()); + Base::remove(); + } + } + /* * Important: Return a reference here so passing a Rooted to * something that takes a |const T&| is not a GC hazard. @@ -1155,17 +1191,17 @@ class PersistentRooted : private mozilla::LinkedListElement const T &get() const { return ptr; } T &operator=(T value) { - MOZ_ASSERT(!js::GCMethods::poisoned(value)); - ptr = value; + set(value); return ptr; } - T &operator=(const PersistentRooted &value) { - ptr = value; + T &operator=(const PersistentRooted &other) { + set(other.ptr); return ptr; } void set(T value) { + MOZ_ASSERT(initialized()); MOZ_ASSERT(!js::GCMethods::poisoned(value)); ptr = value; } diff --git a/js/src/jsapi-tests/testPersistentRooted.cpp b/js/src/jsapi-tests/testPersistentRooted.cpp index 3ebdb592aba..8cc328827c7 100644 --- a/js/src/jsapi-tests/testPersistentRooted.cpp +++ b/js/src/jsapi-tests/testPersistentRooted.cpp @@ -38,8 +38,15 @@ const JSClass BarkWhenTracedClass::class_ = { struct Kennel { PersistentRootedObject obj; + Kennel() { } explicit Kennel(JSContext *cx) : obj(cx) { } Kennel(JSContext *cx, const HandleObject &woof) : obj(cx, woof) { } + void init(JSContext *cx, const HandleObject &woof) { + obj.init(cx, woof); + } + void clear() { + obj = nullptr; + } }; // A function for allocating a Kennel and a barker. Only allocating @@ -178,3 +185,35 @@ BEGIN_TEST(test_PersistentRootedAssign) return true; } END_TEST(test_PersistentRootedAssign) + +static PersistentRootedObject gGlobalRoot; + +// PersistentRooted instances can initialized in a separate step to allow for global PersistentRooteds. +BEGIN_TEST(test_GlobalPersistentRooted) +{ + BarkWhenTracedClass::reset(); + + CHECK(!gGlobalRoot.initialized()); + + { + RootedObject barker(cx, JS_NewObject(cx, &BarkWhenTracedClass::class_, JS::NullPtr(), JS::NullPtr())); + CHECK(barker); + + gGlobalRoot.init(cx, barker); + } + + CHECK(gGlobalRoot.initialized()); + + // GC should be able to find our barker. + CHECK(GCFinalizesNBarkers(cx, 0)); + + gGlobalRoot.reset(); + CHECK(!gGlobalRoot.initialized()); + + // Now GC should not be able to find the barker. + JS_GC(JS_GetRuntime(cx)); + CHECK(BarkWhenTracedClass::finalizeCount == 1); + + return true; +} +END_TEST(test_GlobalPersistentRooted) diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 3edb858e1bc..344ca345b48 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -1325,16 +1325,24 @@ GCRuntime::finish() FinishTrace(); } +template +static void +FinishPersistentRootedChain(mozilla::LinkedList>& list) +{ + while (!list.isEmpty()) + list.getFirst()->reset(); +} + void js::gc::FinishPersistentRootedChains(JSRuntime *rt) { /* The lists of persistent roots are stored on the shadow runtime. */ - rt->functionPersistentRooteds.clear(); - rt->idPersistentRooteds.clear(); - rt->objectPersistentRooteds.clear(); - rt->scriptPersistentRooteds.clear(); - rt->stringPersistentRooteds.clear(); - rt->valuePersistentRooteds.clear(); + FinishPersistentRootedChain(rt->functionPersistentRooteds); + FinishPersistentRootedChain(rt->idPersistentRooteds); + FinishPersistentRootedChain(rt->objectPersistentRooteds); + FinishPersistentRootedChain(rt->scriptPersistentRooteds); + FinishPersistentRootedChain(rt->stringPersistentRooteds); + FinishPersistentRootedChain(rt->valuePersistentRooteds); } void From 4bb8091dcb5e152e7716156bc7e3686650e3f78d Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 10:23:56 +0000 Subject: [PATCH 079/106] Bug 1107639 - Give PersistentRooted the standard operations on Value r=terrence --- js/public/RootingAPI.h | 13 +++++++++---- js/public/Value.h | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/js/public/RootingAPI.h b/js/public/RootingAPI.h index 99d3923226d..6069b155b03 100644 --- a/js/public/RootingAPI.h +++ b/js/public/RootingAPI.h @@ -118,6 +118,9 @@ class MutableHandleBase {}; template class HeapBase {}; +template +class PersistentRootedBase {}; + /* * js::NullPtr acts like a nullptr pointer in contexts that require a Handle. * @@ -1098,8 +1101,10 @@ MutableHandle::MutableHandle(PersistentRooted *root) * marked when the object itself is marked. */ template -class PersistentRooted : private mozilla::LinkedListElement> { - typedef mozilla::LinkedListElement> Base; +class PersistentRooted : public js::PersistentRootedBase, + private mozilla::LinkedListElement> +{ + typedef mozilla::LinkedListElement> ListBase; friend class mozilla::LinkedList; friend class mozilla::LinkedListElement; @@ -1149,7 +1154,7 @@ class PersistentRooted : private mozilla::LinkedListElement> } bool initialized() { - return Base::isInList(); + return ListBase::isInList(); } void init(JSContext *cx) { @@ -1175,7 +1180,7 @@ class PersistentRooted : private mozilla::LinkedListElement> void reset() { if (initialized()) { set(js::GCMethods::initial()); - Base::remove(); + ListBase::remove(); } } diff --git a/js/public/Value.h b/js/public/Value.h index 9f967edd7c8..9dd2f95ab25 100644 --- a/js/public/Value.h +++ b/js/public/Value.h @@ -1850,6 +1850,24 @@ class RootedBase : public MutableValueOperations interface when T = Value with type-querying, + * value-extracting, and mutating operations. + */ +template <> +class PersistentRootedBase : public MutableValueOperations> +{ + friend class ValueOperations>; + const JS::Value * extract() const { + return static_cast*>(this)->address(); + } + + friend class MutableValueOperations>; + JS::Value * extractMutable() { + return static_cast*>(this)->address(); + } +}; + } // namespace js inline jsval_layout From 66471074d286ec104ef6810d6f46819a2e274a87 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 10:23:57 +0000 Subject: [PATCH 080/106] Bug 1107639 - Use two phase construction rather than Maybe r=terrence --- docshell/base/TimelineMarker.h | 8 ++++---- .../pref/autoconfig/src/nsJSConfigTriggers.cpp | 12 ++++++------ js/src/shell/js.cpp | 14 ++++++-------- js/xpconnect/src/XPCShellImpl.cpp | 16 +++++++--------- 4 files changed, 23 insertions(+), 27 deletions(-) diff --git a/docshell/base/TimelineMarker.h b/docshell/base/TimelineMarker.h index 522e7ecaf0d..11cfe76d71d 100644 --- a/docshell/base/TimelineMarker.h +++ b/docshell/base/TimelineMarker.h @@ -75,8 +75,8 @@ public: JSObject* GetStack() { - if (mStackTrace) { - return mStackTrace->get(); + if (mStackTrace.initialized()) { + return mStackTrace; } return nullptr; } @@ -89,7 +89,7 @@ protected: if (ctx) { JS::RootedObject stack(ctx); if (JS::CaptureCurrentStack(ctx, &stack)) { - mStackTrace.emplace(ctx, stack.get()); + mStackTrace.init(ctx, stack.get()); } else { JS_ClearPendingException(ctx); } @@ -107,7 +107,7 @@ private: // in this case changing nsDocShell to participate in cycle // collection was deemed too invasive, and the markers are only held // here temporarily to boot. - mozilla::Maybe> mStackTrace; + JS::PersistentRooted mStackTrace; }; #endif /* TimelineMarker_h__ */ diff --git a/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp b/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp index 7979ef0f99a..ac691c34522 100644 --- a/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp +++ b/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp @@ -24,14 +24,14 @@ using mozilla::AutoSafeJSContext; //***************************************************************************** -static mozilla::Maybe > autoconfigSb; +static JS::PersistentRooted autoconfigSb; nsresult CentralizedAdminPrefManagerInit() { nsresult rv; // If the sandbox is already created, no need to create it again. - if (autoconfigSb) + if (autoconfigSb.initialized()) return NS_OK; // Grab XPConnect. @@ -53,14 +53,14 @@ nsresult CentralizedAdminPrefManagerInit() // Unwrap, store and root the sandbox. NS_ENSURE_STATE(sandbox->GetJSObject()); - autoconfigSb.emplace(cx, js::UncheckedUnwrap(sandbox->GetJSObject())); + autoconfigSb.init(cx, js::UncheckedUnwrap(sandbox->GetJSObject())); return NS_OK; } nsresult CentralizedAdminPrefManagerFinish() { - if (autoconfigSb) { + if (autoconfigSb.initialized()) { AutoSafeJSContext cx; autoconfigSb.reset(); JS_MaybeGC(cx); @@ -103,12 +103,12 @@ nsresult EvaluateAdminConfigScript(const char *js_buffer, size_t length, } AutoSafeJSContext cx; - JSAutoCompartment ac(cx, *autoconfigSb); + JSAutoCompartment ac(cx, autoconfigSb); nsAutoCString script(js_buffer, length); JS::RootedValue v(cx); rv = xpc->EvalInSandboxObject(NS_ConvertASCIItoUTF16(script), filename, cx, - *autoconfigSb, &v); + autoconfigSb, &v); NS_ENSURE_SUCCESS(rv, rv); return NS_OK; diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index ae5597e723c..aff3871275b 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -129,7 +129,7 @@ static size_t gMaxStackSize = 128 * sizeof(size_t) * 1024; static double MAX_TIMEOUT_INTERVAL = 1800.0; static double gTimeoutInterval = -1.0; static volatile bool gServiceInterrupt = false; -static Maybe gInterruptFunc; +static JS::PersistentRootedValue gInterruptFunc; static bool enableDisassemblyDumps = false; @@ -364,7 +364,7 @@ ShellInterruptCallback(JSContext *cx) gServiceInterrupt = false; bool result; - RootedValue interruptFunc(cx, *gInterruptFunc); + RootedValue interruptFunc(cx, gInterruptFunc); if (!interruptFunc.isNull()) { JS::AutoSaveExceptionState savedExc(cx); JSAutoCompartment ac(cx, &interruptFunc.toObject()); @@ -3036,7 +3036,7 @@ CancelExecution(JSRuntime *rt) gServiceInterrupt = true; JS_RequestInterruptCallback(rt); - if (!gInterruptFunc->get().isNull()) { + if (!gInterruptFunc.isNull()) { static const char msg[] = "Script runs for too long, terminating.\n"; fputs(msg, stderr); } @@ -3083,7 +3083,7 @@ Timeout(JSContext *cx, unsigned argc, Value *vp) JS_ReportError(cx, "Second argument must be a timeout function"); return false; } - *gInterruptFunc = value; + gInterruptFunc = value; } args.rval().setUndefined(); @@ -3154,7 +3154,7 @@ SetInterruptCallback(JSContext *cx, unsigned argc, Value *vp) JS_ReportError(cx, "Argument must be a function"); return false; } - *gInterruptFunc = value; + gInterruptFunc = value; args.rval().setUndefined(); return true; @@ -6039,7 +6039,7 @@ main(int argc, char **argv, char **envp) if (!SetRuntimeOptions(rt, op)) return 1; - gInterruptFunc.emplace(rt, NullValue()); + gInterruptFunc.init(rt, NullValue()); JS_SetGCParameter(rt, JSGC_MAX_BYTES, 0xffffffff); Maybe noggc; @@ -6102,8 +6102,6 @@ main(int argc, char **argv, char **envp) KillWatchdog(); - gInterruptFunc.reset(); - MOZ_ASSERT_IF(!CanUseExtraThreads(), workerThreads.empty()); for (size_t i = 0; i < workerThreads.length(); i++) PR_JoinThread(workerThreads[i]); diff --git a/js/xpconnect/src/XPCShellImpl.cpp b/js/xpconnect/src/XPCShellImpl.cpp index 6b197de52d0..eff1c30bed0 100644 --- a/js/xpconnect/src/XPCShellImpl.cpp +++ b/js/xpconnect/src/XPCShellImpl.cpp @@ -570,13 +570,13 @@ Btoa(JSContext *cx, unsigned argc, Value *vp) return xpc::Base64Encode(cx, args[0], args.rval()); } -static Maybe sScriptedInterruptCallback; +static PersistentRootedValue sScriptedInterruptCallback; static bool XPCShellInterruptCallback(JSContext *cx) { - MOZ_ASSERT(sScriptedInterruptCallback); - RootedValue callback(cx, *sScriptedInterruptCallback); + MOZ_ASSERT(sScriptedInterruptCallback.initialized()); + RootedValue callback(cx, sScriptedInterruptCallback); // If no interrupt callback was set by script, no-op. if (callback.isUndefined()) @@ -598,7 +598,7 @@ XPCShellInterruptCallback(JSContext *cx) static bool SetInterruptCallback(JSContext *cx, unsigned argc, jsval *vp) { - MOZ_ASSERT(sScriptedInterruptCallback); + MOZ_ASSERT(sScriptedInterruptCallback.initialized()); // Sanity-check args. JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -609,7 +609,7 @@ SetInterruptCallback(JSContext *cx, unsigned argc, jsval *vp) // Allow callers to remove the interrupt callback by passing undefined. if (args[0].isUndefined()) { - *sScriptedInterruptCallback = UndefinedValue(); + sScriptedInterruptCallback = UndefinedValue(); return true; } @@ -619,7 +619,7 @@ SetInterruptCallback(JSContext *cx, unsigned argc, jsval *vp) return false; } - *sScriptedInterruptCallback = args[0]; + sScriptedInterruptCallback = args[0]; return true; } @@ -1390,7 +1390,7 @@ XRE_XPCShellMain(int argc, char **argv, char **envp) // Override the default XPConnect interrupt callback. We could store the // old one and restore it before shutting down, but there's not really a // reason to bother. - sScriptedInterruptCallback.emplace(rt, UndefinedValue()); + sScriptedInterruptCallback.init(rt, UndefinedValue()); JS_SetInterruptCallback(rt, XPCShellInterruptCallback); JS_SetErrorReporter(rt, XPCShellErrorReporter); @@ -1525,8 +1525,6 @@ XRE_XPCShellMain(int argc, char **argv, char **envp) rv = NS_ShutdownXPCOM( nullptr ); MOZ_ASSERT(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed"); - sScriptedInterruptCallback.reset(); - #ifdef TEST_CALL_ON_WRAPPED_JS_AFTER_SHUTDOWN // test of late call and release (see above) JSContext* bogusCX; From 5edd0e2f4aa8c9c76f0a62a3bb3062afc9fabf33 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 10:23:57 +0000 Subject: [PATCH 081/106] Bug 1107639 - Replace nsAutoJSValHolder with use of PersistentRooted r=bent --- ipc/testshell/TestShellParent.cpp | 12 ++- ipc/testshell/TestShellParent.h | 4 +- ipc/testshell/XPCShellEnvironment.cpp | 7 +- ipc/testshell/XPCShellEnvironment.h | 6 +- js/xpconnect/public/moz.build | 1 - js/xpconnect/public/nsAutoJSValHolder.h | 133 ------------------------ js/xpconnect/src/xpcprivate.h | 1 - 7 files changed, 14 insertions(+), 150 deletions(-) delete mode 100644 js/xpconnect/public/nsAutoJSValHolder.h diff --git a/ipc/testshell/TestShellParent.cpp b/ipc/testshell/TestShellParent.cpp index 543faf1baa4..32b84f60334 100644 --- a/ipc/testshell/TestShellParent.cpp +++ b/ipc/testshell/TestShellParent.cpp @@ -54,8 +54,9 @@ bool TestShellCommandParent::SetCallback(JSContext* aCx, JS::Value aCallback) { - if (!mCallback.Hold(aCx)) { - return false; + if (!mCallback.initialized()) { + mCallback.init(aCx, aCallback); + return true; } mCallback = aCallback; @@ -66,11 +67,12 @@ TestShellCommandParent::SetCallback(JSContext* aCx, bool TestShellCommandParent::RunCallback(const nsString& aResponse) { - NS_ENSURE_TRUE(mCallback.ToJSObject(), false); + NS_ENSURE_TRUE(mCallback.isObject(), false); // We're about to run script via JS_CallFunctionValue, so we need an // AutoEntryScript. This is just for testing and not in any spec. - dom::AutoEntryScript aes(xpc::NativeGlobal(js::GetGlobalForObjectCrossCompartment(mCallback.ToJSObject()))); + dom::AutoEntryScript aes( + xpc::NativeGlobal(js::GetGlobalForObjectCrossCompartment(&mCallback.toObject()))); JSContext* cx = aes.cx(); JS::Rooted global(cx, JS::CurrentGlobalOrNull(cx)); @@ -90,7 +92,7 @@ TestShellCommandParent::RunCallback(const nsString& aResponse) void TestShellCommandParent::ReleaseCallback() { - mCallback.Release(); + mCallback.reset(); } bool diff --git a/ipc/testshell/TestShellParent.h b/ipc/testshell/TestShellParent.h index dd394c5eb4e..46c3eb3f206 100644 --- a/ipc/testshell/TestShellParent.h +++ b/ipc/testshell/TestShellParent.h @@ -12,7 +12,7 @@ #include "mozilla/ipc/PTestShellCommandParent.h" #include "js/TypeDecls.h" -#include "nsAutoJSValHolder.h" +#include "js/RootingAPI.h" #include "nsString.h" namespace mozilla { @@ -58,7 +58,7 @@ protected: } private: - nsAutoJSValHolder mCallback; + JS::PersistentRooted mCallback; }; diff --git a/ipc/testshell/XPCShellEnvironment.cpp b/ipc/testshell/XPCShellEnvironment.cpp index efd2e1665c7..f1ad26dbf1b 100644 --- a/ipc/testshell/XPCShellEnvironment.cpp +++ b/ipc/testshell/XPCShellEnvironment.cpp @@ -469,7 +469,7 @@ XPCShellEnvironment::~XPCShellEnvironment() JSAutoCompartment ac(cx, global); JS_SetAllNonReservedSlotsToUndefined(cx, global); } - mGlobalHolder.Release(); + mGlobalHolder.reset(); JSRuntime *rt = JS_GetRuntime(cx); JS_GC(rt); @@ -498,10 +498,7 @@ XPCShellEnvironment::Init() return false; } - if (!mGlobalHolder.Hold(rt)) { - NS_ERROR("Can't protect global object!"); - return false; - } + mGlobalHolder.init(rt); AutoSafeJSContext cx; diff --git a/ipc/testshell/XPCShellEnvironment.h b/ipc/testshell/XPCShellEnvironment.h index d120a23e43c..a29e5f1736e 100644 --- a/ipc/testshell/XPCShellEnvironment.h +++ b/ipc/testshell/XPCShellEnvironment.h @@ -10,12 +10,12 @@ #include #include -#include "nsAutoJSValHolder.h" #include "nsCOMPtr.h" #include "nsDebug.h" #include "nsString.h" #include "nsJSPrincipals.h" #include "nsContentUtils.h" +#include "js/RootingAPI.h" #include "js/TypeDecls.h" struct JSPrincipals; @@ -39,7 +39,7 @@ public: } JSObject* GetGlobalObject() { - return mGlobalHolder.ToJSObject(); + return mGlobalHolder; } void SetIsQuitting() { @@ -54,7 +54,7 @@ protected: bool Init(); private: - nsAutoJSValHolder mGlobalHolder; + JS::PersistentRooted mGlobalHolder; bool mQuitting; }; diff --git a/js/xpconnect/public/moz.build b/js/xpconnect/public/moz.build index 7188b5ac6e3..09255f0c907 100644 --- a/js/xpconnect/public/moz.build +++ b/js/xpconnect/public/moz.build @@ -5,7 +5,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. EXPORTS += [ - 'nsAutoJSValHolder.h', 'nsAXPCNativeCallContext.h', 'nsTArrayHelpers.h', 'SandboxPrivate.h', diff --git a/js/xpconnect/public/nsAutoJSValHolder.h b/js/xpconnect/public/nsAutoJSValHolder.h deleted file mode 100644 index db01b3b1963..00000000000 --- a/js/xpconnect/public/nsAutoJSValHolder.h +++ /dev/null @@ -1,133 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef __NSAUTOJSVALHOLDER_H__ -#define __NSAUTOJSVALHOLDER_H__ - -#include "nsDebug.h" -#include "jsapi.h" - -/** - * Simple class that looks and acts like a JS::Value except that it unroots - * itself automatically if Root() is ever called. Designed to be rooted on the - * context or runtime (but not both!). - */ -class nsAutoJSValHolder -{ -public: - nsAutoJSValHolder() - : mVal(JSVAL_NULL), mRt(nullptr) - { - // nothing to do - } - - /** - * Always release on destruction. - */ - virtual ~nsAutoJSValHolder() { - Release(); - } - - nsAutoJSValHolder(const nsAutoJSValHolder& aOther) - : mVal(JSVAL_NULL), mRt(nullptr) - { - *this = aOther; - } - - nsAutoJSValHolder& operator=(const nsAutoJSValHolder& aOther) { - if (this != &aOther) { - if (aOther.IsHeld()) { - // XXX No error handling here... - this->Hold(aOther.mRt); - } - else { - this->Release(); - } - *this = static_cast(aOther); - } - return *this; - } - - /** - * Hold by rooting on the context's runtime. - */ - bool Hold(JSContext* aCx) { - return Hold(JS_GetRuntime(aCx)); - } - - /** - * Hold by rooting on the runtime. - * Note that mVal may be JSVAL_NULL, which is not a problem. - */ - bool Hold(JSRuntime* aRt) { - MOZ_ASSERT_IF(mRt, mRt == aRt); - - if (!mRt && JS::AddNamedValueRootRT(aRt, &mVal, "nsAutoJSValHolder")) { - mRt = aRt; - } - - return !!mRt; - } - - /** - * Manually release, nullifying mVal, and mRt, but returning - * the original JS::Value. - */ - JS::Value Release() { - JS::Value oldval = mVal; - - if (mRt) { - JS::RemoveValueRootRT(mRt, &mVal); // infallible - mRt = nullptr; - } - - mVal = JSVAL_NULL; - - return oldval; - } - - /** - * Determine if Hold has been called. - */ - bool IsHeld() const { - return !!mRt; - } - - /** - * Explicit JSObject* conversion. - */ - JSObject* ToJSObject() const { - return mVal.isObject() - ? &mVal.toObject() - : nullptr; - } - - /** - * Pretend to be a JS::Value. - */ - operator JS::Value() const { return mVal; } - JS::Value get() const { return mVal; } - - nsAutoJSValHolder &operator=(JSObject* aOther) { - return *this = OBJECT_TO_JSVAL(aOther); - } - - nsAutoJSValHolder &operator=(JS::Value aOther) { -#ifdef DEBUG - if (aOther.isGCThing() && !aOther.isNull()) { - MOZ_ASSERT(IsHeld(), "Not rooted!"); - } -#endif - mVal = aOther; - return *this; - } - -private: - JS::Heap mVal; - JSRuntime* mRt; -}; - -#endif /* __NSAUTOJSVALHOLDER_H__ */ diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 80a727af1ed..7a3b6f3e5ef 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -129,7 +129,6 @@ #include "nsString.h" #include "nsReadableUtils.h" #include "nsXPIDLString.h" -#include "nsAutoJSValHolder.h" #include "MainThreadUtils.h" From 2f1284f631584e0145603284ae9bd07ef444f600 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 10:23:57 +0000 Subject: [PATCH 082/106] Bug 1107639 - Remove GC roots before the final GC r=terrence --- js/src/gc/GCRuntime.h | 1 + js/src/jsgc.cpp | 14 +++++++++----- js/src/vm/Runtime.cpp | 3 +++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index f71effabace..13913234da3 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -277,6 +277,7 @@ class GCRuntime public: explicit GCRuntime(JSRuntime *rt); bool init(uint32_t maxbytes, uint32_t maxNurseryBytes); + void finishRoots(); void finish(); inline int zeal(); diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 344ca345b48..c3d9496fd90 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -1312,11 +1312,6 @@ GCRuntime::finish() FreeChunkPool(rt, availableChunks_); FreeChunkPool(rt, emptyChunks_); - if (rootsHash.initialized()) - rootsHash.clear(); - - FinishPersistentRootedChains(rt); - if (lock) { PR_DestroyLock(lock); lock = nullptr; @@ -1345,6 +1340,15 @@ js::gc::FinishPersistentRootedChains(JSRuntime *rt) FinishPersistentRootedChain(rt->valuePersistentRooteds); } +void +GCRuntime::finishRoots() +{ + if (rootsHash.initialized()) + rootsHash.clear(); + + FinishPersistentRootedChains(rt); +} + void GCRuntime::setParameter(JSGCParamKey key, uint32_t value) { diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index 1f15f14cb60..e2a7022dd36 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -371,6 +371,9 @@ JSRuntime::~JSRuntime() /* Clear atoms to remove GC roots and heap allocations. */ finishAtoms(); + /* Remove persistent GC roots. */ + gc.finishRoots(); + /* * Flag us as being destroyed. This allows the GC to free things like * interned atoms and Ion trampolines. From 7ba19c1841313d43d43cf2741e4420c4065ac541 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 10:23:57 +0000 Subject: [PATCH 083/106] Bug 1107639 - Use PersistentRooted rather than Add/RemoveRoot API is JSAPI tests r=terrence --- js/src/jsapi-tests/testChromeBuffer.cpp | 30 ++++++--------------- js/src/jsapi-tests/testNullRoot.cpp | 20 +++++--------- js/src/jsapi-tests/testResolveRecursion.cpp | 14 +++------- js/src/jsapi-tests/tests.cpp | 19 +++++-------- js/src/jsapi-tests/tests.h | 5 ++-- 5 files changed, 26 insertions(+), 62 deletions(-) diff --git a/js/src/jsapi-tests/testChromeBuffer.cpp b/js/src/jsapi-tests/testChromeBuffer.cpp index 2af32405943..ec2da6aebac 100644 --- a/js/src/jsapi-tests/testChromeBuffer.cpp +++ b/js/src/jsapi-tests/testChromeBuffer.cpp @@ -25,8 +25,8 @@ static const JSClass global_class = { JS_GlobalObjectTraceHook }; -static JS::Heap trusted_glob; -static JS::Heap trusted_fun; +static JS::PersistentRootedObject trusted_glob; +static JS::PersistentRootedObject trusted_fun; static bool CallTrusted(JSContext *cx, unsigned argc, jsval *vp) @@ -50,12 +50,10 @@ BEGIN_TEST(testChromeBuffer) { JS_SetTrustedPrincipals(rt, &system_principals); - trusted_glob = JS_NewGlobalObject(cx, &global_class, &system_principals, JS::FireOnNewGlobalHook); + trusted_glob.init(cx, JS_NewGlobalObject(cx, &global_class, &system_principals, + JS::FireOnNewGlobalHook)); CHECK(trusted_glob); - if (!JS::AddNamedObjectRoot(cx, &trusted_glob, "trusted-global")) - return false; - JS::RootedFunction fun(cx); /* @@ -68,16 +66,13 @@ BEGIN_TEST(testChromeBuffer) JSAutoCompartment ac(cx, trusted_glob); const char *paramName = "x"; const char *bytes = "return x ? 1 + trusted(x-1) : 0"; - JS::HandleObject global = JS::HandleObject::fromMarkedLocation(trusted_glob.unsafeGet()); JS::CompileOptions options(cx); options.setFileAndLine("", 0); JS::AutoObjectVector emptyScopeChain(cx); CHECK(JS::CompileFunction(cx, emptyScopeChain, options, "trusted", 1, ¶mName, bytes, strlen(bytes), &fun)); - CHECK(JS_DefineProperty(cx, global, "trusted", fun, JSPROP_ENUMERATE)); - trusted_fun = JS_GetFunctionObject(fun); - if (!JS::AddNamedObjectRoot(cx, &trusted_fun, "trusted-function")) - return false; + CHECK(JS_DefineProperty(cx, trusted_glob, "trusted", fun, JSPROP_ENUMERATE)); + trusted_fun.init(cx, JS_GetFunctionObject(fun)); } JS::RootedValue v(cx, JS::ObjectValue(*trusted_fun)); @@ -123,13 +118,12 @@ BEGIN_TEST(testChromeBuffer) " return 'From trusted: ' + " " e.name + ': ' + e.message; " "} "; - JS::HandleObject global = JS::HandleObject::fromMarkedLocation(trusted_glob.unsafeGet()); JS::CompileOptions options(cx); options.setFileAndLine("", 0); JS::AutoObjectVector emptyScopeChain(cx); CHECK(JS::CompileFunction(cx, emptyScopeChain, options, "trusted", 1, ¶mName, bytes, strlen(bytes), &fun)); - CHECK(JS_DefineProperty(cx, global, "trusted", fun, JSPROP_ENUMERATE)); + CHECK(JS_DefineProperty(cx, trusted_glob, "trusted", fun, JSPROP_ENUMERATE)); trusted_fun = JS_GetFunctionObject(fun); } @@ -164,13 +158,12 @@ BEGIN_TEST(testChromeBuffer) { JSAutoCompartment ac(cx, trusted_glob); const char *bytes = "return 42"; - JS::HandleObject global = JS::HandleObject::fromMarkedLocation(trusted_glob.unsafeGet()); JS::CompileOptions options(cx); options.setFileAndLine("", 0); JS::AutoObjectVector emptyScopeChain(cx); CHECK(JS::CompileFunction(cx, emptyScopeChain, options, "trusted", 0, nullptr, bytes, strlen(bytes), &fun)); - CHECK(JS_DefineProperty(cx, global, "trusted", fun, JSPROP_ENUMERATE)); + CHECK(JS_DefineProperty(cx, trusted_glob, "trusted", fun, JSPROP_ENUMERATE)); trusted_fun = JS_GetFunctionObject(fun); } @@ -198,11 +191,4 @@ BEGIN_TEST(testChromeBuffer) return true; } -virtual void uninit() MOZ_OVERRIDE { - trusted_glob = nullptr; - trusted_fun = nullptr; - JS::RemoveObjectRoot(cx, &trusted_glob); - JS::RemoveObjectRoot(cx, &trusted_fun); - JSAPITest::uninit(); -} END_TEST(testChromeBuffer) diff --git a/js/src/jsapi-tests/testNullRoot.cpp b/js/src/jsapi-tests/testNullRoot.cpp index 5db2d29128b..60ccbe5ce9a 100644 --- a/js/src/jsapi-tests/testNullRoot.cpp +++ b/js/src/jsapi-tests/testNullRoot.cpp @@ -9,25 +9,17 @@ BEGIN_TEST(testNullRoot) { - obj = nullptr; - CHECK(JS::AddObjectRoot(cx, &obj)); - - str = nullptr; - CHECK(JS::AddStringRoot(cx, &str)); - - script = nullptr; - CHECK(JS::AddNamedScriptRoot(cx, &script, "testNullRoot's script")); + obj.init(cx, nullptr); + str.init(cx, nullptr); + script.init(cx, nullptr); // This used to crash because obj was nullptr. JS_GC(cx->runtime()); - JS::RemoveObjectRoot(cx, &obj); - JS::RemoveStringRoot(cx, &str); - JS::RemoveScriptRoot(cx, &script); return true; } -JS::Heap obj; -JS::Heap str; -JS::Heap script; +JS::PersistentRootedObject obj; +JS::PersistentRootedString str; +JS::PersistentRootedScript script; END_TEST(testNullRoot) diff --git a/js/src/jsapi-tests/testResolveRecursion.cpp b/js/src/jsapi-tests/testResolveRecursion.cpp index 9caa06b2b26..ee5fde890d8 100644 --- a/js/src/jsapi-tests/testResolveRecursion.cpp +++ b/js/src/jsapi-tests/testResolveRecursion.cpp @@ -25,13 +25,9 @@ BEGIN_TEST(testResolveRecursion) my_resolve }; - obj1 = obj2 = nullptr; - JS::AddObjectRoot(cx, &obj1); - JS::AddObjectRoot(cx, &obj2); - - obj1 = JS_NewObject(cx, &my_resolve_class, JS::NullPtr(), JS::NullPtr()); + obj1.init(cx, JS_NewObject(cx, &my_resolve_class, JS::NullPtr(), JS::NullPtr())); CHECK(obj1); - obj2 = JS_NewObject(cx, &my_resolve_class, JS::NullPtr(), JS::NullPtr()); + obj2.init(cx, JS_NewObject(cx, &my_resolve_class, JS::NullPtr(), JS::NullPtr())); CHECK(obj2); JS_SetPrivate(obj1, this); JS_SetPrivate(obj2, this); @@ -53,13 +49,11 @@ BEGIN_TEST(testResolveRecursion) obj1 = nullptr; obj2 = nullptr; - JS::RemoveObjectRoot(cx, &obj1); - JS::RemoveObjectRoot(cx, &obj2); return true; } -JS::Heap obj1; -JS::Heap obj2; +JS::PersistentRootedObject obj1; +JS::PersistentRootedObject obj2; int resolveEntryCount; int resolveExitCount; diff --git a/js/src/jsapi-tests/tests.cpp b/js/src/jsapi-tests/tests.cpp index b0da687a325..63f989340b2 100644 --- a/js/src/jsapi-tests/tests.cpp +++ b/js/src/jsapi-tests/tests.cpp @@ -21,7 +21,8 @@ bool JSAPITest::init() if (!cx) return false; JS_BeginRequest(cx); - JS::RootedObject global(cx, createGlobal()); + global.init(rt); + createGlobal(); if (!global) return false; JS_EnterCompartment(cx, global); @@ -36,7 +37,6 @@ void JSAPITest::uninit() } if (global) { JS_LeaveCompartment(cx, nullptr); - JS::RemoveObjectRoot(cx, &global); global = nullptr; } if (cx) { @@ -53,7 +53,6 @@ void JSAPITest::uninit() bool JSAPITest::exec(const char *bytes, const char *filename, int lineno) { JS::RootedValue v(cx); - JS::HandleObject global = JS::HandleObject::fromMarkedLocation(this->global.unsafeGet()); JS::CompileOptions opts(cx); opts.setFileAndLine(filename, lineno); return JS::Evaluate(cx, global, opts, bytes, strlen(bytes), &v) || @@ -63,7 +62,6 @@ bool JSAPITest::exec(const char *bytes, const char *filename, int lineno) bool JSAPITest::evaluate(const char *bytes, const char *filename, int lineno, JS::MutableHandleValue vp) { - JS::HandleObject global = JS::HandleObject::fromMarkedLocation(this->global.unsafeGet()); JS::CompileOptions opts(cx); opts.setFileAndLine(filename, lineno); return JS::Evaluate(cx, global, opts, bytes, strlen(bytes), vp) || @@ -72,7 +70,6 @@ bool JSAPITest::evaluate(const char *bytes, const char *filename, int lineno, bool JSAPITest::definePrint() { - JS::HandleObject global = JS::HandleObject::fromMarkedLocation(this->global.unsafeGet()); return JS_DefineFunction(cx, global, "print", (JSNative) print, 0, 0); } @@ -84,16 +81,13 @@ JSObject * JSAPITest::createGlobal(JSPrincipals *principals) global = JS_NewGlobalObject(cx, getGlobalClass(), principals, JS::FireOnNewGlobalHook, options); if (!global) return nullptr; - JS::AddNamedObjectRoot(cx, &global, "test-global"); - JS::HandleObject globalHandle = JS::HandleObject::fromMarkedLocation(global.unsafeGet()); - JSAutoCompartment ac(cx, globalHandle); + + JSAutoCompartment ac(cx, global); /* Populate the global object with the standard globals, like Object and Array. */ - if (!JS_InitStandardClasses(cx, globalHandle)) { + if (!JS_InitStandardClasses(cx, global)) global = nullptr; - JS::RemoveObjectRoot(cx, &global); - } return global; } @@ -124,8 +118,7 @@ int main(int argc, char *argv[]) continue; } - JS::HandleObject global = JS::HandleObject::fromMarkedLocation(test->global.unsafeGet()); - if (test->run(global)) { + if (test->run(test->global)) { printf("TEST-PASS | %s | ok\n", name); } else { JSAPITestString messages = test->messages(); diff --git a/js/src/jsapi-tests/tests.h b/js/src/jsapi-tests/tests.h index 816b9b67f5e..fd5fe16ea7e 100644 --- a/js/src/jsapi-tests/tests.h +++ b/js/src/jsapi-tests/tests.h @@ -56,13 +56,12 @@ class JSAPITest JSRuntime *rt; JSContext *cx; - JS::Heap global; + JS::PersistentRootedObject global; bool knownFail; JSAPITestString msgs; JSCompartment *oldCompartment; - JSAPITest() : rt(nullptr), cx(nullptr), global(nullptr), - knownFail(false), oldCompartment(nullptr) { + JSAPITest() : rt(nullptr), cx(nullptr), knownFail(false), oldCompartment(nullptr) { next = list; list = this; } From a55cb2ae54716e017e8af26a4179ffae5b420b96 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 10:23:57 +0000 Subject: [PATCH 084/106] Bug 1107639 - Use PersistentRootedValue in JSExceptionState r=terrence --- js/src/jsapi.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 000be9d8e47..242265127fe 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -5687,8 +5687,9 @@ JS::AutoSaveExceptionState::~AutoSaveExceptionState() } struct JSExceptionState { + JSExceptionState(JSContext *cx) : exception(cx) {} bool throwing; - jsval exception; + PersistentRootedValue exception; }; JS_PUBLIC_API(JSExceptionState *) @@ -5698,13 +5699,9 @@ JS_SaveExceptionState(JSContext *cx) AssertHeapIsIdle(cx); CHECK_REQUEST(cx); - state = cx->pod_malloc(); - if (state) { - state->throwing = - JS_GetPendingException(cx, MutableHandleValue::fromMarkedLocation(&state->exception)); - if (state->throwing && state->exception.isGCThing()) - AddValueRoot(cx, &state->exception, "JSExceptionState.exception"); - } + state = cx->new_(cx); + if (state) + state->throwing = JS_GetPendingException(cx, &state->exception); return state; } @@ -5715,7 +5712,7 @@ JS_RestoreExceptionState(JSContext *cx, JSExceptionState *state) CHECK_REQUEST(cx); if (state) { if (state->throwing) - JS_SetPendingException(cx, HandleValue::fromMarkedLocation(&state->exception)); + JS_SetPendingException(cx, state->exception); else JS_ClearPendingException(cx); JS_DropExceptionState(cx, state); @@ -5727,13 +5724,7 @@ JS_DropExceptionState(JSContext *cx, JSExceptionState *state) { AssertHeapIsIdle(cx); CHECK_REQUEST(cx); - if (state) { - if (state->throwing && state->exception.isGCThing()) { - assertSameCompartment(cx, state->exception); - RemoveRoot(cx->runtime(), &state->exception); - } - js_free(state); - } + js_delete(state); } JS_PUBLIC_API(JSErrorReport *) From 0180ce818c5606e3284839d56e4e020cac72f418 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 10:23:58 +0000 Subject: [PATCH 085/106] Bug 1107639 - Remove public Add/RemoveRoot API r=terrence --- js/src/gc/GCRuntime.h | 11 +++- js/src/gc/RootMarking.cpp | 16 +---- js/src/jsapi.cpp | 124 -------------------------------------- js/src/jsapi.h | 77 ----------------------- js/src/jsgc.cpp | 83 ++++--------------------- js/src/jsgc.h | 40 ------------ 6 files changed, 21 insertions(+), 330 deletions(-) diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index 13913234da3..be3a852c5e2 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -272,6 +272,11 @@ class ChainedIter T operator->() const { return get(); } }; +typedef js::HashMap, + js::SystemAllocPolicy> RootedValueMap; + class GCRuntime { public: @@ -284,8 +289,8 @@ class GCRuntime inline bool upcomingZealousGC(); inline bool needZealousGC(); - template bool addRoot(T *rp, const char *name, JSGCRootType rootType); - void removeRoot(void *rp); + bool addRoot(Value *vp, const char *name); + void removeRoot(Value *vp); void setMarkStackLimit(size_t limit); void setParameter(JSGCParamKey key, uint32_t value); @@ -665,7 +670,7 @@ class GCRuntime // so as to reduce the cost of operations on the available lists. ChunkPool fullChunks_; - js::RootedValueMap rootsHash; + RootedValueMap rootsHash; size_t maxMallocBytes; diff --git a/js/src/gc/RootMarking.cpp b/js/src/gc/RootMarking.cpp index 1db4313cac6..6b593b784f5 100644 --- a/js/src/gc/RootMarking.cpp +++ b/js/src/gc/RootMarking.cpp @@ -445,21 +445,7 @@ js::gc::GCRuntime::markRuntime(JSTracer *trc, for (RootRange r = rootsHash.all(); !r.empty(); r.popFront()) { const RootEntry &entry = r.front(); - const char *name = entry.value().name ? entry.value().name : "root"; - JSGCRootType type = entry.value().type; - void *key = entry.key(); - if (type == JS_GC_ROOT_VALUE_PTR) { - MarkValueRoot(trc, reinterpret_cast(key), name); - } else if (*reinterpret_cast(key)){ - if (type == JS_GC_ROOT_STRING_PTR) - MarkStringRoot(trc, reinterpret_cast(key), name); - else if (type == JS_GC_ROOT_OBJECT_PTR) - MarkObjectRoot(trc, reinterpret_cast(key), name); - else if (type == JS_GC_ROOT_SCRIPT_PTR) - MarkScriptRoot(trc, reinterpret_cast(key), name); - else - MOZ_CRASH("unexpected js::RootInfo::type value"); - } + MarkValueRoot(trc, entry.key(), entry.value()); } MarkPersistentRootedChains(trc); diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 242265127fe..e4ce1121be6 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -1500,130 +1500,6 @@ JS_strdup(JSRuntime *rt, const char *s) #undef JS_AddRoot -JS_PUBLIC_API(bool) -JS::AddValueRoot(JSContext *cx, JS::Heap *vp) -{ - AssertHeapIsIdle(cx); - CHECK_REQUEST(cx); - return AddValueRoot(cx, vp->unsafeGet(), nullptr); -} - -JS_PUBLIC_API(bool) -JS::AddStringRoot(JSContext *cx, JS::Heap *rp) -{ - AssertHeapIsIdle(cx); - CHECK_REQUEST(cx); - return AddStringRoot(cx, rp->unsafeGet(), nullptr); -} - -JS_PUBLIC_API(bool) -JS::AddObjectRoot(JSContext *cx, JS::Heap *rp) -{ - AssertHeapIsIdle(cx); - CHECK_REQUEST(cx); - return AddObjectRoot(cx, rp->unsafeGet(), nullptr); -} - -JS_PUBLIC_API(bool) -JS::AddNamedValueRoot(JSContext *cx, JS::Heap *vp, const char *name) -{ - AssertHeapIsIdle(cx); - CHECK_REQUEST(cx); - return AddValueRoot(cx, vp->unsafeGet(), name); -} - -JS_PUBLIC_API(bool) -JS::AddNamedValueRootRT(JSRuntime *rt, JS::Heap *vp, const char *name) -{ - return AddValueRootRT(rt, vp->unsafeGet(), name); -} - -JS_PUBLIC_API(bool) -JS::AddNamedStringRoot(JSContext *cx, JS::Heap *rp, const char *name) -{ - AssertHeapIsIdle(cx); - CHECK_REQUEST(cx); - return AddStringRoot(cx, rp->unsafeGet(), name); -} - -JS_PUBLIC_API(bool) -JS::AddNamedObjectRoot(JSContext *cx, JS::Heap *rp, const char *name) -{ - AssertHeapIsIdle(cx); - CHECK_REQUEST(cx); - return AddObjectRoot(cx, rp->unsafeGet(), name); -} - -JS_PUBLIC_API(bool) -JS::AddNamedScriptRoot(JSContext *cx, JS::Heap *rp, const char *name) -{ - AssertHeapIsIdle(cx); - CHECK_REQUEST(cx); - return AddScriptRoot(cx, rp->unsafeGet(), name); -} - -/* We allow unrooting from finalizers within the GC */ - -JS_PUBLIC_API(void) -JS::RemoveValueRoot(JSContext *cx, JS::Heap *vp) -{ - CHECK_REQUEST(cx); - RemoveRoot(cx->runtime(), (void *)vp); - *vp = UndefinedValue(); -} - -JS_PUBLIC_API(void) -JS::RemoveStringRoot(JSContext *cx, JS::Heap *rp) -{ - CHECK_REQUEST(cx); - RemoveRoot(cx->runtime(), (void *)rp); - *rp = nullptr; -} - -JS_PUBLIC_API(void) -JS::RemoveObjectRoot(JSContext *cx, JS::Heap *rp) -{ - CHECK_REQUEST(cx); - RemoveRoot(cx->runtime(), (void *)rp); - *rp = nullptr; -} - -JS_PUBLIC_API(void) -JS::RemoveScriptRoot(JSContext *cx, JS::Heap *rp) -{ - CHECK_REQUEST(cx); - RemoveRoot(cx->runtime(), (void *)rp); - *rp = nullptr; -} - -JS_PUBLIC_API(void) -JS::RemoveValueRootRT(JSRuntime *rt, JS::Heap *vp) -{ - RemoveRoot(rt, (void *)vp); - *vp = UndefinedValue(); -} - -JS_PUBLIC_API(void) -JS::RemoveStringRootRT(JSRuntime *rt, JS::Heap *rp) -{ - RemoveRoot(rt, (void *)rp); - *rp = nullptr; -} - -JS_PUBLIC_API(void) -JS::RemoveObjectRootRT(JSRuntime *rt, JS::Heap *rp) -{ - RemoveRoot(rt, (void *)rp); - *rp = nullptr; -} - -JS_PUBLIC_API(void) -JS::RemoveScriptRootRT(JSRuntime *rt, JS::Heap *rp) -{ - RemoveRoot(rt, (void *)rp); - *rp = nullptr; -} - JS_PUBLIC_API(bool) JS_AddExtraGCRootsTracer(JSRuntime *rt, JSTraceDataOp traceOp, void *data) { diff --git a/js/src/jsapi.h b/js/src/jsapi.h index a69b6edf1cb..2b099979263 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -1996,83 +1996,6 @@ JS_strdup(JSContext *cx, const char *s); extern JS_PUBLIC_API(char *) JS_strdup(JSRuntime *rt, const char *s); -namespace JS { - -/* - * A GC root is a pointer to a jsval, JSObject * or JSString * that itself - * points into the GC heap. JS_AddValueRoot takes a pointer to a jsval and - * JS_AddGCThingRoot takes a pointer to a JSObject * or JString *. - * - * Note that, since JS_Add*Root stores the address of a variable (of type - * jsval, JSString *, or JSObject *), that variable must live until - * JS_Remove*Root is called to remove that variable. For example, after: - * - * void some_function() { - * jsval v; - * JS_AddNamedValueRoot(cx, &v, "name"); - * - * the caller must perform - * - * JS_RemoveValueRoot(cx, &v); - * - * before some_function() returns. - * - * Also, use JS_AddNamed*Root(cx, &structPtr->memberObj, "structPtr->memberObj") - * in preference to JS_Add*Root(cx, &structPtr->memberObj), in order to identify - * roots by their source callsites. This way, you can find the callsite while - * debugging if you should fail to do JS_Remove*Root(cx, &structPtr->memberObj) - * before freeing structPtr's memory. - */ -extern JS_PUBLIC_API(bool) -AddValueRoot(JSContext *cx, JS::Heap *vp); - -extern JS_PUBLIC_API(bool) -AddStringRoot(JSContext *cx, JS::Heap *rp); - -extern JS_PUBLIC_API(bool) -AddObjectRoot(JSContext *cx, JS::Heap *rp); - -extern JS_PUBLIC_API(bool) -AddNamedValueRoot(JSContext *cx, JS::Heap *vp, const char *name); - -extern JS_PUBLIC_API(bool) -AddNamedValueRootRT(JSRuntime *rt, JS::Heap *vp, const char *name); - -extern JS_PUBLIC_API(bool) -AddNamedStringRoot(JSContext *cx, JS::Heap *rp, const char *name); - -extern JS_PUBLIC_API(bool) -AddNamedObjectRoot(JSContext *cx, JS::Heap *rp, const char *name); - -extern JS_PUBLIC_API(bool) -AddNamedScriptRoot(JSContext *cx, JS::Heap *rp, const char *name); - -extern JS_PUBLIC_API(void) -RemoveValueRoot(JSContext *cx, JS::Heap *vp); - -extern JS_PUBLIC_API(void) -RemoveStringRoot(JSContext *cx, JS::Heap *rp); - -extern JS_PUBLIC_API(void) -RemoveObjectRoot(JSContext *cx, JS::Heap *rp); - -extern JS_PUBLIC_API(void) -RemoveScriptRoot(JSContext *cx, JS::Heap *rp); - -extern JS_PUBLIC_API(void) -RemoveValueRootRT(JSRuntime *rt, JS::Heap *vp); - -extern JS_PUBLIC_API(void) -RemoveStringRootRT(JSRuntime *rt, JS::Heap *rp); - -extern JS_PUBLIC_API(void) -RemoveObjectRootRT(JSRuntime *rt, JS::Heap *rp); - -extern JS_PUBLIC_API(void) -RemoveScriptRootRT(JSRuntime *rt, JS::Heap *rp); - -} /* namespace JS */ - /* * Register externally maintained GC roots. * diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index c3d9496fd90..937052ad06b 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -1495,10 +1495,6 @@ GCRuntime::setMarkStackLimit(size_t limit) marker.setMaxCapacity(limit); } -template struct BarrierOwner {}; -template struct BarrierOwner { typedef T result; }; -template <> struct BarrierOwner { typedef HeapValue result; }; - bool GCRuntime::addBlackRootsTracer(JSTraceDataOp traceOp, void *data) { @@ -1596,9 +1592,8 @@ GCRuntime::setSliceCallback(JS::GCSliceCallback callback) { return stats.setSliceCallback(callback); } -template bool -GCRuntime::addRoot(T *rp, const char *name, JSGCRootType rootType) +GCRuntime::addRoot(Value *vp, const char *name) { /* * Sometimes Firefox will hold weak references to objects and then convert @@ -1607,87 +1602,33 @@ GCRuntime::addRoot(T *rp, const char *name, JSGCRootType rootType) * cases. */ if (isIncrementalGCInProgress()) - BarrierOwner::result::writeBarrierPre(*rp); + HeapValue::writeBarrierPre(*vp); - return rootsHash.put((void *)rp, RootInfo(name, rootType)); + return rootsHash.put(vp, name); } void -GCRuntime::removeRoot(void *rp) +GCRuntime::removeRoot(Value *vp) { - rootsHash.remove(rp); + rootsHash.remove(vp); poke(); } -template -static bool -AddRoot(JSRuntime *rt, T *rp, const char *name, JSGCRootType rootType) -{ - return rt->gc.addRoot(rp, name, rootType); -} - -template -static bool -AddRoot(JSContext *cx, T *rp, const char *name, JSGCRootType rootType) -{ - bool ok = cx->runtime()->gc.addRoot(rp, name, rootType); - if (!ok) - JS_ReportOutOfMemory(cx); - return ok; -} - -bool -js::AddValueRoot(JSContext *cx, Value *vp, const char *name) -{ - return AddRoot(cx, vp, name, JS_GC_ROOT_VALUE_PTR); -} - -extern bool -js::AddValueRootRT(JSRuntime *rt, js::Value *vp, const char *name) -{ - return AddRoot(rt, vp, name, JS_GC_ROOT_VALUE_PTR); -} - -extern bool -js::AddStringRoot(JSContext *cx, JSString **rp, const char *name) -{ - return AddRoot(cx, rp, name, JS_GC_ROOT_STRING_PTR); -} - -extern bool -js::AddObjectRoot(JSContext *cx, JSObject **rp, const char *name) -{ - return AddRoot(cx, rp, name, JS_GC_ROOT_OBJECT_PTR); -} - -extern bool -js::AddObjectRoot(JSRuntime *rt, JSObject **rp, const char *name) -{ - return AddRoot(rt, rp, name, JS_GC_ROOT_OBJECT_PTR); -} - -extern bool -js::AddScriptRoot(JSContext *cx, JSScript **rp, const char *name) -{ - return AddRoot(cx, rp, name, JS_GC_ROOT_SCRIPT_PTR); -} - extern JS_FRIEND_API(bool) js::AddRawValueRoot(JSContext *cx, Value *vp, const char *name) { - return AddRoot(cx, vp, name, JS_GC_ROOT_VALUE_PTR); + MOZ_ASSERT(vp); + MOZ_ASSERT(name); + bool ok = cx->runtime()->gc.addRoot(vp, name); + if (!ok) + JS_ReportOutOfMemory(cx); + return ok; } extern JS_FRIEND_API(void) js::RemoveRawValueRoot(JSContext *cx, Value *vp) { - RemoveRoot(cx->runtime(), vp); -} - -void -js::RemoveRoot(JSRuntime *rt, void *rp) -{ - rt->gc.removeRoot(rp); + cx->runtime()->gc.removeRoot(vp); } void diff --git a/js/src/jsgc.h b/js/src/jsgc.h index 7cb3c6ed164..f8e92abff5a 100644 --- a/js/src/jsgc.h +++ b/js/src/jsgc.h @@ -832,46 +832,6 @@ const size_t MAX_EMPTY_CHUNK_AGE = 4; } /* namespace gc */ -typedef enum JSGCRootType { - JS_GC_ROOT_VALUE_PTR, - JS_GC_ROOT_STRING_PTR, - JS_GC_ROOT_OBJECT_PTR, - JS_GC_ROOT_SCRIPT_PTR -} JSGCRootType; - -struct RootInfo { - RootInfo() {} - RootInfo(const char *name, JSGCRootType type) : name(name), type(type) {} - const char *name; - JSGCRootType type; -}; - -typedef js::HashMap, - js::SystemAllocPolicy> RootedValueMap; - -extern bool -AddValueRoot(JSContext *cx, js::Value *vp, const char *name); - -extern bool -AddValueRootRT(JSRuntime *rt, js::Value *vp, const char *name); - -extern bool -AddStringRoot(JSContext *cx, JSString **rp, const char *name); - -extern bool -AddObjectRoot(JSContext *cx, JSObject **rp, const char *name); - -extern bool -AddObjectRoot(JSRuntime *rt, JSObject **rp, const char *name); - -extern bool -AddScriptRoot(JSContext *cx, JSScript **rp, const char *name); - -extern void -RemoveRoot(JSRuntime *rt, void *rp); - } /* namespace js */ extern bool From eded800b4f71e465a5e62e3d16037c0e3cdc58e8 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Fri, 23 Jan 2015 11:33:31 +0100 Subject: [PATCH 086/106] Backed out changeset 2b79bd646942 (bug 1109968) for b2g ics m9 test failures --- dom/html/HTMLAnchorElement.cpp | 16 +------------ layout/base/tests/bug1109968-1-ref.html | 17 -------------- layout/base/tests/bug1109968-1.html | 23 ------------------- layout/base/tests/bug1109968-2-ref.html | 17 -------------- layout/base/tests/bug1109968-2.html | 23 ------------------- layout/base/tests/mochitest.ini | 4 ---- .../base/tests/test_reftests_with_caret.html | 2 -- 7 files changed, 1 insertion(+), 101 deletions(-) delete mode 100644 layout/base/tests/bug1109968-1-ref.html delete mode 100644 layout/base/tests/bug1109968-1.html delete mode 100644 layout/base/tests/bug1109968-2-ref.html delete mode 100644 layout/base/tests/bug1109968-2.html diff --git a/dom/html/HTMLAnchorElement.cpp b/dom/html/HTMLAnchorElement.cpp index 139ad2e8dfc..0672b45aeaa 100644 --- a/dom/html/HTMLAnchorElement.cpp +++ b/dom/html/HTMLAnchorElement.cpp @@ -193,18 +193,6 @@ HTMLAnchorElement::UnbindFromTree(bool aDeep, bool aNullParent) nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent); } -static bool -IsNodeInEditableRegion(nsINode* aNode) -{ - while (aNode) { - if (aNode->IsEditable()) { - return true; - } - aNode = aNode->GetParent(); - } - return false; -} - bool HTMLAnchorElement::IsHTMLFocusable(bool aWithMouse, bool *aIsFocusable, int32_t *aTabIndex) @@ -226,9 +214,7 @@ HTMLAnchorElement::IsHTMLFocusable(bool aWithMouse, } } - // Links that are in an editable region should never be focusable, even if - // they are in a contenteditable="false" region. - if (IsNodeInEditableRegion(this)) { + if (IsEditable()) { if (aTabIndex) { *aTabIndex = -1; } diff --git a/layout/base/tests/bug1109968-1-ref.html b/layout/base/tests/bug1109968-1-ref.html deleted file mode 100644 index 28bcf608a73..00000000000 --- a/layout/base/tests/bug1109968-1-ref.html +++ /dev/null @@ -1,17 +0,0 @@ - - -
foobaz
- - - diff --git a/layout/base/tests/bug1109968-1.html b/layout/base/tests/bug1109968-1.html deleted file mode 100644 index a8d0d216fa8..00000000000 --- a/layout/base/tests/bug1109968-1.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - -
foobaz
- - - diff --git a/layout/base/tests/bug1109968-2-ref.html b/layout/base/tests/bug1109968-2-ref.html deleted file mode 100644 index 9638c35b331..00000000000 --- a/layout/base/tests/bug1109968-2-ref.html +++ /dev/null @@ -1,17 +0,0 @@ - - -
foo
bar
- - - diff --git a/layout/base/tests/bug1109968-2.html b/layout/base/tests/bug1109968-2.html deleted file mode 100644 index 159311ad39a..00000000000 --- a/layout/base/tests/bug1109968-2.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - -
foo
bar
- - - diff --git a/layout/base/tests/mochitest.ini b/layout/base/tests/mochitest.ini index 8538c1a8d13..62e6c04cfbb 100644 --- a/layout/base/tests/mochitest.ini +++ b/layout/base/tests/mochitest.ini @@ -55,10 +55,6 @@ support-files = bug644768.html bug1061468.html bug1061468-ref.html - bug1109968-1-ref.html - bug1109968-1.html - bug1109968-2-ref.html - bug1109968-2.html [test_preserve3d_sorting_hit_testing.html] [test_after_paint_pref.html] diff --git a/layout/base/tests/test_reftests_with_caret.html b/layout/base/tests/test_reftests_with_caret.html index e43042093c7..d3680d1099f 100644 --- a/layout/base/tests/test_reftests_with_caret.html +++ b/layout/base/tests/test_reftests_with_caret.html @@ -109,8 +109,6 @@ var tests = [ [ 'bug613807-1.html' , 'bug613807-1-ref.html' ] , [ 'bug1082486-1.html', 'bug1082486-1-ref.html'] , [ 'bug1082486-2.html', 'bug1082486-2-ref.html'] , - [ 'bug1109968-1.html', 'bug1109968-1-ref.html'] , - [ 'bug1109968-2.html', 'bug1109968-2-ref.html'] , // The following test cases are all involving with one sending // synthesizeKey(), the other without. They ought to be failed // when touch caret preference on. Test them with preference off. From 38b317d7790b6ba3dcc57ae46ff7c00a1c24a617 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Mon, 12 Jan 2015 13:32:11 +0100 Subject: [PATCH 087/106] Bug 1119266 - Properly wrap the table index in ComputeCustom on ARM. r=karlt On ARM, casting a negative float to an unsigned integer yields zero, whereas on x86, it wraps. When the OscillatorNode had a negative frequency, the code would just interpolate between the first and second value of the wave table, instead of interpolating backward. --- dom/media/webaudio/OscillatorNode.cpp | 4 ++-- dom/media/webaudio/test/mochitest.ini | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dom/media/webaudio/OscillatorNode.cpp b/dom/media/webaudio/OscillatorNode.cpp index 9a39efc25f4..fe4ef4bef93 100644 --- a/dom/media/webaudio/OscillatorNode.cpp +++ b/dom/media/webaudio/OscillatorNode.cpp @@ -258,8 +258,8 @@ public: } // Bilinear interpolation between adjacent samples in each table. float floorPhase = floorf(mPhase); - uint32_t j1 = floorPhase; - j1 &= indexMask; + int j1Signed = static_cast(floorPhase); + uint32_t j1 = j1Signed & indexMask; uint32_t j2 = j1 + 1; j2 &= indexMask; diff --git a/dom/media/webaudio/test/mochitest.ini b/dom/media/webaudio/test/mochitest.ini index 83b47d29d1a..be8856b4793 100644 --- a/dom/media/webaudio/test/mochitest.ini +++ b/dom/media/webaudio/test/mochitest.ini @@ -127,7 +127,6 @@ skip-if = (toolkit == 'gonk' && !debug) || android_version == '10' # Android: bu [test_oscillatorNode.html] [test_oscillatorNode2.html] [test_oscillatorNodeNegativeFrequency.html] -skip-if = (toolkit == 'gonk') || (toolkit == 'android') [test_oscillatorNodePassThrough.html] [test_oscillatorNodeStart.html] [test_oscillatorTypeChange.html] From 41dfbc7cc64cd128ec7e13a01d04e205f62609a3 Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Wed, 21 Jan 2015 08:40:00 +0100 Subject: [PATCH 088/106] Bug 1124102 - Fix preloading of mozSettings API. r=fabrice In the past, we used to use |navigator.mozSettings| call in preload.js to make sure the SettingsManager.js was loaded for improving access time. Checking the behavior, it turns out that |navigator| in non existent at this point and thus this was not helping at all. We fix this by instead forcing creating an instance of settingsManager. Measurements shows that this reduces the time spent for the call |var settings = navigator.mozSettings| by 20ms on Flame, going from ~30ms to ~10ms. --- dom/ipc/preload.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dom/ipc/preload.js b/dom/ipc/preload.js index 742bb250216..a897c3f5ede 100644 --- a/dom/ipc/preload.js +++ b/dom/ipc/preload.js @@ -74,14 +74,9 @@ const BrowserElementIsPreloaded = true; Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci["nsIAppStartup"]); Cc["@mozilla.org/uriloader;1"].getService(Ci["nsIURILoader"]); Cc["@mozilla.org/cspcontext;1"].createInstance(Ci["nsIContentSecurityPolicy"]); + Cc["@mozilla.org/settingsManager;1"].createInstance(Ci["nsISupports"]); /* Applications Specific Helper */ - try { - // May throw if we don't have the settings permission - navigator.mozSettings; - } catch(e) { - } - try { if (Services.prefs.getBoolPref("dom.sysmsg.enabled")) { Cc["@mozilla.org/system-message-manager;1"].getService(Ci["nsIDOMNavigatorSystemMessages"]); From 1356d2d23e08c4dfbfae3de51ae65d86f676db2a Mon Sep 17 00:00:00 2001 From: Honza Bambas Date: Thu, 22 Jan 2015 13:51:00 +0100 Subject: [PATCH 089/106] Bug 1123840 - "crash in libsystem_platform.dylib@0x51e0". r=honzab.moz --- netwerk/cache2/CacheEntry.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netwerk/cache2/CacheEntry.cpp b/netwerk/cache2/CacheEntry.cpp index a8aec185c03..93207ca3b94 100644 --- a/netwerk/cache2/CacheEntry.cpp +++ b/netwerk/cache2/CacheEntry.cpp @@ -610,7 +610,8 @@ bool CacheEntry::InvokeCallbacks(bool aReadOnly) // returns RECHECK_AFTER_WRITE_FINISHED. If we would stop the loop, other // readers or potential writers would be unnecessarily kept from being // invoked. - mCallbacks.InsertElementAt(i, callback); + size_t pos = std::min(mCallbacks.Length(), static_cast(i)); + mCallbacks.InsertElementAt(pos, callback); ++i; } } From 21f03cea78b6a44e2e80e263a23ea093c19ccfce Mon Sep 17 00:00:00 2001 From: KuoE0 Date: Thu, 22 Jan 2015 22:25:00 +0100 Subject: [PATCH 090/106] Bug 1123622 - add trusted attribute to complete the permission table of tv. r=fabrice --- dom/apps/PermissionsTable.jsm | 1 + 1 file changed, 1 insertion(+) diff --git a/dom/apps/PermissionsTable.jsm b/dom/apps/PermissionsTable.jsm index e5603929577..47b2e2d8b6e 100644 --- a/dom/apps/PermissionsTable.jsm +++ b/dom/apps/PermissionsTable.jsm @@ -509,6 +509,7 @@ this.PermissionsTable = { geolocation: { }, "tv": { app: DENY_ACTION, + trusted: DENY_ACTION, privileged: DENY_ACTION, certified: ALLOW_ACTION }, From 6902281fe576bfae72dd8ce2e96c201c77a4ffd8 Mon Sep 17 00:00:00 2001 From: Valentin Gosu Date: Sun, 18 Jan 2015 00:10:38 +0200 Subject: [PATCH 091/106] Bug 1122948 - .hash shouldn't be encoded/decoded for WorkerLocation. r=mrbkap --- dom/workers/WorkerPrivate.cpp | 2 +- .../meta/workers/WorkerLocation_hash_encoding.htm.ini | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 testing/web-platform/meta/workers/WorkerLocation_hash_encoding.htm.ini diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 8f2d8f469e3..f4c6bac57d5 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -3520,7 +3520,7 @@ WorkerPrivateParent::SetBaseURI(nsIURI* aBaseURI) if (NS_SUCCEEDED(aBaseURI->GetRef(temp)) && !temp.IsEmpty()) { nsCOMPtr converter = do_GetService(NS_ITEXTTOSUBURI_CONTRACTID); - if (converter) { + if (converter && nsContentUtils::EncodeDecodeURLHash()) { nsCString charset; nsAutoString unicodeRef; if (NS_SUCCEEDED(aBaseURI->GetOriginCharset(charset)) && diff --git a/testing/web-platform/meta/workers/WorkerLocation_hash_encoding.htm.ini b/testing/web-platform/meta/workers/WorkerLocation_hash_encoding.htm.ini deleted file mode 100644 index 81add633be8..00000000000 --- a/testing/web-platform/meta/workers/WorkerLocation_hash_encoding.htm.ini +++ /dev/null @@ -1,8 +0,0 @@ -[WorkerLocation_hash_encoding.htm] - type: testharness - [Test Description: WorkerLocation.hash returns \'#question%3f\' from input \'http://example.com/carrot#question%3f\'] - expected: FAIL - - [ WorkerLocation.hash with url encoding string ] - expected: FAIL - From a4a3c0a4d7e1b7c33de44a5c3a88202e851bf2e6 Mon Sep 17 00:00:00 2001 From: Morris Tseng Date: Mon, 19 Jan 2015 23:12:00 +0100 Subject: [PATCH 092/106] Bug 1121353 - Use DOMWindowUtils::SendNativeTouchPoint for emitTouchEvent. r=dburns --- testing/marionette/marionette-listener.js | 42 ++++++++++++++++------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/testing/marionette/marionette-listener.js b/testing/marionette/marionette-listener.js index 2c49e817954..d25e78930a6 100644 --- a/testing/marionette/marionette-listener.js +++ b/testing/marionette/marionette-listener.js @@ -117,15 +117,31 @@ function registerSelf() { function emitTouchEventForIFrame(message) { message = message.json; - let frames = curFrame.document.getElementsByTagName("iframe"); - let iframe = frames[message.index]; let identifier = nextTouchId; - let tabParent = iframe.QueryInterface(Components.interfaces.nsIFrameLoaderOwner).frameLoader.tabParent; - tabParent.injectTouchEvent(message.type, [identifier], - [message.clientX], [message.clientY], - [message.radiusX], [message.radiusY], - [message.rotationAngle], [message.force], - 1, 0); + + let domWindowUtils = curFrame. + QueryInterface(Components.interfaces.nsIInterfaceRequestor). + getInterface(Components.interfaces.nsIDOMWindowUtils); + var ratio = domWindowUtils.screenPixelsPerCSSPixel; + + var typeForUtils; + switch (message.type) { + case 'touchstart': + typeForUtils = domWindowUtils.TOUCH_CONTACT; + break; + case 'touchend': + typeForUtils = domWindowUtils.TOUCH_REMOVE; + break; + case 'touchcancel': + typeForUtils = domWindowUtils.TOUCH_CANCEL; + break; + case 'touchmove': + typeForUtils = domWindowUtils.TOUCH_CONTACT; + break; + } + domWindowUtils.sendNativeTouchPoint(identifier, typeForUtils, + Math.round(message.screenX * ratio), Math.round(message.screenY * ratio), + message.force, 90); } /** @@ -709,10 +725,12 @@ function emitTouchEvent(type, touch) { let index = sendSyncMessage("MarionetteFrame:getCurrentFrameId"); // only call emitTouchEventForIFrame if we're inside an iframe. if (index != null) { - sendSyncMessage("Marionette:emitTouchEvent", {index: index, type: type, id: touch.identifier, - clientX: touch.clientX, clientY: touch.clientY, - radiusX: touch.radiusX, radiusY: touch.radiusY, - rotation: touch.rotationAngle, force: touch.force}); + sendSyncMessage("Marionette:emitTouchEvent", + { index: index, type: type, id: touch.identifier, + clientX: touch.clientX, clientY: touch.clientY, + screenX: touch.screenX, screenY: touch.screenY, + radiusX: touch.radiusX, radiusY: touch.radiusY, + rotation: touch.rotationAngle, force: touch.force }); return; } } From e116db3134a5ebbfb6f23802eb939700e28750d0 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Tue, 20 Jan 2015 00:38:00 +0100 Subject: [PATCH 093/106] Bug 1121353 - Implement SynthesizeNativeTouchPoint in the gonk widget to allow injecting touch events into APZ. r=mwu --- dom/interfaces/base/nsIDOMWindowUtils.idl | 4 +- widget/InputData.cpp | 11 ++++ widget/InputData.h | 4 ++ widget/gonk/GeckoTouchDispatcher.cpp | 20 +++---- widget/gonk/nsWindow.cpp | 65 +++++++++++++++++++++++ widget/gonk/nsWindow.h | 11 ++++ 6 files changed, 101 insertions(+), 14 deletions(-) diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl index 241d1e7b5c1..11c86b48056 100644 --- a/dom/interfaces/base/nsIDOMWindowUtils.idl +++ b/dom/interfaces/base/nsIDOMWindowUtils.idl @@ -664,8 +664,8 @@ interface nsIDOMWindowUtils : nsISupports { * drag - msg1-n:TOUCH_CONTACT (moving), msgn+1:TOUCH_REMOVE * hover drag - msg1-n:TOUCH_HOVER (moving), msgn+1:TOUCH_REMOVE * - * Widget support: Windows 8.0+, Winrt/Win32. Other widgets will - * throw. + * Widget support: Windows 8.0+, Winrt/Win32. Gonk supports CONTACT, REMOVE, + * and CANCEL but no HOVER. Other widgets will throw. * * @param aPointerId The touch point id to create or update. * @param aTouchState one or more of the touch states listed above diff --git a/widget/InputData.cpp b/widget/InputData.cpp index d85002303df..a0e85b4eef6 100644 --- a/widget/InputData.cpp +++ b/widget/InputData.cpp @@ -158,6 +158,17 @@ MultiTouchInput::ToWidgetMouseEvent(nsIWidget* aWidget) const return event; } +int32_t +MultiTouchInput::IndexOfTouch(int32_t aTouchIdentifier) +{ + for (size_t i = 0; i < mTouches.Length(); i++) { + if (mTouches[i].mIdentifier == aTouchIdentifier) { + return (int32_t)i; + } + } + return -1; +} + // This conversion from WidgetMouseEvent to MultiTouchInput is needed because on // the B2G emulator we can only receive mouse events, but we need to be able // to pan correctly. To do this, we convert the events into a format that the diff --git a/widget/InputData.h b/widget/InputData.h index cc5a26f2711..6229eabcc04 100644 --- a/widget/InputData.h +++ b/widget/InputData.h @@ -222,6 +222,10 @@ public: WidgetTouchEvent ToWidgetTouchEvent(nsIWidget* aWidget) const; WidgetMouseEvent ToWidgetMouseEvent(nsIWidget* aWidget) const; + // Return the index into mTouches of the SingleTouchData with the given + // identifier, or -1 if there is no such SingleTouchData. + int32_t IndexOfTouch(int32_t aTouchIdentifier); + // This conversion from WidgetMouseEvent to MultiTouchInput is needed because // on the B2G emulator we can only receive mouse events, but we need to be // able to pan correctly. To do this, we convert the events into a format that diff --git a/widget/gonk/GeckoTouchDispatcher.cpp b/widget/gonk/GeckoTouchDispatcher.cpp index 77f48b6b610..7701b43a094 100644 --- a/widget/gonk/GeckoTouchDispatcher.cpp +++ b/widget/gonk/GeckoTouchDispatcher.cpp @@ -224,19 +224,15 @@ Interpolate(int start, int end, TimeDuration aFrameDiff, TimeDuration aTouchDiff static const SingleTouchData& GetTouchByID(const SingleTouchData& aCurrentTouch, MultiTouchInput& aOtherTouch) { - int32_t id = aCurrentTouch.mIdentifier; - for (size_t i = 0; i < aOtherTouch.mTouches.Length(); i++) { - SingleTouchData& touch = aOtherTouch.mTouches[i]; - if (touch.mIdentifier == id) { - return touch; - } + int32_t index = aOtherTouch.IndexOfTouch(aCurrentTouch.mIdentifier); + if (index < 0) { + // We can have situations where a previous touch event had 2 fingers + // and we lift 1 finger off. In those cases, we won't find the touch event + // with given id, so just return the current touch, which will be resampled + // without modification and dispatched. + return aCurrentTouch; } - - // We can have situations where a previous touch event had 2 fingers - // and we lift 1 finger off. In those cases, we won't find the touch event - // with given id, so just return the current touch, which will be resampled - // without modification and dispatched. - return aCurrentTouch; + return aOtherTouch.mTouches[index]; } diff --git a/widget/gonk/nsWindow.cpp b/widget/gonk/nsWindow.cpp index 544805bd19f..732d3a33e7a 100644 --- a/widget/gonk/nsWindow.cpp +++ b/widget/gonk/nsWindow.cpp @@ -300,6 +300,71 @@ nsWindow::DispatchTouchInputViaAPZ(MultiTouchInput& aInput) } } + +nsresult +nsWindow::SynthesizeNativeTouchPoint(uint32_t aPointerId, + TouchPointerState aPointerState, + nsIntPoint aPointerScreenPoint, + double aPointerPressure, + uint32_t aPointerOrientation) +{ + if (aPointerState == TOUCH_HOVER) { + return NS_ERROR_UNEXPECTED; + } + + if (!mSynthesizedTouchInput) { + mSynthesizedTouchInput = new MultiTouchInput(); + } + + // We can't dispatch mSynthesizedTouchInput directly because (a) dispatching + // it might inadvertently modify it and (b) in the case of touchend or + // touchcancel events mSynthesizedTouchInput will hold the touches that are + // still down whereas the input dispatched needs to hold the removed + // touch(es). We use |inputToDispatch| for this purpose. + MultiTouchInput inputToDispatch; + inputToDispatch.mInputType = MULTITOUCH_INPUT; + + int32_t index = mSynthesizedTouchInput->IndexOfTouch((int32_t)aPointerId); + if (aPointerState == TOUCH_CONTACT) { + if (index >= 0) { + // found an existing touch point, update it + SingleTouchData& point = mSynthesizedTouchInput->mTouches[index]; + point.mScreenPoint = ScreenIntPoint::FromUntyped(aPointerScreenPoint); + point.mRotationAngle = (float)aPointerOrientation; + point.mForce = (float)aPointerPressure; + inputToDispatch.mType = MultiTouchInput::MULTITOUCH_MOVE; + } else { + // new touch point, add it + mSynthesizedTouchInput->mTouches.AppendElement(SingleTouchData( + (int32_t)aPointerId, + ScreenIntPoint::FromUntyped(aPointerScreenPoint), + ScreenSize(0, 0), + (float)aPointerOrientation, + (float)aPointerPressure)); + inputToDispatch.mType = MultiTouchInput::MULTITOUCH_START; + } + inputToDispatch.mTouches = mSynthesizedTouchInput->mTouches; + } else { + MOZ_ASSERT(aPointerState == TOUCH_REMOVE || aPointerState == TOUCH_CANCEL); + // a touch point is being lifted, so remove it from the stored list + if (index >= 0) { + mSynthesizedTouchInput->mTouches.RemoveElementAt(index); + } + inputToDispatch.mType = (aPointerState == TOUCH_REMOVE + ? MultiTouchInput::MULTITOUCH_END + : MultiTouchInput::MULTITOUCH_CANCEL); + inputToDispatch.mTouches.AppendElement(SingleTouchData( + (int32_t)aPointerId, + ScreenIntPoint::FromUntyped(aPointerScreenPoint), + ScreenSize(0, 0), + (float)aPointerOrientation, + (float)aPointerPressure)); + } + + DispatchTouchInputViaAPZ(inputToDispatch); + return NS_OK; +} + NS_IMETHODIMP nsWindow::Create(nsIWidget *aParent, void *aNativeParent, diff --git a/widget/gonk/nsWindow.h b/widget/gonk/nsWindow.h index cf816ab2dda..cf5d140c4ad 100644 --- a/widget/gonk/nsWindow.h +++ b/widget/gonk/nsWindow.h @@ -90,6 +90,12 @@ public: void DispatchTouchInputViaAPZ(mozilla::MultiTouchInput& aInput); NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent, nsEventStatus& aStatus); + virtual nsresult SynthesizeNativeTouchPoint(uint32_t aPointerId, + TouchPointerState aPointerState, + nsIntPoint aPointerScreenPoint, + double aPointerPressure, + uint32_t aPointerOrientation) MOZ_OVERRIDE; + NS_IMETHOD CaptureRollupEvents(nsIRollupListener *aListener, bool aDoCapture) { @@ -147,6 +153,11 @@ protected: // Call this function when the users activity is the direct cause of an // event (like a keypress or mouse click). void UserActivity(); + +private: + // This is used by SynthesizeNativeTouchPoint to maintain state between + // multiple synthesized points + nsAutoPtr mSynthesizedTouchInput; }; #endif /* nsWindow_h */ From fb69d03a3fc9e13d6ba571ebac25c0e8b973038f Mon Sep 17 00:00:00 2001 From: Kershaw Chang Date: Thu, 22 Jan 2015 07:33:00 +0100 Subject: [PATCH 094/106] Bug 1120839 - Add 'allowXULXBL' permission for nested-oop iframe, r=ted.mielczarek --- testing/specialpowers/content/specialpowers.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/testing/specialpowers/content/specialpowers.js b/testing/specialpowers/content/specialpowers.js index bee62d93121..07d44208c0b 100644 --- a/testing/specialpowers/content/specialpowers.js +++ b/testing/specialpowers/content/specialpowers.js @@ -61,6 +61,7 @@ SpecialPowers.prototype.sanityCheck = function() { return "foo"; }; // This gets filled in in the constructor. SpecialPowers.prototype.DOMWindowUtils = undefined; SpecialPowers.prototype.Components = undefined; +SpecialPowers.prototype.IsInNestedFrame = false; SpecialPowers.prototype._sendSyncMessage = function(msgname, msg) { if (this.SP_SYNC_MESSAGES.indexOf(msgname) == -1) { @@ -163,6 +164,9 @@ SpecialPowers.prototype.nestedFrameSetup = function() { mm.loadFrameScript(specialPowersBase + "MozillaLogger.js", false); mm.loadFrameScript(specialPowersBase + "specialpowersAPI.js", false); mm.loadFrameScript(specialPowersBase + "specialpowers.js", false); + + let frameScript = "SpecialPowers.prototype.IsInNestedFrame=true;"; + mm.loadFrameScript("data:," + frameScript, false); } }, "remote-browser-shown", false); }; @@ -174,7 +178,11 @@ function attachSpecialPowersToWindow(aWindow) { (aWindow !== undefined) && (aWindow.wrappedJSObject) && !(aWindow.wrappedJSObject.SpecialPowers)) { - aWindow.wrappedJSObject.SpecialPowers = new SpecialPowers(aWindow); + let sp = new SpecialPowers(aWindow); + aWindow.wrappedJSObject.SpecialPowers = sp; + if (sp.IsInNestedFrame) { + sp.addPermission("allowXULXBL", true, aWindow.document); + } } } catch(ex) { dump("TEST-INFO | specialpowers.js | Failed to attach specialpowers to window exception: " + ex + "\n"); @@ -197,6 +205,7 @@ SpecialPowersManager.prototype = { } }; + var specialpowersmanager = new SpecialPowersManager(); this.SpecialPowers = SpecialPowers; From cc0b0b6d2a0d0d7d38c6c3e7fa514f6beae24876 Mon Sep 17 00:00:00 2001 From: ZongShen Shen Date: Thu, 22 Jan 2015 18:49:51 -0800 Subject: [PATCH 095/106] Bug 1104658 - Add constant propagation to MMathFunction. r=nbp --- js/src/jit/MIR.cpp | 105 ++++++++++++++++++++++++++++++++++++++++++++- js/src/jit/MIR.h | 4 ++ 2 files changed, 107 insertions(+), 2 deletions(-) diff --git a/js/src/jit/MIR.cpp b/js/src/jit/MIR.cpp index 4751506d305..a431ef2c1c6 100644 --- a/js/src/jit/MIR.cpp +++ b/js/src/jit/MIR.cpp @@ -627,14 +627,20 @@ MConstant::New(TempAllocator &alloc, const Value &v, types::CompilerConstraintLi } MConstant * -MConstant::NewAsmJS(TempAllocator &alloc, const Value &v, MIRType type) +MConstant::NewTypedValue(TempAllocator &alloc, const Value &v, MIRType type, types::CompilerConstraintList *constraints) { MOZ_ASSERT(!IsSimdType(type)); - MConstant *constant = new(alloc) MConstant(v, nullptr); + MConstant *constant = new(alloc) MConstant(v, constraints); constant->setResultType(type); return constant; } +MConstant * +MConstant::NewAsmJS(TempAllocator &alloc, const Value &v, MIRType type) +{ + return NewTypedValue(alloc, v, type); +} + MConstant * MConstant::NewConstraintlessObject(TempAllocator &alloc, JSObject *v) { @@ -970,6 +976,101 @@ MMathFunction::printOpcode(FILE *fp) const fprintf(fp, " %s", FunctionName(function())); } +MDefinition * +MMathFunction::foldsTo(TempAllocator &alloc) +{ + MDefinition *input = getOperand(0); + if (!input->isConstant()) + return this; + + Value val = input->toConstant()->value(); + if (!val.isNumber()) + return this; + + double in = val.toNumber(); + double out; + switch (function_) { + case Log: + out = js::math_log_uncached(in); + break; + case Sin: + out = js::math_sin_uncached(in); + break; + case Cos: + out = js::math_cos_uncached(in); + break; + case Exp: + out = js::math_exp_uncached(in); + break; + case Tan: + out = js::math_tan_uncached(in); + break; + case ACos: + out = js::math_acos_uncached(in); + break; + case ASin: + out = js::math_asin_uncached(in); + break; + case ATan: + out = js::math_atan_uncached(in); + break; + case Log10: + out = js::math_log10_uncached(in); + break; + case Log2: + out = js::math_log2_uncached(in); + break; + case Log1P: + out = js::math_log1p_uncached(in); + break; + case ExpM1: + out = js::math_expm1_uncached(in); + break; + case CosH: + out = js::math_cosh_uncached(in); + break; + case SinH: + out = js::math_sinh_uncached(in); + break; + case TanH: + out = js::math_tanh_uncached(in); + break; + case ACosH: + out = js::math_acosh_uncached(in); + break; + case ASinH: + out = js::math_asinh_uncached(in); + break; + case ATanH: + out = js::math_atanh_uncached(in); + break; + case Sign: + out = js::math_sign_uncached(in); + break; + case Trunc: + out = js::math_trunc_uncached(in); + break; + case Cbrt: + out = js::math_cbrt_uncached(in); + break; + case Floor: + out = js::math_floor_impl(in); + break; + case Ceil: + out = js::math_ceil_impl(in); + break; + case Round: + out = js::math_round_impl(in); + break; + default: + return this; + } + + if (input->type() == MIRType_Float32) + return MConstant::NewTypedValue(alloc, DoubleValue(out), MIRType_Float32); + return MConstant::New(alloc, DoubleValue(out)); +} + MParameter * MParameter::New(TempAllocator &alloc, int32_t index, types::TemporaryTypeSet *types) { diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index c4d08df8951..92dc4fdf672 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -1279,6 +1279,8 @@ class MConstant : public MNullaryInstruction INSTRUCTION_HEADER(Constant) static MConstant *New(TempAllocator &alloc, const Value &v, types::CompilerConstraintList *constraints = nullptr); + static MConstant *NewTypedValue(TempAllocator &alloc, const Value &v, MIRType type, + types::CompilerConstraintList *constraints = nullptr); static MConstant *NewAsmJS(TempAllocator &alloc, const Value &v, MIRType type); static MConstant *NewConstraintlessObject(TempAllocator &alloc, JSObject *v); @@ -5703,6 +5705,8 @@ class MMathFunction return true; } + MDefinition *foldsTo(TempAllocator &alloc); + void printOpcode(FILE *fp) const MOZ_OVERRIDE; static const char *FunctionName(Function function); From 1870b5871b4c39ab7f0b7e530918f448457c2ca4 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 11:17:15 +0000 Subject: [PATCH 096/106] Bug 1107639 - Fix build error due to missing explicit keyword on JSExceptionState constructor r=me on a CLOSED TREE --- js/src/jsapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index e4ce1121be6..7f36f5beaa6 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -5563,7 +5563,7 @@ JS::AutoSaveExceptionState::~AutoSaveExceptionState() } struct JSExceptionState { - JSExceptionState(JSContext *cx) : exception(cx) {} + explicit JSExceptionState(JSContext *cx) : exception(cx) {} bool throwing; PersistentRootedValue exception; }; From af66b232354dd5c8f4cff8af27310c110dfd3402 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 23 Jan 2015 11:30:40 +0000 Subject: [PATCH 097/106] Bug 1108007 - Don't allow GC to observe uninitialized elements in cloned array r=nbp --- js/src/jit-test/tests/gc/bug-1108007.js | 24 ++++++++++++++++++++++++ js/src/jsobj.cpp | 7 ++----- 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 js/src/jit-test/tests/gc/bug-1108007.js diff --git a/js/src/jit-test/tests/gc/bug-1108007.js b/js/src/jit-test/tests/gc/bug-1108007.js new file mode 100644 index 00000000000..937fa1cb394 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1108007.js @@ -0,0 +1,24 @@ +// |jit-test| --no-threads; --no-ion; --no-baseline +if (!("gczeal" in this)) + quit(); +gczeal(2); +(function() { + evaluate(cacheEntry((function() { + return "".toSource() + })()), Object.create({}, { + saveBytecode: { + value: true + } + })) +})(); +[[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], + [0], [0], [0], [0]]; diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index 3dbe324f77c..453315a00fd 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -1789,12 +1789,8 @@ js::DeepCloneObjectLiteral(JSContext *cx, HandleNativeObject obj, NewObjectKind if (!clone || !clone->ensureElements(cx, obj->getDenseCapacity())) return nullptr; - // Copy the number of initialized elements. - uint32_t initialized = obj->getDenseInitializedLength(); - if (initialized) - clone->setDenseInitializedLength(initialized); - // Recursive copy of dense element. + uint32_t initialized = obj->getDenseInitializedLength(); for (uint32_t i = 0; i < initialized; ++i) { v = obj->getDenseElement(i); if (v.isObject()) { @@ -1806,6 +1802,7 @@ js::DeepCloneObjectLiteral(JSContext *cx, HandleNativeObject obj, NewObjectKind } v.setObject(*deepObj); } + clone->setDenseInitializedLength(i + 1); clone->initDenseElement(i, v); } From c24d27ebacb24aa7c53f70fb5701551baaed5d70 Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Fri, 23 Jan 2015 13:55:46 +0200 Subject: [PATCH 098/106] Bug 1079236, Event.composedTarget to reveal the original non-native-anonymous event target, r=wchen, r=smaug --- dom/events/Event.cpp | 14 +++++++ dom/events/Event.h | 1 + dom/events/test/mochitest.ini | 1 + dom/events/test/test_bug1079236.html | 60 ++++++++++++++++++++++++++++ dom/inputmethod/forms.js | 2 +- dom/webidl/Event.webidl | 1 + 6 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 dom/events/test/test_bug1079236.html diff --git a/dom/events/Event.cpp b/dom/events/Event.cpp index c4d140225d1..eedf5a69fb4 100644 --- a/dom/events/Event.cpp +++ b/dom/events/Event.cpp @@ -362,6 +362,20 @@ Event::GetOriginalTarget(nsIDOMEventTarget** aOriginalTarget) return NS_OK; } +EventTarget* +Event::GetComposedTarget() const +{ + EventTarget* et = GetOriginalTarget(); + nsCOMPtr content = do_QueryInterface(et); + if (!content) { + return et; + } + nsIContent* nonChrome = content->FindFirstNonChromeOnlyAccessContent(); + return nonChrome ? + static_cast(nonChrome) : + static_cast(content->GetComposedDoc()); +} + NS_IMETHODIMP_(void) Event::SetTrusted(bool aTrusted) { diff --git a/dom/events/Event.h b/dom/events/Event.h index b0b7a0232f2..a1cb30bcf6c 100644 --- a/dom/events/Event.h +++ b/dom/events/Event.h @@ -205,6 +205,7 @@ public: EventTarget* GetOriginalTarget() const; EventTarget* GetExplicitOriginalTarget() const; + EventTarget* GetComposedTarget() const; bool GetPreventDefault() const; diff --git a/dom/events/test/mochitest.ini b/dom/events/test/mochitest.ini index 3f95187153d..f2195f91c2d 100644 --- a/dom/events/test/mochitest.ini +++ b/dom/events/test/mochitest.ini @@ -138,6 +138,7 @@ skip-if = toolkit == "gonk" || e10s support-files = bug1017086_inner.html [test_bug1017086_enable.html] support-files = bug1017086_inner.html +[test_bug1079236.html] [test_clickevent_on_input.html] skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM [test_continuous_wheel_events.html] diff --git a/dom/events/test/test_bug1079236.html b/dom/events/test/test_bug1079236.html new file mode 100644 index 00000000000..7957823e604 --- /dev/null +++ b/dom/events/test/test_bug1079236.html @@ -0,0 +1,60 @@ + + + + + + Test for Bug 1079236 + + + + + + +Mozilla Bug 1079236 +

+
+ +
+
+
+ + diff --git a/dom/inputmethod/forms.js b/dom/inputmethod/forms.js index 089c9ba1e07..e8346324087 100644 --- a/dom/inputmethod/forms.js +++ b/dom/inputmethod/forms.js @@ -355,7 +355,7 @@ let FormAssistant = { }, handleEvent: function fa_handleEvent(evt) { - let target = evt.target; + let target = evt.composedTarget; let range = null; switch (evt.type) { diff --git a/dom/webidl/Event.webidl b/dom/webidl/Event.webidl index 8d1c14bddcc..188045654e1 100644 --- a/dom/webidl/Event.webidl +++ b/dom/webidl/Event.webidl @@ -56,6 +56,7 @@ partial interface Event { readonly attribute EventTarget? originalTarget; readonly attribute EventTarget? explicitOriginalTarget; + [ChromeOnly] readonly attribute EventTarget? composedTarget; [ChromeOnly] readonly attribute boolean multipleActionsPrevented; [ChromeOnly] readonly attribute boolean isSynthesized; From a23a9913a00a5f4bf6f1113de3969dc79de43095 Mon Sep 17 00:00:00 2001 From: Lars T Hansen Date: Fri, 23 Jan 2015 13:53:34 +0100 Subject: [PATCH 099/106] Bug 1121435 - fix the comment. r=jandem --- js/src/jit/shared/Assembler-shared.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/src/jit/shared/Assembler-shared.h b/js/src/jit/shared/Assembler-shared.h index 2b4c064e603..6eb1c36c8e2 100644 --- a/js/src/jit/shared/Assembler-shared.h +++ b/js/src/jit/shared/Assembler-shared.h @@ -929,11 +929,11 @@ class AssemblerShared ImmGCPtr noteMaybeNurseryPtr(ImmMaybeNurseryPtr ptr) { if (ptr.value && gc::IsInsideNursery(ptr.value)) { - // PJS FIXME bug 1121435 - // FIXME: Ideally we'd assert this in all cases, but PJS needs to - // compile IC's from off-main-thread; it will not touch - // nursery pointers, however. + // noteMaybeNurseryPtr can be reached from off-thread compilation, + // though not with an actual nursery pointer argument in that case. MOZ_ASSERT(GetJitContext()->runtime->onMainThread()); + // Do not be ion-compiling on the main thread. + MOZ_ASSERT(!GetJitContext()->runtime->mainThread()->ionCompiling); embedsNurseryPointers_ = true; } return ImmGCPtr(ptr); From de33a28323ff46af79c36c5c537f15812e2c2dab Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Fri, 23 Jan 2015 22:01:52 +0900 Subject: [PATCH 100/106] Backed out changeset 17c4307d1678 (bug 1120512) since the spec will be changed again to match current behavior near future. --- .../tests/proxy/testTestIntegrityLevel.js | 16 -------- js/src/jsobj.cpp | 40 ++++++++----------- 2 files changed, 16 insertions(+), 40 deletions(-) delete mode 100644 js/src/jit-test/tests/proxy/testTestIntegrityLevel.js diff --git a/js/src/jit-test/tests/proxy/testTestIntegrityLevel.js b/js/src/jit-test/tests/proxy/testTestIntegrityLevel.js deleted file mode 100644 index f938b9912f0..00000000000 --- a/js/src/jit-test/tests/proxy/testTestIntegrityLevel.js +++ /dev/null @@ -1,16 +0,0 @@ -// isSealed/isFrozen should call getOwnPropertyDescriptor for all properties. - -var log = []; -var target = Object.preventExtensions({a: 1, b: 2, c: 3}); -var p = new Proxy(target, { - getOwnPropertyDescriptor(t, id) { - log.push(id); - return Object.getOwnPropertyDescriptor(t, id); - } -}); -assertEq(Object.isSealed(p), false); -assertEq(log.sort().join(''), 'abc'); - -log.length = 0; -assertEq(Object.isFrozen(p), false); -assertEq(log.sort().join(''), 'abc'); diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index 453315a00fd..48650a302c2 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -1144,38 +1144,30 @@ js::TestIntegrityLevel(JSContext *cx, HandleObject obj, IntegrityLevel level, bo if (!GetPropertyKeys(cx, obj, JSITER_HIDDEN | JSITER_OWNONLY | JSITER_SYMBOLS, &props)) return false; - // Steps 9-10. - bool configurable = false; - bool writable = false; - - // Steps 11. + // Steps 9-11. The spec does not permit stopping as soon as we find out the + // answer is false, so we are cheating a little here (bug 1120512). RootedId id(cx); for (size_t i = 0, len = props.length(); i < len; i++) { id = props[i]; - // Steps 11.a-b. - Rooted desc(cx); - if (!GetOwnPropertyDescriptor(cx, obj, id, &desc)) + unsigned attrs; + if (!GetPropertyAttributes(cx, obj, id, &attrs)) return false; - // Step 11.c. - if (!desc.object()) - continue; - - // Step 11.c.i. - if (!desc.isPermanent()) - configurable = true; - - // Step 11.c.ii. - if (desc.isDataDescriptor() && desc.isWritable()) - writable = true; + // If the property is configurable, this object is neither sealed nor + // frozen. If the property is a writable data property, this object is + // not frozen. + if (!(attrs & JSPROP_PERMANENT) || + (level == IntegrityLevel::Frozen && + !(attrs & (JSPROP_READONLY | JSPROP_GETTER | JSPROP_SETTER)))) + { + *result = false; + return true; + } } - // Steps 12-14. - if (level == IntegrityLevel::Frozen && writable) - *result = false; - else - *result = !configurable; + // All properties checked out. This object is sealed/frozen. + *result = true; return true; } From e98bebedfa360318e5dc623b74a9234ec74939ee Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Fri, 23 Jan 2015 13:12:02 +0000 Subject: [PATCH 101/106] Bug 1107699 - Remove timeout before Console.log() and the dispatching of ConsoleEvents, r=past --- dom/base/Console.cpp | 2 +- dom/base/ConsoleAPIStorage.js | 51 -------------------- dom/base/nsIConsoleAPIStorage.idl | 18 +------ dom/tests/browser/browser_ConsoleAPITests.js | 36 ++------------ 4 files changed, 5 insertions(+), 102 deletions(-) diff --git a/dom/base/Console.cpp b/dom/base/Console.cpp index c0e13683e8d..677be227f83 100644 --- a/dom/base/Console.cpp +++ b/dom/base/Console.cpp @@ -1268,7 +1268,7 @@ Console::ProcessCallData(ConsoleCallData* aData) innerID.AppendInt(aData->mInnerIDNumber); } - if (NS_FAILED(mStorage->RecordPendingEvent(innerID, outerID, eventValue))) { + if (NS_FAILED(mStorage->RecordEvent(innerID, outerID, eventValue))) { NS_WARNING("Failed to record a console event."); } } diff --git a/dom/base/ConsoleAPIStorage.js b/dom/base/ConsoleAPIStorage.js index ebd7889bcee..e3a982fa934 100644 --- a/dom/base/ConsoleAPIStorage.js +++ b/dom/base/ConsoleAPIStorage.js @@ -11,18 +11,12 @@ let Cc = Components.classes; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -// The console API events have to be scheduled when stored using -// |recordPendingEvent|. -const CALL_DELAY = 15 // milliseconds - // This constant tells how many messages to process in a single timer execution. const MESSAGES_IN_INTERVAL = 1500 const STORAGE_MAX_EVENTS = 200; var _consoleStorage = new Map(); -var _consolePendingStorage = new Map(); -var _timer; const CONSOLEAPISTORAGE_CID = Components.ID('{96cf7855-dfa9-4c6d-8276-f9705b4890f2}'); @@ -141,51 +135,6 @@ ConsoleAPIStorageService.prototype = { Services.obs.notifyObservers(aEvent, "console-storage-cache-event", aId); }, - /** - * Similar to recordEvent, but these events are scheduled and stored any - * CALL_DELAY millisecs. - */ - recordPendingEvent: function CS_recordPendingEvent(aId, aOuterId, aEvent) - { - if (!_consolePendingStorage.has(aId)) { - _consolePendingStorage.set(aId, []); - } - - let storage = _consolePendingStorage.get(aId); - storage.push({ outerId: aOuterId, event: aEvent }); - - if (!_timer) { - _timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); - } - - let self = this; - _timer.initWithCallback(function() { self.flushPendingEvents(); }, - CALL_DELAY, Ci.nsITimer.TYPE_REPEATING_SLACK); - }, - - /** - * Processes the pending event queue. - */ - flushPendingEvents: function CS_flushPendingEvents() - { - for (let [id, objs] of _consolePendingStorage) { - for (let i = 0; i < objs.length && i < MESSAGES_IN_INTERVAL; ++i) { - this.recordEvent(id, objs[i].outerId, objs[i].event); - } - - if (objs.length <= MESSAGES_IN_INTERVAL) { - _consolePendingStorage.delete(id); - } else { - _consolePendingStorage.set(id, objs.splice(MESSAGES_IN_INTERVAL)); - } - } - - if (_timer && _consolePendingStorage.size == 0) { - _timer.cancel(); - _timer = null; - } - }, - /** * Clear storage data for the given window. * diff --git a/dom/base/nsIConsoleAPIStorage.idl b/dom/base/nsIConsoleAPIStorage.idl index 262ae76b498..6ee218af23b 100644 --- a/dom/base/nsIConsoleAPIStorage.idl +++ b/dom/base/nsIConsoleAPIStorage.idl @@ -5,7 +5,7 @@ #include "nsISupports.idl" -[scriptable, uuid(cce39123-585e-411b-9edd-2513f7cf7e47)] +[scriptable, uuid(9e32a7b6-c4d1-4d9a-87b9-1ef6b75c27a9)] interface nsIConsoleAPIStorage : nsISupports { /** @@ -35,22 +35,6 @@ interface nsIConsoleAPIStorage : nsISupports */ void recordEvent(in DOMString aId, in DOMString aOuterId, in jsval aEvent); - /** - * Similar to recordEvent() but these events will be collected - * and dispatched with a timer in order to avoid flooding the devtools - * webconsole. - * - * @param string aId - * The ID of the inner window for which the event occurred or "jsm" for - * messages logged from JavaScript modules.. - * @param string aOuterId - * This ID is used as 3rd parameters for the console-api-log-event - * notification. - * @param object aEvent - * A JavaScript object you want to store. - */ - void recordPendingEvent(in DOMString aId, in DOMString aOuterId, in jsval aEvent); - /** * Clear storage data for the given window. * diff --git a/dom/tests/browser/browser_ConsoleAPITests.js b/dom/tests/browser/browser_ConsoleAPITests.js index 288d002f019..17ebebc8a92 100644 --- a/dom/tests/browser/browser_ConsoleAPITests.js +++ b/dom/tests/browser/browser_ConsoleAPITests.js @@ -5,7 +5,7 @@ const TEST_URI = "http://example.com/browser/dom/tests/browser/test-console-api.html"; -var gWindow, gLevel, gArgs, gTestDriver, gStyle; +var gWindow, gLevel, gArgs, gStyle; function test() { waitForExplicitFinish(); @@ -15,7 +15,7 @@ function test() { var browser = gBrowser.selectedBrowser; registerCleanupFunction(function () { - gWindow = gLevel = gArgs = gTestDriver = null; + gWindow = gLevel = gArgs = null; gBrowser.removeTab(tab); }); @@ -26,8 +26,7 @@ function test() { executeSoon(function test_executeSoon() { gWindow = browser.contentWindow; consoleAPISanityTest(); - gTestDriver = observeConsoleTest(); - gTestDriver.next(); + observeConsoleTest(); }); }, false); @@ -74,8 +73,6 @@ function testConsoleData(aMessageObject) { } } } - - gTestDriver.next(); } function testLocationData(aMessageObject) { @@ -215,127 +212,100 @@ function observeConsoleTest() { let win = XPCNativeWrapper.unwrap(gWindow); expect("log", "arg"); win.console.log("arg"); - yield undefined; expect("info", "arg", "extra arg"); win.console.info("arg", "extra arg"); - yield undefined; expect("warn", "Lesson 1: PI is approximately equal to 3"); win.console.warn("Lesson %d: %s is approximately equal to %1.0f", 1, "PI", 3.14159); - yield undefined; expect("warn", "Lesson 1: PI is approximately equal to 3.14"); win.console.warn("Lesson %d: %s is approximately equal to %1.2f", 1, "PI", 3.14159); - yield undefined; expect("warn", "Lesson 1: PI is approximately equal to 3.141590"); win.console.warn("Lesson %d: %s is approximately equal to %f", 1, "PI", 3.14159); - yield undefined; expect("warn", "Lesson 1: PI is approximately equal to 3.1415900"); win.console.warn("Lesson %d: %s is approximately equal to %0.7f", 1, "PI", 3.14159); - yield undefined; expect("log", "%d, %s, %l"); win.console.log("%d, %s, %l"); - yield undefined; expect("log", "%a %b %g"); win.console.log("%a %b %g"); - yield undefined; expect("log", "%a %b %g", "a", "b"); win.console.log("%a %b %g", "a", "b"); - yield undefined; expect("log", "2, a, %l", 3); win.console.log("%d, %s, %l", 2, "a", 3); - yield undefined; // Bug #692550 handle null and undefined. expect("log", "null, undefined"); win.console.log("%s, %s", null, undefined); - yield undefined; // Bug #696288 handle object as first argument. let obj = { a: 1 }; expect("log", obj, "a"); win.console.log(obj, "a"); - yield undefined; expect("dir", win.toString()); win.console.dir(win); - yield undefined; expect("error", "arg"); win.console.error("arg"); - yield undefined; expect("exception", "arg"); win.console.exception("arg"); - yield undefined; expect("log", "foobar"); gStyle = ["color:red;foobar;;"]; win.console.log("%cfoobar", gStyle[0]); - yield undefined; let obj4 = { d: 4 }; expect("warn", "foobar", obj4, "test", "bazbazstr", "last"); gStyle = [null, null, null, "color:blue;", "color:red"]; win.console.warn("foobar%Otest%cbazbaz%s%clast", obj4, gStyle[3], "str", gStyle[4]); - yield undefined; let obj3 = { c: 3 }; expect("info", "foobar", "bazbaz", obj3, "%comg", "color:yellow"); gStyle = [null, "color:pink;"]; win.console.info("foobar%cbazbaz", gStyle[1], obj3, "%comg", "color:yellow"); - yield undefined; gStyle = null; let obj2 = { b: 2 }; expect("log", "omg ", obj, " foo ", 4, obj2); win.console.log("omg %o foo %o", obj, 4, obj2); - yield undefined; expect("assert", "message"); win.console.assert(false, "message"); - yield undefined; expect("count", { label: "label a", count: 1 }) win.console.count("label a"); - yield undefined; expect("count", { label: "label b", count: 1 }) win.console.count("label b"); - yield undefined; expect("count", { label: "label a", count: 2 }) win.console.count("label a"); - yield undefined; expect("count", { label: "label b", count: 2 }) win.console.count("label b"); - yield undefined; startTraceTest(); - yield undefined; - startLocationTest(); - yield undefined; } function consoleAPISanityTest() { From ef8ceb114cdaa3b0b61ce60a642ccc37560e3139 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sat, 17 Jan 2015 22:17:06 -0500 Subject: [PATCH 102/106] Bug 1123016 - Clarify the ownership of DOMEventTargetHelper::mParentObject/mOwnerWindow; r=smaug This patch converts DOMEventTargetHelper::mParentObject into an nsWeakPtr, and adds fatal assertions to ensure that all future nsIGlobalObject implementations support weak references. It also marks DOMEventTargetHelper::mOwnerWindow as a non-owning reference. --- dom/events/DOMEventTargetHelper.cpp | 11 +++++++---- dom/events/DOMEventTargetHelper.h | 11 ++++++++--- dom/ipc/TabChild.cpp | 1 + dom/ipc/TabChild.h | 3 ++- dom/workers/WorkerScope.cpp | 1 + dom/workers/WorkerScope.h | 4 +++- 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/dom/events/DOMEventTargetHelper.cpp b/dom/events/DOMEventTargetHelper.cpp index 0b8efa35584..0d64c2f1a0c 100644 --- a/dom/events/DOMEventTargetHelper.cpp +++ b/dom/events/DOMEventTargetHelper.cpp @@ -99,7 +99,8 @@ DOMEventTargetHelper::BindToOwner(nsPIDOMWindow* aOwner) void DOMEventTargetHelper::BindToOwner(nsIGlobalObject* aOwner) { - if (mParentObject) { + nsCOMPtr parentObject = do_QueryReferent(mParentObject); + if (parentObject) { if (mOwnerWindow) { static_cast(mOwnerWindow)->RemoveEventTargetObject(this); mOwnerWindow = nullptr; @@ -108,7 +109,8 @@ DOMEventTargetHelper::BindToOwner(nsIGlobalObject* aOwner) mHasOrHasHadOwnerWindow = false; } if (aOwner) { - mParentObject = aOwner; + mParentObject = do_GetWeakReference(aOwner); + MOZ_ASSERT(mParentObject, "All nsIGlobalObjects must support nsISupportsWeakReference"); // Let's cache the result of this QI for fast access and off main thread usage mOwnerWindow = nsCOMPtr(do_QueryInterface(aOwner)).get(); if (mOwnerWindow) { @@ -131,9 +133,10 @@ DOMEventTargetHelper::BindToOwner(DOMEventTargetHelper* aOther) if (aOther) { mHasOrHasHadOwnerWindow = aOther->HasOrHasHadOwner(); if (aOther->GetParentObject()) { - mParentObject = aOther->GetParentObject(); + mParentObject = do_GetWeakReference(aOther->GetParentObject()); + MOZ_ASSERT(mParentObject, "All nsIGlobalObjects must support nsISupportsWeakReference"); // Let's cache the result of this QI for fast access and off main thread usage - mOwnerWindow = nsCOMPtr(do_QueryInterface(mParentObject)).get(); + mOwnerWindow = nsCOMPtr(do_QueryInterface(aOther->GetParentObject())).get(); if (mOwnerWindow) { MOZ_ASSERT(mOwnerWindow->IsInnerWindow()); mHasOrHasHadOwnerWindow = true; diff --git a/dom/events/DOMEventTargetHelper.h b/dom/events/DOMEventTargetHelper.h index 15277cae175..7e92c0c2ef7 100644 --- a/dom/events/DOMEventTargetHelper.h +++ b/dom/events/DOMEventTargetHelper.h @@ -12,6 +12,7 @@ #include "nsPIDOMWindow.h" #include "nsIScriptGlobalObject.h" #include "nsIScriptContext.h" +#include "nsIWeakReferenceUtils.h" #include "MainThreadUtils.h" #include "mozilla/Attributes.h" #include "mozilla/EventListenerManager.h" @@ -138,7 +139,10 @@ public: void BindToOwner(nsPIDOMWindow* aOwner); void BindToOwner(DOMEventTargetHelper* aOther); virtual void DisconnectFromOwner(); - nsIGlobalObject* GetParentObject() const { return mParentObject; } + nsIGlobalObject* GetParentObject() const { + nsCOMPtr parentObject = do_QueryReferent(mParentObject); + return parentObject; + } bool HasOrHasHadOwner() { return mHasOrHasHadOwnerWindow; } virtual void EventListenerAdded(nsIAtom* aType) MOZ_OVERRIDE; @@ -164,10 +168,11 @@ protected: virtual void LastRelease() {} private: // Inner window or sandbox. - nsIGlobalObject* mParentObject; + nsWeakPtr mParentObject; // mParentObject pre QI-ed and cached (inner window) // (it is needed for off main thread access) - nsPIDOMWindow* mOwnerWindow; + // It is obtained in BindToOwner and reset in DisconnectFromOwner. + nsPIDOMWindow* MOZ_NON_OWNING_REF mOwnerWindow; bool mHasOrHasHadOwnerWindow; }; diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index fdb04476074..6fc26e3eff8 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -3573,6 +3573,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TabChildGlobal) NS_INTERFACE_MAP_ENTRY(nsIContentFrameMessageManager) NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal) NS_INTERFACE_MAP_ENTRY(nsIGlobalObject) + NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(ContentFrameMessageManager) NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index 8a3eaf206a8..4c703f5778f 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -65,7 +65,8 @@ class TabChildBase; class TabChildGlobal : public DOMEventTargetHelper, public nsIContentFrameMessageManager, public nsIScriptObjectPrincipal, - public nsIGlobalObject + public nsIGlobalObject, + public nsSupportsWeakReference { public: explicit TabChildGlobal(TabChildBase* aTabChild); diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp index c2eb0b76be8..06f50d7b3d8 100644 --- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -95,6 +95,7 @@ NS_IMPL_RELEASE_INHERITED(WorkerGlobalScope, DOMEventTargetHelper) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WorkerGlobalScope) NS_INTERFACE_MAP_ENTRY(nsIGlobalObject) + NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) JSObject* diff --git a/dom/workers/WorkerScope.h b/dom/workers/WorkerScope.h index 786d6b92eb3..84f6066f6d4 100644 --- a/dom/workers/WorkerScope.h +++ b/dom/workers/WorkerScope.h @@ -10,6 +10,7 @@ #include "mozilla/DOMEventTargetHelper.h" #include "mozilla/dom/Headers.h" #include "mozilla/dom/RequestBinding.h" +#include "nsWeakReference.h" namespace mozilla { namespace dom { @@ -37,7 +38,8 @@ class WorkerNavigator; class Performance; class WorkerGlobalScope : public DOMEventTargetHelper, - public nsIGlobalObject + public nsIGlobalObject, + public nsSupportsWeakReference { typedef mozilla::dom::indexedDB::IDBFactory IDBFactory; From 3271a041d798c3da4bccaaaa34483cf985703bcb Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 22 Jan 2015 21:32:20 -0500 Subject: [PATCH 103/106] Bug 1124985 - Annotate the reason for the setTimeout usage in test_XHR_timeout.html --- dom/base/test/test_XHR_timeout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/base/test/test_XHR_timeout.html b/dom/base/test/test_XHR_timeout.html index ed47db0a32e..14422d9f4ab 100644 --- a/dom/base/test/test_XHR_timeout.html +++ b/dom/base/test/test_XHR_timeout.html @@ -48,7 +48,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=525816 (function() { SimpleTest.waitForExplicitFinish(); SimpleTest.requestLongerTimeout(TestRequests.length); - SimpleTest.requestFlakyTimeout("untriaged"); + SimpleTest.requestFlakyTimeout("This is testing XHR timeouts."); var msg = "This test will take approximately " + (TestRequests.length * 10) msg += " seconds to complete, at most."; document.getElementById("content").firstChild.nodeValue = msg; From 76152330292bed6310b7d4852be0527141e54c09 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sat, 17 Jan 2015 18:50:09 -0500 Subject: [PATCH 104/106] Bug 1109968 - Make all links in editable regions unfocusable; r=roc The content inside an editable region is either editable itself, or is inside a contenteditable="false" subtree. In the first case, it should not be focusable since it is editable. In the second case, it should not be focusable since the entire non-editable region is treated as a special single entity for the purposes of selection and caret movement, and having something focusable in the middle of such a subtree breaks that model. --- dom/html/HTMLAnchorElement.cpp | 16 ++++++++++++- layout/base/tests/bug1109968-1-ref.html | 17 ++++++++++++++ layout/base/tests/bug1109968-1.html | 23 +++++++++++++++++++ layout/base/tests/bug1109968-2-ref.html | 17 ++++++++++++++ layout/base/tests/bug1109968-2.html | 23 +++++++++++++++++++ layout/base/tests/mochitest.ini | 4 ++++ .../base/tests/test_reftests_with_caret.html | 4 +++- 7 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 layout/base/tests/bug1109968-1-ref.html create mode 100644 layout/base/tests/bug1109968-1.html create mode 100644 layout/base/tests/bug1109968-2-ref.html create mode 100644 layout/base/tests/bug1109968-2.html diff --git a/dom/html/HTMLAnchorElement.cpp b/dom/html/HTMLAnchorElement.cpp index 0672b45aeaa..139ad2e8dfc 100644 --- a/dom/html/HTMLAnchorElement.cpp +++ b/dom/html/HTMLAnchorElement.cpp @@ -193,6 +193,18 @@ HTMLAnchorElement::UnbindFromTree(bool aDeep, bool aNullParent) nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent); } +static bool +IsNodeInEditableRegion(nsINode* aNode) +{ + while (aNode) { + if (aNode->IsEditable()) { + return true; + } + aNode = aNode->GetParent(); + } + return false; +} + bool HTMLAnchorElement::IsHTMLFocusable(bool aWithMouse, bool *aIsFocusable, int32_t *aTabIndex) @@ -214,7 +226,9 @@ HTMLAnchorElement::IsHTMLFocusable(bool aWithMouse, } } - if (IsEditable()) { + // Links that are in an editable region should never be focusable, even if + // they are in a contenteditable="false" region. + if (IsNodeInEditableRegion(this)) { if (aTabIndex) { *aTabIndex = -1; } diff --git a/layout/base/tests/bug1109968-1-ref.html b/layout/base/tests/bug1109968-1-ref.html new file mode 100644 index 00000000000..28bcf608a73 --- /dev/null +++ b/layout/base/tests/bug1109968-1-ref.html @@ -0,0 +1,17 @@ + + +
foobaz
+ + + diff --git a/layout/base/tests/bug1109968-1.html b/layout/base/tests/bug1109968-1.html new file mode 100644 index 00000000000..a8d0d216fa8 --- /dev/null +++ b/layout/base/tests/bug1109968-1.html @@ -0,0 +1,23 @@ + + + + + +
foobaz
+ + + diff --git a/layout/base/tests/bug1109968-2-ref.html b/layout/base/tests/bug1109968-2-ref.html new file mode 100644 index 00000000000..9638c35b331 --- /dev/null +++ b/layout/base/tests/bug1109968-2-ref.html @@ -0,0 +1,17 @@ + + +
foo
bar
+ + + diff --git a/layout/base/tests/bug1109968-2.html b/layout/base/tests/bug1109968-2.html new file mode 100644 index 00000000000..159311ad39a --- /dev/null +++ b/layout/base/tests/bug1109968-2.html @@ -0,0 +1,23 @@ + + + + + +
foo
bar
+ + + diff --git a/layout/base/tests/mochitest.ini b/layout/base/tests/mochitest.ini index 62e6c04cfbb..8538c1a8d13 100644 --- a/layout/base/tests/mochitest.ini +++ b/layout/base/tests/mochitest.ini @@ -55,6 +55,10 @@ support-files = bug644768.html bug1061468.html bug1061468-ref.html + bug1109968-1-ref.html + bug1109968-1.html + bug1109968-2-ref.html + bug1109968-2.html [test_preserve3d_sorting_hit_testing.html] [test_after_paint_pref.html] diff --git a/layout/base/tests/test_reftests_with_caret.html b/layout/base/tests/test_reftests_with_caret.html index d3680d1099f..762db5e94c9 100644 --- a/layout/base/tests/test_reftests_with_caret.html +++ b/layout/base/tests/test_reftests_with_caret.html @@ -146,7 +146,9 @@ var tests = [ [ 'bug746993-1.html' , 'bug746993-1-ref.html' ] , [ 'bug1007065-1.html' , 'bug1007065-1-ref.html' ] , [ 'bug1007067-1.html' , 'bug1007067-1-ref.html' ] , - [ 'bug1061468.html' , 'bug1061468-ref.html' ] , + [ 'bug1061468.html' , 'bug1061468-ref.html' ] , + [ 'bug1109968-1.html', 'bug1109968-1-ref.html'] , + [ 'bug1109968-2.html', 'bug1109968-2-ref.html'] , function() {SpecialPowers.clearUserPref("touchcaret.enabled");} , ]; From c964f3cf521de6f4720babec8ca9c8eac59eefe4 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Fri, 23 Jan 2015 15:35:16 +0100 Subject: [PATCH 105/106] Bug 1119019 - Avoid destroying a SharedSurface before its TextureClient/Host pair. r=sotaro --- gfx/layers/client/CanvasClient.cpp | 15 +++++++++++++++ gfx/layers/client/CanvasClient.h | 13 +++++++++---- gfx/layers/client/TextureClient.cpp | 4 ++-- gfx/layers/client/TextureClient.h | 4 +++- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/gfx/layers/client/CanvasClient.cpp b/gfx/layers/client/CanvasClient.cpp index a01da3feb9e..6c6a3cb5d14 100644 --- a/gfx/layers/client/CanvasClient.cpp +++ b/gfx/layers/client/CanvasClient.cpp @@ -403,5 +403,20 @@ CanvasClientSharedSurface::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) forwarder->UseTexture(this, mFrontTex); } +void +CanvasClientSharedSurface::ClearSurfaces() +{ + if (mFrontTex && (mFront || mPrevFront)) { + // Force a synchronous destruction so that the TextureHost does not + // outlive the SharedSurface. This won't be needed once TextureClient/Host + // and SharedSurface are merged. + mFrontTex->ForceRemove(true /* sync */); + mFrontTex = nullptr; + } + // It is important to destroy the SharedSurface *after* the TextureClient. + mFront = nullptr; + mPrevFront = nullptr; +} + } } diff --git a/gfx/layers/client/CanvasClient.h b/gfx/layers/client/CanvasClient.h index a0a49ed5c72..70f38c24d3c 100644 --- a/gfx/layers/client/CanvasClient.h +++ b/gfx/layers/client/CanvasClient.h @@ -119,25 +119,30 @@ private: RefPtr mFrontTex; + void ClearSurfaces(); + public: CanvasClientSharedSurface(CompositableForwarder* aLayerForwarder, TextureFlags aFlags); + ~CanvasClientSharedSurface() + { + ClearSurfaces(); + } + virtual TextureInfo GetTextureInfo() const MOZ_OVERRIDE { return TextureInfo(CompositableType::IMAGE); } virtual void Clear() MOZ_OVERRIDE { - mFront = nullptr; - mPrevFront = nullptr; - mFrontTex = nullptr; + ClearSurfaces(); } virtual void Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) MOZ_OVERRIDE; virtual void OnDetach() MOZ_OVERRIDE { - CanvasClientSharedSurface::Clear(); + ClearSurfaces(); } }; diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index 341284f9fbc..7ab4ff74aed 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -503,10 +503,10 @@ TextureClient::KeepUntilFullDeallocation(KeepAlive* aKeep) mActor->mKeep = aKeep; } -void TextureClient::ForceRemove() +void TextureClient::ForceRemove(bool sync) { if (mValid && mActor) { - if (GetFlags() & TextureFlags::DEALLOCATE_CLIENT) { + if (sync || GetFlags() & TextureFlags::DEALLOCATE_CLIENT) { MOZ_PERFORMANCE_WARNING("gfx", "TextureClient/Host pair requires synchronous deallocation"); if (mActor->IPCOpen()) { mActor->SendClearTextureHostSync(); diff --git a/gfx/layers/client/TextureClient.h b/gfx/layers/client/TextureClient.h index 760e5006fee..e52d9ad0754 100644 --- a/gfx/layers/client/TextureClient.h +++ b/gfx/layers/client/TextureClient.h @@ -426,8 +426,10 @@ public: * If the texture flags contain TextureFlags::DEALLOCATE_CLIENT, the destruction * will be synchronously coordinated with the compositor side, otherwise it * will be done asynchronously. + * If sync is true, the destruction will be synchronous regardless of the + * texture's flags (bad for performance, use with care). */ - void ForceRemove(); + void ForceRemove(bool sync = false); virtual void SetReleaseFenceHandle(FenceHandle aReleaseFenceHandle) { From 5b4d2a28c93ccc9ef8b943136097adef2fea0e17 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 23 Jan 2015 09:38:42 -0500 Subject: [PATCH 106/106] Remove TestTArray from the list of disabled XPCOM tests, because it's not disabled, no bug, DONTBUILD --- xpcom/tests/moz.build | 1 - 1 file changed, 1 deletion(-) diff --git a/xpcom/tests/moz.build b/xpcom/tests/moz.build index d8687cf3fab..93c4f938e4f 100644 --- a/xpcom/tests/moz.build +++ b/xpcom/tests/moz.build @@ -80,7 +80,6 @@ if CONFIG['MOZ_MEMORY']: # XXX Make these tests work in libxul builds. #CPP_UNIT_TESTS += [ -# 'TestTArray', # 'TestThreadPool', # 'TestThreads', # 'TestTimeStamp',