[libbluray-devel] commit: Splitted _render_page() (hpi1 )
git at videolan.org
git at videolan.org
Mon Dec 13 14:43:46 CET 2010
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Dec 13 15:14:21 2010 +0200| [3c5744b96a145d76ac40fa7cc0a255d94f389ff8] | committer: hpi1
Splitted _render_page()
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=3c5744b96a145d76ac40fa7cc0a255d94f389ff8
---
src/libbluray/decoders/graphics_controller.c | 32 +++++++++++++++++--------
1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index f36b1f1..9d41def 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -246,17 +246,13 @@ static BD_IG_PAGE *_find_page(BD_IG_INTERACTIVE_COMPOSITION *c, unsigned page_id
return NULL;
}
-/*
- * IG rendering
- */
-
enum { BTN_NORMAL, BTN_SELECTED, BTN_ACTIVATED };
-static void _render_button(GRAPHICS_CONTROLLER *gc, BD_IG_BUTTON *button, BD_PG_PALETTE *palette, int state)
+static BD_PG_OBJECT *_find_object_for_button(PG_DISPLAY_SET *s,
+ BD_IG_BUTTON *button, int state)
{
- BD_PG_OBJECT *object = NULL;
- unsigned object_id = 0xffff;
- BD_OVERLAY ov;
+ BD_PG_OBJECT *object = NULL;
+ unsigned object_id = 0xffff;
switch (state) {
case BTN_NORMAL:
@@ -270,9 +266,25 @@ static void _render_button(GRAPHICS_CONTROLLER *gc, BD_IG_BUTTON *button, BD_PG_
break;
}
- object = _find_object(gc->igs, object_id);
+ object = _find_object(s, object_id);
+
+ return object;
+}
+
+
+/*
+ * IG rendering
+ */
+
+static void _render_button(GRAPHICS_CONTROLLER *gc, BD_IG_BUTTON *button, BD_PG_PALETTE *palette,
+ int state)
+{
+ BD_PG_OBJECT *object = NULL;
+ BD_OVERLAY ov;
+
+ object = _find_object_for_button(gc->igs, button, state);
if (!object) {
- TRACE("_render_button(#%d): object #%d (state %d) not found\n", button->id, object_id, state);
+ TRACE("_render_button(#%d): object (state %d) not found\n", button->id, state);
return;
}
More information about the libbluray-devel
mailing list