Граф коммитов

69 Коммитов

Автор SHA1 Сообщение Дата
Bob Owen 8a6b8bfbbf Bug 1462049: Fix MemStream allocation to only allocate its capacity. r=jrmuizel 2018-05-16 18:26:24 +01:00
Andrew Osmond 63d93fdc78 Bug 1425484 - Part 3. Integrate shared surfaces with the blob image recordings. r=jrmuizel 2018-04-26 19:00:16 -04:00
Jeff Muizelaar 62a9686ee2 Bug 1439005. Add PushLayerWithBlend. r=Bas
This makes it possible to implement nsDisplayBlend blob image invalidation.
It currently only includes an implementation for Skia and DrawTargetRecording.
All other backends will crash when used.

MozReview-Commit-ID: 2GhdDxi4jHG
2018-02-17 12:07:30 -05:00
Jeff Muizelaar 12ce692c26 Bug 1438631. Fix typos in IntoLuminance recording event. 2018-02-16 15:52:44 -05:00
Jamie Nicol 61cdff34c5 Bug 1429508 - Allow created mask surfaces to be clipped to the necessary size when replaying a recording. r=bas
Add a command CreateClippedDrawTarget to DrawTarget, which takes the
max required size and a transform between this draw target and the one
to be created. The created draw target may have its size clipped to
the size of this draw target, transformed to the new target's
space. This means that the new surface will be large enough so
that it is rendered to this draw target correctly, but not necessarily
any larger.

Usually this will just create a draw target of the requested size, for
simplicity. However, when replaying a recorded draw target we do clip
the size to the base draw target's size. This is done using a
DrawTargetTiled, so when applying the mask in PopLayer, we must take
the SourceSurface's offset in to account.

MozReview-Commit-ID: 89ONElphzLu

--HG--
extra : rebase_source : 7eebeb66a2686a7b6f4ade36f3004ebb06abc2fe
2018-02-05 17:59:42 +00:00
Daniel Holbert 126bd9e1a4 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Jeff Muizelaar ed62b1d4a1 Bug 1380014. Share fonts with WebRender. r=lsalzman
This changes the serialization format a little bit.
We now have an index at the end of the blob. This
is currently used to store a list of the used font keys.
In the future we'll add rects and can use it for invalidation.
2017-10-27 18:21:27 -04:00
Jeff Muizelaar f1e1608327 Bug 1380014. Add the ability to record UnscaledFonts by index. r=lsalzman 2017-10-27 18:21:26 -04:00
Alex Gaynor b00c32c807 Bug 1319423 - Part 2 - Switch away from std::ifstream to PRFileDesc in PrintTranslator; r=jrmuizel
MozReview-Commit-ID: 6ucwbGkqOQ0

--HG--
extra : rebase_source : ab0540e2b7d61108c8c550d8bf8b8a594364f90a
2017-10-03 13:23:57 -04:00
Alex Gaynor 41d8032290 Bug 1319423 - Part 1 - Introduce DrawEventRecorderPRFileDesc to allow switching away from std::ofstream in printing; r=jrmuizel
MozReview-Commit-ID: 1gn8J2fhejS

--HG--
extra : rebase_source : 02b6224c2788964c375092e58174efbacfdbdba5
2017-10-03 12:29:15 -04:00
Jeff Muizelaar 480f5db364 Bug 1383055. RecordedEvent: Add DoWithEvent. r=lsalzman
Add DoWithEvent which switches over an event type, reads the event into
a stack variable and calls a callable with that event as a parameter.

This avoids doing a heap allocation for every event that we play back.
2017-08-18 13:03:09 -04:00
Lee Salzman 2d696d5c34 Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel
MozReview-Commit-ID: 5K9201eCSv
2017-06-30 14:09:05 -04:00
Sebastian Hengst 522fc18c93 Backed out changeset 24421d72ba08 (bug 1376026) 2017-07-07 21:42:09 +02:00
Lee Salzman ab6885d706 Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel
MozReview-Commit-ID: 5K9201eCSv
2017-06-30 14:09:05 -04:00
Jeff Muizelaar 1b3f0224fd Bug 1377362. Make InlineTranslator::TranslateRecording() take data instead of a stream. r=lsalzman
This gives us a big improvement to deserialization speed.
2017-07-06 07:15:45 -04:00
Jeff Muizelaar e60693a015 Bug 1377362. Make LoadEventFromStream generic. r=lsalzman
This is needed to allow deserialization directly from memory
2017-07-06 07:15:43 -04:00
Carsten "Tomcat" Book fbc9f302f1 Backed out changeset d09fb3a5cedf (bug 1376026) 2017-07-06 08:11:48 +02:00
Lee Salzman edc6db4195 Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel 2017-06-30 14:09:05 -04:00
Jeff Muizelaar 8e3a8d7ea1 Bug 1374900. Rewrite DrawEventRecorderMemory to use the MemStream infrastructure. r=lsalzman 2017-06-22 23:55:47 -04:00
Jeff Muizelaar cf684af118 Bug 1374900. Replace MemWriter with a MemStream implementation. r=lsalzman
This is much faster than using a stringstream for a couple of reasons:
1. ostream needs to do a virtual call on each write which means that
   it can't be inlined.
2. stringstream needs to check for resize every write(). We combine
   those checks into a single one.
2017-06-22 23:55:47 -04:00
Jeff Muizelaar 75d68e196f Bug 1374900. Add MemWriter r=lsalzman
Add a dummy RecordToStream() implementation that supports something other than
istream. This makes a couple of places more generic to support this.
2017-06-22 23:55:47 -04:00
Jeff Muizelaar 4f96690374 Bug 1374900. Make our low level serialization functions generic over the type of stream. r=lsalzman 2017-06-22 23:55:47 -04:00
Jeff Muizelaar 07374b97fe Bug 1372225 - Add recording for IntoLumaSource. r=mchang
This lets us avoid using the default implementation and allows us to
do the actual work on during playback.
2017-06-12 16:15:08 -04:00
Lee Salzman 6648f1fbf8 Bug 1364628 - give each webrender blob image renderer thread its own thread-local FT_Library to work around unsafe FT_Face rasterization/metrics calls. r=jrmuizel
MozReview-Commit-ID: 5sJznRRV3bq
2017-05-17 21:56:58 -04:00
Jeff Muizelaar ec4e044d9e Bug 1360001. Add back some recording helpers. r=bobowen
These are only going to be used temporarily while we bring up blob images for
webrender.
2017-05-01 21:58:21 -04:00
Lee Salzman 28471864af Bug 1355931 - move font serialization from ScaledFont to UnscaledFont. r=jrmuizel
MozReview-Commit-ID: 3d1XMoe2BKj
2017-04-14 14:11:00 -04:00
Bob Owen 3f14ad38c2 Bug 1347646 Part 1: Backout 4849ef8c9a34 for causing OOM issues when printing PDFs. r=jwatt, r=lsalzman, r=tobytailor 2017-04-08 22:47:51 +01:00
Lee Salzman 11961c7776 Bug 1343813 - make NativeFontResourceGDI send the LOGFONT as scaled font instance data. r=bobowen
MozReview-Commit-ID: F4UCQSXScHz
2017-03-29 18:22:06 -04:00
Tobias Schneider 2722515c91 Bug 1311512 - Use recording draw target for mozPrintCallback canvases. r=jwatt 2016-12-22 11:11:15 -08:00
Jonathan Kew b64c9129e3 Bug 1321031 pt 6 - Include variation settings in moz2d recording stream when using the native Mac font backend. r=bas,jrmuizel 2017-01-06 16:35:12 +00:00
Ryan VanderMeulen e897fba434 Backed out 6 changesets (bug 1321031) for bustage.
Backed out changeset e0be4f5390fb (bug 1321031)
Backed out changeset ba071046f8ab (bug 1321031)
Backed out changeset 7cb4242dc636 (bug 1321031)
Backed out changeset bc58e479eb58 (bug 1321031)
Backed out changeset c551913ae892 (bug 1321031)
Backed out changeset f4ae57d5358f (bug 1321031)

CLOSED TREE
2017-01-06 12:46:27 -05:00
Jonathan Kew 7199a26387 Bug 1321031 pt 6 - Include variation settings in moz2d recording stream when using the native Mac font backend. r=bas,jrmuizel 2017-01-06 16:35:12 +00:00
Lee Salzman 3cff1c818b Bug 1309205 - part 2 - provide NativeFontResourceFontconfig so that print_via_parent works on Linux. r=jfkthame
MozReview-Commit-ID: 94XcLKgwTPq
2017-01-04 14:01:12 -05:00
Bob Owen c4a371a6ce Bug 1316783: Record mSamplingRect for PatternType::SURFACE when using DrawTargetRecording. r=mstange
MozReview-Commit-ID: 8JWzW2cOSXK
2016-11-15 11:09:51 +00:00
Bob Owen 0671a5539a Bug 1285942 Part 1: Make RecordedEvent::PlayEvent return a bool and null check DrawTarget creation. r=bas
MozReview-Commit-ID: 8tm7rjFEbw0

--HG--
extra : rebase_source : 5a85bec626644515ef5a261c4cba076bcddf136c
2016-07-18 12:13:04 +01:00
Jonathan Watt 0b33916487 Bug 1277862, part 1 - Rename Moz2D's Filter to SamplingFilter in gfx/2d/. r=Bas 2016-05-25 17:01:18 +01:00
Edwin Flores cdd3b63026 Bug 1256678 - Fall back to loading GDI fonts from system in DrawTargetRecording - r=bas 2016-04-22 13:23:25 +01:00
Bob Owen 00a3e39683 Bug 1240437 part 2: Follow-up to fix implicit constrcutor static analysis failure. r=me 2016-01-26 10:31:31 +00:00
Bob Owen ddcde763b9 Bug 1240437: Implement PushLayer and PopLayer for DrawTargetRecording. r=bas 2016-01-26 10:03:07 +00:00
Bob Owen 1fe62dee68 Bug 1156742 Part 24: Add new Recorded event to record font data. r=bas
We create and destroy ScaledFonts for every piece of text we write.
That causes a huge amount of duplicated data within the recording.
This splits out the recording of the font data itself from the ScaledFont.
The key generated to determine uniqueness could probably be fairly easily faked, but for our purposes that doesn't matter.
2016-01-05 10:08:58 +00:00
Bob Owen 0c7ef20c4d Bug 1156742 Part 19: Implement GetFontFileData for ScaledFontWin. r=bas 2016-01-05 10:08:58 +00:00
Bob Owen 3b91f57af4 Bug 1156742 Part 17: Add virtual destructor to RecorededEvent and fix subsequent crash with DWrite playback fonts. r=bas 2016-01-05 10:08:57 +00:00
Bob Owen af9224e713 Bug 1156742 Part 16: Add recording and forwarding of Matrix attribute set for Moz2D recording. r=bas 2016-01-05 10:08:57 +00:00
Bob Owen 20e589aec1 Bug 1156742 Part 13: Create a Moz2D PrintTranslator. r=bas
A better solution to the ScaledFonts issue comes in Part 24.
2016-01-05 10:08:57 +00:00
Bob Owen e707786501 Bug 1156742 Part 12: Record CreateSimilarDrawTarget separately for Moz2D. r=bas
This is so we can create the real print DrawTarget from our nsDeviceContext at the beginning of each page.
Default behaviour for other Translators is still to always use CreateSimilarDrawTarget.
2016-01-05 10:08:57 +00:00
Bob Owen fdd98bfb6b Bug 1156742 Part 9: Add a new nsIDeviceContextSpec for proxied printing. r=roc
This also changes aPrintToFileName parameter for BeginDocument to an nsAString& from char16_t*.
Having a char16_t* caused a pain with VS2105 where wchar_t != char16_t (as on VS2103), after it had been sent over IPDL.
This could have been worked around with casting, but this seemed like the tidier solution.
2016-01-05 10:08:57 +00:00
Wes Kocher a5249b6201 Backed out 25 changesets (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE
Backed out changeset 31c0aadae8e7 (bug 1156742)
Backed out changeset f08df57ff700 (bug 1156742)
Backed out changeset 90c026d5dcb1 (bug 1156742)
Backed out changeset 8c6d14d80238 (bug 1156742)
Backed out changeset 72d86b0471c9 (bug 1156742)
Backed out changeset 363829accc09 (bug 1156742)
Backed out changeset 16360fe94d54 (bug 1156742)
Backed out changeset 5355c636a81a (bug 1156742)
Backed out changeset 18844d26b873 (bug 1156742)
Backed out changeset 99df86591613 (bug 1156742)
Backed out changeset 7ac1c7e15a11 (bug 1156742)
Backed out changeset de352000aae1 (bug 1156742)
Backed out changeset 4dd34ea230c6 (bug 1156742)
Backed out changeset 48c6ce65a5c2 (bug 1156742)
Backed out changeset dd52947f73c6 (bug 1156742)
Backed out changeset 5fe429ee880c (bug 1156742)
Backed out changeset dedca8fb19b0 (bug 1156742)
Backed out changeset d748b1354f92 (bug 1156742)
Backed out changeset 7f8e59588518 (bug 1156742)
Backed out changeset b90d302c57f6 (bug 1156742)
Backed out changeset 7a4da453572c (bug 1156742)
Backed out changeset a40eea914519 (bug 1156742)
Backed out changeset 99a8859afcdb (bug 1156742)
Backed out changeset 4934e88b2d7a (bug 1156742)
Backed out changeset 79733166f05e (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE

--HG--
extra : amend_source : beeb6abbcc724b79ac166e828efa78dc4c5301da
2015-12-21 13:47:33 -08:00
Bob Owen fb35888c83 Bug 1156742 Part 24: Add new Recorded event to record font data. r=bas
We create and destroy ScaledFonts for every piece of text we write.
That causes a huge amount of duplicated data within the recording.
This splits out the recording of the font data itself from the ScaledFont.
The key generated to determine uniqueness could probably be fairly easily faked, but for our purposes that doesn't matter.
2015-12-21 20:33:14 +00:00
Bob Owen ff49466165 Bug 1156742 Part 19: Implement GetFontFileData for ScaledFontWin. r=bas 2015-12-21 20:33:14 +00:00
Bob Owen f8497152ba Bug 1156742 Part 17: Add virtual destructor to RecorededEvent and fix subsequent crash with DWrite playback fonts. r=bas 2015-12-21 20:33:14 +00:00