зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to inbound a=merge on a CLOSED TREE
--HG-- rename : python/mozrelease/test/data/Firefox-62.0b11.update.json => python/mozrelease/test/data/Firefox-64.0b13.update.json extra : rebase_source : 6eb078869182f40343e201993c0d0442ed96ad46
This commit is contained in:
Коммит
b8bc09a5b5
|
@ -16,7 +16,8 @@ JS_END_MACRO|\
|
|||
NS_INTERFACE_MAP_END|\
|
||||
NS_IMPL_CYCLE_COLLECTION_.*_END|\
|
||||
NS_INTERFACE_TABLE_END|\
|
||||
NS_INTERFACE_MAP_END_INHERITING|\
|
||||
NS_INTERFACE_TABLE_TAIL.*|\
|
||||
NS_INTERFACE_MAP_END_.*|\
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END_INHERITED|\
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED$"
|
||||
|
||||
|
|
|
@ -45,6 +45,9 @@ xpcom/tests/.*
|
|||
|
||||
# Autogenerated file
|
||||
gfx/gl/GLConsts.h
|
||||
gfx/webrender_bindings/webrender_ffi_generated.h
|
||||
intl/unicharutil/util/nsUnicodePropertyData.cpp
|
||||
intl/unicharutil/util/nsUnicodeScriptCodes.h
|
||||
media/mp4parse-rust/mp4parse.h
|
||||
|
||||
# Generated from ./tools/rewriting/ThirdPartyPaths.txt
|
||||
|
|
|
@ -36,8 +36,7 @@ add_task(async function setup() {
|
|||
Services.telemetry.getHistogramById("TRACKING_PROTECTION_ENABLED").snapshot().values;
|
||||
is(enabledCounts[0], 1, "TP was not enabled on start up");
|
||||
|
||||
let scalars = Services.telemetry.snapshotScalars(
|
||||
Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTOUT, false).parent;
|
||||
let scalars = Services.telemetry.getSnapshotForScalars("main", false).parent;
|
||||
|
||||
is(scalars["contentblocking.exceptions"], 0, "no CB exceptions at startup");
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"properties": {
|
||||
"keyword": {
|
||||
"type": "string",
|
||||
"pattern": "^[^?\\s:]([^\\s:]*[^/\\s:])?$"
|
||||
"pattern": "^[^?\\s:][^\\s:]*$"
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
|
|
|
@ -12,7 +12,7 @@ async function testKeyword(params) {
|
|||
if (params.expectError) {
|
||||
let expectedError = (
|
||||
String.raw`omnibox.keyword: String "${params.keyword}" ` +
|
||||
String.raw`must match /^[^?\s:]([^\s:]*[^/\s:])?$/`
|
||||
String.raw`must match /^[^?\s:][^\s:]*$/`
|
||||
);
|
||||
ok(normalized.error.includes(expectedError),
|
||||
`The manifest error ${JSON.stringify(normalized.error)} ` +
|
||||
|
@ -43,6 +43,7 @@ add_task(async function test_manifest_commands() {
|
|||
await testKeyword({keyword: "fa?", expectError: false});
|
||||
await testKeyword({keyword: "f/x", expectError: false});
|
||||
await testKeyword({keyword: "/fx", expectError: false});
|
||||
await testKeyword({keyword: "fx/", expectError: false});
|
||||
|
||||
// rejected multi-character keywords
|
||||
await testKeyword({keyword: " a", expectError: true});
|
||||
|
@ -50,7 +51,6 @@ add_task(async function test_manifest_commands() {
|
|||
await testKeyword({keyword: " ", expectError: true});
|
||||
await testKeyword({keyword: " a ", expectError: true});
|
||||
await testKeyword({keyword: "?fx", expectError: true});
|
||||
await testKeyword({keyword: "fx/", expectError: true});
|
||||
await testKeyword({keyword: "f:x", expectError: true});
|
||||
await testKeyword({keyword: "fx:", expectError: true});
|
||||
await testKeyword({keyword: "f x", expectError: true});
|
||||
|
|
|
@ -16,12 +16,7 @@
|
|||
<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/containers.css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/in-content/privacy.css"?>
|
||||
|
||||
<!DOCTYPE page [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
<!ENTITY % certManagerDTD SYSTEM "chrome://pippki/locale/certManager.dtd">
|
||||
%brandDTD;
|
||||
%certManagerDTD;
|
||||
]>
|
||||
<!DOCTYPE page>
|
||||
|
||||
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
|
@ -49,6 +44,7 @@
|
|||
<link rel="localization" href="browser/sanitize.ftl"/>
|
||||
<link rel="localization" href="toolkit/updates/history.ftl"/>
|
||||
<link rel="localization" href="security/certificates/deviceManager.ftl"/>
|
||||
<link rel="localization" href="security/certificates/certManager.ftl"/>
|
||||
</linkset>
|
||||
|
||||
<html:link rel="shortcut icon"
|
||||
|
|
|
@ -792,19 +792,21 @@
|
|||
class="accessory-button"
|
||||
data-l10n-id="certs-view"
|
||||
preference="security.disable_button.openCertManager"
|
||||
searchkeywords="&certmgr.tab.mine;
|
||||
&certmgr.tab.others2;
|
||||
&certmgr.tab.websites3;
|
||||
&certmgr.tab.ca;
|
||||
&certmgr.mine2;
|
||||
&certmgr.others2;
|
||||
&certmgr.websites3;
|
||||
&certmgr.cas2;
|
||||
&certmgr.certname;
|
||||
&certmgr.tokenname;
|
||||
&certmgr.view2.label;
|
||||
&certmgr.export.label;
|
||||
&certmgr.delete2.label;"/>
|
||||
search-l10n-ids="
|
||||
certmgr-tab-mine.label,
|
||||
certmgr-tab-people.label,
|
||||
certmgr-tab-servers.label,
|
||||
certmgr-tab-ca.label,
|
||||
certmgr-mine,
|
||||
certmgr-people,
|
||||
certmgr-servers,
|
||||
certmgr-ca,
|
||||
certmgr-cert-name.label,
|
||||
certmgr-token-name.label,
|
||||
certmgr-view.label,
|
||||
certmgr-export.label,
|
||||
certmgr-delete.label
|
||||
"/>
|
||||
</hbox>
|
||||
<!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
|
||||
<hbox pack="end">
|
||||
|
|
|
@ -136,8 +136,6 @@ class AsyncTabSwitcher {
|
|||
this._useDumpForLogging = false;
|
||||
this._logInit = false;
|
||||
|
||||
this._tabSwitchStopWatchRunning = false;
|
||||
|
||||
this.window.addEventListener("MozAfterPaint", this);
|
||||
this.window.addEventListener("MozLayerTreeReady", this);
|
||||
this.window.addEventListener("MozLayerTreeCleared", this);
|
||||
|
@ -437,7 +435,6 @@ class AsyncTabSwitcher {
|
|||
// the parent process might not even get MozAfterPaint delivered for it), so just
|
||||
// give up measuring this for now. :(
|
||||
TelemetryStopwatch.cancel("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window);
|
||||
this._tabSwitchStopWatchRunning = false;
|
||||
}
|
||||
|
||||
this.tabbrowser._adjustFocusAfterTabSwitch(showTab);
|
||||
|
@ -743,12 +740,11 @@ class AsyncTabSwitcher {
|
|||
onPaint(event) {
|
||||
if (this.switchPaintId != -1 &&
|
||||
event.transactionId >= this.switchPaintId) {
|
||||
if (this._tabSwitchStopWatchRunning) {
|
||||
if (TelemetryStopwatch.running("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window)) {
|
||||
let time = TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window);
|
||||
if (time != -1) {
|
||||
TelemetryStopwatch.finish("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window);
|
||||
this.log("DEBUG: tab switch time including compositing = " + time);
|
||||
this._tabSwitchStopWatchRunning = false;
|
||||
}
|
||||
}
|
||||
this.addMarker("AsyncTabSwitch:Composited");
|
||||
|
@ -1081,11 +1077,10 @@ class AsyncTabSwitcher {
|
|||
TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_E10S_MS", this.window);
|
||||
TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_E10S_MS", this.window);
|
||||
|
||||
if (this._tabSwitchStopWatchRunning) {
|
||||
if (TelemetryStopwatch.running("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window)) {
|
||||
TelemetryStopwatch.cancel("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window);
|
||||
}
|
||||
TelemetryStopwatch.start("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window);
|
||||
this._tabSwitchStopWatchRunning = true;
|
||||
this.addMarker("AsyncTabSwitch:Start");
|
||||
this.switchInProgress = true;
|
||||
}
|
||||
|
|
|
@ -113,8 +113,7 @@ add_task(async function testScalars() {
|
|||
await reporter.handleMessage(message);
|
||||
}
|
||||
|
||||
const optin = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN;
|
||||
const scalars = Services.telemetry.snapshotScalars(optin, false).parent;
|
||||
const scalars = Services.telemetry.getSnapshotForScalars("main", false).parent;
|
||||
is(
|
||||
scalars[TELEMETRY_ERROR_COLLECTED],
|
||||
7,
|
||||
|
@ -126,7 +125,7 @@ add_task(async function testScalars() {
|
|||
`${TELEMETRY_ERROR_REPORTED_FAIL} is incremented when an error with a stack trace is collected.`,
|
||||
);
|
||||
|
||||
const keyedScalars = Services.telemetry.snapshotKeyedScalars(optin, false).parent;
|
||||
const keyedScalars = Services.telemetry.getSnapshotForKeyedScalars("main", false).parent;
|
||||
Assert.deepEqual(
|
||||
keyedScalars[TELEMETRY_ERROR_COLLECTED_FILENAME],
|
||||
{
|
||||
|
@ -181,7 +180,7 @@ add_task(async function testCollectedFilenameScalar() {
|
|||
}));
|
||||
|
||||
const keyedScalars = (
|
||||
Services.telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false).parent
|
||||
Services.telemetry.getSnapshotForKeyedScalars("main", false).parent
|
||||
);
|
||||
|
||||
let matched = null;
|
||||
|
|
|
@ -448,8 +448,7 @@ add_task(async function testScalars() {
|
|||
fetchStub.rejects(new Error("Could not report"));
|
||||
await reporter.handleMessage(createScriptError({message: "Maybe name?"}));
|
||||
|
||||
const optin = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN;
|
||||
const scalars = Services.telemetry.snapshotScalars(optin, false).parent;
|
||||
const scalars = Services.telemetry.getSnapshotForScalars("main", false).parent;
|
||||
is(
|
||||
scalars[TELEMETRY_ERROR_COLLECTED],
|
||||
3,
|
||||
|
|
|
@ -117,10 +117,9 @@ add_task(async function test_subsessionSplit() {
|
|||
// Remove a tab.
|
||||
BrowserTestUtils.removeTab(openedTabs.pop());
|
||||
|
||||
// Simulate a subsession split by clearing the scalars (via |snapshotScalars|) and
|
||||
// Simulate a subsession split by clearing the scalars (via |getSnapshotForScalars|) and
|
||||
// notifying the subsession split topic.
|
||||
Services.telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN,
|
||||
true /* clearScalars */);
|
||||
Services.telemetry.getSnapshotForScalars("main", true /* clearScalars */);
|
||||
Services.obs.notifyObservers(null, TELEMETRY_SUBSESSION_TOPIC);
|
||||
|
||||
// After a subsession split, only the MAX_CONCURRENT_* scalars must be available
|
||||
|
|
|
@ -139,9 +139,13 @@ function checkKeyedHistogram(h, key, expectedValue) {
|
|||
* Return the scalars from the parent-process.
|
||||
*/
|
||||
function getParentProcessScalars(aChannel, aKeyed = false, aClear = false) {
|
||||
const extended = aChannel == Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN;
|
||||
const currentExtended = Services.telemetry.canRecordExtended;
|
||||
Services.telemetry.canRecordExtended = extended;
|
||||
const scalars = aKeyed ?
|
||||
Services.telemetry.snapshotKeyedScalars(aChannel, aClear).parent :
|
||||
Services.telemetry.snapshotScalars(aChannel, aClear).parent;
|
||||
Services.telemetry.getSnapshotForKeyedScalars("main", aClear).parent :
|
||||
Services.telemetry.getSnapshotForScalars("main", aClear).parent;
|
||||
Services.telemetry.canRecordExtended = currentExtended;
|
||||
return scalars || {};
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
}
|
||||
|
||||
#tabbrowser-tabs:-moz-lwtheme {
|
||||
--tab-line-color: var(--lwt-accent-color);
|
||||
--tab-line-color: currentColor;
|
||||
}
|
||||
|
||||
#tabbrowser-tabpanels {
|
||||
|
|
|
@ -9,18 +9,20 @@
|
|||
const Menu = require("devtools/client/framework/menu");
|
||||
const MenuItem = require("devtools/client/framework/menu-item");
|
||||
|
||||
var stringsLoaded = false;
|
||||
// This WeakMap will be used to know if strings have already been loaded in a given
|
||||
// window, which will be used as key.
|
||||
const stringsLoaded = new WeakMap();
|
||||
|
||||
/**
|
||||
* Lazily load strings for the edit menu.
|
||||
*/
|
||||
function loadEditMenuStrings(win) {
|
||||
if (stringsLoaded) {
|
||||
if (stringsLoaded.has(win)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (win.MozXULElement) {
|
||||
stringsLoaded = true;
|
||||
stringsLoaded.set(win, true);
|
||||
win.MozXULElement.insertFTLIfNeeded("toolkit/main-window/editmenu.ftl");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -197,3 +197,4 @@ skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32
|
|||
[browser_inspector_startup.js]
|
||||
[browser_inspector_switch-to-inspector-on-pick.js]
|
||||
[browser_inspector_textbox-menu.js]
|
||||
[browser_inspector_textbox-menu_reopen_toolbox.js]
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
"use strict";
|
||||
|
||||
// Test that textbox context menu elements are still displayed correctly after reopening
|
||||
// the toolbox. Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1510182.
|
||||
|
||||
add_task(async function() {
|
||||
await addTab(`data:text/html;charset=utf-8,<div>test</div>`);
|
||||
|
||||
info("Testing the textbox context menu a first time");
|
||||
const {toolbox, inspector} = await openInspector();
|
||||
await checkContextMenuOnSearchbox(inspector, toolbox);
|
||||
|
||||
// Destroy the toolbox and try the context menu again with a new toolbox.
|
||||
await toolbox.destroy();
|
||||
|
||||
info("Testing the textbox context menu after reopening the toolbox");
|
||||
const {toolbox: newToolbox, inspector: newInspector} = await openInspector();
|
||||
await checkContextMenuOnSearchbox(newInspector, newToolbox);
|
||||
});
|
||||
|
||||
async function checkContextMenuOnSearchbox(inspector, toolbox) {
|
||||
// The same context menu is used for any text input.
|
||||
// Here we use the inspector searchbox for this test because it is always available.
|
||||
const searchbox = inspector.panelDoc.getElementById("inspector-searchbox");
|
||||
|
||||
info("Simulating context click on the textbox and expecting the menu to open");
|
||||
const onContextMenu = toolbox.once("menu-open");
|
||||
synthesizeContextMenuEvent(searchbox);
|
||||
await onContextMenu;
|
||||
|
||||
const textboxContextMenu = toolbox.doc.getElementById("toolbox-menu");
|
||||
info("Wait until menu items are rendered");
|
||||
const pasteElement = textboxContextMenu.querySelector("#editmenu-paste");
|
||||
await waitUntil(() => !!pasteElement.getAttribute("label"));
|
||||
|
||||
is(pasteElement.getAttribute("label"), "Paste", "Paste is visible and localized");
|
||||
|
||||
info("Closing the menu");
|
||||
const onContextMenuHidden = toolbox.once("menu-close");
|
||||
EventUtils.sendKey("ESCAPE", toolbox.win);
|
||||
await onContextMenuHidden;
|
||||
}
|
|
@ -27,49 +27,26 @@ class TelemetryHelpers {
|
|||
* Clear all telemetry types.
|
||||
*/
|
||||
stopTelemetry() {
|
||||
Services.telemetry.canRecordExtended = this.oldCanRecord;
|
||||
|
||||
// Clear histograms, scalars and Telemetry Events.
|
||||
this.clearHistograms(Services.telemetry.snapshotHistograms);
|
||||
this.clearHistograms(Services.telemetry.snapshotKeyedHistograms);
|
||||
this.clearHistograms(Services.telemetry.getSnapshotForHistograms);
|
||||
this.clearHistograms(Services.telemetry.getSnapshotForKeyedHistograms);
|
||||
Services.telemetry.clearScalars();
|
||||
Services.telemetry.clearEvents();
|
||||
|
||||
Services.telemetry.canRecordExtended = this.oldCanRecord;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears both OPTIN and OPTOUT versions of Telemetry Histograms.
|
||||
* Clears Telemetry Histograms.
|
||||
*
|
||||
* @param {Function} snapshotFunc
|
||||
* The function used to take the snapshot. This can be one of the
|
||||
* following:
|
||||
* - Services.telemetry.snapshotHistograms
|
||||
* - Services.telemetry.snapshotKeyedHistograms
|
||||
*
|
||||
* `snapshotFunc(OPTIN, true, true)` should clear the histograms but this
|
||||
* only deletes seemingly random histograms, hence this method.
|
||||
* - Services.telemetry.getSnapshotForHistograms
|
||||
* - Services.telemetry.getSnapshotForKeyedHistograms
|
||||
*/
|
||||
clearHistograms(snapshotFunc) {
|
||||
// Although most of our Telemetry probes are OPTOUT, OPTIN includes all OPTIN
|
||||
// *and* OPTOUT data.
|
||||
const OPTIN = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN;
|
||||
const OPTOUT = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTOUT;
|
||||
const tel = Services.telemetry;
|
||||
|
||||
for (const optInOut of [OPTIN, OPTOUT]) {
|
||||
const snapshot = snapshotFunc(optInOut, true, false).parent;
|
||||
const histKeys = Object.keys(snapshot);
|
||||
|
||||
for (const getHistogram of [tel.getHistogramById, tel.getKeyedHistogramById]) {
|
||||
for (const key of histKeys) {
|
||||
try {
|
||||
getHistogram(key).clear();
|
||||
} catch (e) {
|
||||
// Some histograms may have already been cleaned up by the system so we
|
||||
// swallow the "histogram does not exist" error silently here.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
snapshotFunc("main", true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,10 +66,6 @@ class TelemetryHelpers {
|
|||
* "keyedscalar" - Telemetry type is a keyed scalar.
|
||||
*/
|
||||
checkTelemetry(histId, key, expected, checkType) {
|
||||
// Although most of our Telemetry probes are OPTOUT, OPTIN includes all OPTIN
|
||||
// *and* OPTOUT data.
|
||||
const OPTIN = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN;
|
||||
|
||||
let actual;
|
||||
let msg;
|
||||
|
||||
|
@ -128,13 +101,13 @@ class TelemetryHelpers {
|
|||
break;
|
||||
case "scalar":
|
||||
const scalars =
|
||||
Services.telemetry.snapshotScalars(OPTIN, false).parent;
|
||||
Services.telemetry.getSnapshotForScalars("main", false).parent;
|
||||
|
||||
is(scalars[histId], expected, `${histId} correct`);
|
||||
break;
|
||||
case "keyedscalar":
|
||||
const keyedScalars =
|
||||
Services.telemetry.snapshotKeyedScalars(OPTIN, false).parent;
|
||||
Services.telemetry.getSnapshotForKeyedScalars("main", false).parent;
|
||||
const value = keyedScalars[histId][key];
|
||||
|
||||
msg = key ? `${histId}["${key}"] correct.` : `${histId} correct.`;
|
||||
|
@ -152,19 +125,15 @@ class TelemetryHelpers {
|
|||
* Optionally limits results to histogram ids starting with prefix.
|
||||
*/
|
||||
generateTelemetryTests(prefix = "") {
|
||||
// Although most of our Telemetry probes are OPTOUT, OPTIN includes all OPTIN
|
||||
// *and* OPTOUT data.
|
||||
const OPTIN = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN;
|
||||
|
||||
// Get all histograms and scalars
|
||||
const histograms =
|
||||
Services.telemetry.snapshotHistograms(OPTIN, true, false).parent;
|
||||
Services.telemetry.getSnapshotForHistograms("main", true).parent;
|
||||
const keyedHistograms =
|
||||
Services.telemetry.snapshotKeyedHistograms(OPTIN, true, false).parent;
|
||||
Services.telemetry.getSnapshotForKeyedHistograms("main", true).parent;
|
||||
const scalars =
|
||||
Services.telemetry.snapshotScalars(OPTIN, false).parent;
|
||||
Services.telemetry.getSnapshotForScalars("main", false).parent;
|
||||
const keyedScalars =
|
||||
Services.telemetry.snapshotKeyedScalars(OPTIN, false).parent;
|
||||
Services.telemetry.getSnapshotForKeyedScalars("main", false).parent;
|
||||
const allHistograms = Object.assign({},
|
||||
histograms,
|
||||
keyedHistograms,
|
||||
|
@ -217,7 +186,7 @@ class TelemetryHelpers {
|
|||
* Generates the inner contents of a test's checkTelemetry() method.
|
||||
*
|
||||
* @param {HistogramSnapshot} snapshot
|
||||
* A snapshot of a telemetry chart obtained via snapshotHistograms or
|
||||
* A snapshot of a telemetry chart obtained via getSnapshotForHistograms or
|
||||
* similar.
|
||||
* @param {String} key
|
||||
* Only used for keyed histograms. This is the key we are interested in
|
||||
|
|
|
@ -678,43 +678,71 @@ class FlexboxHighlighter extends AutoRefreshHighlighter {
|
|||
return;
|
||||
}
|
||||
|
||||
const lineWidth = getDisplayPixelRatio(this.win);
|
||||
const containerQuad = getUntransformedQuad(this.currentNode, "content");
|
||||
const containerBounds = containerQuad.getBounds();
|
||||
|
||||
// Draw a justify content pattern over the whole flex container content area.
|
||||
this.drawJustifyContent(0, 0, containerBounds.width, containerBounds.height);
|
||||
const { width: containerWidth, height: containerHeight } = containerBounds;
|
||||
|
||||
for (const flexLine of this.flexData.lines) {
|
||||
const { crossStart, crossSize } = flexLine;
|
||||
let mainStart = 0;
|
||||
|
||||
// In these two situations mainStart goes from right to left so set it's
|
||||
// value as appropriate.
|
||||
if (this.axes === "horizontal-lr vertical-bt" ||
|
||||
this.axes === "horizontal-rl vertical-tb") {
|
||||
mainStart = containerWidth;
|
||||
}
|
||||
|
||||
for (const flexItem of flexLine.items) {
|
||||
const { left, top, right, bottom } = flexItem.rect;
|
||||
|
||||
// Clear a rectangular are covering the alignment container.
|
||||
switch (this.axes) {
|
||||
case "horizontal-lr vertical-tb":
|
||||
case "horizontal-rl vertical-bt":
|
||||
this.drawJustifyContent(mainStart, crossStart, left, crossStart + crossSize);
|
||||
mainStart = right;
|
||||
break;
|
||||
case "horizontal-lr vertical-bt":
|
||||
case "horizontal-rl vertical-tb":
|
||||
case "horizontal-rl vertical-bt":
|
||||
clearRect(this.ctx, left, crossStart + lineWidth, right,
|
||||
crossStart + crossSize - lineWidth, this.currentMatrix);
|
||||
this.drawJustifyContent(right, crossStart, mainStart, crossStart + crossSize);
|
||||
mainStart = left;
|
||||
break;
|
||||
case "vertical-tb horizontal-lr":
|
||||
case "vertical-bt horizontal-rl":
|
||||
clearRect(this.ctx,
|
||||
crossStart + lineWidth * 2, top,
|
||||
crossStart + crossSize - lineWidth, bottom, this.currentMatrix);
|
||||
this.drawJustifyContent(crossStart, mainStart, crossStart + crossSize, top);
|
||||
mainStart = bottom;
|
||||
break;
|
||||
case "vertical-bt horizontal-lr":
|
||||
case "vertical-tb horizontal-rl":
|
||||
clearRect(this.ctx,
|
||||
containerBounds.width - crossStart - crossSize + lineWidth * 2, top,
|
||||
containerBounds.width - crossStart - lineWidth, bottom,
|
||||
this.currentMatrix);
|
||||
this.drawJustifyContent(containerWidth - crossStart - crossSize, mainStart,
|
||||
containerWidth - crossStart, top);
|
||||
mainStart = bottom;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Draw the last justify-content area after the last flex item.
|
||||
switch (this.axes) {
|
||||
case "horizontal-lr vertical-tb":
|
||||
case "horizontal-rl vertical-bt":
|
||||
this.drawJustifyContent(mainStart, crossStart, containerWidth,
|
||||
crossStart + crossSize);
|
||||
break;
|
||||
case "horizontal-lr vertical-bt":
|
||||
case "horizontal-rl vertical-tb":
|
||||
this.drawJustifyContent(0, crossStart, mainStart, crossStart + crossSize);
|
||||
break;
|
||||
case "vertical-tb horizontal-lr":
|
||||
case "vertical-bt horizontal-rl":
|
||||
this.drawJustifyContent(crossStart, mainStart, crossStart + crossSize,
|
||||
containerHeight);
|
||||
break;
|
||||
case "vertical-bt horizontal-lr":
|
||||
case "vertical-tb horizontal-rl":
|
||||
this.drawJustifyContent(containerWidth - crossStart - crossSize, mainStart,
|
||||
containerWidth - crossStart, containerHeight);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -111,9 +111,9 @@ function grabHistogramsFromContent(use_counter_middlefix, page_before = null) {
|
|||
let gather = () => {
|
||||
let snapshots;
|
||||
if (Services.appinfo.browserTabsRemoteAutostart) {
|
||||
snapshots = telemetry.snapshotHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false).content;
|
||||
snapshots = telemetry.getSnapshotForHistograms("main", false).content;
|
||||
} else {
|
||||
snapshots = telemetry.snapshotHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false).parent;
|
||||
snapshots = telemetry.getSnapshotForHistograms("main", false).parent;
|
||||
}
|
||||
let checkGet = (probe) => {
|
||||
return snapshots[probe] ? snapshots[probe].sum : 0;
|
||||
|
@ -170,7 +170,7 @@ var check_use_counter_iframe = async function(file, use_counter_middlefix, check
|
|||
|
||||
return deferred.promise;
|
||||
});
|
||||
|
||||
|
||||
// Tear down the page.
|
||||
gBrowser.removeTab(newTab);
|
||||
|
||||
|
@ -235,7 +235,7 @@ var check_use_counter_img = async function(file, use_counter_middlefix) {
|
|||
|
||||
return deferred.promise;
|
||||
});
|
||||
|
||||
|
||||
// Tear down the page.
|
||||
gBrowser.removeTab(newTab);
|
||||
|
||||
|
@ -288,7 +288,7 @@ var check_use_counter_direct = async function(file, use_counter_middlefix, xfail
|
|||
addEventListener("load", listener, true);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Tear down the page.
|
||||
gBrowser.removeTab(newTab);
|
||||
|
||||
|
|
|
@ -12,8 +12,7 @@ add_task(async function test_memory_distribution() {
|
|||
Services.telemetry.canRecordExtended = true;
|
||||
registerCleanupFunction(() => Services.telemetry.canRecordExtended = canRecordExtended);
|
||||
|
||||
Services.telemetry.snapshotKeyedHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN,
|
||||
true /* clear */);
|
||||
Services.telemetry.getSnapshotForKeyedHistograms("main", true /* clear */);
|
||||
|
||||
// Open a remote page in a new tab to trigger the WebNavigation:LoadURI.
|
||||
let tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com");
|
||||
|
@ -29,12 +28,11 @@ add_task(async function test_memory_distribution() {
|
|||
// There is no good way to make sure that the parent received the histogram entries from the child processes.
|
||||
// Let's stick to the ugly, spinning the event loop until we have a good approach (Bug 1357509).
|
||||
await BrowserTestUtils.waitForCondition(() => {
|
||||
let s = Services.telemetry.snapshotKeyedHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN,
|
||||
false).content["FX_TAB_REMOTE_NAVIGATION_DELAY_MS"];
|
||||
let s = Services.telemetry.getSnapshotForKeyedHistograms("main", false).content["FX_TAB_REMOTE_NAVIGATION_DELAY_MS"];
|
||||
return s && "WebNavigation:LoadURI" in s && "SessionStore:restoreTabContent" in s;
|
||||
});
|
||||
|
||||
let s = Services.telemetry.snapshotKeyedHistograms(1, false).content["FX_TAB_REMOTE_NAVIGATION_DELAY_MS"];
|
||||
let s = Services.telemetry.getSnapshotForKeyedHistograms("main", false).content["FX_TAB_REMOTE_NAVIGATION_DELAY_MS"];
|
||||
let restoreTabSnapshot = s["SessionStore:restoreTabContent"];
|
||||
ok(restoreTabSnapshot.sum > 0, "Zero delay for the restoreTabContent case is unlikely.");
|
||||
ok(restoreTabSnapshot.sum < 10000, "More than 10 seconds delay for the restoreTabContent case is unlikely.");
|
||||
|
@ -43,8 +41,7 @@ add_task(async function test_memory_distribution() {
|
|||
ok(loadURISnapshot.sum > 0, "Zero delay for the LoadURI case is unlikely.");
|
||||
ok(loadURISnapshot.sum < 10000, "More than 10 seconds delay for the LoadURI case is unlikely.");
|
||||
|
||||
Services.telemetry.snapshotKeyedHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN,
|
||||
true /* clear */);
|
||||
Services.telemetry.getSnapshotForKeyedHistograms("main", true /* clear */);
|
||||
|
||||
BrowserTestUtils.removeTab(tab2);
|
||||
BrowserTestUtils.removeTab(tab1);
|
||||
|
|
|
@ -119,7 +119,7 @@ class RemoteVideoDecoder : public RemoteDataDecoder {
|
|||
|
||||
if (ok && (size > 0 || presentationTimeUs >= 0)) {
|
||||
RefPtr<layers::Image> img = new SurfaceTextureImage(
|
||||
mDecoder->mImageHandle, inputInfo.mImageSize,
|
||||
mDecoder->mSurfaceHandle, inputInfo.mImageSize,
|
||||
false /* NOT continuous */, gl::OriginPos::BottomLeft);
|
||||
|
||||
RefPtr<VideoData> v = VideoData::CreateFromImage(
|
||||
|
@ -168,7 +168,7 @@ class RemoteVideoDecoder : public RemoteDataDecoder {
|
|||
__func__);
|
||||
}
|
||||
|
||||
mImageHandle = mSurface->GetImageHandle();
|
||||
mSurfaceHandle = mSurface->GetHandle();
|
||||
|
||||
// Register native methods.
|
||||
JavaCallbacksSupport::Init();
|
||||
|
@ -256,7 +256,7 @@ class RemoteVideoDecoder : public RemoteDataDecoder {
|
|||
private:
|
||||
const VideoInfo mConfig;
|
||||
GeckoSurface::GlobalRef mSurface;
|
||||
AndroidSurfaceTextureHandle mImageHandle;
|
||||
AndroidSurfaceTextureHandle mSurfaceHandle;
|
||||
// Only accessed on reader's task queue.
|
||||
bool mIsCodecSupportAdaptivePlayback = false;
|
||||
// Can be accessed on any thread, but only written on during init.
|
||||
|
|
|
@ -14,9 +14,10 @@ createHTML({
|
|||
});
|
||||
|
||||
runTest(async () => {
|
||||
// We need a real device to get a MediaEngine supporting constraints
|
||||
let audioDevice = SpecialPowers.getCharPref("media.audio_loopback_dev", "");
|
||||
if (!audioDevice) {
|
||||
ok(false, "No device set by framework. Try --use-test-media-devices");
|
||||
todo(false, "No device set by framework. Try --use-test-media-devices");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -24,16 +25,54 @@ runTest(async () => {
|
|||
// expect.
|
||||
let stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
||||
let track = stream.getAudioTracks()[0];
|
||||
let defaultConstraints = track.getSettings();
|
||||
let defaultSettings = track.getSettings();
|
||||
|
||||
is(defaultConstraints.echoCancellation, true,
|
||||
is(defaultSettings.echoCancellation, true,
|
||||
"Echo cancellation should be ON by default.");
|
||||
is(defaultConstraints.noiseSuppression, true,
|
||||
is(defaultSettings.noiseSuppression, true,
|
||||
"Noise suppression should be ON by default.");
|
||||
is(defaultConstraints.autoGainControl, true,
|
||||
is(defaultSettings.autoGainControl, true,
|
||||
"Automatic gain control should be ON by default.");
|
||||
|
||||
track.stop();
|
||||
|
||||
// This is UA-dependant, and belongs in a Mochitest, not in a WPT.
|
||||
// When a gUM track has been requested with `echoCancellation` OFF, check that
|
||||
// `noiseSuppression` and `autoGainControl` are off as well.
|
||||
stream =
|
||||
await navigator.mediaDevices.getUserMedia({audio:{echoCancellation: false}});
|
||||
track = stream.getAudioTracks()[0];
|
||||
defaultSettings = track.getSettings();
|
||||
|
||||
is(defaultSettings.echoCancellation, false,
|
||||
"Echo cancellation should be OFF when requested.");
|
||||
is(defaultSettings.noiseSuppression, false,
|
||||
`Noise suppression should be OFF when echoCancellation is the only
|
||||
constraint and is OFF.`);
|
||||
is(defaultSettings.autoGainControl, false,
|
||||
`Automatic gain control should be OFF when echoCancellation is the only
|
||||
constraint and is OFF.`);
|
||||
|
||||
track.stop();
|
||||
|
||||
// When a gUM track has been requested with `echoCancellation` OFF, check that
|
||||
// `noiseSuppression` and `autoGainControl` are not OFF as well if another
|
||||
// constraint has been specified.
|
||||
stream =
|
||||
await navigator.mediaDevices.getUserMedia({audio:{echoCancellation: false,
|
||||
autoGainControl: true}});
|
||||
track = stream.getAudioTracks()[0];
|
||||
defaultSettings = track.getSettings();
|
||||
|
||||
is(defaultSettings.echoCancellation, false,
|
||||
"Echo cancellation should be OFF when requested.");
|
||||
is(defaultSettings.noiseSuppression, false,
|
||||
`Noise suppression should be OFF when echoCancellation is OFF and another
|
||||
constraint has been specified.`);
|
||||
is(defaultSettings.autoGainControl, true,
|
||||
"Auto gain control should be ON when requested.");
|
||||
|
||||
track.stop();
|
||||
});
|
||||
</script>
|
||||
</pre>
|
||||
|
|
|
@ -114,13 +114,12 @@ nsresult MediaEngineWebRTCMicrophoneSource::EvaluateSettings(
|
|||
const char** aOutBadConstraint) {
|
||||
AssertIsOnOwningThread();
|
||||
|
||||
FlattenedConstraints c(aConstraintsUpdate);
|
||||
MediaEnginePrefs prefs = aInPrefs;
|
||||
|
||||
FlattenedConstraints c(aConstraintsUpdate);
|
||||
|
||||
prefs.mAecOn = c.mEchoCancellation.Get(aInPrefs.mAecOn);
|
||||
prefs.mAgcOn = c.mAutoGainControl.Get(aInPrefs.mAgcOn);
|
||||
prefs.mNoiseOn = c.mNoiseSuppression.Get(aInPrefs.mNoiseOn);
|
||||
prefs.mAgcOn = c.mAutoGainControl.Get(aInPrefs.mAgcOn && prefs.mAecOn);
|
||||
prefs.mNoiseOn = c.mNoiseSuppression.Get(aInPrefs.mNoiseOn && prefs.mAecOn);
|
||||
|
||||
// Determine an actual channel count to use for this source. Three factors at
|
||||
// play here: the device capabilities, the constraints passed in by content,
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
const TEST_URL = "https://example.com/";
|
||||
|
||||
// Return the scalars from the parent-process.
|
||||
function getParentProcessScalars(aChannel, aKeyed = false, aClear = false) {
|
||||
function getParentProcessScalars(aKeyed = false, aClear = false) {
|
||||
const scalars = aKeyed ?
|
||||
Services.telemetry.snapshotKeyedScalars(aChannel, aClear)["parent"] :
|
||||
Services.telemetry.snapshotScalars(aChannel, aClear)["parent"];
|
||||
Services.telemetry.getSnapshotForKeyedScalars("main", aClear)["parent"] :
|
||||
Services.telemetry.getSnapshotForScalars("main", aClear)["parent"];
|
||||
return scalars || {};
|
||||
}
|
||||
|
||||
function getTelemetryForScalar(aName) {
|
||||
let scalars = getParentProcessScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTOUT, true);
|
||||
let scalars = getParentProcessScalars(true);
|
||||
return scalars[aName] || 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,13 +8,6 @@
|
|||
|
||||
#include "AndroidSurfaceTexture.h"
|
||||
|
||||
#include "GeneratedJNINatives.h"
|
||||
|
||||
#include "AndroidNativeWindow.h"
|
||||
#include "GLContextEGL.h"
|
||||
#include "GLBlitHelper.h"
|
||||
#include "GLImages.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -36,184 +29,6 @@ AndroidSurfaceTexture::GetTransformMatrix(java::sdk::SurfaceTexture::Param surfa
|
|||
env->ReleaseFloatArrayElements(jarray.Get(), array, 0);
|
||||
}
|
||||
|
||||
class SharedGL {
|
||||
public:
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SharedGL);
|
||||
|
||||
SharedGL(AndroidNativeWindow& window)
|
||||
{
|
||||
MutexAutoLock lock(sMutex);
|
||||
|
||||
if (!sContext) {
|
||||
MOZ_ASSERT(sInstanceCount == 0);
|
||||
sContext = CreateContext();
|
||||
if (!sContext) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
InitSurface(window);
|
||||
++sInstanceCount;
|
||||
}
|
||||
|
||||
void Blit(const AndroidSurfaceTextureHandle& sourceTextureHandle,
|
||||
const gfx::IntSize& imageSize)
|
||||
{
|
||||
MutexAutoLock lock(sMutex);
|
||||
MOZ_ASSERT(sContext);
|
||||
|
||||
// Setting overide also makes conext and surface current.
|
||||
sContext->SetEGLSurfaceOverride(mTargetSurface);
|
||||
RefPtr<layers::SurfaceTextureImage> img =
|
||||
new layers::SurfaceTextureImage(sourceTextureHandle,
|
||||
imageSize,
|
||||
false,
|
||||
OriginPos::TopLeft);
|
||||
sContext->BlitHelper()->BlitImage(img, imageSize, OriginPos::BottomLeft);
|
||||
sContext->SwapBuffers();
|
||||
// This method is called through binder IPC and could run on any thread in
|
||||
// the pool. Release the context and surface from this thread after use so
|
||||
// they can be bound to another thread later.
|
||||
UnmakeCurrent(sContext);
|
||||
}
|
||||
|
||||
private:
|
||||
~SharedGL()
|
||||
{
|
||||
MutexAutoLock lock(sMutex);
|
||||
|
||||
if (mTargetSurface != EGL_NO_SURFACE) {
|
||||
GLLibraryEGL::Get()->fDestroySurface(EGL_DISPLAY(), mTargetSurface);
|
||||
}
|
||||
|
||||
// Destroy shared GL context when no one uses it.
|
||||
if (--sInstanceCount == 0) {
|
||||
sContext.reset();
|
||||
}
|
||||
}
|
||||
|
||||
static UniquePtr<GLContextEGL> CreateContext()
|
||||
{
|
||||
sMutex.AssertCurrentThreadOwns();
|
||||
MOZ_ASSERT(!sContext);
|
||||
|
||||
auto* egl = gl::GLLibraryEGL::Get();
|
||||
EGLDisplay eglDisplay = egl->fGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
EGLConfig eglConfig;
|
||||
CreateConfig(&eglConfig, /* bpp */ 24, /* depth buffer? */ false);
|
||||
EGLint attributes[] = {
|
||||
LOCAL_EGL_CONTEXT_CLIENT_VERSION, 2,
|
||||
LOCAL_EGL_NONE
|
||||
};
|
||||
EGLContext eglContext =
|
||||
egl->fCreateContext(eglDisplay, eglConfig, EGL_NO_CONTEXT, attributes);
|
||||
UniquePtr<GLContextEGL> gl = MakeUnique<GLContextEGL>(CreateContextFlags::NONE,
|
||||
SurfaceCaps::Any(),
|
||||
/* offscreen? */ false,
|
||||
eglConfig,
|
||||
EGL_NO_SURFACE,
|
||||
eglContext);
|
||||
if (!gl->Init()) {
|
||||
NS_WARNING("Fail to create GL context for native blitter.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Yield the current state made in constructor.
|
||||
UnmakeCurrent(gl);
|
||||
return gl;
|
||||
}
|
||||
|
||||
void InitSurface(AndroidNativeWindow& window)
|
||||
{
|
||||
sMutex.AssertCurrentThreadOwns();
|
||||
MOZ_ASSERT(sContext);
|
||||
|
||||
mTargetSurface = gl::GLLibraryEGL::Get()->fCreateWindowSurface(sContext->GetEGLDisplay(),
|
||||
sContext->mConfig,
|
||||
window.NativeWindow(),
|
||||
0);
|
||||
}
|
||||
|
||||
static bool UnmakeCurrent(UniquePtr<GLContextEGL>& gl)
|
||||
{
|
||||
sMutex.AssertCurrentThreadOwns();
|
||||
MOZ_ASSERT(gl);
|
||||
|
||||
if (!gl->IsCurrent()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return gl::GLLibraryEGL::Get()->fMakeCurrent(EGL_DISPLAY(),
|
||||
EGL_NO_SURFACE,
|
||||
EGL_NO_SURFACE,
|
||||
EGL_NO_CONTEXT);
|
||||
}
|
||||
|
||||
static Mutex sMutex;
|
||||
static UniquePtr<GLContextEGL> sContext;
|
||||
static size_t sInstanceCount;
|
||||
|
||||
EGLSurface mTargetSurface;
|
||||
};
|
||||
|
||||
Mutex SharedGL::sMutex("SharedGLContext::sMutex");
|
||||
UniquePtr<GLContextEGL> SharedGL::sContext(nullptr);
|
||||
size_t SharedGL::sInstanceCount = 0;
|
||||
|
||||
class GLBlitterSupport final
|
||||
: public java::GeckoSurfaceTexture::NativeGLBlitHelper::Natives<GLBlitterSupport>
|
||||
{
|
||||
public:
|
||||
using Base = java::GeckoSurfaceTexture::NativeGLBlitHelper::Natives<GLBlitterSupport>;
|
||||
using Base::AttachNative;
|
||||
using Base::GetNative;
|
||||
using Base::DisposeNative;
|
||||
|
||||
static java::GeckoSurfaceTexture::NativeGLBlitHelper::LocalRef
|
||||
Create(jint sourceTextureHandle,
|
||||
jni::Object::Param targetSurface,
|
||||
jint width,
|
||||
jint height)
|
||||
{
|
||||
AndroidNativeWindow win(java::GeckoSurface::Ref::From(targetSurface));
|
||||
auto helper = java::GeckoSurfaceTexture::NativeGLBlitHelper::New();
|
||||
RefPtr<SharedGL> gl = new SharedGL(win);
|
||||
GLBlitterSupport::AttachNative(
|
||||
helper,
|
||||
MakeUnique<GLBlitterSupport>(std::move(gl),
|
||||
sourceTextureHandle,
|
||||
width,
|
||||
height));
|
||||
return helper;
|
||||
}
|
||||
|
||||
GLBlitterSupport(RefPtr<SharedGL>&& gl,
|
||||
jint sourceTextureHandle,
|
||||
jint width,
|
||||
jint height)
|
||||
: mGl(gl)
|
||||
, mSourceTextureHandle(sourceTextureHandle)
|
||||
, mSize(width, height)
|
||||
{
|
||||
}
|
||||
|
||||
void Blit()
|
||||
{
|
||||
mGl->Blit(mSourceTextureHandle, mSize);
|
||||
}
|
||||
|
||||
private:
|
||||
const RefPtr<SharedGL> mGl;
|
||||
const AndroidSurfaceTextureHandle mSourceTextureHandle;
|
||||
const gfx::IntSize mSize;
|
||||
};
|
||||
|
||||
void
|
||||
AndroidSurfaceTexture::Init()
|
||||
{
|
||||
GLBlitterSupport::Init();
|
||||
}
|
||||
|
||||
} // gl
|
||||
} // mozilla
|
||||
#endif // MOZ_WIDGET_ANDROID
|
||||
|
|
|
@ -18,7 +18,6 @@ namespace gl {
|
|||
|
||||
class AndroidSurfaceTexture {
|
||||
public:
|
||||
static void Init();
|
||||
static void GetTransformMatrix(java::sdk::SurfaceTexture::Param surfaceTexture,
|
||||
mozilla::gfx::Matrix4x4* outMatrix);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
@ -29,18 +29,20 @@ DXGI_SWAP_CHAIN_DESC scd;
|
|||
|
||||
<set appropriate swap chain parameters in scd>
|
||||
|
||||
hr = D3D11CreateDeviceAndSwapChain(NULL, // pAdapter
|
||||
D3D_DRIVER_TYPE_HARDWARE, // DriverType
|
||||
NULL, // Software
|
||||
0, // Flags (Do not set D3D11_CREATE_DEVICE_SINGLETHREADED)
|
||||
NULL, // pFeatureLevels
|
||||
0, // FeatureLevels
|
||||
D3D11_SDK_VERSION, // SDKVersion
|
||||
&scd, // pSwapChainDesc
|
||||
&swapChain, // ppSwapChain
|
||||
&device, // ppDevice
|
||||
NULL, // pFeatureLevel
|
||||
&devCtx); // ppImmediateContext
|
||||
hr = D3D11CreateDeviceAndSwapChain(
|
||||
NULL, // pAdapter
|
||||
D3D_DRIVER_TYPE_HARDWARE, // DriverType
|
||||
NULL, // Software
|
||||
0, // Flags (Do not set
|
||||
// D3D11_CREATE_DEVICE_SINGLETHREADED)
|
||||
NULL, // pFeatureLevels
|
||||
0, // FeatureLevels
|
||||
D3D11_SDK_VERSION, // SDKVersion
|
||||
&scd, // pSwapChainDesc
|
||||
&swapChain, // ppSwapChain
|
||||
&device, // ppDevice
|
||||
NULL, // pFeatureLevel
|
||||
&devCtx); // ppImmediateContext
|
||||
|
||||
// Fetch the swapchain backbuffer
|
||||
ID3D11Texture2D *dxColorbuffer;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
@ -280,7 +280,7 @@ bool
|
|||
SharedSurface_SurfaceTexture::ToSurfaceDescriptor(layers::SurfaceDescriptor* const out_descriptor)
|
||||
{
|
||||
*out_descriptor =
|
||||
layers::SurfaceTextureDescriptor(mSurface->GetImageHandle(),
|
||||
layers::SurfaceTextureDescriptor(mSurface->GetHandle(),
|
||||
mSize,
|
||||
gfx::SurfaceFormat::R8G8B8A8,
|
||||
false /* NOT continuous */,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
|
||||
/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 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/. */
|
||||
|
|
|
@ -66,9 +66,12 @@ public:
|
|||
const FLOAT* pfAttribFList,
|
||||
UINT nMaxFormats, int* piFormats,
|
||||
UINT* nNumFormats);
|
||||
//BOOL (GLAPIENTRY * fGetPixelFormatAttribiv) (HDC hdc, int iPixelFormat,
|
||||
// int iLayerPlane, UINT nAttributes,
|
||||
// int* piAttributes, int* piValues);
|
||||
//BOOL (GLAPIENTRY * fGetPixelFormatAttribiv) (HDC hdc,
|
||||
// int iPixelFormat,
|
||||
// int iLayerPlane,
|
||||
// UINT nAttributes,
|
||||
// int* piAttributes,
|
||||
// int* piValues);
|
||||
const char* (GLAPIENTRY * fGetExtensionsStringARB) (HDC hdc);
|
||||
HGLRC (GLAPIENTRY * fCreateContextAttribsARB) (HDC hdc, HGLRC hShareContext,
|
||||
const int* attribList);
|
||||
|
|
|
@ -54,18 +54,21 @@ struct FrameMetrics {
|
|||
|
||||
typedef ScrollableLayerGuid::ViewID ViewID;
|
||||
public:
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_WITH_BASE_AT_CLASS_SCOPE(
|
||||
ScrollOffsetUpdateType, uint8_t, (
|
||||
eNone, // The default; the scroll offset was not updated
|
||||
eMainThread, // The scroll offset was updated by the main thread.
|
||||
ePending, // The scroll offset was updated on the main thread, but not
|
||||
// painted, so the layer texture data is still at the old
|
||||
// offset.
|
||||
eRestore // The scroll offset was updated by the main thread, but as
|
||||
// a restore from history or after a frame reconstruction.
|
||||
// In this case, APZ can ignore the offset change if the
|
||||
// user has done an APZ scroll already.
|
||||
ePending, // The scroll offset was updated on the main thread, but
|
||||
// not painted, so the layer texture data is still at the
|
||||
// old offset.
|
||||
eRestore // The scroll offset was updated by the main thread, but
|
||||
// as a restore from history or after a frame
|
||||
// reconstruction. In this case, APZ can ignore the
|
||||
// offset change if the user has done an APZ scroll
|
||||
// already.
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
FrameMetrics()
|
||||
: mScrollId(ScrollableLayerGuid::NULL_SCROLL_ID)
|
||||
|
@ -838,12 +841,14 @@ struct ScrollSnapInfo {
|
|||
nsTArray<nsPoint> mScrollSnapCoordinates;
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_CLASS_WITH_BASE(
|
||||
OverscrollBehavior, uint8_t, (
|
||||
Auto,
|
||||
Contain,
|
||||
None
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
struct OverscrollBehaviorInfo {
|
||||
OverscrollBehaviorInfo()
|
||||
|
|
|
@ -1469,17 +1469,19 @@ RefLayer::FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
|
|||
* To determine availability of the data upon StopFrameTimeRecording:
|
||||
* - mRecording.mNextIndex increases on each RecordFrame, and never resets.
|
||||
* - Cyclic buffer position is realized as mNextIndex % bufferSize.
|
||||
* - StartFrameTimeRecording returns mNextIndex. When StopFrameTimeRecording is called,
|
||||
* the required start index is passed as an arg, and we're able to calculate the required
|
||||
* length. If this length is bigger than bufferSize, it means data was overwritten.
|
||||
* otherwise, we can return the entire sequence.
|
||||
* - To determine if we need to pause, mLatestStartIndex is updated to mNextIndex
|
||||
* on each call to StartFrameTimeRecording. If this index gets overwritten,
|
||||
* it means that all earlier start indices obtained via StartFrameTimeRecording
|
||||
* were also overwritten, hence, no point in recording, so pause.
|
||||
* - mCurrentRunStartIndex indicates the oldest index of the recording after which
|
||||
* the recording was not paused. If StopFrameTimeRecording is invoked with a start index
|
||||
* older than this, it means that some frames were not recorded, so data is invalid.
|
||||
* - StartFrameTimeRecording returns mNextIndex. When StopFrameTimeRecording is
|
||||
* called, the required start index is passed as an arg, and we're able to
|
||||
* calculate the required length. If this length is bigger than bufferSize, it
|
||||
* means data was overwritten. otherwise, we can return the entire sequence.
|
||||
* - To determine if we need to pause, mLatestStartIndex is updated to
|
||||
* mNextIndex on each call to StartFrameTimeRecording. If this index gets
|
||||
* overwritten, it means that all earlier start indices obtained via
|
||||
* StartFrameTimeRecording were also overwritten, hence, no point in
|
||||
* recording, so pause.
|
||||
* - mCurrentRunStartIndex indicates the oldest index of the recording after
|
||||
* which the recording was not paused. If StopFrameTimeRecording is invoked
|
||||
* with a start index older than this, it means that some frames were not
|
||||
* recorded, so data is invalid.
|
||||
*/
|
||||
uint32_t
|
||||
FrameRecorder::StartFrameTimeRecording(int32_t aBufferSize)
|
||||
|
|
|
@ -131,12 +131,18 @@ public:
|
|||
* Record (and return) frame-intervals and paint-times for frames which were presented
|
||||
* between calling StartFrameTimeRecording and StopFrameTimeRecording.
|
||||
*
|
||||
* - Uses a cyclic buffer and serves concurrent consumers, so if Stop is called too late
|
||||
* (elements were overwritten since Start), result is considered invalid and hence empty.
|
||||
* - Buffer is capable of holding 10 seconds @ 60fps (or more if frames were less frequent).
|
||||
* Can be changed (up to 1 hour) via pref: toolkit.framesRecording.bufferSize.
|
||||
* - Note: the first frame-interval may be longer than expected because last frame
|
||||
* might have been presented some time before calling StartFrameTimeRecording.
|
||||
* - Uses a cyclic buffer and serves concurrent consumers, so if Stop is
|
||||
* called too late
|
||||
* (elements were overwritten since Start), result is considered invalid
|
||||
* and hence empty.)
|
||||
* - Buffer is capable of holding 10 seconds @ 60fps (or more if frames were
|
||||
* less frequent).
|
||||
* Can be changed (up to 1 hour) via pref:
|
||||
* toolkit.framesRecording.bufferSize.
|
||||
* - Note: the first frame-interval may be longer than expected because last
|
||||
* frame
|
||||
* might have been presented some time before calling
|
||||
* StartFrameTimeRecording.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -195,12 +195,14 @@ enum class SurfaceMode : int8_t {
|
|||
SURFACE_COMPONENT_ALPHA
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_CLASS_WITH_BASE(
|
||||
ScaleMode, int8_t, (
|
||||
SCALE_NONE,
|
||||
STRETCH
|
||||
// Unimplemented - PRESERVE_ASPECT_RATIO_CONTAIN
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
struct EventRegions {
|
||||
// The hit region for a layer contains all areas on the layer that are
|
||||
|
@ -456,10 +458,12 @@ private:
|
|||
uint64_t mHandle;
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_CLASS_WITH_BASE(ScrollDirection, uint32_t, (
|
||||
eVertical,
|
||||
eHorizontal
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -28,11 +28,13 @@ struct RepaintRequest {
|
|||
friend struct IPC::ParamTraits<mozilla::layers::RepaintRequest>;
|
||||
public:
|
||||
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_WITH_BASE_AT_CLASS_SCOPE(
|
||||
ScrollOffsetUpdateType, uint8_t, (
|
||||
eNone, // The default; the scroll offset was not updated.
|
||||
eUserAction // The scroll offset was updated by APZ.
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
RepaintRequest()
|
||||
: mScrollId(ScrollableLayerGuid::NULL_SCROLL_ID)
|
||||
|
|
|
@ -89,8 +89,9 @@ WaitForTextureIdsToUnlock(pid_t pid, const Span<const uint64_t>& textureIds)
|
|||
return false;
|
||||
}
|
||||
|
||||
// In case the monitor gets signaled multiple times, each less than kTextureLockTimeout.
|
||||
// This ensures that the total time we wait is < 2 * kTextureLockTimeout
|
||||
// In case the monitor gets signaled multiple times, each less than
|
||||
// kTextureLockTimeout. This ensures that the total time we wait is
|
||||
// < 2 * kTextureLockTimeout
|
||||
if ((TimeStamp::Now() - start).ToMilliseconds() > (double)kTextureLockTimeout) {
|
||||
return false;
|
||||
}
|
||||
|
@ -285,4 +286,4 @@ TextureSync::CleanupForPid(base::ProcessId aProcessId)
|
|||
|
||||
} // namespace layers
|
||||
|
||||
} // namespace mozilla
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -52,6 +52,7 @@ public:
|
|||
* a click event with detail=2 to web content (similar to what a mouse double-
|
||||
* click would do).
|
||||
*/
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_CLASS_AT_CLASS_SCOPE(
|
||||
TapType, (
|
||||
eSingleTap,
|
||||
|
@ -60,6 +61,7 @@ public:
|
|||
eLongTap,
|
||||
eLongTapUp
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* Requests handling of a tap event. |aPoint| is in LD pixels, relative to the
|
||||
|
@ -109,6 +111,7 @@ public:
|
|||
*/
|
||||
virtual void DispatchToRepaintThread(already_AddRefed<Runnable> aTask) = 0;
|
||||
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_CLASS_AT_CLASS_SCOPE(
|
||||
APZStateChange, (
|
||||
/**
|
||||
|
@ -134,6 +137,7 @@ public:
|
|||
*/
|
||||
eEndTouch
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* General notices of APZ state changes for consumers.
|
||||
|
|
|
@ -121,7 +121,8 @@ struct ScrollThumbData;
|
|||
* Note that the ClearTree function MUST be called when this class is no longer needed;
|
||||
* see the method documentation for details.
|
||||
*
|
||||
* Behaviour of APZ is controlled by a number of preferences shown \ref APZCPrefs "here".
|
||||
* Behaviour of APZ is controlled by a number of preferences shown
|
||||
* \ref APZCPrefs "here".
|
||||
*/
|
||||
class APZCTreeManager : public IAPZCTreeManager
|
||||
, public APZInputBridge {
|
||||
|
@ -185,12 +186,13 @@ public:
|
|||
* @param aRootLayerTreeId The layer tree ID of the root layer corresponding
|
||||
* to this APZCTreeManager
|
||||
* @param aRoot The root of the (full) layer tree
|
||||
* @param aFirstPaintLayersId The layers id of the subtree to which aIsFirstPaint
|
||||
* applies.
|
||||
* @param aIsFirstPaint True if the layers update that this is called in response
|
||||
* to included a first-paint. If this is true, the part of
|
||||
* the tree that is affected by the first-paint flag is
|
||||
* indicated by the aFirstPaintLayersId parameter.
|
||||
* @param aFirstPaintLayersId The layers id of the subtree to which
|
||||
* aIsFirstPaint applies.
|
||||
* @param aIsFirstPaint True if the layers update that this is called in
|
||||
* response to included a first-paint. If this is true,
|
||||
* the part of the tree that is affected by the
|
||||
* first-paint flag is indicated by the
|
||||
* aFirstPaintLayersId parameter.
|
||||
* @param aPaintSequenceNumber The sequence number of the paint that triggered
|
||||
* this layer update. Note that every layer child
|
||||
* process' layer subtree has its own sequence
|
||||
|
@ -425,13 +427,20 @@ public:
|
|||
* to the tree manager object as TM.
|
||||
* Here's what happens when C receives a touch-move event:
|
||||
* - C.TrackTouch() calls TM.DispatchScroll() with index = 0.
|
||||
* - TM.DispatchScroll() calls B.AttemptScroll() (since B is at index 0 in the chain).
|
||||
* - B.AttemptScroll() scrolls B. If there is overscroll, it calls TM.DispatchScroll() with index = 1.
|
||||
* - TM.DispatchScroll() calls C.AttemptScroll() (since C is at index 1 in the chain)
|
||||
* - C.AttemptScroll() scrolls C. If there is overscroll, it calls TM.DispatchScroll() with index = 2.
|
||||
* - TM.DispatchScroll() calls A.AttemptScroll() (since A is at index 2 in the chain)
|
||||
* - A.AttemptScroll() scrolls A. If there is overscroll, it calls TM.DispatchScroll() with index = 3.
|
||||
* - TM.DispatchScroll() discards the rest of the scroll as there are no more elements in the chain.
|
||||
* - TM.DispatchScroll() calls B.AttemptScroll() (since B is at index 0 in
|
||||
* the chain).
|
||||
* - B.AttemptScroll() scrolls B. If there is overscroll, it calls
|
||||
* TM.DispatchScroll() with index = 1.
|
||||
* - TM.DispatchScroll() calls C.AttemptScroll() (since C is at index 1 in
|
||||
* the chain)
|
||||
* - C.AttemptScroll() scrolls C. If there is overscroll, it calls
|
||||
* TM.DispatchScroll() with index = 2.
|
||||
* - TM.DispatchScroll() calls A.AttemptScroll() (since A is at index 2 in
|
||||
* the chain)
|
||||
* - A.AttemptScroll() scrolls A. If there is overscroll, it calls
|
||||
* TM.DispatchScroll() with index = 3.
|
||||
* - TM.DispatchScroll() discards the rest of the scroll as there are no
|
||||
* more elements in the chain.
|
||||
*
|
||||
* Note: this should be used for panning only. For handing off overscroll for
|
||||
* a fling, use DispatchFling().
|
||||
|
|
|
@ -40,6 +40,7 @@ operator|(CancelAnimationFlags a, CancelAnimationFlags b)
|
|||
|
||||
typedef EnumSet<ScrollDirection> ScrollDirections;
|
||||
|
||||
// clang-format off
|
||||
enum class ScrollSource {
|
||||
// scrollTo() or something similar.
|
||||
DOM,
|
||||
|
@ -58,6 +59,7 @@ MOZ_DEFINE_ENUM_CLASS_WITH_BASE(APZWheelAction, uint8_t, (
|
|||
Scroll,
|
||||
PinchZoom
|
||||
))
|
||||
// clang-format on
|
||||
|
||||
// Epsilon to be used when comparing 'float' coordinate values
|
||||
// with FuzzyEqualsAdditive. The rationale is that 'float' has 7 decimal
|
||||
|
|
|
@ -255,8 +255,9 @@ public:
|
|||
* relative.
|
||||
*
|
||||
* Note: Unlike most other functions in Axis, this functions operates in
|
||||
* CSS coordinates so there is no confusion as to whether the ParentLayer
|
||||
* coordinates it operates in are before or after the scale is applied.
|
||||
* CSS coordinates so there is no confusion as to whether the
|
||||
* ParentLayer coordinates it operates in are before or after the scale
|
||||
* is applied.
|
||||
*/
|
||||
CSSCoord ScaleWillOverscrollAmount(float aScale, CSSCoord aFocus) const;
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ namespace layers {
|
|||
*/
|
||||
class CheckerboardEvent {
|
||||
public:
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_AT_CLASS_SCOPE(
|
||||
RendertraceProperty, (
|
||||
Page,
|
||||
|
@ -35,6 +36,7 @@ public:
|
|||
RequestedDisplayPort,
|
||||
UserVisible
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
static const char* sDescriptions[sRendertracePropertyCount];
|
||||
static const char* sColors[sRendertracePropertyCount];
|
||||
|
|
|
@ -18,17 +18,17 @@ namespace mozilla {
|
|||
namespace layers {
|
||||
|
||||
/**
|
||||
* This class is used for tracking chrome and content focus targets and calculating
|
||||
* global focus information from them for use by APZCTreeManager for async keyboard
|
||||
* scrolling.
|
||||
* This class is used for tracking chrome and content focus targets and
|
||||
* calculating global focus information from them for use by APZCTreeManager
|
||||
* for async keyboard scrolling.
|
||||
*
|
||||
* # Calculating the element to scroll
|
||||
*
|
||||
* Chrome and content processes have independently focused elements. This makes it
|
||||
* difficult to calculate the global focused element and its scrollable frame from
|
||||
* the chrome or content side. So instead we send the local focus information from
|
||||
* each process to here and then calculate the global focus information. This
|
||||
* local information resides in a `focus target`.
|
||||
* Chrome and content processes have independently focused elements. This makes
|
||||
* it difficult to calculate the global focused element and its scrollable
|
||||
* frame from the chrome or content side. So instead we send the local focus
|
||||
* information from each process to here and then calculate the global focus
|
||||
* information. This local information resides in a `focus target`.
|
||||
*
|
||||
* A focus target indicates that either:
|
||||
* 1. The focused element is a remote browser along with its layer tree ID
|
||||
|
@ -54,12 +54,13 @@ namespace layers {
|
|||
* here is that `setTimeout` and others are already non-deterministic and so it
|
||||
* might not be as breaking to web content.
|
||||
*
|
||||
* To maintain deterministic focus changes for a given stream of user inputs, we
|
||||
* invalidate our focus state whenever we receive a user input that may trigger
|
||||
* event listeners. We then attach a new sequence number to these events and
|
||||
* dispatch them to content. Content will then include the latest sequence number
|
||||
* it has processed to every focus update. Using this we can determine whether
|
||||
* any potentially focus changing events have yet to be handled by content.
|
||||
* To maintain deterministic focus changes for a given stream of user inputs,
|
||||
* we invalidate our focus state whenever we receive a user input that may
|
||||
* trigger event listeners. We then attach a new sequence number to these
|
||||
* events and dispatch them to content. Content will then include the latest
|
||||
* sequence number it has processed to every focus update. Using this we can
|
||||
* determine whether any potentially focus changing events have yet to be
|
||||
* handled by content.
|
||||
*
|
||||
* Once we have received the latest focus sequence number from content, we know
|
||||
* that all event listeners triggered by user inputs, and their resulting focus
|
||||
|
|
|
@ -465,8 +465,9 @@ public:
|
|||
*/
|
||||
bool TouchActionAllowsDoubleTapZoom() const;
|
||||
/**
|
||||
* @return false iff touch-action is enabled and the allowed touch behaviors for
|
||||
* the first touch point do not allow panning in the specified direction(s).
|
||||
* @return false iff touch-action is enabled and the allowed touch behaviors
|
||||
* for the first touch point do not allow panning in the specified
|
||||
* direction(s).
|
||||
*/
|
||||
bool TouchActionAllowsPanningX() const;
|
||||
bool TouchActionAllowsPanningY() const;
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace layers {
|
|||
struct KeyboardScrollAction final
|
||||
{
|
||||
public:
|
||||
// clang-format off
|
||||
MOZ_DEFINE_ENUM_WITH_BASE_AT_CLASS_SCOPE(
|
||||
KeyboardScrollActionType, uint8_t, (
|
||||
eScrollCharacter,
|
||||
|
@ -26,6 +27,7 @@ public:
|
|||
eScrollPage,
|
||||
eScrollComplete
|
||||
));
|
||||
// clang-format on
|
||||
|
||||
static nsIScrollableFrame::ScrollUnit
|
||||
GetScrollUnit(KeyboardScrollActionType aDeltaType);
|
||||
|
|
|
@ -180,10 +180,14 @@ TEST_F(APZHitTestingTester, HitTesting2) {
|
|||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
|
||||
// At this point, the following holds (all coordinates in screen pixels):
|
||||
// layers[0] has content from (0,0)-(200,200), clipped by composition bounds (0,0)-(100,100)
|
||||
// layers[1] has content from (10,10)-(90,90), clipped by composition bounds (10,10)-(50,50)
|
||||
// layers[2] has content from (20,60)-(100,100). no clipping as it's not a scrollable layer
|
||||
// layers[3] has content from (20,60)-(180,140), clipped by composition bounds (20,60)-(100,100)
|
||||
// layers[0] has content from (0,0)-(200,200), clipped by composition bounds
|
||||
// (0,0)-(100,100)
|
||||
// layers[1] has content from (10,10)-(90,90), clipped by composition bounds
|
||||
// (10,10)-(50,50)
|
||||
// layers[2] has content from (20,60)-(100,100). no clipping as it's not a
|
||||
// scrollable layer
|
||||
// layers[3] has content from (20,60)-(180,140), clipped by composition
|
||||
// bounds (20,60)-(100,100)
|
||||
|
||||
RefPtr<TestAsyncPanZoomController> apzcroot = ApzcOf(root);
|
||||
TestAsyncPanZoomController* apzc1 = ApzcOf(layers[1]);
|
||||
|
|
|
@ -936,17 +936,20 @@ AsyncCompositionManager::ApplyAsyncContentTransformToTree(Layer *aLayer,
|
|||
ScreenMargin fixedLayerMargins;
|
||||
|
||||
// Each layer has multiple clips:
|
||||
// - Its local clip, which is fixed to the layer contents, i.e. it moves
|
||||
// with those async transforms which the layer contents move with.
|
||||
// - Its local clip, which is fixed to the layer contents, i.e. it
|
||||
// moves with those async transforms which the layer contents move
|
||||
// with.
|
||||
// - Its scrolled clip, which moves with all async transforms.
|
||||
// - For each ScrollMetadata on the layer, a scroll clip. This includes
|
||||
// the composition bounds and any other clips induced by layout. This
|
||||
// moves with async transforms from ScrollMetadatas above it.
|
||||
// In this function, these clips are combined into two shadow clip parts:
|
||||
// - For each ScrollMetadata on the layer, a scroll clip. This
|
||||
// includes the composition bounds and any other clips induced by
|
||||
// layout. This moves with async transforms from ScrollMetadatas
|
||||
// above it.
|
||||
// In this function, these clips are combined into two shadow clip
|
||||
// parts:
|
||||
// - The fixed clip, which consists of the local clip only, initially
|
||||
// transformed by all async transforms.
|
||||
// - The scrolled clip, which consists of the other clips, transformed by
|
||||
// the appropriate transforms.
|
||||
// - The scrolled clip, which consists of the other clips, transformed
|
||||
// by the appropriate transforms.
|
||||
// These two parts are kept separate for now, because for fixed layers, we
|
||||
// need to adjust the fixed clip (to cancel out some async transforms).
|
||||
// The parts are kept in a cache which is cleared at the beginning of every
|
||||
|
|
|
@ -79,7 +79,8 @@ Diagnostics::GetFrameOverlayString(const GPUStats& aStats)
|
|||
// R = ClientLayerManager::EndTransaction
|
||||
// CP = ShadowLayerForwarder::EndTransaction (txn build)
|
||||
// TX = LayerTransactionChild::SendUpdate (IPDL serialize+send)
|
||||
// UP = LayerTransactionParent::RecvUpdate (IPDL deserialize, update, APZ update)
|
||||
// UP = LayerTransactionParent::RecvUpdate (IPDL deserialize, update, APZ
|
||||
// update)
|
||||
// CC_BUILD = Container prepare/composite frame building
|
||||
// CC_EXEC = Container render/composite drawing
|
||||
nsPrintfCString line1("FPS: %d (TXN: %d)", fps, txnFps);
|
||||
|
|
|
@ -38,7 +38,8 @@ const int kMaxFrames = 2400;
|
|||
* absolute frame composite times to a file on the device.
|
||||
* The FPS counters displayed on screen are based on how many frames we
|
||||
* composited within the last ~1 second. The more accurate measurement is to
|
||||
* grab the histogram from stderr or grab the FPS timestamp dumps written to file.
|
||||
* grab the histogram from stderr or grab the FPS timestamp dumps written to
|
||||
* file.
|
||||
*
|
||||
* To enable dumping to file, enable
|
||||
* layers.acceleration.draw-fps.write-to-file pref.
|
||||
|
|
|
@ -322,21 +322,22 @@ public:
|
|||
/**
|
||||
* Post-processes layers before composition. This performs the following:
|
||||
*
|
||||
* - Applies occlusion culling. This restricts the shadow visible region
|
||||
* of layers that are covered with opaque content.
|
||||
* |aOpaqueRegion| is the region already known to be covered with opaque
|
||||
* content, in the post-transform coordinate space of aLayer.
|
||||
* - Applies occlusion culling. This restricts the shadow visible region of
|
||||
* layers that are covered with opaque content. |aOpaqueRegion| is the
|
||||
* region already known to be covered with opaque content, in the
|
||||
* post-transform coordinate space of aLayer.
|
||||
*
|
||||
* - Recomputes visible regions to account for async transforms.
|
||||
* Each layer accumulates into |aVisibleRegion| its post-transform
|
||||
* (including async transforms) visible region.
|
||||
*
|
||||
* - aRenderTargetClip is the exact clip required for aLayer, in the coordinates
|
||||
* of the nearest render target (the same as GetEffectiveTransform).
|
||||
* - aRenderTargetClip is the exact clip required for aLayer, in the
|
||||
* coordinates of the nearest render target (the same as
|
||||
* GetEffectiveTransform).
|
||||
*
|
||||
* - aClipFromAncestors is the approximate combined clip from all ancestors, in
|
||||
* the coordinate space of our parent, but maybe be an overestimate in the
|
||||
* presence of complex transforms.
|
||||
* - aClipFromAncestors is the approximate combined clip from all
|
||||
* ancestors, in the coordinate space of our parent, but maybe be an
|
||||
* overestimate in the presence of complex transforms.
|
||||
*/
|
||||
void PostProcessLayers(nsIntRegion& aOpaqueRegion);
|
||||
void PostProcessLayers(Layer* aLayer,
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
#include "mozilla/gfx/Matrix.h" // for Matrix4x4
|
||||
#include "mozilla/gfx/Point.h" // for IntSize
|
||||
#include "mozilla/layers/Compositor.h" // for Compositor
|
||||
// clang-format off
|
||||
//#include "mozilla/layers/CompositorBridgeParent.h" // for CompositorBridgeParent
|
||||
// clang-format on
|
||||
#include "mozilla/layers/Effects.h" // for TexturedEffect, Effect, etc
|
||||
#include "mozilla/layers/LayerMetricsWrapper.h" // for LayerMetricsWrapper
|
||||
#include "mozilla/layers/TextureHostOGL.h" // for TextureHostOGL
|
||||
|
|
|
@ -79,26 +79,29 @@ bool InImageBridgeChildThread();
|
|||
* - When an ImageContainer calls its method SetCurrentImage:
|
||||
* - (A) The image is sent directly to the compositor process through the
|
||||
* ImageBridge IPDL protocol.
|
||||
* On the compositor side the image is stored in a global table that associates
|
||||
* the image with an ID corresponding to the ImageContainer, and a composition is
|
||||
* triggered.
|
||||
* On the compositor side the image is stored in a global table that
|
||||
* associates the image with an ID corresponding to the ImageContainer, and a
|
||||
* composition is triggered.
|
||||
* - (B) Since it does not have an ImageBridge, the image is not sent yet.
|
||||
* instead the will be sent to the compositor during the next layer transaction
|
||||
* (on the main thread).
|
||||
* instead the will be sent to the compositor during the next layer
|
||||
* transaction (on the main thread).
|
||||
*
|
||||
* - During a Layer transaction:
|
||||
* - (A) The ImageContainer uses ImageBridge. The image is already available to the
|
||||
* compositor process because it has been sent with SetCurrentImage. Yet, the
|
||||
* CompositableHost on the compositor side will needs the ID referring to the
|
||||
* ImageContainer to access the Image. So during the Swap operation that happens
|
||||
* in the transaction, we swap the container ID rather than the image data.
|
||||
* - (B) Since the ImageContainer does not use ImageBridge, the image data is swaped.
|
||||
* - (A) The ImageContainer uses ImageBridge. The image is already available
|
||||
* to the compositor process because it has been sent with SetCurrentImage.
|
||||
* Yet, the CompositableHost on the compositor side will needs the ID
|
||||
* referring to the ImageContainer to access the Image. So during the Swap
|
||||
* operation that happens in the transaction, we swap the container ID rather
|
||||
* than the image data.
|
||||
* - (B) Since the ImageContainer does not use ImageBridge, the image data is
|
||||
* swaped.
|
||||
*
|
||||
* - During composition:
|
||||
* - (A) The CompositableHost has an AsyncID, it looks up the ID in the
|
||||
* global table to see if there is an image. If there is no image, nothing is rendered.
|
||||
* - (B) The CompositableHost has image data rather than an ID (meaning it is not
|
||||
* using ImageBridge), then it just composites the image data normally.
|
||||
* global table to see if there is an image. If there is no image, nothing is
|
||||
* rendered.
|
||||
* - (B) The CompositableHost has image data rather than an ID (meaning it is
|
||||
* not using ImageBridge), then it just composites the image data normally.
|
||||
*
|
||||
* This means that there might be a possibility for the ImageBridge to send the first
|
||||
* frame before the first layer transaction that will pass the container ID to the
|
||||
|
|
|
@ -11,10 +11,13 @@ namespace mozilla {
|
|||
namespace layers {
|
||||
|
||||
//
|
||||
// NOTE: These values are also defined in mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
|
||||
// and must be kept in sync. Any new message added here must also be added there to the AnimatorMessageType enum.
|
||||
// NOTE: These values are also defined in
|
||||
// mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
|
||||
// and must be kept in sync. Any new message added here must also be added
|
||||
// there to the AnimatorMessageType enum.
|
||||
//
|
||||
|
||||
// clang-format off
|
||||
enum UiCompositorControllerMessageTypes {
|
||||
STATIC_TOOLBAR_NEEDS_UPDATE = 0, // Sent from compositor when the static toolbar wants to hide.
|
||||
STATIC_TOOLBAR_READY = 1, // Sent from compositor when the static toolbar image has been updated and is ready to animate.
|
||||
|
@ -31,6 +34,7 @@ enum UiCompositorControllerMessageTypes {
|
|||
COMPOSITOR_CONTROLLER_OPEN = 20, // Compositor controller IPC is open
|
||||
IS_COMPOSITOR_CONTROLLER_OPEN = 21 // Special message sent from controller to query if the compositor controller is open
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -56,7 +56,8 @@ public:
|
|||
* - viewport
|
||||
* - blend state (will be enabled at end)
|
||||
* - scissor state (will be enabled at end)
|
||||
* - vertex attrib 0 and 1 (pointer and enable state [enable state will be disabled at exit])
|
||||
* - vertex attrib 0 and 1 (pointer and enable state [enable state will
|
||||
* be disabled at exit])
|
||||
* - array buffer binding (will be 0)
|
||||
* - active texture (will be 0)
|
||||
* - texture 0 binding
|
||||
|
|
|
@ -170,7 +170,7 @@ AndroidNativeWindowTextureData::FillInfo(TextureData::Info& aInfo) const
|
|||
bool
|
||||
AndroidNativeWindowTextureData::Serialize(SurfaceDescriptor& aOutDescriptor)
|
||||
{
|
||||
aOutDescriptor = SurfaceTextureDescriptor(mSurface->GetImageHandle(),
|
||||
aOutDescriptor = SurfaceTextureDescriptor(mSurface->GetHandle(),
|
||||
mSize,
|
||||
mFormat,
|
||||
false /* not continuous */,
|
||||
|
|
|
@ -17,8 +17,12 @@
|
|||
#include "UnitTransforms.h"
|
||||
|
||||
#define CLIP_LOG(...)
|
||||
//#define CLIP_LOG(...) printf_stderr("CLIP: " __VA_ARGS__)
|
||||
//#define CLIP_LOG(...) if (XRE_IsContentProcess()) printf_stderr("CLIP: " __VA_ARGS__)
|
||||
/*
|
||||
#define CLIP_LOG(...) printf_stderr("CLIP: " __VA_ARGS__)
|
||||
#define CLIP_LOG(...) if (XRE_IsContentProcess()) { \
|
||||
printf_stderr("CLIP: " __VA_ARGS__) \
|
||||
}
|
||||
*/
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
|
|
@ -285,7 +285,8 @@ UpdateContainerLayerPropertiesAndDetectChange(nsDisplayItem* aItem, BlobItemData
|
|||
if (changed) {
|
||||
std::stringstream ss;
|
||||
//ss << trans << ' ' << aData->mTransform;
|
||||
//GP("UpdateContainerLayerPropertiesAndDetectChange Matrix %d %s\n", changed, ss.str().c_str());
|
||||
//GP("UpdateContainerLayerPropertiesAndDetectChange Matrix %d %s\n",
|
||||
// changed, ss.str().c_str());
|
||||
}
|
||||
|
||||
aData->mTransform = trans;
|
||||
|
@ -437,9 +438,13 @@ struct DIGroup
|
|||
UniquePtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(aBuilder));
|
||||
/* Instead of doing this dance, let's just invalidate the old rect and the
|
||||
* new rect.
|
||||
combined = aData->mClip.ApplyNonRoundedIntersection(aData->mGeometry->ComputeInvalidationRegion());
|
||||
combined =
|
||||
aData->mClip.ApplyNonRoundedIntersection(
|
||||
aData->mGeometry->ComputeInvalidationRegion());
|
||||
combined.MoveBy(shift);
|
||||
combined.Or(combined, clip.ApplyNonRoundedIntersection(geometry->ComputeInvalidationRegion()));
|
||||
combined.Or(combined,
|
||||
clip.ApplyNonRoundedIntersection(
|
||||
geometry->ComputeInvalidationRegion()));
|
||||
aData->mGeometry = std::move(geometry);
|
||||
*/
|
||||
combined = clip.ApplyNonRoundedIntersection(geometry->ComputeInvalidationRegion());
|
||||
|
@ -678,7 +683,9 @@ struct DIGroup
|
|||
|
||||
PaintItemRange(aGrouper, aStartItem, aEndItem, context, recorder);
|
||||
|
||||
// XXX: set this correctly perhaps using aItem->GetOpaqueRegion(aDisplayListBuilder, &snapped).Contains(paintBounds);?
|
||||
// XXX: set this correctly perhaps using
|
||||
// aItem->GetOpaqueRegion(aDisplayListBuilder, &snapped).
|
||||
// Contains(paintBounds);?
|
||||
wr::OpacityType opacity = wr::OpacityType::HasAlphaChannel;
|
||||
|
||||
TakeExternalSurfaces(recorder, mExternalSurfaces, aWrManager, aResources);
|
||||
|
|
|
@ -142,8 +142,10 @@ struct nsRect :
|
|||
__m128i resultRect = _mm_max_epi32(rect1, rect2); // xr, yr, zz, zz
|
||||
|
||||
|
||||
// result.width = std::min<int32_t>(x - result.x + width, aRect.x - result.x + aRect.width);
|
||||
// result.height = std::min<int32_t>(y - result.y + height, aRect.y - result.y + aRect.height);
|
||||
// result.width = std::min<int32_t>(x - result.x + width,
|
||||
// aRect.x - result.x + aRect.width);
|
||||
// result.height = std::min<int32_t>(y - result.y + height,
|
||||
// aRect.y - result.y + aRect.height);
|
||||
__m128i widthheight = _mm_min_epi32(_mm_add_epi32(_mm_sub_epi32(rect1, resultRect), _mm_srli_si128(rect1, 8)),
|
||||
_mm_add_epi32(_mm_sub_epi32(rect2, resultRect), _mm_srli_si128(rect2, 8))); // w, h, zz, zz
|
||||
widthheight = _mm_slli_si128(widthheight, 8); // 00, 00, wr, hr
|
||||
|
@ -178,8 +180,10 @@ struct nsRect :
|
|||
__m128i rect2 = _mm_loadu_si128((__m128i*)&aRect2); // x2, y2, w2, h2
|
||||
|
||||
__m128i resultRect = _mm_max_epi32(rect1, rect2); // xr, yr, zz, zz
|
||||
// result.width = std::min<int32_t>(x - result.x + width, aRect.x - result.x + aRect.width);
|
||||
// result.height = std::min<int32_t>(y - result.y + height, aRect.y - result.y + aRect.height);
|
||||
// result.width = std::min<int32_t>(x - result.x + width,
|
||||
// aRect.x - result.x + aRect.width);
|
||||
// result.height = std::min<int32_t>(y - result.y + height,
|
||||
// aRect.y - result.y + aRect.height);
|
||||
__m128i widthheight = _mm_min_epi32(_mm_add_epi32(_mm_sub_epi32(rect1, resultRect), _mm_srli_si128(rect1, 8)),
|
||||
_mm_add_epi32(_mm_sub_epi32(rect2, resultRect), _mm_srli_si128(rect2, 8))); // w, h, zz, zz
|
||||
widthheight = _mm_slli_si128(widthheight, 8); // 00, 00, wr, hr
|
||||
|
@ -395,7 +399,8 @@ nsRect::ScaleToOutsidePixels(float aXScale, float aYScale,
|
|||
|
||||
__m128 rectFloat = _mm_cvtepi32_ps(rectPacked);
|
||||
|
||||
// Scale i.e. ([ x y xmost ymost ] / aAppUnitsPerPixel) * [ aXScale aYScale aXScale aYScale ]
|
||||
// Scale i.e. ([ x y xmost ymost ] / aAppUnitsPerPixel) *
|
||||
// [ aXScale aYScale aXScale aYScale ]
|
||||
rectFloat = _mm_mul_ps(_mm_div_ps(rectFloat, appUnitsPacked), scalesPacked);
|
||||
rectPacked = ceil_ps2epi32(rectFloat); // xx, xx, XMost(), YMost()
|
||||
__m128i tmp = floor_ps2epi32(rectFloat); // x, y, xx, xx
|
||||
|
@ -409,7 +414,9 @@ nsRect::ScaleToOutsidePixels(float aXScale, float aYScale,
|
|||
// Avoid negative width/height due to overflow.
|
||||
__m128i mask = _mm_or_si128(_mm_cmpgt_epi32(rectPacked, _mm_setzero_si128()),
|
||||
_mm_set_epi32(0, 0, 0xFFFFFFFF, 0xFFFFFFFF));
|
||||
// clang-format off
|
||||
// Mask will now contain [ 0xFFFFFFFF 0xFFFFFFFF (width <= 0 ? 0 : 0xFFFFFFFF) (height <= 0 ? 0 : 0xFFFFFFFF) ]
|
||||
// clang-format on
|
||||
rectPacked = _mm_and_si128(rectPacked, mask);
|
||||
|
||||
_mm_storeu_si128((__m128i*)&rect, rectPacked);
|
||||
|
|
|
@ -341,7 +341,8 @@ void nsRegion::VisitEdges (visit_fn visit, void *closure) const
|
|||
// a change away from 0.
|
||||
int lastX = std::min(topStrip->left, bottomStrip->left) - 1;
|
||||
|
||||
// Current edge being considered for top and bottom, 0 - left, 1 - right.
|
||||
// Current edge being considered for top and bottom,
|
||||
// 0 - left, 1 - right.
|
||||
bool topEdgeIsLeft = true;
|
||||
bool bottomEdgeIsLeft = true;
|
||||
while (topStrip != std::end(topBand.mStrips) && bottomStrip != std::end(bottomBand.mStrips)) {
|
||||
|
@ -728,7 +729,8 @@ nsIntRegion nsRegion::ScaleToInsidePixels (float aScaleX, float aScaleY,
|
|||
// S = array(m+1,n+1)
|
||||
// S[0][i] = 0 for i in [0,n]
|
||||
// S[j][0] = 0 for j in [0,m]
|
||||
// S[j][i] = (if A[j-1][i-1] = 0 then some large negative value else A[j-1][i-1])
|
||||
// S[j][i] = (if A[j-1][i-1] = 0 then some large negative value
|
||||
// else A[j-1][i-1])
|
||||
// + S[j-1][n] + S[j][i-1] - S[j-1][i-1]
|
||||
//
|
||||
// // top, bottom, left, right, area
|
||||
|
|
|
@ -113,7 +113,8 @@ gfxASurface::Release(void)
|
|||
void
|
||||
gfxASurface::SurfaceDestroyFunc(void *data) {
|
||||
gfxASurface *surf = (gfxASurface*) data;
|
||||
// fprintf (stderr, "Deleting wrapper for %p (wrapper: %p)\n", surf->mSurface, data);
|
||||
// fprintf (stderr, "Deleting wrapper for %p (wrapper: %p)\n", surf->mSurface,
|
||||
// data);
|
||||
delete surf;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,17 +89,18 @@ public:
|
|||
const uint32_t GREEN_MASK = 0x0000FF00;
|
||||
const uint32_t ALPHA_MASK = 0xFF000000;
|
||||
|
||||
/* |diff| here is larger when the source image pixel is more transparent.
|
||||
If both renderings are from the same source image composited with OVER,
|
||||
then the color values on white will always be greater than those on
|
||||
black, so |diff| would not overflow. However, overflow may happen, for
|
||||
example, when a plugin plays a video and the image is rapidly changing.
|
||||
If there is overflow, then behave as if we limit to the difference to
|
||||
/* |diff| here is larger when the source image pixel is more
|
||||
transparent. If both renderings are from the same source image
|
||||
composited with OVER, then the color values on white will always be
|
||||
greater than those on black, so |diff| would not overflow. However,
|
||||
overflow may happen, for example, when a plugin plays a video and
|
||||
the image is rapidly changing. If there is overflow, then behave as
|
||||
if we limit to the difference to
|
||||
>= 0, which will make the rendering opaque. (Without this overflow
|
||||
will make the rendering transparent.) */
|
||||
uint32_t diff = (white & GREEN_MASK) - (black & GREEN_MASK);
|
||||
/* |diff| is 0xFFFFxx00 on overflow and 0x0000xx00 otherwise, so use this
|
||||
to limit the transparency. */
|
||||
/* |diff| is 0xFFFFxx00 on overflow and 0x0000xx00 otherwise, so use
|
||||
this to limit the transparency. */
|
||||
uint32_t limit = diff & ALPHA_MASK;
|
||||
/* The alpha bits of the result */
|
||||
uint32_t alpha = (ALPHA_MASK - (diff << 16)) | limit;
|
||||
|
|
|
@ -159,8 +159,10 @@ public:
|
|||
* inset path in device pixels.
|
||||
* @param aBlurRadius The standard deviation of the blur.
|
||||
* @param aShadowColor The color of the blur.
|
||||
* @param aInnerClipRadii Corner radii for the inside rect if it is a rounded rect.
|
||||
* @param aSkipRect An area in device pixels we don't have to paint in.
|
||||
* @param aInnerClipRadii Corner radii for the inside rect if it is a
|
||||
* rounded rect.
|
||||
* @param aSkipRect An area in device pixels we don't have to
|
||||
* paint in.
|
||||
*/
|
||||
void BlurInsetBox(gfxContext* aDestinationCtx,
|
||||
const mozilla::gfx::Rect& aDestinationRect,
|
||||
|
|
|
@ -252,8 +252,10 @@ gfxCoreTextShaper::SetGlyphsFromRun(gfxShapedText *aShapedText,
|
|||
|
||||
// character offsets get really confusing here, as we have to keep track of
|
||||
// (a) the text in the actual textRun we're constructing
|
||||
// (c) the string that was handed to CoreText, which contains the text of the font run
|
||||
// (d) the CTRun currently being processed, which may be a sub-run of the CoreText line
|
||||
// (c) the string that was handed to CoreText, which contains the text of
|
||||
// the font run
|
||||
// (d) the CTRun currently being processed, which may be a sub-run of the
|
||||
// CoreText line
|
||||
|
||||
// get the source string range within the CTLine's text
|
||||
CFRange stringRange = ::CTRunGetStringRange(aCTRun);
|
||||
|
|
|
@ -3901,7 +3901,8 @@ gfxFont::SanitizeMetrics(gfxFont::Metrics *aMetrics, bool aIsBadUnderlineFont)
|
|||
* However, if this is system font, we should not do this for the rendering compatibility with
|
||||
* another application's UI on the platform.
|
||||
* XXX Should not use this hack if the font size is too small?
|
||||
* Such text cannot be read, this might be used for tight CSS rendering? (E.g., Acid2)
|
||||
* Such text cannot be read, this might be used for tight CSS
|
||||
* rendering? (E.g., Acid2)
|
||||
*/
|
||||
if (!mStyle.systemFont && aIsBadUnderlineFont) {
|
||||
// First, we need 2 pixels between baseline and underline at least. Because many CJK characters
|
||||
|
|
|
@ -270,7 +270,8 @@ gfxFontUtils::ReadCMAPTableFormat4(const uint8_t *aBuf, uint32_t aLength,
|
|||
endCount);
|
||||
}
|
||||
} else {
|
||||
// const uint16_t idDelta = ReadShortAt16(idDeltas, i); // Unused: self-documenting.
|
||||
// Unused: self-documenting.
|
||||
// const uint16_t idDelta = ReadShortAt16(idDeltas, i);
|
||||
for (uint32_t c = startCount; c <= endCount; ++c) {
|
||||
if (c == 0xFFFF)
|
||||
break;
|
||||
|
|
|
@ -17,7 +17,9 @@ struct gfxLineSegment {
|
|||
|
||||
bool PointsOnSameSide(const gfxPoint& aOne, const gfxPoint& aTwo)
|
||||
{
|
||||
// Solve the equation y - mStart.y - ((mEnd.y - mStart.y)/(mEnd.x - mStart.x))(x - mStart.x) for both points
|
||||
// Solve the equation
|
||||
// y - mStart.y - ((mEnd.y - mStart.y)/(mEnd.x - mStart.x))(x - mStart.x)
|
||||
// for both points
|
||||
|
||||
gfxFloat deltaY = (mEnd.y - mStart.y);
|
||||
gfxFloat deltaX = (mEnd.x - mStart.x);
|
||||
|
|
|
@ -2262,9 +2262,9 @@ gfxPlatform::CreateCMSOutputProfile()
|
|||
/* Determine if we're using the internal override to force sRGB as
|
||||
an output profile for reftests. See Bug 452125.
|
||||
|
||||
Note that we don't normally (outside of tests) set a
|
||||
default value of this preference, which means nsIPrefBranch::GetBoolPref
|
||||
will typically throw (and leave its out-param untouched).
|
||||
Note that we don't normally (outside of tests) set a default value
|
||||
of this preference, which means nsIPrefBranch::GetBoolPref will
|
||||
typically throw (and leave its out-param untouched).
|
||||
*/
|
||||
if (Preferences::GetBool(GFX_PREF_CMS_FORCE_SRGB, false)) {
|
||||
gCMSOutputProfile = GetCMSsRGBProfile();
|
||||
|
@ -2882,10 +2882,13 @@ gfxPlatform::InitWebRenderConfig()
|
|||
|
||||
// On Nightly:
|
||||
// WR? WR+ => means WR was enabled via gfx.webrender.all.qualified
|
||||
// WR! WR+ => means WR was enabled via gfx.webrender.{all,enabled} or envvar
|
||||
// WR! WR+ => means WR was enabled via gfx.webrender.{all,enabled} or
|
||||
// envvar
|
||||
// On Beta/Release:
|
||||
// WR? WR+ => means WR was enabled via gfx.webrender.all.qualified on qualified hardware
|
||||
// WR! WR+ => means WR was enabled via envvar, possibly on unqualified hardware.
|
||||
// WR? WR+ => means WR was enabled via gfx.webrender.all.qualified on
|
||||
// qualified hardware
|
||||
// WR! WR+ => means WR was enabled via envvar, possibly on unqualified
|
||||
// hardware.
|
||||
// In all cases WR- means WR was not enabled, for one of many possible reasons.
|
||||
ScopedGfxFeatureReporter reporter("WR", prefEnabled || envvarEnabled);
|
||||
if (!XRE_IsParentProcess()) {
|
||||
|
@ -3186,7 +3189,8 @@ gfxPlatform::ContentUsesTiling() const
|
|||
/***
|
||||
* The preference "layout.frame_rate" has 3 meanings depending on the value:
|
||||
*
|
||||
* -1 = Auto (default), use hardware vsync or software vsync @ 60 hz if hw vsync fails.
|
||||
* -1 = Auto (default), use hardware vsync or software vsync @ 60 hz if hw
|
||||
* vsync fails.
|
||||
* 0 = ASAP mode - used during talos testing.
|
||||
* X = Software vsync at a rate of X times per second.
|
||||
*/
|
||||
|
|
|
@ -285,9 +285,11 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
// This is where DECL_GFX_PREF for each of the preferences should go.
|
||||
// We will keep these in an alphabetical order to make it easier to see if
|
||||
// a method accessing a pref already exists. Just add yours in the list.
|
||||
// clang-format off
|
||||
|
||||
// This is where DECL_GFX_PREF for each of the preferences should go. We
|
||||
// will keep these in an alphabetical order to make it easier to see if a
|
||||
// method accessing a pref already exists. Just add yours in the list.
|
||||
|
||||
DECL_GFX_PREF(Live, "accessibility.browsewithcaret", AccessibilityBrowseWithCaret, bool, false);
|
||||
|
||||
|
@ -814,9 +816,12 @@ private:
|
|||
DECL_GFX_PREF(Live, "widget.window-transforms.disabled", WindowTransformsDisabled, bool, false);
|
||||
|
||||
// WARNING:
|
||||
// Please make sure that you've added your new preference to the list above in alphabetical order.
|
||||
// Please make sure that you've added your new preference to the list above
|
||||
// in alphabetical order.
|
||||
// Please do not just append it to the end of the list.
|
||||
|
||||
// clang-format on
|
||||
|
||||
public:
|
||||
// Manage the singleton:
|
||||
static gfxPrefs& GetSingleton()
|
||||
|
|
|
@ -1129,8 +1129,10 @@ gfxTextRun::BreakAndMeasureText(uint32_t aStart, uint32_t aMaxLength,
|
|||
|
||||
// There are three possibilities:
|
||||
// 1) all the text fit (width <= aWidth)
|
||||
// 2) some of the text fit up to a break opportunity (width > aWidth && lastBreak >= 0)
|
||||
// 3) none of the text fits before a break opportunity (width > aWidth && lastBreak < 0)
|
||||
// 2) some of the text fit up to a break opportunity (width > aWidth &&
|
||||
// lastBreak >= 0)
|
||||
// 3) none of the text fits before a break opportunity (width > aWidth &&
|
||||
// lastBreak < 0)
|
||||
uint32_t charsFit;
|
||||
bool usedHyphenation = false;
|
||||
if (width - trimmableAdvance <= aWidth) {
|
||||
|
@ -3094,7 +3096,8 @@ gfxFontGroup::FindFontForChar(uint32_t aCh, uint32_t aPrevCh, uint32_t aNextCh,
|
|||
}
|
||||
|
||||
// 3. use fallback fonts
|
||||
// -- before searching for something else check the font used for the previous character
|
||||
// -- before searching for something else check the font used for the
|
||||
// previous character
|
||||
if (aPrevMatchedFont && aPrevMatchedFont->HasCharacter(aCh)) {
|
||||
*aMatchType = gfxTextRange::MatchType::kSystemFallback;
|
||||
return aPrevMatchedFont;
|
||||
|
|
|
@ -381,18 +381,24 @@ public:
|
|||
* Guarantees the following:
|
||||
* -- 0 <= result <= aMaxLength
|
||||
* -- result is the maximal value of N such that either
|
||||
* N < aMaxLength && line break at N && GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
|
||||
* OR N < aMaxLength && hyphen break at N && GetAdvanceWidth(Range(aStart, N), aProvider) + GetHyphenWidth() <= aWidth
|
||||
* OR N == aMaxLength && GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
|
||||
* N < aMaxLength && line break at N &&
|
||||
* GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
|
||||
* OR N < aMaxLength && hyphen break at N &&
|
||||
* GetAdvanceWidth(Range(aStart, N), aProvider) +
|
||||
* GetHyphenWidth() <= aWidth
|
||||
* OR N == aMaxLength &&
|
||||
* GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
|
||||
* where GetAdvanceWidth assumes the effect of
|
||||
* SetLineBreaks(Range(aStart, N), aLineBreakBefore, N < aMaxLength, aProvider)
|
||||
* SetLineBreaks(Range(aStart, N),
|
||||
* aLineBreakBefore, N < aMaxLength, aProvider)
|
||||
* -- if no such N exists, then result is the smallest N such that
|
||||
* N < aMaxLength && line break at N
|
||||
* OR N < aMaxLength && hyphen break at N
|
||||
* OR N == aMaxLength
|
||||
*
|
||||
* The call has the effect of
|
||||
* SetLineBreaks(Range(aStart, result), aLineBreakBefore, result < aMaxLength, aProvider)
|
||||
* SetLineBreaks(Range(aStart, result), aLineBreakBefore,
|
||||
* result < aMaxLength, aProvider)
|
||||
* and the returned metrics and the invariants above reflect this.
|
||||
*
|
||||
* @param aMaxLength this can be UINT32_MAX, in which case the length used
|
||||
|
@ -416,11 +422,15 @@ public:
|
|||
* @param aUsedHyphenation if non-null, records if we selected a hyphenation break
|
||||
* @param aLastBreak if non-null and result is aMaxLength, we set this to
|
||||
* the maximal N such that
|
||||
* N < aMaxLength && line break at N && GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
|
||||
* OR N < aMaxLength && hyphen break at N && GetAdvanceWidth(Range(aStart, N), aProvider) + GetHyphenWidth() <= aWidth
|
||||
* N < aMaxLength && line break at N &&
|
||||
* GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
|
||||
* OR N < aMaxLength && hyphen break at N &&
|
||||
* GetAdvanceWidth(Range(aStart, N), aProvider) +
|
||||
* GetHyphenWidth() <= aWidth
|
||||
* or UINT32_MAX if no such N exists, where GetAdvanceWidth assumes
|
||||
* the effect of
|
||||
* SetLineBreaks(Range(aStart, N), aLineBreakBefore, N < aMaxLength, aProvider)
|
||||
* SetLineBreaks(Range(aStart, N), aLineBreakBefore,
|
||||
* N < aMaxLength, aProvider)
|
||||
*
|
||||
* @param aCanWordWrap true if we can break between any two grapheme
|
||||
* clusters. This is set by overflow-wrap|word-wrap: break-word
|
||||
|
|
|
@ -24,8 +24,9 @@ typedef double gfxFloat;
|
|||
*
|
||||
* eNoBreak The line has no break opportunities
|
||||
* eWordWrapBreak The line has a break opportunity only within a word. With
|
||||
* overflow-wrap|word-wrap: break-word we will break at this point only if
|
||||
* there are no other break opportunities in the line.
|
||||
* overflow-wrap|word-wrap: break-word we will break at this
|
||||
* point only if there are no other break opportunities in the
|
||||
* line.
|
||||
* eNormalBreak The line has a break opportunity determined by the standard
|
||||
* line-breaking algorithm.
|
||||
*
|
||||
|
|
|
@ -276,7 +276,9 @@ struct VRDisplayState
|
|||
uint32_t mMinRestartInterval;
|
||||
char mDisplayName[kVRDisplayNameMaxLen];
|
||||
// eight byte character code identifier
|
||||
// LSB first, so "ABCDEFGH" -> ('H'<<56) + ('G'<<48) + ('F'<<40) + ('E'<<32) + ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
|
||||
// LSB first, so "ABCDEFGH" -> ('H'<<56) + ('G'<<48) + ('F'<<40) +
|
||||
// ('E'<<32) + ('D'<<24) + ('C'<<16) +
|
||||
// ('B'<<8) + 'A').
|
||||
uint64_t mEightCC;
|
||||
VRDisplayCapabilityFlags mCapabilityFlags;
|
||||
VRFieldOfView mEyeFOV[VRDisplayState::NumEyes];
|
||||
|
|
|
@ -163,7 +163,8 @@ RenderCompositorANGLE::Initialize()
|
|||
desc.SampleDesc.Count = 1;
|
||||
desc.SampleDesc.Quality = 0;
|
||||
desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
|
||||
// Do not use DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, since it makes HWND unreusable.
|
||||
// Do not use DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, since it makes HWND
|
||||
// unreusable.
|
||||
//desc.BufferCount = 2;
|
||||
//desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
|
||||
desc.BufferCount = 1;
|
||||
|
|
|
@ -17,8 +17,12 @@
|
|||
#include "TextDrawTarget.h"
|
||||
|
||||
#define WRDL_LOG(...)
|
||||
//#define WRDL_LOG(...) printf_stderr("WRDL(%p): " __VA_ARGS__)
|
||||
//#define WRDL_LOG(...) if (XRE_IsContentProcess()) printf_stderr("WRDL(%p): " __VA_ARGS__)
|
||||
/*
|
||||
#define WRDL_LOG(...) printf_stderr("WRDL(%p): " __VA_ARGS__)
|
||||
#define WRDL_LOG(...) if (XRE_IsContentProcess()) { \
|
||||
printf_stderr("WRDL(%p): " __VA_ARGS__); \
|
||||
}
|
||||
*/
|
||||
|
||||
namespace mozilla {
|
||||
namespace wr {
|
||||
|
|
|
@ -134,7 +134,8 @@ public:
|
|||
* @return a LexerResult which may indicate:
|
||||
* - the image has been successfully decoded (TerminalState::SUCCESS), or
|
||||
* - the image has failed to decode (TerminalState::FAILURE), or
|
||||
* - the decoder is yielding until it gets more data (Yield::NEED_MORE_DATA), or
|
||||
* - the decoder is yielding until it gets more data
|
||||
* (Yield::NEED_MORE_DATA), or
|
||||
* - the decoder is yielding to allow the caller to access intermediate
|
||||
* output (Yield::OUTPUT_AVAILABLE).
|
||||
*/
|
||||
|
|
|
@ -188,9 +188,9 @@ public:
|
|||
* @param aProgress The progress notifications to send.
|
||||
* @param aInvalidRect An invalidation rect to send.
|
||||
* @param aFrameCount If Some(), an updated count of the number of frames of
|
||||
* animation the decoder has finished decoding so far. This
|
||||
* is a lower bound for the total number of animation
|
||||
* frames this image has.
|
||||
* animation the decoder has finished decoding so far.
|
||||
* This is a lower bound for the total number of
|
||||
* animation frames this image has.
|
||||
* @param aDecoderFlags The decoder flags used by the decoder that generated
|
||||
* these notifications, or DefaultDecoderFlags() if the
|
||||
* notifications don't come from a decoder.
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче