#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "cc/benchmarks/rasterize_and_record_benchmark_impl.h"
#include <stddef.h>
#include <algorithm>
#include <limits>
#include <memory>
#include <utility>
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/timer/lap_timer.h"
#include "base/values.h"
#include "cc/layers/layer_impl.h"
#include "cc/layers/picture_layer_impl.h"
#include "cc/paint/display_item_list.h"
#include "cc/raster/playback_image_provider.h"
#include "cc/raster/raster_buffer_provider.h"
#include "cc/tiles/tile_priority.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "cc/trees/layer_tree_impl.h"
#include "skia/ext/legacy_display_globals.h"
#include "ui/gfx/geometry/axis_transform2d.h"
#include "ui/gfx/geometry/rect.h"
namespace cc {
namespace {
void RunBenchmark(const PictureLayerTiling& tiling,
ImageDecodeCache* image_decode_cache,
const gfx::Rect& content_rect,
const gfx::Vector2dF& contents_scale,
size_t repeat_count,
base::TimeDelta* min_time,
bool* is_solid_color) { … }
class FixedInvalidationPictureLayerTilingClient
: public PictureLayerTilingClient { … };
}
RasterizeAndRecordBenchmarkImpl::RasterizeAndRecordBenchmarkImpl(
scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner,
int rasterize_repeat_count,
MicroBenchmarkImpl::DoneCallback callback)
: … { … }
RasterizeAndRecordBenchmarkImpl::~RasterizeAndRecordBenchmarkImpl() = default;
void RasterizeAndRecordBenchmarkImpl::DidCompleteCommit(
LayerTreeHostImpl* host) { … }
void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) { … }
RasterizeAndRecordBenchmarkImpl::RasterizeResults::RasterizeResults()
: … { … }
RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() =
default;
}