/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* 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/. */
// The type of PrintTarget that we return here shouldn't really matter since // our implementation of GetDrawEventRecorder returns an object, which means // the DrawTarget returned by the PrintTarget will be a // DrawTargetWrapAndRecord. The recording will be serialized and sent over to // the parent process where PrintTranslator::TranslateRecording will call // MakePrintTarget (indirectly via PrintTranslator::CreateDrawTarget) on // whatever type of nsIDeviceContextSpecProxy is created for the platform that // we are running on. It is that DrawTarget that the recording will be // replayed on to print. // XXX(jwatt): The above isn't quite true. We do want to use a // PrintTargetRecording here, but we can't until bug 1280324 is figured out // and fixed otherwise we will cause bug 1280181 to happen again.
RefPtr<PrintTarget> target = PrintTargetThebes::CreateOrNull(surface);
mRecorder = new mozilla::layout::DrawEventRecorderPRFileDesc();
nsresult rv =
mRemotePrintJob->InitializePrint(nsString(aTitle), aStartPage, aEndPage); if (NS_FAILED(rv)) { // The parent process will send a 'delete' message to tell this process to // delete our RemotePrintJobChild. As soon as we return to the event loop // and evaluate that message we will crash if we try to access // mRemotePrintJob. We must not try to use it again.
mRemotePrintJob = nullptr;
} return rv;
}
// Send the page recording to the parent.
mRecorder->Close();
mRemotePrintJob->ProcessPage(mCurrentPageSizeInPoints,
std::move(mRecorder->TakeDependentSurfaces()));
return NS_OK;
}
¤ Dauer der Verarbeitung: 0.21 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.