-
David Bokan authored
As part of splitting out input from LayerTreeHostImpl I found some issues in tests that use FakeLayerTreeHost. This class also initializes a FakeLayerTreeHostImpl which is used in some tests. However, some tests also call InitializeSingleThreaded to use the FakeLayerTreeHost with a Proxy. Initializing a Proxy will call LayerTreeHost::CreateLayerTreeHostImpl which currently creates a (real) LayerTreeHostImpl that's owned by the Proxy. These tests are incorrectly running with multiple LTHI objects. This CL overrides CreateLayerTreeHostImpl in the fake so that this method creates a fake Impl object. We also avoid manually creating a fake Impl inside the FakeLayerTreeHost and instead rely on the call to CreateLayerTreeHostImpl to store a pointer to the fake impl. For tests that don't use a Proxy, we now manually call a new CreateFakeLayerTreeHostImpl method that does the same thing and the FakeLayerTreeHost takes ownership of the Impl instead. Bug: 915926 Change-Id: I63202e1717d2eab026688d69c8d0ef75939c7c47 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363247Reviewed-by:
Xianzhu Wang <wangxianzhu@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#799390}
613ec9bd