#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stddef.h>
#include <stdint.h>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "cc/layers/heads_up_display_layer.h"
#include "cc/layers/layer_impl.h"
#include "cc/layers/painted_scrollbar_layer.h"
#include "cc/layers/picture_layer.h"
#include "cc/layers/texture_layer.h"
#include "cc/layers/texture_layer_impl.h"
#include "cc/layers/video_layer.h"
#include "cc/layers/video_layer_impl.h"
#include "cc/paint/filter_operations.h"
#include "cc/paint/paint_flags.h"
#include "cc/resources/ui_resource_manager.h"
#include "cc/test/fake_content_layer_client.h"
#include "cc/test/fake_layer_tree_host_client.h"
#include "cc/test/fake_picture_layer.h"
#include "cc/test/fake_picture_layer_impl.h"
#include "cc/test/fake_scoped_ui_resource.h"
#include "cc/test/fake_scrollbar.h"
#include "cc/test/fake_scrollbar_layer.h"
#include "cc/test/fake_video_frame_provider.h"
#include "cc/test/layer_tree_test.h"
#include "cc/test/render_pass_test_utils.h"
#include "cc/test/test_layer_tree_frame_sink.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/single_thread_proxy.h"
#include "components/viz/client/client_resource_provider.h"
#include "components/viz/test/fake_output_surface.h"
#include "components/viz/test/test_context_provider.h"
#include "components/viz/test/test_gles2_interface.h"
#include "components/viz/test/test_shared_bitmap_manager.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/client/raster_interface.h"
#include "media/base/media.h"
VideoFrame;
namespace cc {
namespace {
base::TimeTicks TicksFromMicroseconds(int64_t micros) { … }
class LayerTreeHostContextTest : public LayerTreeTest { … };
class LayerTreeHostContextTestLostContextSucceeds
: public LayerTreeHostContextTest { … };
class LayerTreeHostClientNotVisibleDoesNotCreateLayerTreeFrameSink
: public LayerTreeHostContextTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostClientNotVisibleDoesNotCreateLayerTreeFrameSink);
class LayerTreeHostClientTakeAwayLayerTreeFrameSink
: public LayerTreeHostContextTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostClientTakeAwayLayerTreeFrameSink);
class MultipleCompositeDoesNotCreateLayerTreeFrameSink
: public LayerTreeHostContextTest { … };
SINGLE_THREAD_TEST_F(MultipleCompositeDoesNotCreateLayerTreeFrameSink);
class FailedCreateDoesNotCreateExtraLayerTreeFrameSink
: public LayerTreeHostContextTest { … };
SINGLE_THREAD_TEST_F(FailedCreateDoesNotCreateExtraLayerTreeFrameSink);
class LayerTreeHostContextTestLostContextSucceedsWithContent
: public LayerTreeHostContextTestLostContextSucceeds { … };
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostContextTestLostContextSucceedsWithContent);
class LayerTreeHostContextTestCreateLayerTreeFrameSinkFailsOnce
: public LayerTreeHostContextTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostContextTestCreateLayerTreeFrameSinkFailsOnce);
class LayerTreeHostContextTestLostContextAndEvictTextures
: public LayerTreeHostContextTest { … };
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
LoseAfterEvict_SingleThread) { … }
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
LoseAfterEvict_MultiThread) { … }
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
LoseBeforeEvict_SingleThread) { … }
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
LoseBeforeEvict_MultiThread) { … }
class LayerTreeHostContextTestLayersNotified : public LayerTreeHostContextTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestLayersNotified);
class LayerTreeHostContextTestDontUseLostResources
: public LayerTreeHostContextTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestDontUseLostResources);
class LayerTreeHostContextTestImplSidePainting
: public LayerTreeHostContextTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostContextTestImplSidePainting);
class ScrollbarLayerLostContext : public LayerTreeHostContextTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(ScrollbarLayerLostContext);
class UIResourceLostTest : public LayerTreeHostContextTest { … };
class UIResourceLostTestSimple : public UIResourceLostTest { … };
class UIResourceLostAfterCommit : public UIResourceLostTestSimple { … };
SINGLE_AND_MULTI_THREAD_TEST_F(UIResourceLostAfterCommit);
class UIResourceLostBeforeCommit : public UIResourceLostTestSimple { … };
MULTI_THREAD_TEST_F(UIResourceLostBeforeCommit);
class UIResourceLostBeforeActivateTree : public UIResourceLostTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(UIResourceLostBeforeActivateTree);
class UIResourceLostEviction : public UIResourceLostTestSimple { … };
SINGLE_AND_MULTI_THREAD_TEST_F(UIResourceLostEviction);
class UIResourceFreedIfLostWhileExported : public LayerTreeHostContextTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(UIResourceFreedIfLostWhileExported);
class TileResourceFreedIfLostWhileExported : public LayerTreeHostContextTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(TileResourceFreedIfLostWhileExported);
class SoftwareTileResourceFreedIfLostWhileExported : public LayerTreeTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(SoftwareTileResourceFreedIfLostWhileExported);
class LayerTreeHostContextTestLoseAfterSendingBeginMainFrame
: public LayerTreeHostContextTest { … };
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostContextTestLoseAfterSendingBeginMainFrame);
class LayerTreeHostContextTestWorkerContextLostRecovery : public LayerTreeTest { … };
MULTI_THREAD_TEST_F(LayerTreeHostContextTestWorkerContextLostRecovery);
}
}