зеркало из https://github.com/mozilla/gecko-dev.git
Back out cset 75b5af791006 (bug 1433139) for OS X debug mochitest-chrome-3 failure. r=me
This commit is contained in:
Родитель
d670a4f4b5
Коммит
b9bc1f73c5
|
@ -104,10 +104,6 @@
|
|||
oncommand="OpenBrowserWindow({private: true});"/>
|
||||
<command id="History:UndoCloseTab" oncommand="undoCloseTab();"/>
|
||||
<command id="History:UndoCloseWindow" oncommand="undoCloseWindow();"/>
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
<command id="wrCaptureCmd" oncommand="gWebRender.capture();"/>
|
||||
#endif
|
||||
</commandset>
|
||||
|
||||
<commandset id="placesCommands">
|
||||
|
@ -384,9 +380,6 @@
|
|||
#expand <key id="key_selectTab8" oncommand="gBrowser.selectTabAtIndex(7, event);" key="8" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
|
||||
#expand <key id="key_selectLastTab" oncommand="gBrowser.selectTabAtIndex(-1, event);" key="9" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
<key id="key_wrCaptureCmd" keycode="VK_3" event="keydown" command="wrCaptureCmd" modifiers="control,shift"/>
|
||||
#endif
|
||||
</keyset>
|
||||
|
||||
# Used by baseMenuOverlay
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// This file is loaded into the browser window scope.
|
||||
/* eslint-env mozilla/browser-window */
|
||||
|
||||
/**
|
||||
* Global browser interface with the WebRender backend.
|
||||
*/
|
||||
var gWebRender = {
|
||||
/**
|
||||
* Trigger a WebRender capture of the current state into a local folder.
|
||||
*/
|
||||
capture() {
|
||||
window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils)
|
||||
.wrCapture();
|
||||
}
|
||||
};
|
|
@ -117,10 +117,7 @@ XPCOMUtils.defineLazyScriptGetter(this, ["DownloadsButton",
|
|||
"chrome://browser/content/downloads/indicator.js");
|
||||
XPCOMUtils.defineLazyScriptGetter(this, "gEditItemOverlay",
|
||||
"chrome://browser/content/places/editBookmarkOverlay.js");
|
||||
if (AppConstants.NIGHTLY_BUILD) {
|
||||
XPCOMUtils.defineLazyScriptGetter(this, "gWebRender",
|
||||
"chrome://browser/content/browser-webrender.js");
|
||||
}
|
||||
|
||||
|
||||
// lazy service getters
|
||||
|
||||
|
|
|
@ -78,7 +78,6 @@ browser.jar:
|
|||
#endif
|
||||
content/browser/browser-thumbnails.js (content/browser-thumbnails.js)
|
||||
content/browser/browser-trackingprotection.js (content/browser-trackingprotection.js)
|
||||
content/browser/browser-webrender.js (content/browser-webrender.js)
|
||||
content/browser/tab-content.js (content/tab-content.js)
|
||||
content/browser/content.js (content/content.js)
|
||||
content/browser/default-theme-icon.svg (content/default-theme-icon.svg)
|
||||
|
|
|
@ -4499,12 +4499,3 @@ nsTranslationNodeList::GetLength(uint32_t* aRetVal)
|
|||
*aRetVal = mLength;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::WrCapture()
|
||||
{
|
||||
if (WebRenderBridgeChild* wrbc = GetWebRenderBridge()) {
|
||||
wrbc->Capture();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -1994,12 +1994,6 @@ interface nsIDOMWindowUtils : nsISupports {
|
|||
*/
|
||||
void removeFromStyloBlocklist(in ACString aBlockedDomain);
|
||||
|
||||
/**
|
||||
* Capture the contents of the current WebRender frame and
|
||||
* save them to a folder relative to the current working directory.
|
||||
*/
|
||||
void wrCapture();
|
||||
|
||||
// These consts are only for testing purposes.
|
||||
const long DEFAULT_MOUSE_POINTER_ID = 0;
|
||||
const long DEFAULT_PEN_POINTER_ID = 1;
|
||||
|
|
|
@ -69,8 +69,6 @@ parent:
|
|||
async ClearCachedResources();
|
||||
// Schedule a composite if one isn't already scheduled.
|
||||
async ForceComposite();
|
||||
// Save the frame capture to disk
|
||||
async Capture();
|
||||
|
||||
// These correspond exactly to the equivalent APIs in PLayerTransaction -
|
||||
// see those for documentation.
|
||||
|
|
|
@ -689,11 +689,5 @@ WebRenderBridgeChild::DeallocResourceShmem(RefCountedShmem& aShm)
|
|||
RefCountedShm::Dealloc(this, aShm);
|
||||
}
|
||||
|
||||
void
|
||||
WebRenderBridgeChild::Capture()
|
||||
{
|
||||
this->SendCapture();
|
||||
}
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -165,8 +165,6 @@ public:
|
|||
/// Do not use this for anything else.
|
||||
void DeallocResourceShmem(RefCountedShmem& aShm);
|
||||
|
||||
void Capture();
|
||||
|
||||
private:
|
||||
friend class CompositorBridgeChild;
|
||||
|
||||
|
|
|
@ -1015,15 +1015,6 @@ WebRenderBridgeParent::RecvForceComposite()
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
WebRenderBridgeParent::RecvCapture()
|
||||
{
|
||||
if (!mDestroyed) {
|
||||
mApi->Capture();
|
||||
}
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
already_AddRefed<AsyncPanZoomController>
|
||||
WebRenderBridgeParent::GetTargetAPZC(const FrameMetrics::ViewID& aScrollId)
|
||||
{
|
||||
|
|
|
@ -115,7 +115,6 @@ public:
|
|||
|
||||
mozilla::ipc::IPCResult RecvClearCachedResources() override;
|
||||
mozilla::ipc::IPCResult RecvForceComposite() override;
|
||||
mozilla::ipc::IPCResult RecvCapture() override;
|
||||
|
||||
mozilla::ipc::IPCResult RecvSetConfirmedTargetAPZC(const uint64_t& aBlockId,
|
||||
nsTArray<ScrollableLayerGuid>&& aTargets) override;
|
||||
|
|
|
@ -501,18 +501,6 @@ WebRenderAPI::WaitFlushed()
|
|||
task.Wait();
|
||||
}
|
||||
|
||||
void
|
||||
WebRenderAPI::Capture()
|
||||
{
|
||||
uint8_t bits = 3; //TODO: get from JavaScript
|
||||
const char* path = "wr-capture"; //TODO: get from JavaScript
|
||||
const char* border = "--------------------------\n";
|
||||
printf("%s Capturing WR state to: %s\n%s", border, path, border);
|
||||
wr_api_capture(mDocHandle, path, bits);
|
||||
RenderThread::Get()->IncPendingFrameCount(GetId());
|
||||
}
|
||||
|
||||
|
||||
ResourceUpdateQueue::ResourceUpdateQueue()
|
||||
{
|
||||
mUpdates = wr_resource_updates_new();
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
void AddExternalImage(ImageKey key,
|
||||
const ImageDescriptor& aDescriptor,
|
||||
ExternalImageId aExtID,
|
||||
wr::WrExternalImageBufferType aBufferType,
|
||||
WrExternalImageBufferType aBufferType,
|
||||
uint8_t aChannelIndex = 0);
|
||||
|
||||
void UpdateImageBuffer(wr::ImageKey aKey,
|
||||
|
@ -204,8 +204,6 @@ public:
|
|||
bool GetUseANGLE() const { return mUseANGLE; }
|
||||
layers::SyncHandle GetSyncHandle() const { return mSyncHandle; }
|
||||
|
||||
void Capture();
|
||||
|
||||
protected:
|
||||
WebRenderAPI(wr::DocumentHandle* aHandle, wr::WindowId aId, uint32_t aMaxTextureSize, bool aUseANGLE, layers::SyncHandle aSyncHandle)
|
||||
: mDocHandle(aHandle)
|
||||
|
|
|
@ -331,6 +331,13 @@ impl ExternalImageHandler for WrExternalImageHandler {
|
|||
let image = (self.lock_func)(self.external_image_obj, id.into(), channel_index);
|
||||
ExternalImage {
|
||||
uv: TexelRect::new(image.u0, image.v0, image.u1, image.v1),
|
||||
//uv: UvRect::new(UvPoint::new(image.u0, image.v0), UvSize::new(image.u1, image.v1)),
|
||||
/*
|
||||
u0: image.u0,
|
||||
v0: image.v0,
|
||||
u1: image.u1,
|
||||
v1: image.v1,
|
||||
*/
|
||||
source: match image.image_type {
|
||||
WrExternalImageType::NativeTexture => ExternalImageSource::NativeTexture(image.handle),
|
||||
WrExternalImageType::RawData => ExternalImageSource::RawData(make_slice(image.buff, image.size)),
|
||||
|
@ -1129,18 +1136,6 @@ pub extern "C" fn wr_resource_updates_add_raw_font(
|
|||
resources.add_raw_font(key, bytes.flush_into_vec(), index);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wr_api_capture(
|
||||
dh: &mut DocumentHandle,
|
||||
path: *const c_char,
|
||||
bits_raw: u32,
|
||||
) {
|
||||
let cstr = unsafe { CStr::from_ptr(path) };
|
||||
let path = PathBuf::from(&*cstr.to_string_lossy());
|
||||
let bits = CaptureBits::from_bits(bits_raw as _).unwrap();
|
||||
dh.api.save_capture(path, bits);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
fn read_font_descriptor(
|
||||
bytes: &mut WrVecU8,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* 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/. */
|
||||
|
||||
/* Generated with cbindgen:0.4.0 */
|
||||
/* Generated with cbindgen:0.3.3 */
|
||||
|
||||
/* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen.
|
||||
* To generate this file:
|
||||
|
@ -975,12 +975,6 @@ WR_INLINE
|
|||
const VecU8 *wr_add_ref_arc(const ArcVecU8 *aArc)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE
|
||||
void wr_api_capture(DocumentHandle *aDh,
|
||||
const char *aPath,
|
||||
uint32_t aBitsRaw)
|
||||
WR_FUNC;
|
||||
|
||||
WR_INLINE
|
||||
void wr_api_clone(DocumentHandle *aDh,
|
||||
DocumentHandle **aOutHandle)
|
||||
|
|
Загрузка…
Ссылка в новой задаче