mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
115004ee5c
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
27 lines
772 B
JavaScript
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();
|
|
},
|
|
};
|