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

Issue 1841833002: Deal gracefully with null {GraphicsContext,SkPictureBuilder}.endRecording() results. (Closed)

Created:
4 years, 8 months ago by wkorman
Modified:
4 years, 8 months ago
Reviewers:
caseq, chrishtr, f(malita), pdr.
CC:
apavlov+blink_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, caseq+blink_chromium.org, chromium-reviews, danakj+watch_chromium.org, devtools-reviews_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, f(malita), fs, gyuyoung2, jbroman, jchaffraix+rendering, Justin Novosad, kinuko+watch, kouhei+svg_chromium.org, kozyatinskiy+blink_chromium.org, leviw+renderwatch, lushnikov+blink_chromium.org, pdr+svgwatchlist_chromium.org, pdr+graphicswatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, pfeldman+blink_chromium.org, rwlbuis, Stephen Chennney, sergeyv+blink_chromium.org, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Deal gracefully with null {GraphicsContext,SkPictureBuilder}.endRecording() results. GraphicsContext supports the notion of being "disabled". Currently this is only used by the rasterize_and_record_micro benchmark. In this mode, both GraphicsContext.endRecording() and SkPictureBuilder.endRecording() can return null and our code is not currently robust against this result. Update callsites to deal with a null picture, and add documentation to GraphicsContext and SkPictureBuilder to make this clearer. BUG=598358 Committed: https://crrev.com/825563e67be0a696f375fce91e6016cabcf0a673 Cr-Commit-Position: refs/heads/master@{#383971}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Code review feedback. #

Patch Set 3 : Don't end recording twice in DrawingRecorder. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -22 lines) Patch
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp View 1 chunk +6 lines, -1 line 2 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGResourcePattern.cpp View 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/SVGClipPainter.cpp View 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/SVGShapePainter.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp View 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebFont.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebScrollbarThemePainter.cpp View 1 11 chunks +17 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsContext.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/SkPictureBuilder.h View 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/PageWidgetDelegate.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 2 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (13 generated)
wkorman
4 years, 8 months ago (2016-03-29 22:32:52 UTC) #2
chrishtr
https://codereview.chromium.org/1841833002/diff/1/third_party/WebKit/Source/core/frame/LocalFrame.cpp File third_party/WebKit/Source/core/frame/LocalFrame.cpp (right): https://codereview.chromium.org/1841833002/diff/1/third_party/WebKit/Source/core/frame/LocalFrame.cpp#newcode130 third_party/WebKit/Source/core/frame/LocalFrame.cpp:130: if (!recording) Did you check call sites to be ...
4 years, 8 months ago (2016-03-29 22:42:23 UTC) #4
wkorman
https://codereview.chromium.org/1841833002/diff/1/third_party/WebKit/Source/core/frame/LocalFrame.cpp File third_party/WebKit/Source/core/frame/LocalFrame.cpp (right): https://codereview.chromium.org/1841833002/diff/1/third_party/WebKit/Source/core/frame/LocalFrame.cpp#newcode130 third_party/WebKit/Source/core/frame/LocalFrame.cpp:130: if (!recording) On 2016/03/29 at 22:42:23, chrishtr wrote: > ...
4 years, 8 months ago (2016-03-29 22:52:02 UTC) #5
chrishtr
lgtm
4 years, 8 months ago (2016-03-29 22:53:53 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1841833002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1841833002/20001
4 years, 8 months ago (2016-03-29 22:54:18 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/136275) linux_chromium_clobber_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 8 months ago (2016-03-29 23:26:35 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1841833002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1841833002/40001
4 years, 8 months ago (2016-03-30 00:02:47 UTC) #14
f(malita)
It feels a bit odd to relax the non-null recording invariant in order to support ...
4 years, 8 months ago (2016-03-30 01:27:34 UTC) #16
wkorman
On 2016/03/30 at 01:27:34, fmalita wrote: > It feels a bit odd to relax the ...
4 years, 8 months ago (2016-03-30 04:00:25 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_TIMED_OUT, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/195899)
4 years, 8 months ago (2016-03-30 06:23:05 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1841833002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1841833002/40001
4 years, 8 months ago (2016-03-30 12:44:41 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-03-30 13:58:26 UTC) #23
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/825563e67be0a696f375fce91e6016cabcf0a673 Cr-Commit-Position: refs/heads/master@{#383971}
4 years, 8 months ago (2016-03-30 13:59:26 UTC) #25
caseq
https://codereview.chromium.org/1841833002/diff/40001/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp (right): https://codereview.chromium.org/1841833002/diff/40001/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp#newcode340 third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp:340: if (!recording) This actually needs to set errorString to ...
4 years, 8 months ago (2016-04-04 21:38:33 UTC) #27
wkorman
https://codereview.chromium.org/1841833002/diff/40001/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp File third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp (right): https://codereview.chromium.org/1841833002/diff/40001/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp#newcode340 third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp:340: if (!recording) On 2016/04/04 at 21:38:33, caseq wrote: > ...
4 years, 8 months ago (2016-04-04 22:20:05 UTC) #28
caseq
4 years, 8 months ago (2016-04-04 23:16:39 UTC) #29
Message was sent while issue was closed.
On 2016/04/04 22:20:05, wkorman wrote:
>
https://codereview.chromium.org/1841833002/diff/40001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
> (right):
> 
>
https://codereview.chromium.org/1841833002/diff/40001/third_party/WebKit/Sour...
> third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp:340: if
> (!recording)
> On 2016/04/04 at 21:38:33, caseq wrote:
> > This actually needs to set errorString to something to indicate the error (I
> realize bail-out at the start of the function may be confusing, but it
actually
> sets errorString within layerById())
> 
> Ah, thanks for catching. I think we are ok because shortly after this change
> fmalita@ landed http://crrev.com/1849433002 which moved this back to previous
> code.

Yup. I only noticed Florin's change later as I was digging through my mail after
vacation.

Powered by Google App Engine
This is Rietveld 408576698