зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
3f14ad38c2
Коммит
377f3f30b2
|
@ -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();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче