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

Issue 2769533002: Clean up calls to ToSkPicture (Closed)

Created:
3 years, 9 months ago by enne (OOO)
Modified:
3 years, 9 months ago
Reviewers:
danakj, pdr., vmpstr
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, fmalita+watch_chromium.org, jbroman, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Clean up calls to ToSkPicture In the future, PaintRecord is going to become a real class, and so a function that takes in a raw PaintRecord* and returns an SkPicture* doesn't make much sense, as it'll really be an ownership transfer. Therefore, remove the callers that use the raw pointer version. ToSkPicture in the future is going to be a playback instead of just a cast and will not be free. So, this also cleans up two callsites that do not have to use drawPicture(ToSkPicture) and could instead use PaintRecord::playback(SkCanvas*). However, drawPicture has some optional parameters, but there's only one callsite that uses it (!!!) so just hoist a single saveLayer call up and make the PaintCavnas API more clean. This is baking what SkAutoCanvasMatrixPaint does in SkCanvas.cpp into that callsite in PaintGeneratedImage. BUG=671433 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2769533002 Cr-Commit-Position: refs/heads/master@{#459208} Committed: https://chromium.googlesource.com/chromium/src/+/dffda5006efcf5d473530268ff2da14f43e41cc3

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -33 lines) Patch
M cc/paint/display_item_list.cc View 2 chunks +2 lines, -7 lines 0 comments Download
M cc/paint/paint_canvas.h View 1 1 chunk +1 line, -6 lines 0 comments Download
M cc/paint/paint_record.h View 1 chunk +0 lines, -8 lines 0 comments Download
M cc/paint/skia_paint_canvas.h View 1 1 chunk +1 line, -3 lines 0 comments Download
M cc/paint/skia_paint_canvas.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp View 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 21 (15 generated)
enne (OOO)
https://codereview.chromium.org/2769533002/diff/1/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp File third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp (right): https://codereview.chromium.org/2769533002/diff/1/third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp#newcode27 third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.cpp:27: canvas->saveLayer(&bounds, &flags); Tested this change via LayoutTests/csspaint. https://codereview.chromium.org/2769533002/diff/1/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp File ...
3 years, 9 months ago (2017-03-21 23:08:11 UTC) #6
vmpstr
cc lgtm https://codereview.chromium.org/2769533002/diff/1/cc/paint/display_item_list.cc File cc/paint/display_item_list.cc (right): https://codereview.chromium.org/2769533002/diff/1/cc/paint/display_item_list.cc#newcode105 cc/paint/display_item_list.cc:105: item.picture->playback(canvas, callback); IIRC this was there as ...
3 years, 9 months ago (2017-03-22 21:00:12 UTC) #9
enne (OOO)
https://codereview.chromium.org/2769533002/diff/1/cc/paint/display_item_list.cc File cc/paint/display_item_list.cc (right): https://codereview.chromium.org/2769533002/diff/1/cc/paint/display_item_list.cc#newcode105 cc/paint/display_item_list.cc:105: item.picture->playback(canvas, callback); On 2017/03/22 at 21:00:11, vmpstr wrote: > ...
3 years, 9 months ago (2017-03-23 16:43:12 UTC) #11
pdr.
On 2017/03/23 at 16:43:12, enne wrote: > https://codereview.chromium.org/2769533002/diff/1/cc/paint/display_item_list.cc > File cc/paint/display_item_list.cc (right): > > https://codereview.chromium.org/2769533002/diff/1/cc/paint/display_item_list.cc#newcode105 ...
3 years, 9 months ago (2017-03-23 20:37:41 UTC) #15
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/2769533002/20001
3 years, 9 months ago (2017-03-23 20:40:40 UTC) #18
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 20:47:35 UTC) #21
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/dffda5006efcf5d473530268ff2d...

Powered by Google App Engine
This is Rietveld 408576698