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

Issue 2680203005: cc: Use DrawingFrame as state, not function argument (Closed)

Created:
3 years, 10 months ago by ccameron
Modified:
3 years, 10 months ago
Reviewers:
enne (OOO)
CC:
cc-bugs_chromium.org, chromium-reviews, danakj
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Use DrawingFrame as state, not function argument Most DirectRenderer functions take a DrawingFrame*, and (with one exception), all of these functions use the DrawingFrame that is allocated on the stack in DirectRenderer::DrawFrame. Since this parameter is state of DirectRenderer, store it as state, namely, a pointer to that stack variable, as DirectRenderer::current_frame_. To ensure that no functions touch current_frame_ while outside of DirectRenderer::DrawFrame, set current_frame_ to nullptr outside of that scope. BUG=667966 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2680203005 Cr-Commit-Position: refs/heads/master@{#449561} Committed: https://chromium.googlesource.com/chromium/src/+/59f7c65c351f8fd43229710e65413df8f3da7c72

Patch Set 1 #

Total comments: 2

Patch Set 2 : Review feedback #

Patch Set 3 : Add reset #

Unified diffs Side-by-side diffs Delta from patch set Stats (+344 lines, -409 lines) Patch
M cc/output/bsp_walk_action.h View 1 chunk +0 lines, -2 lines 0 comments Download
M cc/output/bsp_walk_action.cc View 2 chunks +1 line, -3 lines 0 comments Download
M cc/output/direct_renderer.h View 1 5 chunks +35 lines, -26 lines 0 comments Download
M cc/output/direct_renderer.cc View 1 2 17 chunks +94 lines, -98 lines 0 comments Download
M cc/output/gl_renderer.h View 8 chunks +25 lines, -48 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 51 chunks +91 lines, -121 lines 0 comments Download
M cc/output/overlay_unittest.cc View 1 15 chunks +49 lines, -36 lines 0 comments Download
M cc/output/software_renderer.h View 2 chunks +15 lines, -29 lines 0 comments Download
M cc/output/software_renderer.cc View 1 23 chunks +34 lines, -46 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 12 (5 generated)
ccameron
For color conversion, I need to access DrawingFrame::device_color_space in a bunch of places ... I ...
3 years, 10 months ago (2017-02-08 22:19:16 UTC) #3
enne (OOO)
https://codereview.chromium.org/2680203005/diff/1/cc/output/direct_renderer.cc File cc/output/direct_renderer.cc (right): https://codereview.chromium.org/2680203005/diff/1/cc/output/direct_renderer.cc#newcode241 cc/output/direct_renderer.cc:241: current_frame_ = &frame; In general I'm pretty fine with ...
3 years, 10 months ago (2017-02-08 22:32:40 UTC) #4
ccameron
https://codereview.chromium.org/2680203005/diff/1/cc/output/direct_renderer.cc File cc/output/direct_renderer.cc (right): https://codereview.chromium.org/2680203005/diff/1/cc/output/direct_renderer.cc#newcode241 cc/output/direct_renderer.cc:241: current_frame_ = &frame; On 2017/02/08 22:32:40, enne wrote: > ...
3 years, 10 months ago (2017-02-08 22:35:59 UTC) #5
ccameron
Mmh, on second (well, third, possibly fourth) thought, yah, I like that better.
3 years, 10 months ago (2017-02-08 22:48:38 UTC) #6
enne (OOO)
lgtm
3 years, 10 months ago (2017-02-09 22:23:18 UTC) #7
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/2680203005/40001
3 years, 10 months ago (2017-02-10 06:48:31 UTC) #9
commit-bot: I haz the power
3 years, 10 months ago (2017-02-10 07:41:17 UTC) #12
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/59f7c65c351f8fd43229710e6541...

Powered by Google App Engine
This is Rietveld 408576698