DescriptionFix GeneratedImage::drawPattern() use of SkPictureBuilder.
SkPictureBuilder records DisplayItems and plays them into
an SkPicture. GeneratedImage::drawPattern() was misusing
SkPictureBuilder; using it to create a GraphicsContext and
draw to it directly. It results in the pattern:
1) GraphicsContext::beginRecording()
2) Draw content to GraphicsContext
3) GraphicsContext::beginRecording() again
5) SkPicture picture = GraphicsContext::endRecording()
This is hitting undefined behavior in SkPictureRecorder which
happens to work but is a bug.
This change removes SkPictureBuilder and records directly
to a GraphicsContext.
BUG=672618
Committed: https://crrev.com/45c66caf87f28914324b9851f83216fa58971915
Cr-Commit-Position: refs/heads/master@{#437478}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Remove old include. Add DCHECK to GC::beginRecording. #
Messages
Total messages: 13 (7 generated)
|