Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Issue 2565433003: Fix GeneratedImage::drawPattern() use of SkPictureBuilder. (Closed)

Created:
4 years ago by vmiura
Modified:
4 years ago
Reviewers:
chrishtr, Xianzhu
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), jbroman, Justin Novosad, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -5 lines) Patch
M third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp View 1 2 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 13 (7 generated)
vmiura
ptal
4 years ago (2016-12-09 01:40:11 UTC) #4
chrishtr
lgtm https://codereview.chromium.org/2565433003/diff/1/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp File third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp (right): https://codereview.chromium.org/2565433003/diff/1/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp#newcode36 third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp:36: #include "platform/graphics/paint/SkPictureBuilder.h" You can remove this include.
4 years ago (2016-12-09 02:02:31 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2565433003/20001
4 years ago (2016-12-09 03:44:49 UTC) #8
vmiura
https://codereview.chromium.org/2565433003/diff/1/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp File third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp (right): https://codereview.chromium.org/2565433003/diff/1/third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp#newcode36 third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp:36: #include "platform/graphics/paint/SkPictureBuilder.h" On 2016/12/09 02:02:31, chrishtr wrote: > You ...
4 years ago (2016-12-09 03:48:57 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-09 05:37:18 UTC) #11
commit-bot: I haz the power
4 years ago (2016-12-09 05:38:57 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/45c66caf87f28914324b9851f83216fa58971915
Cr-Commit-Position: refs/heads/master@{#437478}

Powered by Google App Engine
This is Rietveld 408576698