Merge mozilla-central to mozilla-inbound. r=backout-merge a=backout-merge

This commit is contained in:
Sebastian Hengst 2016-10-15 11:10:58 +02:00
Родитель c2196f8420 81339f4bfd
Коммит 8498657f56
38 изменённых файлов: 20615 добавлений и 18583 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -46,7 +46,7 @@ var Debugger =
/***/ 0:
/***/ function(module, exports, __webpack_require__) {
var prettyFast = __webpack_require__(417);
var prettyFast = __webpack_require__(438);
self.onmessage = function (msg) {
var _prettyPrint = prettyPrint(msg.data);
@ -100,7 +100,7 @@ var Debugger =
/***/ },
/***/ 417:
/***/ 438:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
@ -122,8 +122,8 @@ var Debugger =
}(this, function () {
"use strict";
var acorn = this.acorn || __webpack_require__(418);
var sourceMap = this.sourceMap || __webpack_require__(419);
var acorn = this.acorn || __webpack_require__(439);
var sourceMap = this.sourceMap || __webpack_require__(440);
var SourceNode = sourceMap.SourceNode;
// If any of these tokens are seen before a "[" token, we know that "[" token
@ -982,7 +982,7 @@ var Debugger =
/***/ },
/***/ 418:
/***/ 439:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Acorn is a tiny, fast JavaScript parser written in JavaScript.
@ -3642,7 +3642,7 @@ var Debugger =
/***/ },
/***/ 419:
/***/ 440:
/***/ function(module, exports, __webpack_require__) {
/*
@ -3650,14 +3650,14 @@ var Debugger =
* Licensed under the New BSD license. See LICENSE.txt or:
* http://opensource.org/licenses/BSD-3-Clause
*/
exports.SourceMapGenerator = __webpack_require__(420).SourceMapGenerator;
exports.SourceMapConsumer = __webpack_require__(426).SourceMapConsumer;
exports.SourceNode = __webpack_require__(428).SourceNode;
exports.SourceMapGenerator = __webpack_require__(441).SourceMapGenerator;
exports.SourceMapConsumer = __webpack_require__(447).SourceMapConsumer;
exports.SourceNode = __webpack_require__(449).SourceNode;
/***/ },
/***/ 420:
/***/ 441:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -3671,10 +3671,10 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var base64VLQ = __webpack_require__(421);
var util = __webpack_require__(423);
var ArraySet = __webpack_require__(424).ArraySet;
var MappingList = __webpack_require__(425).MappingList;
var base64VLQ = __webpack_require__(442);
var util = __webpack_require__(444);
var ArraySet = __webpack_require__(445).ArraySet;
var MappingList = __webpack_require__(446).MappingList;
/**
* An instance of the SourceMapGenerator represents a source map which is
@ -4064,7 +4064,7 @@ var Debugger =
/***/ },
/***/ 421:
/***/ 442:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4108,7 +4108,7 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var base64 = __webpack_require__(422);
var base64 = __webpack_require__(443);
// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
@ -4213,7 +4213,7 @@ var Debugger =
/***/ },
/***/ 422:
/***/ 443:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4262,7 +4262,7 @@ var Debugger =
/***/ },
/***/ 423:
/***/ 444:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4588,7 +4588,7 @@ var Debugger =
/***/ },
/***/ 424:
/***/ 445:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4602,7 +4602,7 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(423);
var util = __webpack_require__(444);
/**
* A data structure which is a combination of an array and a set. Adding a new
@ -4692,7 +4692,7 @@ var Debugger =
/***/ },
/***/ 425:
/***/ 446:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4706,7 +4706,7 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(423);
var util = __webpack_require__(444);
/**
* Determine whether mappingB is after mappingA with respect to generated
@ -4785,7 +4785,7 @@ var Debugger =
/***/ },
/***/ 426:
/***/ 447:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4799,10 +4799,10 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(423);
var binarySearch = __webpack_require__(427);
var ArraySet = __webpack_require__(424).ArraySet;
var base64VLQ = __webpack_require__(421);
var util = __webpack_require__(444);
var binarySearch = __webpack_require__(448);
var ArraySet = __webpack_require__(445).ArraySet;
var base64VLQ = __webpack_require__(442);
/**
* A SourceMapConsumer instance represents a parsed source map which we can
@ -5367,7 +5367,7 @@ var Debugger =
/***/ },
/***/ 427:
/***/ 448:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5454,7 +5454,7 @@ var Debugger =
/***/ },
/***/ 428:
/***/ 449:
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5468,8 +5468,8 @@ var Debugger =
}
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var SourceMapGenerator = __webpack_require__(420).SourceMapGenerator;
var util = __webpack_require__(423);
var SourceMapGenerator = __webpack_require__(441).SourceMapGenerator;
var util = __webpack_require__(444);
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
// operating systems these days (capturing the result).

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,130 +1,61 @@
.landing-page {
flex: 1;
display: flex;
width: 100%;
height: 100%;
flex-direction: row;
.tabs {
font-size: 1.25em;
margin: 100px auto;
margin-bottom: 0;
width: calc(100% - 200px);
}
.landing-page .sidebar {
display: flex;
background-color: var(--theme-content-color1);
width: 200px;
height: 100%;
flex-direction: column;
.tabs .tab-group {
margin-top: 20px;
}
.landing-page .sidebar h1 {
color: white;
font-size: 24px;
margin: 0;
line-height: 30px;
font-weight: normal;
padding: 40px 20px;
.tabs .tab-group-title {
font-size: 1.25em;
margin: 0 0 1em 10px;
color: var(--theme-highlight-lightorange);
}
.landing-page .sidebar ul {
list-style: none;
padding: 0;
line-height: 30px;
font-size: 18px;
}
.landing-page .sidebar li {
padding: 5px 20px;
}
.landing-page .sidebar li.selected {
background: #1f2327;
}
.landing-page .sidebar li:hover {
background: #1f2327;
cursor: pointer;
}
.landing-page .sidebar li a {
color: var(--theme-comment-alt);
}
.landing-page .panel {
display: flex;
flex: 1;
height: 100%;
overflow: auto;
flex-direction: column;
}
.landing-page .panel .title {
margin: 20px 40px;
width: calc(100% - 80px);
padding: 0 20px;
font-size: 16px;
border-bottom: 1px solid #cccccc;
height: 54px;
}
.landing-page .panel h2 {
color: var(--theme-body-color);
font-weight: normal;
}
.landing-page .panel .center {
flex: 1;
display: flex;
flex-direction: column;
}
.landing-page .panel .center .center-message {
margin: 40px;
font-size: 16px;
line-height: 25px;
padding: 10px;
}
.landing-page .center a {
color: var(--theme-highlight-bluegrey);
text-decoration: none;
}
.landing-page .tab-group {
margin: 40px;
}
.landing-page .tab-list {
.tabs .tab-list {
list-style: none;
padding: 0px;
margin: 0px;
}
.landing-page .tab {
.tabs .tab:first-child {
border-top: 1px solid var(--theme-splitter-color);
}
.tabs .tab {
border-bottom: 1px solid var(--theme-splitter-color);
padding: 10px;
font-family: sans-serif;
}
.landing-page .tab:hover {
.tabs .tab:hover {
background-color: var(--theme-toolbar-background);
cursor: pointer;
}
.landing-page .tab-title {
.tabs .tab-title {
line-height: 25px;
font-size: 16px;
color: var(--theme-content-color1);
}
.tabs .tab-url {
color: var(--theme-highlight-bluegrey);
}
.landing-page .tab-url {
color: var(--theme-comment);
.connect-message {
margin: 20px;
padding: 50px 100px;
text-align: center;
color: #9a9a9a;
}
.landing-page .panel .center .footer-note {
flex: 1;
padding: 50px;
font-size: 14px;
color: var(--theme-comment);
bottom: 0;
position: absolute;
.connect-message.not-connected {
border: 1px solid #dddddd;
background-color: #fbfbfb;
color: #9a9a9a;
}
/* vim:set ts=2 sw=2 sts=2 et: */
@ -157,7 +88,6 @@ body {
.debugger {
display: flex;
flex: 1;
height: 100%;
}
.center-pane {
@ -196,23 +126,6 @@ body {
margin-top: 25px;
margin-right: 20px;
}
.welcomebox {
width: calc(100% - 1px);
/* Offsetting it by 30px for the sources-header area */
height: calc(100% - 30px);
position: absolute;
top: 30px;
left: 0;
padding: 50px 0;
text-align: center;
font-size: 1.25em;
color: var(--theme-comment-alt);
background-color: var(--theme-tab-toolbar-background);
font-weight: lighter;
z-index: 100;
}
/* vim:set ts=2 sw=2 sts=2 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
@ -345,11 +258,6 @@ body {
overflow: hidden;
}
.sources-panel * {
-moz-user-select: none;
user-select: none;
}
.sources-header {
height: 30px;
border-bottom: 1px solid var(--theme-splitter-color);
@ -359,12 +267,10 @@ body {
display: flex;
align-items: baseline;
justify-content: space-between;
-moz-user-select: none;
user-select: none;
}
.sources-header-info {
font-size: 12px;
font-size: 0.7em;
color: var(--theme-comment-alt);
font-weight: lighter;
white-space: nowrap;
@ -492,22 +398,15 @@ ul.sources-list {
position: absolute;
bottom: 0;
left: 0;
right: 1px;
right: 0;
opacity: 1;
z-index: 100;
-moz-user-select: none;
user-select: none;
}
.source-footer .command-bar {
float: right;
}
.source-footer .command-bar * {
-moz-user-select: none;
user-select: none;
}
.command-bar > span {
cursor: pointer;
margin-right: 0.7em;
@ -535,52 +434,6 @@ ul.sources-list {
padding-left: 4px;
font-size: 10px;
}
.search-bar {
width: calc(100% - 1px);
height: 40px;
background: white;
border-bottom: 1px solid var(--theme-splitter-color);
display: flex;
}
.search-bar svg {
width: 16px;
}
.search-bar i {
display: block;
padding: 13px 0 0 13px;
}
.search-bar input {
border: none;
line-height: 30px;
font-size: 14px;
color: var(--theme-comment);
width: calc(100% - 38px);
padding-left: 10px;
display: flex;
padding-right: 100px;
flex: 1;
}
.search-bar input::placeholder {
color: var(--theme-body-color-inactive);
}
.search-bar input:focus {
outline-width: 0;
}
.search-bar input.empty {
color: var(--theme-highlight-orange);
}
.search-bar .summary {
line-height: 40px;
padding-right: 10px;
color: var(--theme-body-color-inactive);
}
/* vim:set ts=2 sw=2 sts=2 et: */
/* This Source Code Form is subject to the terms of the Mozilla Public
@ -608,9 +461,9 @@ ul.sources-list {
.editor.new-breakpoint svg {
fill: var(--theme-selection-background);
width: 60px;
height: 14px;
height: 12px;
position: absolute;
top: 0px;
top: 0;
right: -4px;
}
@ -618,10 +471,6 @@ ul.sources-list {
opacity: 0.3;
}
.search-bar ~ .editor-mount {
height: calc(100% - 58px);
}
.editor-mount,
.CodeMirror {
width: 100%;
@ -631,7 +480,6 @@ ul.sources-list {
.CodeMirror-linenumber {
font-size: 11px;
line-height: 14px;
}
/* set the linenumber white when there is a breakpoint */
@ -644,11 +492,6 @@ ul.sources-list {
z-index: 0;
}
.editor-wrapper .CodeMirror-line {
font-size: 11px;
line-height: 14px;
}
.debug-line .CodeMirror-line {
background-color: var(--breakpoint-active-color) !important;
}
@ -683,8 +526,6 @@ ul.sources-list {
background-color: var(--theme-tab-toolbar-background);
font-weight: lighter;
z-index: 100;
-moz-user-select: none;
user-select: none;
}
.close-btn path {
fill: var(--theme-body-color);
@ -712,28 +553,18 @@ ul.sources-list {
.close-btn .close:hover path {
fill: white;
}
.breakpoints-list * {
-moz-user-select: none;
user-select: none;
}
.breakpoints-list .breakpoint {
font-size: 12px;
color: var(--theme-content-color1);
padding: 0.5em 1px;
margin: 0.25em 0;
padding: 0.25em 0;
line-height: 1em;
position: relative;
border-left: 4px solid transparent;
}
.breakpoints-list .breakpoint:last-of-type {
padding-bottom: 0.45em;
}
.breakpoints-list .breakpoint.paused {
background-color: var(--theme-toolbar-background-alt);
border-color: var(--breakpoint-active-color);
}
.breakpoints-list .breakpoint.disabled .breakpoint-label {
@ -746,18 +577,8 @@ ul.sources-list {
background-color: var(--theme-toolbar-background);
}
.breakpoints-list .breakpoint.paused:hover {
border-color: var(--breakpoint-active-color-hover);
}
.breakpoints-list .breakpoint-checkbox {
margin-left: 0;
}
.breakpoints-list .breakpoint-label {
display: inline-block;
padding-left: 2px;
padding-bottom: 4px;
}
.breakpoints-list .pause-indicator {
@ -767,7 +588,7 @@ ul.sources-list {
.breakpoint-snippet {
color: var(--theme-comment);
padding-left: 18px;
padding-left: 20px;
}
.breakpoint .close-btn {
@ -1038,6 +859,7 @@ ul.sources-list {
.scopes-list .tree-node {
overflow: hidden;
}
.frames ul {
list-style: none;
margin: 0;
@ -1046,16 +868,11 @@ ul.sources-list {
.frames ul li {
cursor: pointer;
padding: 7px 10px 7px 21px;
padding: 10px;
clear: both;
overflow: hidden;
}
.frames ul li * {
-moz-user-select: none;
user-select: none;
}
.frames ul li:nth-of-type(2n) {
background-color: var(--theme-tab-toolbar-background);
}
@ -1108,8 +925,7 @@ ul.sources-list {
}
.accordion ._content {
border-bottom: 1px solid var(--theme-splitter-color);
font-size: 12px;
border-bottom: 1px solid var(--theme-splitter-color);;
}
.right-sidebar {
display: flex;
@ -1118,11 +934,6 @@ ul.sources-list {
white-space: nowrap;
}
.right-siderbar * {
-moz-user-select: none;
user-select: none;
}
.right-sidebar .accordion {
overflow-y: auto;
overflow-x: hidden;
@ -1134,7 +945,7 @@ ul.sources-list {
.command-bar {
height: 30px;
padding: 8px 5px 10px 1px;
padding: 8px 5px 10px 10px;
}
.command-bar > span {
@ -1187,11 +998,6 @@ span.pause-exceptions.all {
flex: 1;
}
.source-header * {
-moz-user-select: none;
user-select: none;
}
.source-tabs {
width: calc(100% - 30px);
overflow: hidden;
@ -1287,11 +1093,6 @@ span.pause-exceptions.all {
padding: 20px;
}
.autocomplete .results * {
-moz-user-select: none;
user-select: none;
}
.autocomplete ul {
list-style: none;
width: 100%;

Просмотреть файл

@ -1,6 +1,7 @@
[DEFAULT]
tags = devtools
subsuite = devtools
skip-if = (os == 'linux' && debug && bits == 32)
support-files =
head.js
!/devtools/client/commandline/test/helpers.js
@ -26,17 +27,16 @@ support-files =
[browser_dbg-breaking.js]
[browser_dbg-breaking-from-console.js]
[browser_dbg-call-stack.js]
[browser_dbg-chrome-create.js]
[browser_dbg-chrome-debugging.js]
[browser_dbg-console.js]
[browser_dbg-debugger-buttons.js]
[browser_dbg-editor-gutter.js]
[browser_dbg-editor-mode.js]
[browser_dbg-editor-select.js]
[browser_dbg-editor-highlight.js]
[browser_dbg-iframes.js]
[browser_dbg_keyboard-shortcuts.js]
[browser_dbg-call-stack.js]
[browser_dbg-pause-exceptions.js]
[browser_dbg-chrome-create.js]
[browser_dbg-chrome-debugging.js]
[browser_dbg-iframes.js]
[browser_dbg-debugger-buttons.js]
[browser_dbg_keyboard-shortcuts.js]
[browser_dbg-navigation.js]
[browser_dbg-sourcemaps.js]
[browser_dbg-console.js]

Просмотреть файл

@ -4,7 +4,7 @@
// Tests the breakpoints are hit in various situations.
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html");
const dbg = yield initDebugger("doc-scripts.html", "scripts.html");
const { selectors: { getSelectedSource }, getState } = dbg;
// Make sure we can set a top-level breakpoint and it will be hit on

Просмотреть файл

@ -16,7 +16,10 @@ function isFrameSelected(dbg, index, title) {
}
add_task(function* () {
const dbg = yield initDebugger("doc-script-switching.html");
const dbg = yield initDebugger(
"doc-script-switching.html",
"script-switching-01.js"
);
toggleCallStack(dbg);

Просмотреть файл

@ -25,7 +25,10 @@ function clickStepOut(dbg) {
* 5. stepUp at the end of a function
*/
add_task(function* () {
const dbg = yield initDebugger("doc-debugger-statements.html");
const dbg = yield initDebugger(
"doc-debugger-statements.html",
"debugger-statements.html"
);
yield reload(dbg);
yield waitForPaused(dbg);

Просмотреть файл

@ -22,7 +22,7 @@ function assertEditorBreakpoint(dbg, line, shouldExist) {
}
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html");
const dbg = yield initDebugger("doc-scripts.html", "simple1.js");
const { selectors: { getBreakpoints, getBreakpoint }, getState } = dbg;
const source = findSource(dbg, "simple1.js");

Просмотреть файл

@ -34,6 +34,7 @@ add_task(function* () {
// Test jumping to a line in a source that exists but hasn't been
// loaded yet.
yield waitForSources(dbg, "simple1.js");
selectSource(dbg, "simple1.js", 6);
// Make sure the source is in the loading state, wait for it to be

Просмотреть файл

@ -4,7 +4,10 @@
// Tests that the editor sets the correct mode for different file
// types
add_task(function* () {
const dbg = yield initDebugger("doc-scripts.html");
const dbg = yield initDebugger(
"doc-scripts.html",
"simple1.js", "doc-scripts.html"
);
yield selectSource(dbg, "simple1.js");
is(dbg.win.cm.getOption("mode").name, "javascript", "Mode is correct");

Просмотреть файл

@ -17,7 +17,10 @@ add_task(function* () {
// fix a frequent failure allow a longer timeout.
requestLongerTimeout(2);
const dbg = yield initDebugger("doc-scripts.html");
const dbg = yield initDebugger(
"doc-scripts.html",
"simple1.js", "simple2.js", "long.js"
);
const { selectors: { getSelectedSource }, getState } = dbg;
const simple1 = findSource(dbg, "simple1.js");
const simple2 = findSource(dbg, "simple2.js");

Просмотреть файл

@ -7,7 +7,7 @@
* 2. pause in the iframe
*/
add_task(function* () {
const dbg = yield initDebugger("doc-iframes.html");
const dbg = yield initDebugger("doc-iframes.html", "iframes.html");
// test pausing in the main thread
yield reload(dbg);

Просмотреть файл

@ -17,7 +17,7 @@ function caughtException() {
4. skip a caught error
*/
add_task(function* () {
const dbg = yield initDebugger("doc-exceptions.html");
const dbg = yield initDebugger("doc-exceptions.html", "exceptions.js");
// test skipping an uncaught exception
yield togglePauseOnExceptions(dbg, false, false);

Просмотреть файл

@ -26,7 +26,10 @@ function pressStepOut(dbg) {
}
add_task(function*() {
const dbg = yield initDebugger("doc-debugger-statements.html");
const dbg = yield initDebugger(
"doc-debugger-statements.html",
"debugger-statements.html"
);
yield reload(dbg);
yield waitForPaused(dbg);

Просмотреть файл

@ -54,12 +54,6 @@
if(opts.extra) {
output(times2(3));
}
window.keepMeAlive = function() {
// This function exists to make sure this script is never garbage
// collected.
return 1;
}
/***/ },

Просмотреть файл

@ -1 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap 2cf3c8b169eb23f03776","webpack:///./entry.js","webpack:///./times2.js","webpack:///./output.js","webpack:///./opts.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA,QAAO,SAAS;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;;;;;;;ACFA;AACA;AACA;;AAEA,mBAAkB;;;;;;;ACJlB;AACA;AACA","file":"bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 2cf3c8b169eb23f03776\n **/","const times2 = require(\"./times2\");\nconst { output } = require(\"./output\");\nconst opts = require(\"./opts\");\n\noutput(times2(1));\noutput(times2(2));\n\nif(opts.extra) {\n output(times2(3));\n}\n\nwindow.keepMeAlive = function() {\n // This function exists to make sure this script is never garbage\n // collected.\n return 1;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./entry.js\n ** module id = 0\n ** module chunks = 0\n **/","module.exports = function(x) {\n return x * 2;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./times2.js\n ** module id = 1\n ** module chunks = 0\n **/","function output(str) {\n console.log(str);\n}\n\nmodule.exports = { output };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./output.js\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = {\n extra: true\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./opts.js\n ** module id = 3\n ** module chunks = 0\n **/"],"sourceRoot":""}
{"version":3,"sources":["webpack:///webpack/bootstrap 54b46cf0214c369e95aa","webpack:///./entry.js","webpack:///./times2.js","webpack:///./output.js","webpack:///./opts.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA,QAAO,SAAS;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;;;;;;;ACTA;AACA;AACA;;;;;;;ACFA;AACA;AACA;;AAEA,mBAAkB;;;;;;;ACJlB;AACA;AACA","file":"bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 54b46cf0214c369e95aa\n **/","const times2 = require(\"./times2\");\nconst { output } = require(\"./output\");\nconst opts = require(\"./opts\");\n\noutput(times2(1));\noutput(times2(2));\n\nif(opts.extra) {\n output(times2(3));\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./entry.js\n ** module id = 0\n ** module chunks = 0\n **/","module.exports = function(x) {\n return x * 2;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./times2.js\n ** module id = 1\n ** module chunks = 0\n **/","function output(str) {\n console.log(str);\n}\n\nmodule.exports = { output };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./output.js\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = {\n extra: true\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./opts.js\n ** module id = 3\n ** module chunks = 0\n **/"],"sourceRoot":""}

Просмотреть файл

@ -8,9 +8,3 @@ output(times2(2));
if(opts.extra) {
output(times2(3));
}
window.keepMeAlive = function() {
// This function exists to make sure this script is never garbage
// collected.
return 1;
}

Просмотреть файл

@ -300,7 +300,9 @@ function createDebuggerContext(toolbox) {
function initDebugger(url, ...sources) {
return Task.spawn(function* () {
const toolbox = yield openNewTabAndToolbox(EXAMPLE_URL + url, "jsdebugger");
return createDebuggerContext(toolbox);
const dbg = createDebuggerContext(toolbox);
yield waitForSources(dbg, ...sources);
return dbg;
});
};

Просмотреть файл

@ -4,7 +4,6 @@
* 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 "gfxUtils.h"
#include "GLBlitHelper.h"
#include "GLContext.h"
#include "GLScreenBuffer.h"
@ -60,7 +59,6 @@ GLBlitHelper::GLBlitHelper(GLContext* gl)
, mSrcTexEGL(0)
, mYTexScaleLoc(-1)
, mCbCrTexScaleLoc(-1)
, mYuvColorMatrixLoc(-1)
, mTexWidth(0)
, mTexHeight(0)
, mCurYScale(1.0f)
@ -173,24 +171,14 @@ GLBlitHelper::InitTexQuadProgram(BlitType target)
";
#endif
/* 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]
[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]
[R] [1.16438, 0.00000, 1.59603] [ Y - 0.06275]
[G] = [1.16438, -0.39176, -0.81297] x [Cb - 0.50196]
[B] [1.16438, 2.01723, 0.00000] [Cr - 0.50196]
From Rec709:
[R] [1.1643835616438356, 4.2781193979771426e-17, 1.7927410714285714] [ Y - 16]
[G] = [1.1643835616438358, -0.21324861427372963, -0.532909328559444] x [Cb - 128]
[B] [1.1643835616438356, 2.1124017857142854, 0.0] [Cr - 128]
For [0,1] instead of [0,255], and to 5 places:
[R] [1.16438, 0.00000, 1.79274] [ Y - 0.06275]
[G] = [1.16438, -0.21325, -0.53291] x [Cb - 0.50196]
[B] [1.16438, 2.11240, 0.00000] [Cr - 0.50196]
[B] [1.16438, 2.01723, 0.00000] [Cr - 0.50196]
*/
const char kTexYUVPlanarBlit_FragShaderSource[] = "\
#version 100 \n\
@ -203,17 +191,17 @@ GLBlitHelper::InitTexQuadProgram(BlitType target)
uniform sampler2D uCrTexture; \n\
uniform vec2 uYTexScale; \n\
uniform vec2 uCbCrTexScale; \n\
uniform mat3 uYuvColorMatrix; \n\
void main() \n\
{ \n\
float y = texture2D(uYTexture, vTexCoord * uYTexScale).r; \n\
float cb = texture2D(uCbTexture, vTexCoord * uCbCrTexScale).r; \n\
float cr = texture2D(uCrTexture, vTexCoord * uCbCrTexScale).r; \n\
y = y - 0.06275; \n\
y = (y - 0.06275) * 1.16438; \n\
cb = cb - 0.50196; \n\
cr = cr - 0.50196; \n\
vec3 yuv = vec3(y, cb, cr); \n\
gl_FragColor.rgb = uYuvColorMatrix * yuv; \n\
gl_FragColor.r = y + cr * 1.59603; \n\
gl_FragColor.g = y - 0.81297 * cr - 0.39176 * cb; \n\
gl_FragColor.b = y + cb * 2.01723; \n\
gl_FragColor.a = 1.0; \n\
} \n\
";
@ -421,15 +409,13 @@ GLBlitHelper::InitTexQuadProgram(BlitType target)
GLint texCb = mGL->fGetUniformLocation(program, "uCbTexture");
GLint texCr = mGL->fGetUniformLocation(program, "uCrTexture");
mYTexScaleLoc = mGL->fGetUniformLocation(program, "uYTexScale");
mCbCrTexScaleLoc = mGL->fGetUniformLocation(program, "uCbCrTexScale");
mYuvColorMatrixLoc = mGL->fGetUniformLocation(program, "uYuvColorMatrix");
mCbCrTexScaleLoc= mGL->fGetUniformLocation(program, "uCbCrTexScale");
DebugOnly<bool> hasUniformLocations = texY != -1 &&
texCb != -1 &&
texCr != -1 &&
mYTexScaleLoc != -1 &&
mCbCrTexScaleLoc != -1 &&
mYuvColorMatrixLoc != -1;
mCbCrTexScaleLoc != -1;
MOZ_ASSERT(hasUniformLocations, "uniforms not found");
mGL->fUniform1i(texY, Channel_Y);
@ -804,9 +790,6 @@ GLBlitHelper::BlitPlanarYCbCrImage(layers::PlanarYCbCrImage* yuvImage)
mGL->fUniform2f(mCbCrTexScaleLoc, (float)yuvData->mCbCrSize.width/yuvData->mCbCrStride, 1.0f);
}
float* yuvToRgb = gfxUtils::Get3x3YuvColorMatrix(yuvData->mYUVColorSpace);
mGL->fUniformMatrix3fv(mYuvColorMatrixLoc, 1, 0, yuvToRgb);
mGL->fDrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
for (int i = 0; i < 3; i++) {
mGL->fActiveTexture(LOCAL_GL_TEXTURE0 + i);

Просмотреть файл

@ -90,7 +90,6 @@ class GLBlitHelper final
GLuint mSrcTexEGL;
GLint mYTexScaleLoc;
GLint mCbCrTexScaleLoc;
GLint mYuvColorMatrixLoc;
int mTexWidth;
int mTexHeight;

Просмотреть файл

@ -158,14 +158,11 @@ struct EffectRGB : public TexturedEffect
struct EffectYCbCr : public TexturedEffect
{
EffectYCbCr(TextureSource *aSource, YUVColorSpace aYUVColorSpace, gfx::SamplingFilter aSamplingFilter)
EffectYCbCr(TextureSource *aSource, gfx::SamplingFilter aSamplingFilter)
: TexturedEffect(EffectTypes::YCBCR, aSource, false, aSamplingFilter)
, mYUVColorSpace(aYUVColorSpace)
{}
virtual const char* Name() { return "EffectYCbCr"; }
YUVColorSpace mYUVColorSpace;
};
struct EffectNV12 : public TexturedEffect
@ -242,12 +239,12 @@ CreateTexturedEffect(gfx::SurfaceFormat aFormat,
case gfx::SurfaceFormat::R8G8B8A8:
result = new EffectRGB(aSource, isAlphaPremultiplied, aSamplingFilter);
break;
case gfx::SurfaceFormat::YUV:
result = new EffectYCbCr(aSource, aSamplingFilter);
break;
case gfx::SurfaceFormat::NV12:
result = new EffectNV12(aSource, aSamplingFilter);
break;
case gfx::SurfaceFormat::YUV:
MOZ_ASSERT_UNREACHABLE("gfx::SurfaceFormat::YUV is invalid");
break;
default:
NS_WARNING("unhandled program type");
break;
@ -258,30 +255,6 @@ CreateTexturedEffect(gfx::SurfaceFormat aFormat,
return result.forget();
}
inline already_AddRefed<TexturedEffect>
CreateTexturedEffect(TextureHost* aHost,
TextureSource* aSource,
const gfx::SamplingFilter aSamplingFilter,
bool isAlphaPremultiplied,
const LayerRenderState &state = LayerRenderState())
{
MOZ_ASSERT(aHost);
MOZ_ASSERT(aSource);
RefPtr<TexturedEffect> result;
if (aHost->GetReadFormat() == gfx::SurfaceFormat::YUV) {
MOZ_ASSERT(aHost->GetYUVColorSpace() != YUVColorSpace::UNKNOWN);
result = new EffectYCbCr(aSource, aHost->GetYUVColorSpace(), aSamplingFilter);
} else {
result = CreateTexturedEffect(aHost->GetReadFormat(),
aSource,
aSamplingFilter,
isAlphaPremultiplied,
state);
}
return result.forget();
}
/**
* Create a textured effect based on aSource format and the presence of
* aSourceOnWhite.

Просмотреть файл

@ -351,7 +351,7 @@ ImageHost::Composite(LayerComposite* aLayer,
bool isAlphaPremultiplied =
!(mCurrentTextureHost->GetFlags() & TextureFlags::NON_PREMULTIPLIED);
RefPtr<TexturedEffect> effect =
CreateTexturedEffect(mCurrentTextureHost,
CreateTexturedEffect(mCurrentTextureHost->GetReadFormat(),
mCurrentTextureSource.get(), aSamplingFilter, isAlphaPremultiplied,
GetRenderState());
if (!effect) {
@ -611,7 +611,7 @@ ImageHost::GenEffect(const gfx::SamplingFilter aSamplingFilter)
isAlphaPremultiplied = false;
}
return CreateTexturedEffect(mCurrentTextureHost,
return CreateTexturedEffect(mCurrentTextureHost->GetReadFormat(),
mCurrentTextureSource,
aSamplingFilter,
isAlphaPremultiplied,

Просмотреть файл

@ -807,16 +807,6 @@ BufferTextureHost::GetFormat() const
return mFormat;
}
YUVColorSpace
BufferTextureHost::GetYUVColorSpace() const
{
if (mFormat == gfx::SurfaceFormat::YUV) {
const YCbCrDescriptor& desc = mDescriptor.get_YCbCrDescriptor();
return desc.yUVColorSpace();
}
return YUVColorSpace::UNKNOWN;
}
bool
BufferTextureHost::MaybeUpload(nsIntRegion *aRegion)
{

Просмотреть файл

@ -421,8 +421,6 @@ public:
*/
virtual gfx::SurfaceFormat GetReadFormat() const { return GetFormat(); }
virtual YUVColorSpace GetYUVColorSpace() const { return YUVColorSpace::UNKNOWN; }
/**
* Called during the transaction. The TextureSource may or may not be composited.
*
@ -703,8 +701,6 @@ public:
*/
virtual gfx::SurfaceFormat GetFormat() const override;
virtual YUVColorSpace GetYUVColorSpace() const override;
virtual gfx::IntSize GetSize() const override { return mSize; }
virtual already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override;

Просмотреть файл

@ -19,7 +19,6 @@
#include "gfxPrefs.h"
#include "gfxConfig.h"
#include "gfxCrashReporterUtils.h"
#include "gfxUtils.h"
#include "mozilla/gfx/StackArray.h"
#include "mozilla/Services.h"
#include "mozilla/widget/WinCompositorWidget.h"
@ -889,9 +888,6 @@ CompositorD3D11::DrawQuad(const gfx::Rect& aRect,
return;
}
float* yuvToRgb = gfxUtils::Get4x3YuvColorMatrix(ycbcrEffect->mYUVColorSpace);
memcpy(&mPSConstants.yuvColorMatrix, yuvToRgb, sizeof(mPSConstants.yuvColorMatrix));
TextureSourceD3D11* sourceY = source->GetSubSource(Y)->AsSourceD3D11();
TextureSourceD3D11* sourceCb = source->GetSubSource(Cb)->AsSourceD3D11();
TextureSourceD3D11* sourceCr = source->GetSubSource(Cr)->AsSourceD3D11();

Просмотреть файл

@ -35,7 +35,6 @@ struct PixelShaderConstants
float layerColor[4];
float layerOpacity[4];
int blendConfig[4];
float yuvColorMatrix[3][4];
};
struct DeviceAttachmentsD3D11;

Просмотреть файл

@ -25,8 +25,6 @@ float fLayerOpacity : register(ps, c1);
// w = is premultiplied
uint4 iBlendConfig : register(ps, c2);
row_major float3x3 mYuvColorMatrix : register(ps, c3);
sampler sSampler : register(ps, s0);
// The mix-blend mega shader uses all variables, so we have to make sure they
@ -192,27 +190,19 @@ For [0,1] instead of [0,255], and to 5 places:
[R] [1.16438, 0.00000, 1.59603] [ Y - 0.06275]
[G] = [1.16438, -0.39176, -0.81297] x [Cb - 0.50196]
[B] [1.16438, 2.01723, 0.00000] [Cr - 0.50196]
From Rec709:
[R] [1.1643835616438356, 4.2781193979771426e-17, 1.7927410714285714] [ Y - 16]
[G] = [1.1643835616438358, -0.21324861427372963, -0.532909328559444] x [Cb - 128]
[B] [1.1643835616438356, 2.1124017857142854, 0.0] [Cr - 128]
For [0,1] instead of [0,255], and to 5 places:
[R] [1.16438, 0.00000, 1.79274] [ Y - 0.06275]
[G] = [1.16438, -0.21325, -0.53291] x [Cb - 0.50196]
[B] [1.16438, 2.11240, 0.00000] [Cr - 0.50196]
*/
float4 CalculateYCbCrColor(const float2 aTexCoords)
{
float3 yuv;
float4 yuv;
float4 color;
yuv.x = tY.Sample(sSampler, aTexCoords).r - 0.06275;
yuv.y = tCb.Sample(sSampler, aTexCoords).r - 0.50196;
yuv.z = tCr.Sample(sSampler, aTexCoords).r - 0.50196;
yuv.r = tCr.Sample(sSampler, aTexCoords).r - 0.50196;
yuv.g = tY.Sample(sSampler, aTexCoords).r - 0.06275;
yuv.b = tCb.Sample(sSampler, aTexCoords).r - 0.50196;
color.rgb = mul(mYuvColorMatrix, yuv);
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;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -16,7 +16,6 @@
#include "mozilla/layers/LayerManagerComposite.h"
#include "gfxPrefs.h"
#include "gfxCrashReporterUtils.h"
#include "gfxUtils.h"
#include "mozilla/layers/CompositorBridgeParent.h"
#include "mozilla/widget/WinCompositorWidget.h"
#include "D3D9SurfaceImage.h"
@ -416,10 +415,6 @@ CompositorD3D9::DrawQuad(const gfx::Rect &aRect,
return;
}
float* yuvToRgb = gfxUtils::Get4x3YuvColorMatrix(ycbcrEffect->mYUVColorSpace);
d3d9Device->SetPixelShaderConstantF(CBmYuvColorMatrix, yuvToRgb, 3);
TextureSourceD3D9* sourceY = source->GetSubSource(Y)->AsSourceD3D9();
TextureSourceD3D9* sourceCb = source->GetSubSource(Cb)->AsSourceD3D9();
TextureSourceD3D9* sourceCr = source->GetSubSource(Cr)->AsSourceD3D9();

Просмотреть файл

@ -31,7 +31,6 @@ const int CBvLayerQuad = 10;
// we don't use opacity with solid color shaders
const int CBfLayerOpacity = 0;
const int CBvColor = 0;
const int CBmYuvColorMatrix = 1;
enum DeviceManagerState {
// The device and swap chain are OK.

Просмотреть файл

@ -1,6 +1,6 @@
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -47,7 +47,7 @@
const BYTE LayerQuadVS[] =
{
0, 2, 254, 255, 254, 255,
76, 0, 67, 84, 65, 66,
79, 0, 67, 84, 65, 66,
28, 0, 0, 0, 2, 1,
0, 0, 0, 2, 254, 255,
5, 0, 0, 0, 28, 0,
@ -97,7 +97,9 @@ const BYTE LayerQuadVS[] =
32, 83, 104, 97, 100, 101,
114, 32, 67, 111, 109, 112,
105, 108, 101, 114, 32, 49,
48, 46, 49, 0, 171, 171,
48, 46, 48, 46, 49, 48,
48, 49, 49, 46, 49, 54,
51, 56, 52, 0, 171, 171,
81, 0, 0, 5, 11, 0,
15, 160, 0, 0, 0, 191,
0, 0, 0, 0, 0, 0,
@ -153,7 +155,7 @@ const BYTE LayerQuadVS[] =
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -182,7 +184,7 @@ const BYTE LayerQuadVS[] =
const BYTE RGBAShaderPS[] =
{
0, 2, 255, 255, 254, 255,
43, 0, 67, 84, 65, 66,
46, 0, 67, 84, 65, 66,
28, 0, 0, 0, 127, 0,
0, 0, 0, 2, 255, 255,
2, 0, 0, 0, 28, 0,
@ -210,7 +212,9 @@ const BYTE RGBAShaderPS[] =
76, 32, 83, 104, 97, 100,
101, 114, 32, 67, 111, 109,
112, 105, 108, 101, 114, 32,
49, 48, 46, 49, 0, 171,
49, 48, 46, 48, 46, 49,
48, 48, 49, 49, 46, 49,
54, 51, 56, 52, 0, 171,
31, 0, 0, 2, 0, 0,
0, 128, 0, 0, 3, 176,
31, 0, 0, 2, 0, 0,
@ -226,7 +230,7 @@ const BYTE RGBAShaderPS[] =
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -263,7 +267,7 @@ const BYTE RGBAShaderPS[] =
const BYTE ComponentPass1ShaderPS[] =
{
0, 2, 255, 255, 254, 255,
55, 0, 67, 84, 65, 66,
58, 0, 67, 84, 65, 66,
28, 0, 0, 0, 175, 0,
0, 0, 0, 2, 255, 255,
3, 0, 0, 0, 28, 0,
@ -299,7 +303,9 @@ const BYTE ComponentPass1ShaderPS[] =
76, 32, 83, 104, 97, 100,
101, 114, 32, 67, 111, 109,
112, 105, 108, 101, 114, 32,
49, 48, 46, 49, 0, 171,
49, 48, 46, 48, 46, 49,
48, 48, 49, 49, 46, 49,
54, 51, 56, 52, 0, 171,
81, 0, 0, 5, 1, 0,
15, 160, 0, 0, 128, 63,
0, 0, 0, 0, 0, 0,
@ -331,7 +337,7 @@ const BYTE ComponentPass1ShaderPS[] =
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -367,7 +373,7 @@ const BYTE ComponentPass1ShaderPS[] =
const BYTE ComponentPass2ShaderPS[] =
{
0, 2, 255, 255, 254, 255,
55, 0, 67, 84, 65, 66,
58, 0, 67, 84, 65, 66,
28, 0, 0, 0, 175, 0,
0, 0, 0, 2, 255, 255,
3, 0, 0, 0, 28, 0,
@ -403,7 +409,9 @@ const BYTE ComponentPass2ShaderPS[] =
76, 32, 83, 104, 97, 100,
101, 114, 32, 67, 111, 109,
112, 105, 108, 101, 114, 32,
49, 48, 46, 49, 0, 171,
49, 48, 46, 48, 46, 49,
48, 48, 49, 49, 46, 49,
54, 51, 56, 52, 0, 171,
81, 0, 0, 5, 1, 0,
15, 160, 0, 0, 128, 63,
0, 0, 0, 0, 0, 0,
@ -433,7 +441,7 @@ const BYTE ComponentPass2ShaderPS[] =
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -464,7 +472,7 @@ const BYTE ComponentPass2ShaderPS[] =
const BYTE RGBShaderPS[] =
{
0, 2, 255, 255, 254, 255,
43, 0, 67, 84, 65, 66,
46, 0, 67, 84, 65, 66,
28, 0, 0, 0, 127, 0,
0, 0, 0, 2, 255, 255,
2, 0, 0, 0, 28, 0,
@ -492,7 +500,9 @@ const BYTE RGBShaderPS[] =
76, 32, 83, 104, 97, 100,
101, 114, 32, 67, 111, 109,
112, 105, 108, 101, 114, 32,
49, 48, 46, 49, 0, 171,
49, 48, 46, 48, 46, 49,
48, 48, 49, 49, 46, 49,
54, 51, 56, 52, 0, 171,
81, 0, 0, 5, 1, 0,
15, 160, 0, 0, 128, 63,
0, 0, 0, 0, 0, 0,
@ -514,12 +524,11 @@ const BYTE RGBShaderPS[] =
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
// float fLayerOpacity;
// row_major float3x3 mYuvColorMatrix;
// sampler2D s2DCb;
// sampler2D s2DCr;
// sampler2D s2DY;
@ -527,141 +536,148 @@ const BYTE RGBShaderPS[] =
//
// Registers:
//
// Name Reg Size
// --------------- ----- ----
// fLayerOpacity c0 1
// mYuvColorMatrix c1 3
// s2DY s0 1
// s2DCb s1 1
// s2DCr s2 1
// Name Reg Size
// ------------- ----- ----
// fLayerOpacity c0 1
// s2DY s0 1
// s2DCb s1 1
// s2DCr s2 1
//
ps_2_0
def c4, -0.0627499968, -0.50195998, 1, 0
def c1, -0.5, -0.0625, 1.16400003, 1.59599996
def c2, 0.813000023, 0.391000003, 2.01799989, 1
dcl t0.xy
dcl_2d s0
dcl_2d s1
dcl_2d s2
texld r0, t0, s0
texld r1, t0, s1
texld r2, t0, s2
mov r3.w, c4.z
add r0.x, r0.w, c4.x
add r0.y, r1.w, c4.y
add r0.z, r2.w, c4.y
dp3 r3.x, c1, r0
dp3 r3.y, c2, r0
dp3 r3.z, c3, r0
mul r0, r3, c0.x
texld r0, t0, s2
texld r1, t0, s0
texld r2, t0, s1
add r0.x, r0.w, c1.x
add r0.y, r1.w, c1.y
mul r0.y, r0.y, c1.z
mad r0.z, r0.x, -c2.x, r0.y
mad r1.x, r0.x, c1.w, r0.y
add r0.x, r2.w, c1.x
mad r1.y, r0.x, -c2.y, r0.z
mad r1.z, r0.x, c2.z, r0.y
mov r1.w, c2.w
mul r0, r1, c0.x
mov oC0, r0
// approximately 12 instruction slots used (3 texture, 9 arithmetic)
// approximately 14 instruction slots used (3 texture, 11 arithmetic)
#endif
const BYTE YCbCrShaderPS[] =
{
0, 2, 255, 255, 254, 255,
79, 0, 67, 84, 65, 66,
28, 0, 0, 0, 15, 1,
69, 0, 67, 84, 65, 66,
28, 0, 0, 0, 219, 0,
0, 0, 0, 2, 255, 255,
5, 0, 0, 0, 28, 0,
4, 0, 0, 0, 28, 0,
0, 0, 0, 1, 0, 0,
8, 1, 0, 0, 128, 0,
212, 0, 0, 0, 108, 0,
0, 0, 2, 0, 0, 0,
1, 0, 0, 0, 144, 0,
1, 0, 0, 0, 124, 0,
0, 0, 0, 0, 0, 0,
160, 0, 0, 0, 2, 0,
1, 0, 3, 0, 6, 0,
176, 0, 0, 0, 0, 0,
0, 0, 192, 0, 0, 0,
3, 0, 1, 0, 1, 0,
0, 0, 200, 0, 0, 0,
0, 0, 0, 0, 216, 0,
0, 0, 3, 0, 2, 0,
1, 0, 0, 0, 224, 0,
0, 0, 0, 0, 0, 0,
240, 0, 0, 0, 3, 0,
0, 0, 1, 0, 0, 0,
248, 0, 0, 0, 0, 0,
0, 0, 102, 76, 97, 121,
101, 114, 79, 112, 97, 99,
105, 116, 121, 0, 171, 171,
0, 0, 3, 0, 1, 0,
140, 0, 0, 0, 3, 0,
1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 109, 89,
117, 118, 67, 111, 108, 111,
114, 77, 97, 116, 114, 105,
120, 0, 2, 0, 3, 0,
3, 0, 3, 0, 1, 0,
148, 0, 0, 0, 0, 0,
0, 0, 164, 0, 0, 0,
3, 0, 2, 0, 1, 0,
0, 0, 172, 0, 0, 0,
0, 0, 0, 0, 188, 0,
0, 0, 3, 0, 0, 0,
1, 0, 0, 0, 196, 0,
0, 0, 0, 0, 0, 0,
115, 50, 68, 67, 98, 0,
171, 171, 4, 0, 12, 0,
1, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
115, 50, 68, 67, 114, 0,
171, 171, 4, 0, 12, 0,
1, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
115, 50, 68, 89, 0, 171,
171, 171, 4, 0, 12, 0,
1, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
112, 115, 95, 50, 95, 48,
0, 77, 105, 99, 114, 111,
115, 111, 102, 116, 32, 40,
82, 41, 32, 72, 76, 83,
76, 32, 83, 104, 97, 100,
101, 114, 32, 67, 111, 109,
112, 105, 108, 101, 114, 32,
49, 48, 46, 49, 0, 171,
81, 0, 0, 5, 4, 0,
15, 160, 18, 131, 128, 189,
115, 128, 0, 191, 0, 0,
128, 63, 0, 0, 0, 0,
31, 0, 0, 2, 0, 0,
0, 128, 0, 0, 3, 176,
31, 0, 0, 2, 0, 0,
0, 144, 0, 8, 15, 160,
31, 0, 0, 2, 0, 0,
0, 144, 1, 8, 15, 160,
31, 0, 0, 2, 0, 0,
0, 144, 2, 8, 15, 160,
66, 0, 0, 3, 0, 0,
102, 76, 97, 121, 101, 114,
79, 112, 97, 99, 105, 116,
121, 0, 171, 171, 0, 0,
3, 0, 1, 0, 1, 0,
1, 0, 0, 0, 0, 0,
0, 0, 115, 50, 68, 67,
98, 0, 171, 171, 4, 0,
12, 0, 1, 0, 1, 0,
1, 0, 0, 0, 0, 0,
0, 0, 115, 50, 68, 67,
114, 0, 171, 171, 4, 0,
12, 0, 1, 0, 1, 0,
1, 0, 0, 0, 0, 0,
0, 0, 115, 50, 68, 89,
0, 171, 171, 171, 4, 0,
12, 0, 1, 0, 1, 0,
1, 0, 0, 0, 0, 0,
0, 0, 112, 115, 95, 50,
95, 48, 0, 77, 105, 99,
114, 111, 115, 111, 102, 116,
32, 40, 82, 41, 32, 72,
76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67,
111, 109, 112, 105, 108, 101,
114, 32, 49, 48, 46, 48,
46, 49, 48, 48, 49, 49,
46, 49, 54, 51, 56, 52,
0, 171, 81, 0, 0, 5,
1, 0, 15, 160, 0, 0,
0, 191, 0, 0, 128, 189,
244, 253, 148, 63, 186, 73,
204, 63, 81, 0, 0, 5,
2, 0, 15, 160, 197, 32,
80, 63, 39, 49, 200, 62,
233, 38, 1, 64, 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, 2, 8, 228, 160,
66, 0, 0, 3, 1, 0,
15, 128, 0, 0, 228, 176,
0, 8, 228, 160, 66, 0,
0, 3, 1, 0, 15, 128,
0, 3, 2, 0, 15, 128,
0, 0, 228, 176, 1, 8,
228, 160, 66, 0, 0, 3,
2, 0, 15, 128, 0, 0,
228, 176, 2, 8, 228, 160,
1, 0, 0, 2, 3, 0,
8, 128, 4, 0, 170, 160,
228, 160, 2, 0, 0, 3,
0, 0, 1, 128, 0, 0,
255, 128, 1, 0, 0, 160,
2, 0, 0, 3, 0, 0,
1, 128, 0, 0, 255, 128,
4, 0, 0, 160, 2, 0,
2, 128, 1, 0, 255, 128,
1, 0, 85, 160, 5, 0,
0, 3, 0, 0, 2, 128,
1, 0, 255, 128, 4, 0,
85, 160, 2, 0, 0, 3,
0, 0, 4, 128, 2, 0,
255, 128, 4, 0, 85, 160,
8, 0, 0, 3, 3, 0,
1, 128, 1, 0, 228, 160,
0, 0, 228, 128, 8, 0,
0, 3, 3, 0, 2, 128,
2, 0, 228, 160, 0, 0,
228, 128, 8, 0, 0, 3,
3, 0, 4, 128, 3, 0,
228, 160, 0, 0, 228, 128,
5, 0, 0, 3, 0, 0,
15, 128, 3, 0, 228, 128,
0, 0, 0, 160, 1, 0,
0, 2, 0, 8, 15, 128,
0, 0, 228, 128, 255, 255,
0, 0
0, 0, 85, 128, 1, 0,
170, 160, 4, 0, 0, 4,
0, 0, 4, 128, 0, 0,
0, 128, 2, 0, 0, 161,
0, 0, 85, 128, 4, 0,
0, 4, 1, 0, 1, 128,
0, 0, 0, 128, 1, 0,
255, 160, 0, 0, 85, 128,
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,
85, 161, 0, 0, 170, 128,
4, 0, 0, 4, 1, 0,
4, 128, 0, 0, 0, 128,
2, 0, 170, 160, 0, 0,
85, 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
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -684,7 +700,7 @@ const BYTE YCbCrShaderPS[] =
const BYTE SolidColorShaderPS[] =
{
0, 2, 255, 255, 254, 255,
32, 0, 67, 84, 65, 66,
35, 0, 67, 84, 65, 66,
28, 0, 0, 0, 83, 0,
0, 0, 0, 2, 255, 255,
1, 0, 0, 0, 28, 0,
@ -705,14 +721,16 @@ const BYTE SolidColorShaderPS[] =
83, 104, 97, 100, 101, 114,
32, 67, 111, 109, 112, 105,
108, 101, 114, 32, 49, 48,
46, 49, 0, 171, 1, 0,
46, 48, 46, 49, 48, 48,
49, 49, 46, 49, 54, 51,
56, 52, 0, 171, 1, 0,
0, 2, 0, 8, 15, 128,
0, 0, 228, 160, 255, 255,
0, 0
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -768,7 +786,7 @@ const BYTE SolidColorShaderPS[] =
const BYTE LayerQuadVSMask[] =
{
0, 2, 254, 255, 254, 255,
84, 0, 67, 84, 65, 66,
87, 0, 67, 84, 65, 66,
28, 0, 0, 0, 34, 1,
0, 0, 0, 2, 254, 255,
6, 0, 0, 0, 28, 0,
@ -823,7 +841,9 @@ const BYTE LayerQuadVSMask[] =
83, 76, 32, 83, 104, 97,
100, 101, 114, 32, 67, 111,
109, 112, 105, 108, 101, 114,
32, 49, 48, 46, 49, 0,
32, 49, 48, 46, 48, 46,
49, 48, 48, 49, 49, 46,
49, 54, 51, 56, 52, 0,
171, 171, 81, 0, 0, 5,
12, 0, 15, 160, 0, 0,
0, 191, 0, 0, 128, 63,
@ -894,7 +914,7 @@ const BYTE LayerQuadVSMask[] =
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -931,7 +951,7 @@ const BYTE LayerQuadVSMask[] =
const BYTE RGBAShaderPSMask[] =
{
0, 2, 255, 255, 254, 255,
54, 0, 67, 84, 65, 66,
57, 0, 67, 84, 65, 66,
28, 0, 0, 0, 171, 0,
0, 0, 0, 2, 255, 255,
3, 0, 0, 0, 28, 0,
@ -966,7 +986,9 @@ const BYTE RGBAShaderPSMask[] =
76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67,
111, 109, 112, 105, 108, 101,
114, 32, 49, 48, 46, 49,
114, 32, 49, 48, 46, 48,
46, 49, 48, 48, 49, 49,
46, 49, 54, 51, 56, 52,
0, 171, 31, 0, 0, 2,
0, 0, 0, 128, 0, 0,
3, 176, 31, 0, 0, 2,
@ -997,7 +1019,7 @@ const BYTE RGBAShaderPSMask[] =
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -1042,7 +1064,7 @@ const BYTE RGBAShaderPSMask[] =
const BYTE ComponentPass1ShaderPSMask[] =
{
0, 2, 255, 255, 254, 255,
66, 0, 67, 84, 65, 66,
69, 0, 67, 84, 65, 66,
28, 0, 0, 0, 219, 0,
0, 0, 0, 2, 255, 255,
4, 0, 0, 0, 28, 0,
@ -1085,7 +1107,9 @@ const BYTE ComponentPass1ShaderPSMask[] =
76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67,
111, 109, 112, 105, 108, 101,
114, 32, 49, 48, 46, 49,
114, 32, 49, 48, 46, 48,
46, 49, 48, 48, 49, 49,
46, 49, 54, 51, 56, 52,
0, 171, 81, 0, 0, 5,
1, 0, 15, 160, 0, 0,
128, 63, 0, 0, 0, 0,
@ -1132,7 +1156,7 @@ const BYTE ComponentPass1ShaderPSMask[] =
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -1176,7 +1200,7 @@ const BYTE ComponentPass1ShaderPSMask[] =
const BYTE ComponentPass2ShaderPSMask[] =
{
0, 2, 255, 255, 254, 255,
66, 0, 67, 84, 65, 66,
69, 0, 67, 84, 65, 66,
28, 0, 0, 0, 219, 0,
0, 0, 0, 2, 255, 255,
4, 0, 0, 0, 28, 0,
@ -1219,7 +1243,9 @@ const BYTE ComponentPass2ShaderPSMask[] =
76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67,
111, 109, 112, 105, 108, 101,
114, 32, 49, 48, 46, 49,
114, 32, 49, 48, 46, 48,
46, 49, 48, 48, 49, 49,
46, 49, 54, 51, 56, 52,
0, 171, 81, 0, 0, 5,
1, 0, 15, 160, 0, 0,
128, 63, 0, 0, 0, 0,
@ -1264,7 +1290,7 @@ const BYTE ComponentPass2ShaderPSMask[] =
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -1303,7 +1329,7 @@ const BYTE ComponentPass2ShaderPSMask[] =
const BYTE RGBShaderPSMask[] =
{
0, 2, 255, 255, 254, 255,
54, 0, 67, 84, 65, 66,
57, 0, 67, 84, 65, 66,
28, 0, 0, 0, 171, 0,
0, 0, 0, 2, 255, 255,
3, 0, 0, 0, 28, 0,
@ -1338,7 +1364,9 @@ const BYTE RGBShaderPSMask[] =
76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67,
111, 109, 112, 105, 108, 101,
114, 32, 49, 48, 46, 49,
114, 32, 49, 48, 46, 48,
46, 49, 48, 48, 49, 49,
46, 49, 54, 51, 56, 52,
0, 171, 81, 0, 0, 5,
1, 0, 15, 160, 0, 0,
128, 63, 0, 0, 0, 0,
@ -1375,12 +1403,11 @@ const BYTE RGBShaderPSMask[] =
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
// float fLayerOpacity;
// row_major float3x3 mYuvColorMatrix;
// sampler2D s2DCb;
// sampler2D s2DCr;
// sampler2D s2DMask;
@ -1389,18 +1416,18 @@ const BYTE RGBShaderPSMask[] =
//
// Registers:
//
// Name Reg Size
// --------------- ----- ----
// fLayerOpacity c0 1
// mYuvColorMatrix c1 3
// s2DY s0 1
// s2DCb s1 1
// s2DCr s2 1
// s2DMask s3 1
// Name Reg Size
// ------------- ----- ----
// fLayerOpacity c0 1
// s2DY s0 1
// s2DCb s1 1
// s2DCr s2 1
// s2DMask s3 1
//
ps_2_0
def c4, -0.0627499968, -0.50195998, 1, 0
def c1, -0.50195998, -0.0627499968, 1.16437995, 1.59603
def c2, 0.812969983, 0.391759992, 2.01723003, 1
dcl t0.xy
dcl t1.xyz
dcl_2d s0
@ -1409,149 +1436,156 @@ const BYTE RGBShaderPSMask[] =
dcl_2d s3
rcp r0.w, t1.z
mul r0.xy, r0.w, t1
texld r1, t0, s0
texld r2, t0, s1
texld r3, t0, s2
texld r1, t0, s2
texld r2, t0, s0
texld r3, t0, s1
texld r0, r0, s3
mov r4.w, c4.z
add r0.x, r1.w, c4.x
add r0.y, r2.w, c4.y
add r0.z, r3.w, c4.y
dp3 r4.x, c1, r0
dp3 r4.y, c2, r0
dp3 r4.z, c3, r0
mul r1, r4, c0.x
add r0.x, r1.w, c1.x
add r0.y, r2.w, c1.y
mul r0.y, r0.y, c1.z
mad r0.z, r0.x, -c2.x, r0.y
mad r1.x, r0.x, c1.w, r0.y
add r0.x, r3.w, c1.x
mad r1.y, r0.x, -c2.y, r0.z
mad r1.z, r0.x, c2.z, r0.y
mov r1.w, c2.w
mul r1, r1, c0.x
mul r0, r0.w, r1
mov oC0, r0
// approximately 16 instruction slots used (4 texture, 12 arithmetic)
// approximately 18 instruction slots used (4 texture, 14 arithmetic)
#endif
const BYTE YCbCrShaderPSMask[] =
{
0, 2, 255, 255, 254, 255,
90, 0, 67, 84, 65, 66,
28, 0, 0, 0, 59, 1,
80, 0, 67, 84, 65, 66,
28, 0, 0, 0, 7, 1,
0, 0, 0, 2, 255, 255,
6, 0, 0, 0, 28, 0,
5, 0, 0, 0, 28, 0,
0, 0, 0, 1, 0, 0,
52, 1, 0, 0, 148, 0,
0, 1, 0, 0, 128, 0,
0, 0, 2, 0, 0, 0,
1, 0, 0, 0, 164, 0,
1, 0, 0, 0, 144, 0,
0, 0, 0, 0, 0, 0,
180, 0, 0, 0, 2, 0,
1, 0, 3, 0, 6, 0,
196, 0, 0, 0, 0, 0,
0, 0, 212, 0, 0, 0,
3, 0, 1, 0, 1, 0,
0, 0, 220, 0, 0, 0,
0, 0, 0, 0, 236, 0,
0, 0, 3, 0, 2, 0,
1, 0, 0, 0, 244, 0,
160, 0, 0, 0, 3, 0,
1, 0, 1, 0, 0, 0,
168, 0, 0, 0, 0, 0,
0, 0, 184, 0, 0, 0,
3, 0, 2, 0, 1, 0,
0, 0, 192, 0, 0, 0,
0, 0, 0, 0, 208, 0,
0, 0, 3, 0, 3, 0,
1, 0, 0, 0, 216, 0,
0, 0, 0, 0, 0, 0,
4, 1, 0, 0, 3, 0,
3, 0, 1, 0, 0, 0,
12, 1, 0, 0, 0, 0,
0, 0, 28, 1, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 36, 1, 0, 0,
0, 0, 0, 0, 102, 76,
97, 121, 101, 114, 79, 112,
97, 99, 105, 116, 121, 0,
171, 171, 0, 0, 3, 0,
1, 0, 1, 0, 1, 0,
0, 0, 0, 0, 0, 0,
109, 89, 117, 118, 67, 111,
108, 111, 114, 77, 97, 116,
114, 105, 120, 0, 2, 0,
3, 0, 3, 0, 3, 0,
1, 0, 0, 0, 0, 0,
0, 0, 115, 50, 68, 67,
98, 0, 171, 171, 4, 0,
12, 0, 1, 0, 1, 0,
1, 0, 0, 0, 0, 0,
0, 0, 115, 50, 68, 67,
114, 0, 171, 171, 4, 0,
12, 0, 1, 0, 1, 0,
1, 0, 0, 0, 0, 0,
0, 0, 115, 50, 68, 77,
97, 115, 107, 0, 4, 0,
12, 0, 1, 0, 1, 0,
1, 0, 0, 0, 0, 0,
0, 0, 115, 50, 68, 89,
0, 171, 171, 171, 4, 0,
12, 0, 1, 0, 1, 0,
1, 0, 0, 0, 0, 0,
0, 0, 112, 115, 95, 50,
95, 48, 0, 77, 105, 99,
114, 111, 115, 111, 102, 116,
32, 40, 82, 41, 32, 72,
76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67,
111, 109, 112, 105, 108, 101,
114, 32, 49, 48, 46, 49,
0, 171, 81, 0, 0, 5,
4, 0, 15, 160, 18, 131,
128, 189, 115, 128, 0, 191,
0, 0, 128, 63, 0, 0,
0, 0, 31, 0, 0, 2,
0, 0, 0, 128, 0, 0,
3, 176, 31, 0, 0, 2,
0, 0, 0, 128, 1, 0,
7, 176, 31, 0, 0, 2,
0, 0, 0, 144, 0, 8,
15, 160, 31, 0, 0, 2,
0, 0, 0, 144, 1, 8,
15, 160, 31, 0, 0, 2,
0, 0, 0, 144, 2, 8,
15, 160, 31, 0, 0, 2,
0, 0, 0, 144, 3, 8,
15, 160, 6, 0, 0, 2,
0, 0, 8, 128, 1, 0,
170, 176, 5, 0, 0, 3,
0, 0, 3, 128, 0, 0,
255, 128, 1, 0, 228, 176,
66, 0, 0, 3, 1, 0,
232, 0, 0, 0, 3, 0,
0, 0, 1, 0, 0, 0,
240, 0, 0, 0, 0, 0,
0, 0, 102, 76, 97, 121,
101, 114, 79, 112, 97, 99,
105, 116, 121, 0, 171, 171,
0, 0, 3, 0, 1, 0,
1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 115, 50,
68, 67, 98, 0, 171, 171,
4, 0, 12, 0, 1, 0,
1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 115, 50,
68, 67, 114, 0, 171, 171,
4, 0, 12, 0, 1, 0,
1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 115, 50,
68, 77, 97, 115, 107, 0,
4, 0, 12, 0, 1, 0,
1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 115, 50,
68, 89, 0, 171, 171, 171,
4, 0, 12, 0, 1, 0,
1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 112, 115,
95, 50, 95, 48, 0, 77,
105, 99, 114, 111, 115, 111,
102, 116, 32, 40, 82, 41,
32, 72, 76, 83, 76, 32,
83, 104, 97, 100, 101, 114,
32, 67, 111, 109, 112, 105,
108, 101, 114, 32, 49, 48,
46, 48, 46, 49, 48, 48,
49, 49, 46, 49, 54, 51,
56, 52, 0, 171, 81, 0,
0, 5, 1, 0, 15, 160,
115, 128, 0, 191, 18, 131,
128, 189, 103, 10, 149, 63,
182, 74, 204, 63, 81, 0,
0, 5, 2, 0, 15, 160,
205, 30, 80, 63, 196, 148,
200, 62, 76, 26, 1, 64,
0, 0, 128, 63, 31, 0,
0, 2, 0, 0, 0, 128,
0, 0, 3, 176, 31, 0,
0, 2, 0, 0, 0, 128,
1, 0, 7, 176, 31, 0,
0, 2, 0, 0, 0, 144,
0, 8, 15, 160, 31, 0,
0, 2, 0, 0, 0, 144,
1, 8, 15, 160, 31, 0,
0, 2, 0, 0, 0, 144,
2, 8, 15, 160, 31, 0,
0, 2, 0, 0, 0, 144,
3, 8, 15, 160, 6, 0,
0, 2, 0, 0, 8, 128,
1, 0, 170, 176, 5, 0,
0, 3, 0, 0, 3, 128,
0, 0, 255, 128, 1, 0,
228, 176, 66, 0, 0, 3,
1, 0, 15, 128, 0, 0,
228, 176, 2, 8, 228, 160,
66, 0, 0, 3, 2, 0,
15, 128, 0, 0, 228, 176,
0, 8, 228, 160, 66, 0,
0, 3, 2, 0, 15, 128,
0, 3, 3, 0, 15, 128,
0, 0, 228, 176, 1, 8,
228, 160, 66, 0, 0, 3,
3, 0, 15, 128, 0, 0,
228, 176, 2, 8, 228, 160,
66, 0, 0, 3, 0, 0,
15, 128, 0, 0, 228, 128,
3, 8, 228, 160, 1, 0,
0, 2, 4, 0, 8, 128,
4, 0, 170, 160, 2, 0,
0, 3, 0, 0, 1, 128,
1, 0, 255, 128, 4, 0,
0, 160, 2, 0, 0, 3,
0, 0, 2, 128, 2, 0,
255, 128, 4, 0, 85, 160,
2, 0, 0, 3, 0, 0,
4, 128, 3, 0, 255, 128,
4, 0, 85, 160, 8, 0,
0, 3, 4, 0, 1, 128,
1, 0, 228, 160, 0, 0,
228, 128, 8, 0, 0, 3,
4, 0, 2, 128, 2, 0,
228, 160, 0, 0, 228, 128,
8, 0, 0, 3, 4, 0,
4, 128, 3, 0, 228, 160,
0, 0, 228, 128, 5, 0,
0, 3, 1, 0, 15, 128,
4, 0, 228, 128, 0, 0,
0, 160, 5, 0, 0, 3,
0, 0, 15, 128, 0, 0,
255, 128, 1, 0, 228, 128,
1, 0, 0, 2, 0, 8,
15, 128, 0, 0, 228, 128,
255, 255, 0, 0
228, 128, 3, 8, 228, 160,
2, 0, 0, 3, 0, 0,
1, 128, 1, 0, 255, 128,
1, 0, 0, 160, 2, 0,
0, 3, 0, 0, 2, 128,
2, 0, 255, 128, 1, 0,
85, 160, 5, 0, 0, 3,
0, 0, 2, 128, 0, 0,
85, 128, 1, 0, 170, 160,
4, 0, 0, 4, 0, 0,
4, 128, 0, 0, 0, 128,
2, 0, 0, 161, 0, 0,
85, 128, 4, 0, 0, 4,
1, 0, 1, 128, 0, 0,
0, 128, 1, 0, 255, 160,
0, 0, 85, 128, 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, 85, 161,
0, 0, 170, 128, 4, 0,
0, 4, 1, 0, 4, 128,
0, 0, 0, 128, 2, 0,
170, 160, 0, 0, 85, 128,
1, 0, 0, 2, 1, 0,
8, 128, 2, 0, 255, 160,
5, 0, 0, 3, 1, 0,
15, 128, 1, 0, 228, 128,
0, 0, 0, 160, 5, 0,
0, 3, 0, 0, 15, 128,
0, 0, 255, 128, 1, 0,
228, 128, 1, 0, 0, 2,
0, 8, 15, 128, 0, 0,
228, 128, 255, 255, 0, 0
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
// Parameters:
//
@ -1582,7 +1616,7 @@ const BYTE YCbCrShaderPSMask[] =
const BYTE SolidColorShaderPSMask[] =
{
0, 2, 255, 255, 254, 255,
43, 0, 67, 84, 65, 66,
46, 0, 67, 84, 65, 66,
28, 0, 0, 0, 127, 0,
0, 0, 0, 2, 255, 255,
2, 0, 0, 0, 28, 0,
@ -1610,7 +1644,9 @@ const BYTE SolidColorShaderPSMask[] =
76, 32, 83, 104, 97, 100,
101, 114, 32, 67, 111, 109,
112, 105, 108, 101, 114, 32,
49, 48, 46, 49, 0, 171,
49, 48, 46, 48, 46, 49,
48, 48, 49, 49, 46, 49,
54, 51, 56, 52, 0, 171,
31, 0, 0, 2, 0, 0,
0, 128, 1, 0, 7, 176,
31, 0, 0, 2, 0, 0,

Просмотреть файл

@ -18,7 +18,6 @@ sampler s2DMask;
float fLayerOpacity;
float4 fLayerColor;
row_major float3x3 mYuvColorMatrix : register(ps, c1);
struct VS_INPUT {
float4 vPosition : POSITION;
@ -140,36 +139,18 @@ float4 RGBShader(const VS_OUTPUT aVertex) : COLOR
return result * fLayerOpacity;
}
/* From Rec601:
[R] [1.1643835616438356, 0.0, 1.5960267857142858] [ Y - 16]
[G] = [1.1643835616438358, -0.3917622900949137, -0.8129676472377708] x [Cb - 128]
[B] [1.1643835616438356, 2.017232142857143, 8.862867620416422e-17] [Cr - 128]
For [0,1] instead of [0,255], and to 5 places:
[R] [1.16438, 0.00000, 1.59603] [ Y - 0.06275]
[G] = [1.16438, -0.39176, -0.81297] x [Cb - 0.50196]
[B] [1.16438, 2.01723, 0.00000] [Cr - 0.50196]
From Rec709:
[R] [1.1643835616438356, 4.2781193979771426e-17, 1.7927410714285714] [ Y - 16]
[G] = [1.1643835616438358, -0.21324861427372963, -0.532909328559444] x [Cb - 128]
[B] [1.1643835616438356, 2.1124017857142854, 0.0] [Cr - 128]
For [0,1] instead of [0,255], and to 5 places:
[R] [1.16438, 0.00000, 1.79274] [ Y - 0.06275]
[G] = [1.16438, -0.21325, -0.53291] x [Cb - 0.50196]
[B] [1.16438, 2.11240, 0.00000] [Cr - 0.50196]
*/
float4 YCbCrShader(const VS_OUTPUT aVertex) : COLOR
{
float3 yuv;
float4 yuv;
float4 color;
yuv.x = tex2D(s2DY, aVertex.vTexCoords).a - 0.06275;
yuv.y = tex2D(s2DCb, aVertex.vTexCoords).a - 0.50196;
yuv.z = tex2D(s2DCr, aVertex.vTexCoords).a - 0.50196;
yuv.r = tex2D(s2DCr, aVertex.vTexCoords).a - 0.5;
yuv.g = tex2D(s2DY, aVertex.vTexCoords).a - 0.0625;
yuv.b = tex2D(s2DCb, aVertex.vTexCoords).a - 0.5;
color.rgb = mul(mYuvColorMatrix, yuv);
color.r = yuv.g * 1.164 + yuv.r * 1.596;
color.g = yuv.g * 1.164 - 0.813 * yuv.r - 0.391 * yuv.b;
color.b = yuv.g * 1.164 + yuv.b * 2.018;
color.a = 1.0f;
return color * fLayerOpacity;
@ -217,16 +198,28 @@ float4 RGBShaderMask(const VS_OUTPUT_MASK aVertex) : COLOR
return result * fLayerOpacity * 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 YCbCrShaderMask(const VS_OUTPUT_MASK aVertex) : COLOR
{
float3 yuv;
float4 yuv;
float4 color;
yuv.x = tex2D(s2DY, aVertex.vTexCoords).a - 0.06275;
yuv.y = tex2D(s2DCb, aVertex.vTexCoords).a - 0.50196;
yuv.z = tex2D(s2DCr, aVertex.vTexCoords).a - 0.50196;
yuv.r = tex2D(s2DCr, aVertex.vTexCoords).a - 0.50196;
yuv.g = tex2D(s2DY, aVertex.vTexCoords).a - 0.06275;
yuv.b = tex2D(s2DCb, aVertex.vTexCoords).a - 0.50196;
color.rgb = mul((float3x3)mYuvColorMatrix, yuv);
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;
float2 maskCoords = aVertex.vMaskCoords.xy / aVertex.vMaskCoords.z;

Просмотреть файл

@ -1319,7 +1319,6 @@ CompositorOGL::DrawGeometry(const Geometry& aGeometry,
program->SetYCbCrTextureUnits(Y, Cb, Cr);
program->SetTextureTransform(Matrix4x4());
program->SetYUVColorSpace(effectYCbCr->mYUVColorSpace);
if (maskType != MaskType::MaskNone) {
BindMaskForProgram(program, sourceMask, LOCAL_GL_TEXTURE3, maskQuadTransform);

Просмотреть файл

@ -7,7 +7,6 @@
#include <sstream> // for ostringstream
#include "gfxEnv.h"
#include "gfxRect.h" // for gfxRect
#include "gfxUtils.h"
#include "mozilla/DebugOnly.h" // for DebugOnly
#include "mozilla/layers/Compositor.h" // for BlendOpIsMixBlendMode
#include "nsAString.h"
@ -59,7 +58,6 @@ AddUniforms(ProgramProfileOGL& aProfile)
"uSSEdges",
"uViewportSize",
"uVisibleCenter",
"uYuvColorMatrix",
nullptr
};
@ -377,7 +375,6 @@ ProgramProfileOGL::GetProfileFor(ShaderConfigOGL aConfig)
fs << "uniform sampler2D uYTexture;" << endl;
fs << "uniform sampler2D uCbTexture;" << endl;
fs << "uniform sampler2D uCrTexture;" << endl;
fs << "uniform mat3 uYuvColorMatrix;" << endl;
} else if (aConfig.mFeatures & ENABLE_TEXTURE_NV12) {
fs << "uniform " << sampler2D << " uYTexture;" << endl;
fs << "uniform " << sampler2D << " uCbTexture;" << endl;
@ -436,11 +433,22 @@ ProgramProfileOGL::GetProfileFor(ShaderConfigOGL aConfig)
}
}
fs << " y = y - 0.06275;" << endl;
/* 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]
*/
fs << " y = (y - 0.06275) * 1.16438;" << endl;
fs << " cb = cb - 0.50196;" << endl;
fs << " cr = cr - 0.50196;" << endl;
fs << " vec3 yuv = vec3(y, cb, cr);" << endl;
fs << " color.rgb = uYuvColorMatrix * yuv;" << endl;
fs << " color.r = y + 1.59603*cr;" << endl;
fs << " color.g = y - 0.39176*cb - 0.81297*cr;" << endl;
fs << " color.b = y + 2.01723*cb;" << endl;
fs << " color.a = 1.0;" << endl;
} else if (aConfig.mFeatures & ENABLE_TEXTURE_COMPONENT_ALPHA) {
if (aConfig.mFeatures & ENABLE_TEXTURE_RECT) {
@ -963,12 +971,5 @@ ShaderProgramOGL::SetBlurRadius(float aRX, float aRY)
SetArrayUniform(KnownUniform::BlurGaussianKernel, GAUSSIAN_KERNEL_HALF_WIDTH, gaussianKernel);
}
void
ShaderProgramOGL::SetYUVColorSpace(YUVColorSpace aYUVColorSpace)
{
float* yuvToRgb = gfxUtils::Get3x3YuvColorMatrix(aYUVColorSpace);
SetMatrix3fvUniform(KnownUniform::YuvColorMatrix, yuvToRgb);
}
} // namespace layers
} // namespace mozilla

Просмотреть файл

@ -8,7 +8,6 @@
#include "GLContext.h" // for fast inlines of glUniform*
#include "gfxTypes.h"
#include "ImageTypes.h"
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/Pair.h" // for Pair
#include "mozilla/RefPtr.h" // for RefPtr
@ -82,7 +81,6 @@ public:
SSEdges,
ViewportSize,
VisibleCenter,
YuvColorMatrix,
KnownUniformCount
};
@ -148,7 +146,6 @@ public:
case 2:
case 3:
case 4:
case 9:
case 16:
if (memcmp(mValue.f16v, fp, sizeof(float) * cnt) != 0) {
memcpy(mValue.f16v, fp, sizeof(float) * cnt);
@ -157,7 +154,7 @@ public:
return false;
}
NS_NOTREACHED("cnt must be 1 2 3 4 9 or 16");
NS_NOTREACHED("cnt must be 1 2 3 4 or 16");
return false;
}
@ -479,8 +476,6 @@ public:
SetUniform(KnownUniform::CbCrTexCoordMultiplier, 2, f);
}
void SetYUVColorSpace(YUVColorSpace aYUVColorSpace);
// Set whether we want the component alpha shader to return the color
// vector (pass 1, false) or the alpha vector (pass2, true). With support
// for multiple render targets we wouldn't need two passes here.
@ -600,16 +595,6 @@ protected:
}
}
void SetMatrix3fvUniform(KnownUniform::KnownUniformName aKnownUniform, const float *aFloatValues) {
ASSERT_THIS_PROGRAM;
NS_ASSERTION(aKnownUniform >= 0 && aKnownUniform < KnownUniform::KnownUniformCount, "Invalid known uniform");
KnownUniform& ku(mProfile.mUniforms[aKnownUniform]);
if (ku.UpdateUniform(9, aFloatValues)) {
mGL->fUniformMatrix3fv(ku.mLocation, 1, false, ku.mValue.f16v);
}
}
void SetMatrixUniform(KnownUniform::KnownUniformName aKnownUniform, const gfx::Matrix4x4& aMatrix) {
SetMatrixUniform(aKnownUniform, &aMatrix._11);
}

Просмотреть файл

@ -1148,64 +1148,6 @@ gfxUtils::EncodeSourceSurface(SourceSurface* aSurface,
aBinaryOrData, aFile, nullptr);
}
/* From Rec601:
[R] [1.1643835616438356, 0.0, 1.5960267857142858] [ Y - 16]
[G] = [1.1643835616438358, -0.3917622900949137, -0.8129676472377708] x [Cb - 128]
[B] [1.1643835616438356, 2.017232142857143, 8.862867620416422e-17] [Cr - 128]
For [0,1] instead of [0,255], and to 5 places:
[R] [1.16438, 0.00000, 1.59603] [ Y - 0.06275]
[G] = [1.16438, -0.39176, -0.81297] x [Cb - 0.50196]
[B] [1.16438, 2.01723, 0.00000] [Cr - 0.50196]
From Rec709:
[R] [1.1643835616438356, 4.2781193979771426e-17, 1.7927410714285714] [ Y - 16]
[G] = [1.1643835616438358, -0.21324861427372963, -0.532909328559444] x [Cb - 128]
[B] [1.1643835616438356, 2.1124017857142854, 0.0] [Cr - 128]
For [0,1] instead of [0,255], and to 5 places:
[R] [1.16438, 0.00000, 1.79274] [ Y - 0.06275]
[G] = [1.16438, -0.21325, -0.53291] x [Cb - 0.50196]
[B] [1.16438, 2.11240, 0.00000] [Cr - 0.50196]
*/
/* static */ float*
gfxUtils::Get4x3YuvColorMatrix(YUVColorSpace aYUVColorSpace)
{
static const float yuv_to_rgb_rec601[12] = { 1.16438f, 0.0f, 1.59603f, 0.0f,
1.16438f, -0.39176f, -0.81297f, 0.0f,
1.16438f, 2.01723f, 0.0f, 0.0f,
};
static const float yuv_to_rgb_rec709[12] = { 1.16438f, 0.0f, 1.79274f, 0.0f,
1.16438f, -0.21325f, -0.53291f, 0.0f,
1.16438f, 2.11240f, 0.0f, 0.0f,
};
if (aYUVColorSpace == YUVColorSpace::BT709) {
return const_cast<float*>(yuv_to_rgb_rec709);
} else {
return const_cast<float*>(yuv_to_rgb_rec601);
}
}
/* static */ float*
gfxUtils::Get3x3YuvColorMatrix(YUVColorSpace aYUVColorSpace)
{
static const float yuv_to_rgb_rec601[9] = {
1.16438f, 1.16438f, 1.16438f, 0.0f, -0.39176f, 2.01723f, 1.59603f, -0.81297f, 0.0f,
};
static const float yuv_to_rgb_rec709[9] = {
1.16438f, 1.16438f, 1.16438f, 0.0f, -0.21325f, 2.11240f, 1.79274f, -0.53291f, 0.0f,
};
if (aYUVColorSpace == YUVColorSpace::BT709) {
return const_cast<float*>(yuv_to_rgb_rec709);
} else {
return const_cast<float*>(yuv_to_rgb_rec601);
}
}
/* static */ void
gfxUtils::WriteAsPNG(SourceSurface* aSurface, const nsAString& aFile)
{

Просмотреть файл

@ -7,7 +7,6 @@
#define GFX_UTILS_H
#include "gfxTypes.h"
#include "ImageTypes.h"
#include "imgIContainer.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/RefPtr.h"
@ -42,7 +41,6 @@ public:
typedef mozilla::gfx::SourceSurface SourceSurface;
typedef mozilla::gfx::SurfaceFormat SurfaceFormat;
typedef mozilla::image::ImageRegion ImageRegion;
typedef mozilla::YUVColorSpace YUVColorSpace;
/*
* Premultiply or Unpremultiply aSourceSurface, writing the result
@ -136,13 +134,6 @@ public:
*/
static void ClearThebesSurface(gfxASurface* aSurface);
/**
* Get array of yuv to rgb conversion matrix.
*/
static float* Get4x3YuvColorMatrix(YUVColorSpace aYUVColorSpace);
static float* Get3x3YuvColorMatrix(YUVColorSpace aYUVColorSpace);
/**
* Creates a copy of aSurface, but having the SurfaceFormat aFormat.
*