gecko-dev/browser/base/content/browser-graphics-utils.js
Bas Schouten 115004ee5c Bug 1536174 - Part 3: Add ability to start and stop composition recordings from a keyboard combo. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D23915

--HG--
rename : browser/base/content/browser-webrender.js => browser/base/content/browser-graphics-utils.js
extra : rebase_source : dd94a1bb4e437bd9283c0cec6198c4912429a6af
2019-03-18 20:06:33 +01:00

27 lines
772 B
JavaScript

/* 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/. */
// This file is loaded into the browser window scope.
/* eslint-env mozilla/browser-window */
/**
* Global browser interface with graphics utilities.
*/
var gGfxUtils = {
_isRecording: false,
/**
* Toggle composition recording for the current window.
*/
toggleWindowRecording() {
window.windowUtils.setCompositionRecording(!this._isRecording);
this._isRecording = !this._isRecording;
},
/**
* Trigger a WebRender capture of the current state into a local folder.
*/
webrenderCapture() {
window.windowUtils.wrCapture();
},
};