Chromium Code Reviews
Descriptionremember the last metafile, instead of the last canvas
SkCanvas is marked to become NOT reference counted (its very problematic today, since a canvas can (and often is) be on the stack).
The current code in plugins rely on "ref"ing the last canvas it saw, so that later it can extract the "metafile" from it and use that (in printEnd). This itself is a bit odd, since there is no explicit mapping between the lifetime of the canvas and the lifetime of the metafile.
This change just makes bare what is going on: we remember the last metafile we've seen (by extracting it from the canvas each time we see a canvas), and then use it directly in printEnd.
This does require that the metafile be valid until printEnd is called, but that was a necessary promise all along.
BUG=
Committed: https://crrev.com/b8367dc404046305d17bb691075531da1da2c0c5
Cr-Commit-Position: refs/heads/master@{#433542}
Patch Set 1 #
Messages
Total messages: 19 (12 generated)
|
||||||||||||||||||||||||||||