diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-06-02 11:36:51 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2017-06-02 15:50:08 -0500 |
commit | df0595ebc0fb2de8940864748ea128925ae54ea6 (patch) | |
tree | 057c927ff05d828dbe4cf8dd51f895cb275ab225 /src/lib/ecore_drm2/ecore_drm2_fb.c | |
parent | bd1ee1b08398cc12a41838d12a4f6f70995a36d2 (diff) |
ecore_drm2: Rename _release_buffer and make it private instead of static
Other files in ecore_drm2 need to release buffers too.
Diffstat (limited to '')
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_fb.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c index 59e2c5a214..ea6fcec194 100644 --- a/src/lib/ecore_drm2/ecore_drm2_fb.c +++ b/src/lib/ecore_drm2/ecore_drm2_fb.c | |||
@@ -243,8 +243,8 @@ ecore_drm2_fb_dirty(Ecore_Drm2_Fb *fb, Eina_Rectangle *rects, unsigned int count | |||
243 | #endif | 243 | #endif |
244 | } | 244 | } |
245 | 245 | ||
246 | static void | 246 | void |
247 | _release_buffer(Ecore_Drm2_Output *output, Ecore_Drm2_Output_State *s) | 247 | _ecore_drm2_fb_buffer_release(Ecore_Drm2_Output *output, Ecore_Drm2_Output_State *s) |
248 | { | 248 | { |
249 | if (output->release_cb) output->release_cb(output->release_data, s->fb); | 249 | if (output->release_cb) output->release_cb(output->release_data, s->fb); |
250 | _ecore_drm2_fb_deref(s->fb); | 250 | _ecore_drm2_fb_deref(s->fb); |
@@ -264,7 +264,7 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output) | |||
264 | EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); | 264 | EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); |
265 | 265 | ||
266 | if (output->current.fb && (output->current.fb != output->pending.fb)) | 266 | if (output->current.fb && (output->current.fb != output->pending.fb)) |
267 | _release_buffer(output, &output->current); | 267 | _ecore_drm2_fb_buffer_release(output, &output->current); |
268 | 268 | ||
269 | output->current.fb = output->pending.fb; | 269 | output->current.fb = output->pending.fb; |
270 | output->pending.fb = NULL; | 270 | output->pending.fb = NULL; |
@@ -464,7 +464,8 @@ _fb_flip(Ecore_Drm2_Output *output) | |||
464 | return ret; | 464 | return ret; |
465 | } | 465 | } |
466 | 466 | ||
467 | if (output->current.fb) _release_buffer(output, &output->current); | 467 | if (output->current.fb) |
468 | _ecore_drm2_fb_buffer_release(output, &output->current); | ||
468 | output->current.fb = fb; | 469 | output->current.fb = fb; |
469 | _ecore_drm2_fb_ref(output->current.fb); | 470 | _ecore_drm2_fb_ref(output->current.fb); |
470 | output->next.fb = NULL; | 471 | output->next.fb = NULL; |
@@ -543,7 +544,8 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output) | |||
543 | 544 | ||
544 | if (output->pending.fb) | 545 | if (output->pending.fb) |
545 | { | 546 | { |
546 | if (output->next.fb) _release_buffer(output, &output->next); | 547 | if (output->next.fb) |
548 | _ecore_drm2_fb_buffer_release(output, &output->next); | ||
547 | output->next.fb = fb; | 549 | output->next.fb = fb; |
548 | return 0; | 550 | return 0; |
549 | } | 551 | } |
@@ -557,7 +559,7 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output) | |||
557 | if (!fb) fb = output->current.fb; | 559 | if (!fb) fb = output->current.fb; |
558 | 560 | ||
559 | if (output->next.fb) | 561 | if (output->next.fb) |
560 | _release_buffer(output, &output->next); | 562 | _ecore_drm2_fb_buffer_release(output, &output->next); |
561 | 563 | ||
562 | /* If we don't have an fb to set by now, BAIL! */ | 564 | /* If we don't have an fb to set by now, BAIL! */ |
563 | if (!fb) return -1; | 565 | if (!fb) return -1; |
@@ -572,7 +574,7 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output) | |||
572 | if (ret) | 574 | if (ret) |
573 | { | 575 | { |
574 | if (output->prep.fb != output->current.fb) | 576 | if (output->prep.fb != output->current.fb) |
575 | _release_buffer(output, &output->prep); | 577 | _ecore_drm2_fb_buffer_release(output, &output->prep); |
576 | return ret; | 578 | return ret; |
577 | } | 579 | } |
578 | output->pending.fb = output->prep.fb; | 580 | output->pending.fb = output->prep.fb; |
@@ -600,7 +602,7 @@ ecore_drm2_fb_release(Ecore_Drm2_Output *o, Eina_Bool panic) | |||
600 | 602 | ||
601 | if (o->next.fb) | 603 | if (o->next.fb) |
602 | { | 604 | { |
603 | _release_buffer(o, &o->next); | 605 | _ecore_drm2_fb_buffer_release(o, &o->next); |
604 | return EINA_TRUE; | 606 | return EINA_TRUE; |
605 | } | 607 | } |
606 | if (!panic) return EINA_FALSE; | 608 | if (!panic) return EINA_FALSE; |
@@ -615,13 +617,13 @@ ecore_drm2_fb_release(Ecore_Drm2_Output *o, Eina_Bool panic) | |||
615 | */ | 617 | */ |
616 | if (o->current.fb) | 618 | if (o->current.fb) |
617 | { | 619 | { |
618 | _release_buffer(o, &o->current); | 620 | _ecore_drm2_fb_buffer_release(o, &o->current); |
619 | return EINA_TRUE; | 621 | return EINA_TRUE; |
620 | } | 622 | } |
621 | 623 | ||
622 | if (o->pending.fb) | 624 | if (o->pending.fb) |
623 | { | 625 | { |
624 | _release_buffer(o, &o->pending); | 626 | _ecore_drm2_fb_buffer_release(o, &o->pending); |
625 | return EINA_TRUE; | 627 | return EINA_TRUE; |
626 | } | 628 | } |
627 | 629 | ||