@@ -706,17 +706,6 @@ video_buffer_forbitmask(video_dim_t __size_x, video_dim_t __size_y,
706706 video_color_t const __bg_fg_colors[2 ]);
707707#endif /* LIBVIDEO_GFX_WANT_PROTOTYPES */
708708
709- /* Return the preferred video format.
710- * If possible, this format will match the format used by the host's graphics card.
711- * If no graphics card exists, or the card isn't clear on its preferred format, some
712- * other, common format will be returned instead. */
713- typedef __ATTR_RETNONNULL_T __ATTR_WUNUSED_T struct video_format const *
714- (LIBVIDEO_GFX_CC *PVIDEO_PREFERRED_FORMAT)(void );
715- #ifdef LIBVIDEO_GFX_WANT_PROTOTYPES
716- LIBVIDEO_GFX_DECL __ATTR_RETNONNULL __ATTR_WUNUSED struct video_format const *
717- LIBVIDEO_GFX_CC video_preferred_format (void );
718- #endif /* LIBVIDEO_GFX_WANT_PROTOTYPES */
719-
720709#endif /* TODO: END DEPRECATED */
721710
722711
@@ -885,29 +874,46 @@ video_buffer_region(struct video_buffer *__restrict __self,
885874#endif /* LIBVIDEO_GFX_WANT_PROTOTYPES */
886875
887876
888-
889-
890- /* Return a video buffer that will always (forcefully) re-return `__self'
891- * whenever a GFX context is requested. Additionally, video locks will fail
892- * when pixels represented by `__self' cannot represented as a video lock
893- * (e.g. the Clip- and I/O-Rects don't match, or the Clip Rect's bounds
894- * don't end up at some whole-byte boundary, or don't end up aligned to a
895- * degree that is sufficient for the codec of `__self', or `__self' is
896- * making using of some rotation/mirror GFX flags).
877+ /* Return a video buffer that simulates the clipping/rotation behavior
878+ * of the given GFX context `__self'. Other GFX pixel modification flags
879+ * that are unrelated to rotation/mirroring are also retained by the
880+ * returned buffer (e.g. VIDEO_GFX_F_BLUR is retained).
881+ *
882+ * Note that the returned buffer only retains:
883+ * - Clip Rect
884+ * - I/O Rect
885+ * - GFX Flags
897886 *
898- * If you want to guaranty that the returned buffer is still lockable, you
899- * should wrap it again using `video_buffer_lockable()'.
887+ * It does not retain:
888+ * - Blend Mode
889+ * - Color Key
900890 *
901- * @return: * : A video buffer representing the Clip Rect of `__self'
891+ * Note that unlike `video_buffer_region()', which still allows for use
892+ * of video locks being applied to the returned buffer when rotation is
893+ * being used (with those locks then used to access un-rotated pixels),
894+ * the buffer returned by this function REJECTS video locks when pixel
895+ * data is transformed in any way that cannot be represented using only
896+ * I/O rects. As such, you may need to use `video_buffer_lockable()' on
897+ * the returned buffer in order to make it lockable (if you wish to use
898+ * pixel data in a rotated/mirrored form).
899+ *
900+ * NOTE: Revoking pixel access on the returned buffer, or other types
901+ * of buffers derived from it may also revoke pixel access from
902+ * `__self', so use with care.
903+ *
904+ * @return: * : A video buffer representing the given `__self'
902905 * @return: NULL: [errno=ENOMEM] Insufficient memory. */
903906typedef __ATTR_WUNUSED_T __ATTR_IN_T (1 ) __REF struct video_buffer *
904- (LIBVIDEO_GFX_CC *POLD_VIDEO_BUFFER_FROMGFX )(struct video_gfx const *__restrict __self);
907+ (LIBVIDEO_GFX_CC *PVIDEO_BUFFER_FROMGFX )(struct video_gfx const *__restrict __self);
905908#ifdef LIBVIDEO_GFX_WANT_PROTOTYPES
906909LIBVIDEO_GFX_DECL __ATTR_WUNUSED __ATTR_IN (1 ) __REF struct video_buffer *LIBVIDEO_GFX_CC
907- old_video_buffer_fromgfx (struct video_gfx const *__restrict __self);
910+ video_buffer_fromgfx (struct video_gfx const *__restrict __self);
908911#endif /* LIBVIDEO_GFX_WANT_PROTOTYPES */
909912
910913
914+
915+
916+
911917/* Various functions for opening a file/stream/blob as an image file.
912918 * The actual file format is auto-detected, and supported formats depend
913919 * on installed 3rd party libraries. By default, BMP and PNG is supported. */
0 commit comments