Chromium Code Reviews
Descriptioncc: 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 #
Depends on Patchset: Messages
Total messages: 12 (5 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||