summaryrefslogtreecommitdiff
path: root/lib/igt_draw.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-07-17 18:32:38 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-09-27 23:15:58 +0300
commit2238361afbfee71827e2ee6e71fc43f1a39dcefe (patch)
tree87a679513a25bf93ac774dcea3d8e8ffc7910d63 /lib/igt_draw.c
parentef43fce48d55eb0d37f9fb2f97785228dc844584 (diff)
lib/igt_fb: Pass around igt_fb internally
Instead of passing around a boatload of integers everywhere let's just pass around the igt_fb struct. That obviously means we have to populate it first sufficiently, to which end we'll add a small helper. Later on the stride/size calculations will consult the already pre-populated igt_fb and fill in the rest as needed. This makes the whole thing a lot less error prone as it's impossible to accidentally pass the arguments in the wrong order when there's just the one of them, and it's a pointer. v2: Rebase due to uint64_t size Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'lib/igt_draw.c')
-rw-r--r--lib/igt_draw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index c7d5770d..05821480 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -720,7 +720,7 @@ void igt_draw_rect_fb(int fd, drm_intel_bufmgr *bufmgr,
enum igt_draw_method method, int rect_x, int rect_y,
int rect_w, int rect_h, uint32_t color)
{
- igt_draw_rect(fd, bufmgr, context, fb->gem_handle, fb->size, fb->stride,
+ igt_draw_rect(fd, bufmgr, context, fb->gem_handle, fb->size, fb->strides[0],
method, rect_x, rect_y, rect_w, rect_h, color,
igt_drm_format_to_bpp(fb->drm_format));
}