5#include "flutter/display_list/benchmarking/dl_benchmarks.h"
6#include "flutter/display_list/dl_builder.h"
7#include "flutter/display_list/dl_op_flags.h"
8#include "flutter/display_list/skia/dl_sk_canvas.h"
9#include "flutter/display_list/testing/dl_test_snippets.h"
37 paint.setStrokeWidth(0.0f);
39 paint.setStrokeWidth(1.0f);
59 if (
flags.always_stroked()) {
62 if (
flags.applies_style()) {
67 if (
flags.applies_anti_alias()) {
91 unsigned attributes) {
101 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
110 auto display_list =
builder.Build();
113 for ([[maybe_unused]]
auto _ :
state) {
114 canvas.DrawDisplayList(display_list);
118 auto filename = surface_provider->backend_name() +
"-DrawLine-" +
120 surface_provider->Snapshot(filename);
129 unsigned attributes) {
137 size_t canvas_size =
length * 2;
138 surface_provider->InitializeSurface(canvas_size, canvas_size);
139 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
151 if (
rect.right() > canvas_size) {
152 rect.offset(-canvas_size, 0);
154 if (
rect.bottom() > canvas_size) {
155 rect.offset(0, -canvas_size);
159 auto display_list =
builder.Build();
162 for ([[maybe_unused]]
auto _ :
state) {
163 canvas.DrawDisplayList(display_list);
167 auto filename = surface_provider->backend_name() +
"-DrawRect-" +
169 surface_provider->Snapshot(filename);
178 unsigned attributes) {
186 size_t canvas_size =
length * 2;
187 surface_provider->InitializeSurface(canvas_size, canvas_size);
188 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
198 if (
rect.right() > canvas_size) {
199 rect.offset(-canvas_size, 0);
201 if (
rect.bottom() > canvas_size) {
202 rect.offset(0, -canvas_size);
205 auto display_list =
builder.Build();
208 for ([[maybe_unused]]
auto _ :
state) {
209 canvas.DrawDisplayList(display_list);
213 auto filename = surface_provider->backend_name() +
"-DrawOval-" +
215 surface_provider->Snapshot(filename);
224 unsigned attributes) {
232 size_t canvas_size =
length * 2;
233 surface_provider->InitializeSurface(canvas_size, canvas_size);
234 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
246 if (center.x() + radius > canvas_size) {
247 center.set(radius, center.y());
249 if (center.y() + radius > canvas_size) {
250 center.set(center.x(), radius);
253 auto display_list =
builder.Build();
256 for ([[maybe_unused]]
auto _ :
state) {
257 canvas.DrawDisplayList(display_list);
261 auto filename = surface_provider->backend_name() +
"-DrawCircle-" +
263 surface_provider->Snapshot(filename);
281 size_t canvas_size =
length * 2;
282 surface_provider->InitializeSurface(canvas_size, canvas_size);
283 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
288 case SkRRect::Type::kSimple_Type:
294 case SkRRect::Type::kNinePatch_Type:
300 case SkRRect::Type::kComplex_Type:
315 for (
size_t i = 0;
i < 4;
i++) {
331 auto display_list =
builder.Build();
334 for ([[maybe_unused]]
auto _ :
state) {
335 canvas.DrawDisplayList(display_list);
339 auto filename = surface_provider->backend_name() +
"-DrawRRect-" +
341 surface_provider->Snapshot(filename);
362 size_t canvas_size =
length * 2;
363 surface_provider->InitializeSurface(canvas_size, canvas_size);
364 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
369 case SkRRect::Type::kSimple_Type:
375 case SkRRect::Type::kNinePatch_Type:
381 case SkRRect::Type::kComplex_Type:
396 for (
size_t i = 0;
i < 4;
i++) {
413 auto display_list =
builder.Build();
416 for ([[maybe_unused]]
auto _ :
state) {
417 canvas.DrawDisplayList(display_list);
421 auto filename = surface_provider->backend_name() +
"-DrawDRRect-" +
423 surface_provider->Snapshot(filename);
428 unsigned attributes) {
437 size_t canvas_size =
length * 2;
438 surface_provider->InitializeSurface(canvas_size, canvas_size);
439 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
446 std::vector<SkScalar> segment_sweeps = {5.5f, -10.0f, 42.0f, 71.7f, 90.0f,
447 37.5f, 17.9f, 32.0f, 379.4f};
453 for (
SkScalar sweep : segment_sweeps) {
455 starting_angle += sweep + 5.0f;
458 if (
bounds.right() > canvas_size) {
459 bounds.offset(-canvas_size, 0);
461 if (
bounds.bottom() > canvas_size) {
462 bounds.offset(0, -canvas_size);
466 auto display_list =
builder.Build();
469 for ([[maybe_unused]]
auto _ :
state) {
470 canvas.DrawDisplayList(display_list);
474 auto filename = surface_provider->backend_name() +
"-DrawArc-" +
476 surface_provider->Snapshot(filename);
482 std::vector<SkPoint>
points;
485 float full_circle = 2.0f *
M_PI;
486 for (
size_t i = 0;
i < n;
i++) {
487 angle = (full_circle /
static_cast<float>(n)) *
static_cast<float>(
i);
488 x = center.x() + r * std::cosf(angle);
489 y = center.y() + r * std::sinf(angle);
504 for (
size_t i = 1;
i < sides;
i++) {
522 std::vector<SkPoint> control_points =
526 for (
size_t i = 1;
i < sides;
i++) {
529 path.quadTo(control_points[2 * sides - 1],
points[0]);
544 std::vector<SkPoint> control_points =
548 for (
size_t i = 1;
i < sides;
i++) {
549 path.conicTo(control_points[2 *
i - 1],
points[
i], 3.7f);
551 path.conicTo(control_points[2 * sides - 1],
points[0], 3.7f);
567 std::vector<SkPoint> inner_control_points =
569 std::vector<SkPoint> outer_control_points =
573 for (
size_t i = 1;
i < sides;
i++) {
574 path.cubicTo(inner_control_points[3 *
i - 2],
575 outer_control_points[3 *
i - 1],
points[
i]);
577 path.cubicTo(inner_control_points[3 * sides - 2],
578 outer_control_points[3 * sides - 1],
points[0]);
596 std::vector<SkPoint> center_points =
601 case SkPath::Verb::kLine_Verb:
604 case SkPath::Verb::kQuad_Verb:
607 case SkPath::Verb::kConic_Verb:
610 case SkPath::Verb::kCubic_Verb:
621 case SkPath::Verb::kLine_Verb:
623 case SkPath::Verb::kQuad_Verb:
625 case SkPath::Verb::kConic_Verb:
627 case SkPath::Verb::kCubic_Verb:
653 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
660 float radius =
length * 0.25f;
665 state.counters[
"VerbCount"] =
path.countVerbs();
666 state.counters[
"DrawCallCount"] = 1;
669 auto display_list =
builder.Build();
672 for ([[maybe_unused]]
auto _ :
state) {
673 canvas.DrawDisplayList(display_list);
677 auto filename = surface_provider->backend_name() +
"-DrawPath-" + label +
679 surface_provider->Snapshot(filename);
698 size_t& final_vertex_count) {
699 size_t outer_vertex_count = vertex_count / 2;
700 std::vector<SkPoint> outer_points =
703 std::vector<SkPoint> vertices;
704 std::vector<DlColor>
colors;
711 vertices.push_back(center);
713 for (
size_t i = 0;
i <= outer_points.size();
i++) {
714 vertices.push_back(outer_points[
i % outer_points.size()]);
717 }
else if (
i % 3 == 1) {
728 for (
size_t i = 0;
i < outer_vertex_count;
i++) {
729 vertices.push_back(outer_points[
i % outer_points.size()]);
731 vertices.push_back(outer_points[(
i + 1) % outer_points.size()]);
733 vertices.push_back(center);
741 for (
size_t i = 0;
i <= outer_vertex_count;
i++) {
742 vertices.push_back(outer_points[
i % outer_points.size()]);
745 vertices.push_back(center);
754 final_vertex_count = vertices.size();
762 return "TriangleStrip";
764 return "TriangleFan";
791 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
796 float radius =
length / 4.0f;
798 size_t vertex_count, total_vertex_count = 0;
799 size_t disc_count =
state.range(0);
801 std::vector<SkPoint> center_points =
804 state.counters[
"DrawCallCount"] = center_points.size();
806 std::shared_ptr<DlVertices> vertices =
808 total_vertex_count += vertex_count;
812 state.counters[
"VertexCount"] = total_vertex_count;
813 state.SetComplexityN(total_vertex_count);
815 auto display_list =
builder.Build();
818 for ([[maybe_unused]]
auto _ :
state) {
819 canvas.DrawDisplayList(display_list);
823 auto filename = surface_provider->backend_name() +
"-DrawVertices-" +
826 surface_provider->Snapshot(filename);
836 std::vector<SkPoint>
points;
839 std::vector<SkScalar> delta_x = {10.0f, 6.3f, 15.0f, 3.5f, 22.6f, 4.7f};
840 std::vector<SkScalar> delta_y = {9.3f, -5.4f, 8.5f, -12.0f, 19.2f, -19.6f};
843 for (
size_t i = 0;
i <
count;
i++) {
844 points.push_back(current);
845 current.
offset(delta_x[
i % delta_x.size()], delta_y[
i % delta_y.size()]);
846 if (current.
x() > canvas_size.
width()) {
849 if (current.
y() > canvas_size.
height()) {
900 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
903 size_t point_count =
state.range(0);
904 state.SetComplexityN(point_count);
905 state.counters[
"PointCount"] = point_count;
906 state.counters[
"DrawCallCount"] = 1;
908 std::vector<SkPoint>
points =
912 auto display_list =
builder.Build();
914 for ([[maybe_unused]]
auto _ :
state) {
915 canvas.DrawDisplayList(display_list);
919 auto filename = surface_provider->backend_name() +
"-DrawPoints-" +
922 surface_provider->Snapshot(filename);
930 bitmap.peekPixels(&pixmap);
940 bool upload_bitmap) {
948 size_t bitmap_size =
state.range(0);
949 size_t canvas_size = 2 * bitmap_size;
950 surface_provider->InitializeSurface(canvas_size, canvas_size);
951 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
955 std::shared_ptr<DlSurfaceInstance> offscreen_instance;
967 surface_provider->MakeOffscreenSurface(bitmap_size, bitmap_size);
968 offscreen = offscreen_instance->sk_surface();
982 if (
dst.x() + bitmap_size > canvas_size) {
985 if (
dst.y() + bitmap_size > canvas_size) {
990 auto display_list =
builder.Build();
992 for ([[maybe_unused]]
auto _ :
state) {
993 canvas.DrawDisplayList(display_list);
997 auto filename = surface_provider->backend_name() +
"-DrawImage-" +
998 (upload_bitmap ?
"Upload-" :
"Texture-") +
1000 surface_provider->Snapshot(filename);
1004 switch (constraint) {
1020 unsigned attributes,
1023 bool upload_bitmap) {
1031 size_t bitmap_size =
state.range(0);
1032 size_t canvas_size = 2 * bitmap_size;
1033 surface_provider->InitializeSurface(canvas_size, canvas_size);
1034 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
1038 std::shared_ptr<DlSurfaceInstance> offscreen_instance;
1042 if (upload_bitmap) {
1049 offscreen_instance =
1050 surface_provider->MakeOffscreenSurface(bitmap_size, bitmap_size);
1051 offscreen = offscreen_instance->sk_surface();
1057 bitmap_size / 2.0f, bitmap_size / 2.0f);
1068 if (
dst.right() > canvas_size) {
1069 dst.offsetTo(0,
dst.y());
1071 if (
dst.bottom() > canvas_size) {
1072 dst.offsetTo(
dst.x(), 0);
1076 auto display_list =
builder.Build();
1078 for ([[maybe_unused]]
auto _ :
state) {
1079 canvas.DrawDisplayList(display_list);
1083 auto filename = surface_provider->backend_name() +
"-DrawImageRect-" +
1084 (upload_bitmap ?
"Upload-" :
"Texture-") +
1087 surface_provider->Snapshot(filename);
1108 unsigned attributes,
1110 bool upload_bitmap) {
1118 size_t bitmap_size =
state.range(0);
1119 size_t canvas_size = 2 * bitmap_size;
1120 surface_provider->InitializeSurface(canvas_size, canvas_size);
1121 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
1125 bitmap_size / 2, bitmap_size / 2);
1128 std::shared_ptr<DlSurfaceInstance> offscreen_instance;
1132 if (upload_bitmap) {
1139 offscreen_instance =
1140 surface_provider->MakeOffscreenSurface(bitmap_size, bitmap_size);
1141 offscreen = offscreen_instance->sk_surface();
1155 if (
dst.right() > canvas_size) {
1156 dst.offsetTo(0,
dst.y());
1158 if (
dst.bottom() > canvas_size) {
1159 dst.offsetTo(
dst.x(), 0);
1163 auto display_list =
builder.Build();
1165 for ([[maybe_unused]]
auto _ :
state) {
1166 canvas.DrawDisplayList(display_list);
1170 auto filename = surface_provider->backend_name() +
"-DrawImageNine-" +
1171 (upload_bitmap ?
"Upload-" :
"Texture-") +
1174 surface_provider->Snapshot(filename);
1186 unsigned attributes) {
1193 size_t draw_calls =
state.range(0);
1195 surface_provider->InitializeSurface(canvas_size, canvas_size);
1196 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
1199 state.counters[
"DrawCallCount_Varies"] = draw_calls;
1200 state.counters[
"GlyphCount"] = draw_calls;
1203 for (
size_t i = 0;
i < draw_calls;
i++) {
1209 auto display_list =
builder.Build();
1211 for ([[maybe_unused]]
auto _ :
state) {
1212 canvas.DrawDisplayList(display_list);
1216 auto filename = surface_provider->backend_name() +
"-DrawTextBlob-" +
1218 surface_provider->Snapshot(filename);
1231 unsigned attributes,
1232 bool transparent_occluder,
1242 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
1248 float radius =
length * 0.25f;
1251 case SkPath::Verb::kLine_Verb:
1254 case SkPath::Verb::kQuad_Verb:
1257 case SkPath::Verb::kConic_Verb:
1260 case SkPath::Verb::kCubic_Verb:
1267 float elevation =
state.range(0);
1268 state.counters[
"DrawCallCount"] = 1;
1273 transparent_occluder, 1.0f);
1274 auto display_list =
builder.Build();
1277 for ([[maybe_unused]]
auto _ :
state) {
1278 canvas.DrawDisplayList(display_list);
1282 auto filename = surface_provider->backend_name() +
"-DrawShadow-" +
1284 (transparent_occluder ?
"Transparent-" :
"Opaque-") +
1286 surface_provider->Snapshot(filename);
1297 unsigned attributes,
1298 size_t save_depth) {
1307 auto surface = surface_provider->GetPrimarySurface()->sk_surface();
1310 size_t save_layer_calls =
state.range(0);
1317 state.counters[
"DrawCallCount_Varies"] = save_layer_calls * save_depth;
1318 for (
size_t i = 0;
i < save_layer_calls;
i++) {
1319 for (
size_t j = 0; j < save_depth; j++) {
1320 builder.SaveLayer(
nullptr,
nullptr);
1324 for (
size_t j = 0; j < save_depth; j++) {
1328 auto display_list =
builder.Build();
1331 for ([[maybe_unused]]
auto _ :
state) {
1332 canvas.DrawDisplayList(display_list);
1336 auto filename = surface_provider->backend_name() +
"-SaveLayer-" +
1339 surface_provider->Snapshot(filename);
1342#ifdef ENABLE_SOFTWARE_BENCHMARKS
1346#ifdef ENABLE_OPENGL_BENCHMARKS
1350#ifdef ENABLE_METAL_BENCHMARKS
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
static const int points[]
static void set_radii(SkVector radii[4], int index, float rad)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
void clear(SkColor color)
const SkRect & rect() const
void inset(SkScalar dx, SkScalar dy, SkRRect *dst) const
void offset(SkScalar dx, SkScalar dy)
void setRectRadii(const SkRect &rect, const SkVector radii[4])
sk_sp< SkImage > makeImageSnapshot()
static sk_sp< SkTextBlob > MakeFromString(const char *string, const SkFont &font, SkTextEncoding encoding=SkTextEncoding::kUTF8)
static constexpr DisplayListAttributeFlags kDrawVerticesFlags
static constexpr DisplayListAttributeFlags kDrawArcNoCenterFlags
static constexpr DisplayListAttributeFlags kDrawImageRectWithPaintFlags
static constexpr DisplayListAttributeFlags kSaveLayerFlags
static constexpr DisplayListAttributeFlags kDrawOvalFlags
static constexpr DisplayListAttributeFlags kDrawTextBlobFlags
static constexpr DisplayListAttributeFlags kDrawPointsAsLinesFlags
static constexpr DisplayListAttributeFlags kDrawPointsAsPolygonFlags
static constexpr DisplayListAttributeFlags kDrawCircleFlags
static constexpr DisplayListAttributeFlags kDrawPathFlags
static constexpr DisplayListAttributeFlags kDrawLineFlags
static constexpr DisplayListAttributeFlags kDrawPointsAsPointsFlags
static constexpr DisplayListAttributeFlags kDrawImageWithPaintFlags
static constexpr DisplayListAttributeFlags kDrawImageNineWithPaintFlags
static constexpr DisplayListAttributeFlags kDrawShadowFlags
static constexpr DisplayListAttributeFlags kDrawRRectFlags
static constexpr DisplayListAttributeFlags kDrawDRRectFlags
static constexpr DisplayListAttributeFlags kDrawRectFlags
@ kLines
draw each separate pair of points as a line segment
@ kPolygon
draw each pair of overlapping points as a line segment
@ kPoints
draw each point separately
static sk_sp< DlImage > Make(const SkImage *image)
Backend implementation of |DlCanvas| for |SkCanvas|.
static std::shared_ptr< DlVertices > Make(DlVertexMode mode, int vertex_count, const SkPoint vertices[], const SkPoint texture_coordinates[], const DlColor colors[], int index_count=0, const uint16_t indices[]=nullptr)
Constructs a DlVector with compact inline storage for all of its required and optional lists of data.
static std::unique_ptr< DlSurfaceProvider > Create(BackendType backend_type)
#define RUN_DISPLAYLIST_BENCHMARKS(BACKEND)
FlutterSemanticsFlag flags
SK_API sk_sp< SkImage > RasterFromPixmap(const SkPixmap &pixmap, RasterReleaseProc rasterReleaseProc, ReleaseContext releaseContext)
Optional< SkRect > bounds
sk_sp< const SkImage > image
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
std::string VertexModeToString(DlVertexMode mode)
void BM_DrawVertices(benchmark::State &state, BackendType backend_type, unsigned attributes, DlVertexMode mode)
std::string PointModeToString(DlCanvas::PointMode mode)
static void FlushSubmitCpuSync(const sk_sp< SkSurface > &surface)
void BM_DrawRRect(benchmark::State &state, BackendType backend_type, unsigned attributes, SkRRect::Type type)
void BM_DrawPath(benchmark::State &state, BackendType backend_type, unsigned attributes, SkPath::Verb type)
void BM_DrawShadow(benchmark::State &state, BackendType backend_type, unsigned attributes, bool transparent_occluder, SkPath::Verb type)
std::vector< SkPoint > GetPolygonPoints(size_t n, SkPoint center, SkScalar r)
void BM_DrawImageRect(benchmark::State &state, BackendType backend_type, unsigned attributes, DlImageSampling options, DlCanvas::SrcRectConstraint constraint, bool upload_bitmap)
SkFont CreateTestFontOfSize(SkScalar scalar)
constexpr size_t kRectsToDraw
void GetLinesPath(SkPath &path, size_t sides, SkPoint center, float radius)
std::shared_ptr< DlVertices > GetTestVertices(SkPoint center, float radius, size_t vertex_count, DlVertexMode mode, size_t &final_vertex_count)
void BM_DrawOval(benchmark::State &state, BackendType backend_type, unsigned attributes)
void AnnotateAttributes(unsigned attributes, benchmark::State &state, const DisplayListAttributeFlags flags)
constexpr size_t kFixedCanvasSize
constexpr size_t kImagesToDraw
void BM_DrawImage(benchmark::State &state, BackendType backend_type, unsigned attributes, DlImageSampling options, bool upload_bitmap)
void BM_DrawLine(benchmark::State &state, BackendType backend_type, unsigned attributes)
void BM_DrawCircle(benchmark::State &state, BackendType backend_type, unsigned attributes)
void BM_DrawRect(benchmark::State &state, BackendType backend_type, unsigned attributes)
constexpr size_t kDRRectsToDraw
std::string VerbToString(SkPath::Verb type)
std::string FilterModeToString(const DlFilterMode mode)
void BM_DrawDRRect(benchmark::State &state, BackendType backend_type, unsigned attributes, SkRRect::Type type)
std::vector< SkPoint > GetTestPoints(size_t count, SkISize canvas_size)
sk_sp< SkImage > ImageFromBitmapWithNewID(const SkBitmap &bitmap)
void MultiplyPath(SkPath &path, SkPath::Verb type, SkPoint center, size_t sides, size_t number, float radius)
void BM_DrawTextBlob(benchmark::State &state, BackendType backend_type, unsigned attributes)
void BM_DrawArc(benchmark::State &state, BackendType backend_type, unsigned attributes)
void GetQuadsPath(SkPath &path, size_t sides, SkPoint center, float radius)
constexpr size_t kRRectsToDraw
void GetConicsPath(SkPath &path, size_t sides, SkPoint center, float radius)
constexpr size_t kArcSweepSetsToDraw
void BM_DrawImageNine(benchmark::State &state, BackendType backend_type, unsigned attributes, const DlFilterMode filter, bool upload_bitmap)
void BM_DrawPoints(benchmark::State &state, BackendType backend_type, unsigned attributes, DlCanvas::PointMode mode)
void BM_SaveLayer(benchmark::State &state, BackendType backend_type, unsigned attributes, size_t save_depth)
constexpr size_t kCirclesToDraw
constexpr size_t kLinesToDraw
constexpr size_t kOvalsToDraw
void GetCubicsPath(SkPath &path, size_t sides, SkPoint center, float radius)
std::string ConstraintToString(DlCanvas::SrcRectConstraint constraint)
DlPaint GetPaintForRun(unsigned attributes)
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
DlVertexMode
Defines the way in which the vertices of a DlVertices object are separated into triangles into which ...
@ kTriangles
The vertices are taken 3 at a time to form a triangle.
@ kStrokeAndFill
both strokes and fills shapes
@ kStroke
strokes boundary of shapes
@ kFill
fills interior of shapes
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 Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
static SkString to_string(int n)
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
static constexpr SkISize Make(int32_t w, int32_t h)
constexpr int32_t width() const
constexpr int32_t height() const
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
void offset(float dx, float dy)
static constexpr SkPoint Make(float x, float y)
constexpr float y() const
constexpr float x() const
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
constexpr float right() const
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
constexpr float bottom() const