#include <limits>
#include <memory>
#include <vector>
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/null_task_runner.h"
#include "base/time/time.h"
#include "base/timer/lap_timer.h"
#include "components/viz/common/quads/compositor_frame.h"
#include "components/viz/common/quads/compositor_render_pass.h"
#include "components/viz/common/quads/draw_quad.h"
#include "components/viz/common/quads/shared_quad_state.h"
#include "components/viz/common/quads/texture_draw_quad.h"
#include "components/viz/service/display/aggregated_frame.h"
#include "components/viz/service/display/occlusion_culler.h"
#include "components/viz/service/display/overlay_processor_interface.h"
#include "components/viz/service/display/overlay_processor_stub.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_result_reporter.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/transform.h"
namespace viz {
namespace {
constexpr int kTimeLimitMillis = …;
constexpr int kWarmupRuns = …;
constexpr int kTimeCheckInterval = …;
constexpr int kHeight = …;
constexpr int kWidth = …;
constexpr float kDeviceScaleFactor = …;
constexpr char kMetricPrefixRemoveOverdrawQuad[] = …;
constexpr char kMetricOverlapThroughputRunsPerS[] = …;
constexpr char kMetricIsolatedThroughputRunsPerS[] = …;
constexpr char kMetricPartialOverlapThroughputRunsPerS[] = …;
constexpr char kMetricAdjacentThroughputRunsPerS[] = …;
perf_test::PerfResultReporter SetUpRemoveOverdrawQuadReporter(
const std::string& story) { … }
class RemoveOverdrawQuadPerfTest : public testing::Test { … };
TEST_F(RemoveOverdrawQuadPerfTest, IterateOverlapShareQuadStates) { … }
TEST_F(RemoveOverdrawQuadPerfTest, IterateIsolatedSharedQuadStates) { … }
TEST_F(RemoveOverdrawQuadPerfTest, IteratePartiallyOverlapSharedQuadStates) { … }
TEST_F(RemoveOverdrawQuadPerfTest, IterateAdjacentSharedQuadStates) { … }
}
}