16#if defined(SK_ENABLE_SVG)
23 "svg or skp for the BoundsManager bench to sniff paths from.");
25#define PRINT_DRAWSET_COUNT 0
54 for (
int i = 0;
i < loops; ++
i) {
60#if PRINT_DRAWSET_COUNT
61 SkDebugf(
"%s >> grouped %d draws into %d sets <<\n",
71 fManager->recordDraw(drawBounds, order);
72 if (order > maxRead) {
93 const char* managerName,
96 , fNumRandomRects(numRandomRects) {
97 fName.
printf(
"BoundsManager_rand_%i_%s", numRandomRects, managerName);
103 for (
int i = 0;
i < fNumRandomRects; ++
i) {
117 const char* managerName)
119 if (!FLAGS_boundsManagerFile.isEmpty()) {
120 const char* filename = strrchr(FLAGS_boundsManagerFile[0],
'/');
124 filename = FLAGS_boundsManagerFile[0];
126 fName.
printf(
"BoundsManager_file_%s_%s", filename, managerName);
132 if (FLAGS_boundsManagerFile.isEmpty()) {
139 if (FLAGS_boundsManagerFile.isEmpty()) {
146 if (!
paint.canComputeFastBounds() ||
path.isInverseFillType()) {
156 fileBounds.
join(drawBounds);
159 const char*
path = FLAGS_boundsManagerFile[0];
160 if (
const char*
ext = strrchr(
path,
'.');
ext && !strcmp(
ext,
".svg")) {
161#if defined(SK_ENABLE_SVG)
164 SK_ABORT(
"must compile with svg backend to process svgs");
170#if PRINT_DRAWSET_COUNT
171 SkDebugf(
"%s bounds are [%f %f %f %f]\n",
172 FLAGS_boundsManagerFile[0],
181#define DEF_BOUNDS_MANAGER_BENCH_SET(manager, name) \
182 DEF_BENCH( return new skgpu::graphite::RandomBoundsManagerBench(manager, name, 100); ) \
183 DEF_BENCH( return new skgpu::graphite::RandomBoundsManagerBench(manager, name, 500); ) \
184 DEF_BENCH( return new skgpu::graphite::RandomBoundsManagerBench(manager, name, 1000); ) \
185 DEF_BENCH( return new skgpu::graphite::RandomBoundsManagerBench(manager, name, 10000); ) \
186 DEF_BENCH( return new skgpu::graphite::FileBoundsManagerBench(manager, name); )
198#undef DEF_BOUNDS_MANAGER_BENCH_SET
#define DEF_BOUNDS_MANAGER_BENCH_SET(manager, name)
static DEFINE_string(boundsManagerFile, "", "svg or skp for the BoundsManager bench to sniff paths from.")
#define SK_ABORT(message,...)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
T * makeArray(size_t count)
float nextRangeF(float min, float max)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
void onDraw(int loops, SkCanvas *) final
BoundsManagerBench(std::unique_ptr< BoundsManager > manager)
void onDelayedSetup() final
CompressedPaintersOrder fMaxRead
const char * onGetName() final
void onPerCanvasPostDraw(SkCanvas *) override
std::unique_ptr< BoundsManager > fManager
SkArenaAlloc fAlignedAllocator
bool isSuitableFor(Backend backend) override
virtual void gatherRects(TArray< SkRect > *rects)=0
FileBoundsManagerBench(std::unique_ptr< BoundsManager > manager, const char *managerName)
static constexpr MonotonicValue First()
RandomBoundsManagerBench(std::unique_ptr< BoundsManager > manager, const char *managerName, int numRandomRects)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font manager
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
static constexpr SkRect MakeEmpty()
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
SkScalar fRight
larger x-axis bounds
void join(const SkRect &r)
SkScalar fTop
smaller y-axis bounds