зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1399787 - Part 11.d. Using PrintTargetEMF on windows if skia-pdf is enable. r=jwatt
MozReview-Commit-ID: Hx94fqGJFz6 --HG-- extra : rebase_source : faedf5f44db7f27482644987aa22bc2a5e156ab9 extra : source : 564351eb834faef9c2363edd690d80e7b24a2c41
This commit is contained in:
Родитель
7f167d3fc5
Коммит
8724da38d5
|
@ -36,6 +36,7 @@
|
|||
|
||||
#ifdef MOZ_ENABLE_SKIA_PDF
|
||||
#include "mozilla/gfx/PrintTargetSkPDF.h"
|
||||
#include "mozilla/gfx/PrintTargetEMF.h"
|
||||
#include "nsIUUIDGenerator.h"
|
||||
#include "nsDirectoryServiceDefs.h"
|
||||
#include "nsPrintfCString.h"
|
||||
|
@ -227,7 +228,14 @@ already_AddRefed<PrintTarget> nsDeviceContextSpecWin::MakePrintTarget()
|
|||
}
|
||||
|
||||
if (mDevMode) {
|
||||
// TBD: Implement a new PrintTarget to serve EMF OOP.
|
||||
NS_WARNING_ASSERTION(!mDriverName.IsEmpty(), "No driver!");
|
||||
HDC dc = ::CreateDCW(mDriverName.get(), mDeviceName.get(), nullptr, mDevMode);
|
||||
if (!dc) {
|
||||
gfxCriticalError(gfxCriticalError::DefaultOptions(false))
|
||||
<< "Failed to create device context in GetSurfaceForPrinter";
|
||||
return nullptr;
|
||||
}
|
||||
return PrintTargetEMF::CreateOrNull(dc, size);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче