Commit 3fd572c40076bda02985f2098e91e20acf19c43a

Tim Van Patten 2021-08-04T12:45:09

FrameCapture: Fix setCaptureActive() and MEC timing Frame capture is currently off by one when calling setCaptureActive() and collecting the mid-execution capture state. The MEC state is collected at frame N, but setCaptureActive() isn't called until frame N+1, meaning all of the maybeCapturePreCallUpdates() and maybeCapturePostCallUpdates() calls are not tracking resources correctly for frame N. This CL fixes when setCaptureActive() is called relative to when setupSharedAndAuxReplay() is called, so the trace is active for the first frame and all of the resources are correctly tracked. Additionally, setCaptureActive() during the FrameCaptureShared() ctor if frame capture starts with the first frame. Bug: angleproject:6225 Change-Id: Id07e78b2da9c9d33779e20ab6a42f63cd103a6a6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3071940 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>