Bug 1347646 Part 2: Use CreateRenderingContext in nsSimplePageSequenceFrame::PrePrintNextPage to ensure recorder is used for canvases. r=jwatt

Calling CreateReferenceRenderingContext currently returns a non-recording DrawTarget even
when the nsIDeviceContextSpec within the nsDeviceContext has a DrawEventRecorder, due to
bug 1354624. Since we've already called BeginPage we can call CreateRenderingContext instead
though and that will give us a recording DrawTarget as we require to record the canvas drawing.
This commit is contained in:
Bob Owen 2017-04-08 22:47:51 +01:00
Родитель 3f14ad38c2
Коммит 377f3f30b2
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -629,7 +629,7 @@ nsSimplePageSequenceFrame::PrePrintNextPage(nsITimerCallback* aCallback, bool* a
mCalledBeginPage = true; mCalledBeginPage = true;
RefPtr<gfxContext> renderingContext = dc->CreateReferenceRenderingContext(); RefPtr<gfxContext> renderingContext = dc->CreateRenderingContext();
NS_ENSURE_TRUE(renderingContext, NS_ERROR_OUT_OF_MEMORY); NS_ENSURE_TRUE(renderingContext, NS_ERROR_OUT_OF_MEMORY);
DrawTarget* drawTarget = renderingContext->GetDrawTarget(); DrawTarget* drawTarget = renderingContext->GetDrawTarget();