source: svn/trunk/newcon3bcm2_21bu/magnum/commonutils/sur/7552/bsur.h @ 2

Last change on this file since 2 was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 26.2 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2003-2011, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bsur.h $
11 * $brcm_Revision: Hydra_Software_Devel/28 $
12 * $brcm_Date: 3/18/11 1:38p $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /magnum/commonutils/sur/7422/bsur.h $
19 *
20 * Hydra_Software_Devel/28   3/18/11 1:38p nissen
21 * SW7420-1200: Added function to get all the packet blit info.
22 *
23 * Hydra_Software_Devel/27   2/26/09 4:24p nissen
24 * PR 47303: Added prediction mode field to settings structure.
25 *
26 * Hydra_Software_Devel/26   10/3/08 10:45a yuxiaz
27 * PR47303: More TestFeature1 support in BSUR.
28 *
29 * Hydra_Software_Devel/25   10/1/08 5:47p nissen
30 * PR 47303: Added functions to get default surface settings and
31 * TestFeature1 settings. Added settings structure parameter to surface
32 * create function.
33 *
34 * Hydra_Software_Devel/24   4/4/08 11:22a nissen
35 * PR 40122: Added support for 10-bit 422 40-bit packed formats.
36 *
37 * Hydra_Software_Devel/23   11/15/06 10:52a nissen
38 * PR 25683: Added function to set surface ID.
39 *
40 * Hydra_Software_Devel/22   11/8/06 10:53a nissen
41 * PR 25683: Added support for a surface ID.
42 *
43 * Hydra_Software_Devel/21   8/25/06 11:11a nissen
44 * PR 18990: Added support for 10-bit YCbCr 422 alignment.
45 *
46 * Hydra_Software_Devel/20   3/21/06 12:49p nissen
47 * PR 20331: Added functions to return offsets for surfaces and palettes.
48 *
49 * Hydra_Software_Devel/19   3/15/06 11:54a nissen
50 * PR 15840: Added support for creating YCbCr 420 surfaces.
51 *
52 * Hydra_Software_Devel/18   11/10/05 5:03p syang
53 * PR 12244: move alpha-only pixel constant color setting from BSUR to
54 * BVDC
55 *
56 * Hydra_Software_Devel/17   10/8/04 3:27p yuxiaz
57 * PR9076: Change isr functions to _isr.
58 *
59 * Hydra_Software_Devel/16   8/11/04 6:27p syang
60 * PR 12244: added alpha only pixel format support for gfx feeder (new B0
61 * feature)
62 *
63 * Hydra_Software_Devel/15   6/11/04 4:50p syang
64 * PR 11299: changed func name BSUR_Palette_GetEntryFormat to
65 * BSUR_Palette_GetFormat
66 *
67 * Hydra_Software_Devel/14   6/1/04 3:54p jasonh
68 * PR 11215: Updated documentation for surface creation.
69 *
70 * Hydra_Software_Devel/13   10/28/03 1:53p syang
71 * added BSUR_Palette_GetEntryFormat
72 *
73 * Hydra_Software_Devel/12   8/21/03 1:22p nissen
74 * Added constraints for width and height being a power of 2.
75 *
76 * Hydra_Software_Devel/11   8/20/03 4:27p nissen
77 * Removed open and close functions. Replaced usage mask functions and
78 * parameters with constraint mask functions and parameters. Replaced
79 * surface module handle parameters with memory module handle.
80 *
81 * Hydra_Software_Devel/10   8/19/03 10:09a nissen
82 * Removed usage mask functions and parameters and added alignment
83 * parameter to surface and palette creation functions.
84 *
85 * Hydra_Software_Devel/9   8/6/03 2:25p nissen
86 * Changed all references to "unsigned int" to "uint32_t".
87 *
88 * Hydra_Software_Devel/8   6/5/03 11:39a nissen
89 * Added entry point function to get surface format.
90 *
91 * Hydra_Software_Devel/7   4/25/03 3:42p nissen
92 * Removed breg.h include.
93 *
94 * Hydra_Software_Devel/6   4/11/03 3:54p jasonh
95 * Changed palette creation to work similar to surface creation, requring
96 * a format. Fixed out of memory errors.
97 *
98 * Hydra_Software_Devel/5   3/21/03 1:15p jasonh
99 * Fixed module overview section.
100 *
101 * Hydra_Software_Devel/4   3/19/03 5:16p jasonh
102 * Added changes requested in first internal code review.
103 *
104 * Hydra_Software_Devel/3   3/12/03 4:27p pntruong
105 * Added the include bchp.h, so thing will compile.
106 *
107 ***************************************************************************/
108#ifndef BSUR_H__
109#define BSUR_H__
110
111#include "bchp.h"
112#include "bmem.h"
113#include "bpxl.h"
114
115#ifdef __cplusplus
116extern "C" {
117#endif
118
119/*=Module Overview: ********************************************************
120The purpose of the surface module is to allocate surfaces for use with
121other modules. The video display control module uses surfaces for
122hardware cursor support, the graphics compositor module uses surfaces as
123a standard input for many of its operations, and the graphics feeder uses
124surfaces to represent frame buffers.
125
126This module contains functions to create, destroy and modify surfaces
127and palettes. Palettes are associated with surfaces which specify a
128format that requires a palette.
129
130Supported features:
131o Can create surface with any pixel format.
132o Can create palettes with 4, 16, and 256 entries.
133o TODO: Complete list of specific features that are supported and unit
134  tested for this module.
135****************************************************************************/
136
137#define BSUR_SURFACE_CREATE_HAS_SETTINGS
138
139/***************************************************************************
140Summary:
141        A handle representing a surface.
142
143Description:
144        This handle is used by surface module functions to store a two
145        dimensional array of pixels.
146
147See Also:
148        BSUR_Surface_Create
149****************************************************************************/
150typedef struct BSUR_P_Surface_Handle *BSUR_Surface_Handle;
151
152/***************************************************************************
153Summary:
154        A handle representing a palette.
155
156Description:
157        This handle is used by surface module functions to store a
158        one dimensional array of colors. This handle is used with a surface
159        handle when the format of a surface requires a palette.
160
161See Also:
162        BSUR_Palette_Create,
163        BSUR_Surface_Handle
164****************************************************************************/
165typedef struct BSUR_P_Palette_Handle *BSUR_Palette_Handle;
166
167/***************************************************************************
168Summary:
169        Surface TestFeature1 settings structure.
170
171Description:
172        This structure is a field in the BSUR_Surface_Settings structure, and
173        is used to set the TestFeature1 settings of a surface when creating it.
174
175        bEnable:        Enables/disables TestFeature1. (default=false)
176        ulBitsPerPixel: Bits per pixel in units of 0.5 bits per pixel.
177                        Range from 14 to 64. Note this is in U31.1 fixed point
178                        format, with 31 bit integer and 1 bit fraction.
179                        The greater BitsPerPixel is, the better picture quality.
180                                        (default=14,minimum)
181        ulPredicationMode: Predication mode, 0=Normal, 1=NOLEFT, 2=NO2LEFT
182                           (default=0,Normal)
183
184See Also:
185        BSUR_Surface_Settings,
186        BSUR_Surface_Create,
187        BSUR_Surface_GetTestFeature1,
188        BSUR_Surface_GetDefaultSettings
189****************************************************************************/
190typedef struct
191{
192        bool bEnable;                    /* Enables TestFeature1 */
193        uint32_t ulBitsPerPixel;         /* Bits per pixel in units of 0.5 */
194        uint32_t ulPredictionMode;       /* Predication mode, 0=Normal, 1=NOLEFT, 2=NO2LEFT */
195}
196BSUR_TestFeature1_Settings;
197
198/***************************************************************************
199Summary:
200        TestFeature1 settings structure.
201
202Description:
203        This structure is used to set the extended settings of a surface
204        when creating it.
205
206        stTestFeature1Settings: TestFeature1 settings.
207
208See Also:
209        BSUR_TestFeature1_Settings,
210        BSUR_Surface_Create,
211        BSUR_Surface_GetDefaultSettings
212****************************************************************************/
213typedef struct
214{
215        BSUR_TestFeature1_Settings stTestFeature1Settings;
216}
217BSUR_Surface_Settings;
218
219/***************************************************************************
220Summary:
221        Constraint masks.
222
223Description:
224        The constraint mask is a bit mask describing which restrictions
225        should be put on the properties of a palette or surface when
226        creating it.
227
228See Also:
229        BSUR_Palette_Create,
230        BSUR_Surface_Create
231****************************************************************************/
232#define BSUR_CONSTRAINT_ADDRESS_PIXEL_ALIGNED        0x1   /* address and pitch must be pixel aligned */
233#define BSUR_CONSTRAINT_WIDTH_POWER_2                0x2   /* width in pixels must be a power of 2 */
234#define BSUR_CONSTRAINT_HEIGHT_POWER_2               0x4   /* height in pixels must be a power of 2 */
235#define BSUR_CONSTRAINT_YCbCr420_FORMAT              0x8   /* address and pitch must be YCbCr420 aligned (16 dwords) */
236#define BSUR_CONSTRAINT_YCbCr422_10BIT_FORMAT        0x10  /* address and pitch must be YCbCr422 10-bit aligned (4 dwords) */
237#define BSUR_CONSTRAINT_YCbCr422_10BIT_PACKED_FORMAT 0x20  /* address and pitch must be YCbCr422 10-bit packed aligned (5 dwords) */
238#define BSUR_CONSTRAINT_DCX_TESTFEATURE1_FORMAT      0x40  /* address must be DCX TestFeature1 aligned (64 bytes) */
239
240/***************************************************************************
241Summary:
242        Checks if surface has required constraints.
243
244Description:
245        This macro is used to determine which contraints a surface has.
246        Possible contraints include BSUR_CONSTRAINT_ADDRESS_PIXEL_ALIGNED,
247        BSUR_CONSTRAINT_WIDTH_POWER_2, and BSUR_CONSTRAINT_HEIGHT_POWER_2.
248
249****************************************************************************/
250#define BSUR_CONSTRAINT_MATCH(surface_constraint, required_constraint) \
251        (((surface_constraint) & (required_constraint)) == (required_constraint))
252
253/***************************************************************************
254Summary:
255        Creates a palette.
256
257Description:
258        Palettes are created and used by surfaces that need them. They are
259        attached to a surface and may be shared between surfaces.
260        Surfaces which require palettes must have one associated with it.
261
262        There are two ways to create a palette:
263
264    o Module allocated palette: The user doesn't provide a palette
265          address, flagging this function to allocate memory from the
266          surface module's memory heap. When the palette is destroyed,
267          this memory will be freed by the module. This memory is
268          considered to be uninitialized after creation.
269
270    o User allocated palette: The user provides a palette address,
271          flagging the function that this given memory should be used for
272          the palette and that no additional memory should be allocated to
273          store the palette. When the palette is destroyed the provided memory
274          will not be freed. Checks will be made by this function to
275          insure that the provided memory can be used for a palette.
276
277        The user must provide the format of the pixels stored in the palette.
278        This user must know what this format is in order to load the palette
279        with appropriate color values. Currently, all palettes must use a
280        format of BPXL_eA8_Y8_Cb8_Cr8 or BPXL_eA8_R8_G8_B8.
281
282        The constraint mask is a bit mask describing which restrictions
283        should be put on the properties of the palette when creating it.
284        Currently the only valid constraint for this function is
285        BSUR_CONSTRAINT_ADDRESS_PIXEL_ALIGNED.
286
287Returns:
288        BERR_SUCCESS - Palette was successfully created.
289        BERR_INVALID_PARAMETER - Input parameter value was invalid.
290        BERR_OUT_OF_SYSTEM_MEMORY - Unable to allocate memory for the handle.
291        BERR_OUT_OF_DEVICE_MEMORY - Unable to allocate memory for the
292        palette entries themselves.
293
294See Also:
295        BSUR_Palette_Destroy
296        BSUR_Surface_Create
297****************************************************************************/
298BERR_Code BSUR_Palette_Create(
299        BMEM_Handle hMem,               /* [in] Handle to BMEM module */
300        uint32_t ulNumEntries,          /* [in] Number of palette entries */
301        void *pvPaletteAddress,         /* [in] Pointer to first palette entry */
302        BPXL_Format eFormat,            /* [in] Format of palette */
303        uint32_t ulConstraintMask,      /* [in] Constraint mask */
304        BSUR_Palette_Handle *phPalette  /* [out] Pointer to palette handle */
305);
306
307/***************************************************************************
308Summary:
309        Destroys a created palette.
310
311Description:
312        If the palette memory was allocated by the surface module it will be
313        freed.
314
315    The user should call this function only after all modules are no
316        longer using this palette.
317
318        Failing to destroy all created palettes will result in an error when
319        the module is closed with BSUR_Close.
320
321Returns:
322        BERR_SUCCESS - Palette was successfully destroyed.
323
324See Also:
325        BSUR_Palette_Create
326        BSUR_Close
327****************************************************************************/
328BERR_Code BSUR_Palette_Destroy(
329        BSUR_Palette_Handle hPalette    /* [in] Handle of palette to destroy */
330);
331
332/***************************************************************************
333Summary:
334        Returns the constraint mask associated with the palette.
335
336Description:
337        The constraint mask is a bit mask describing which restrictions
338        were put on the properties of the palette when it was created.
339
340Returns:
341        BERR_SUCCESS - Returned Constraint mask is valid.
342
343See Also:
344        BSUR_Palette_Create
345****************************************************************************/
346BERR_Code BSUR_Palette_GetConstraintMask(
347        BSUR_Palette_Handle hSurface,    /* [in] Handle to palette to examine */
348        uint32_t *pulConstraintMask      /* [out] Pointer to constraint mask */
349);
350
351/***************************************************************************
352Summary:
353        Returns the number of entries in the specified palette.
354
355Description:
356
357Returns:
358        BERR_SUCCESS - Returned count is valid.
359****************************************************************************/
360BERR_Code BSUR_Palette_GetNumEntries(
361        BSUR_Palette_Handle hPalette,    /* [in] Handle to palette to examine */
362        uint32_t *pulNumEntries          /* [out] Pointer to number of entries */
363);
364
365/***************************************************************************
366Summary:
367        Returns the address of the palette entries.
368
369Description:
370    The address returned will point to the actual location of the
371        palette. The user can use this data to fill in the palette
372        with appropriate values. The format of the palette determines
373        the type of entries pointed to by this address.
374
375Returns:
376        BERR_SUCCESS - Returned address is valid.
377****************************************************************************/
378BERR_Code BSUR_Palette_GetAddress(
379        BSUR_Palette_Handle hPalette,    /* [in] Handle to palette to examine */
380        void **ppvAddress                /* [out] Pointer to palette address */
381);
382
383/***************************************************************************
384Summary:
385        Returns the offset of the palette.
386
387Returns:
388        BERR_SUCCESS - Returned address is valid.
389****************************************************************************/
390BERR_Code BSUR_Palette_GetOffset(
391        BSUR_Palette_Handle hPalette,    /* [in] Handle to palette to examine */
392        uint32_t *pulOffset              /* [out] Pointer to palette offset */
393);
394
395#define BSUR_Palette_GetEntryFormat   BSUR_Palette_GetFormat /* for back compatibility only */ 
396/***************************************************************************
397Summary:
398        Returns the pixel format of the palette entries.
399
400Description:
401        Currently, the supported pixel formats for palettes entries are
402        BPXL_eA8_Y8_Cb8_Cr8 and BPXL_eA8_R8_G8_B8.
403
404Returns:
405        BERR_SUCCESS - Returned entry pixel format is valid.
406
407See Also:
408        BSUR_Palette_Create
409****************************************************************************/
410BERR_Code BSUR_Palette_GetFormat(
411        BSUR_Palette_Handle hPalette,    /* [in] Handle to palette to examine */
412        BPXL_Format *peEntryFormat       /* [out] Pointer to entry format */
413);
414       
415/***************************************************************************
416Summary:
417        Gets default surface settings.
418
419Description:
420        This function gets the default surface settings that can be modified
421        and used when creating a surface. The surface will adopt the specified
422        settings when created.
423
424Returns:
425        BERR_SUCCESS - Returned settings are valid.
426
427See Also:
428        BSUR_Surface_Create,
429        BSUR_Surface_Settings,
430        BSUR_TestFeature1_Settings
431****************************************************************************/
432BERR_Code BSUR_Surface_GetDefaultSettings(
433        BSUR_Surface_Settings *pDefSettings   /* [out] Ptr to default settings */
434);
435
436/***************************************************************************
437Summary:
438        Creates a surface.
439
440Description:
441        There are two ways to create a surface:
442       
443        o Module allocated pixels: The user doesn't provide a pixel address,
444          flagging the function to allocate memory from the surface module's
445          memory heap. The user may specify a pitch value to use for this
446          allocation or specify zero if they wish the function to calculate
447          the pitch. When the surface is destroyed this pixel memory will be
448          freed by the module. This memory is considered to be uninitialized
449          after creation.
450
451        o User allocated pixels: The user provides a pixel address, flagging
452          that no memory should be allocated by the module. Instead, the
453          function should use the memory provided. When this option is
454          given the supplied pitch cannot be zero. When the surface is
455          destroyed the provided pixel memory will not be freed.
456
457        If the surface format requires a palette, a handle to one must be
458        provided to this function. If the surface's format does not require
459        a palette handle, the provided palette handle must be NULL.
460
461        The constraint mask is a bit mask describing which restrictions
462        should be put on the properties of the surface when creating it.
463        Currently the valid constraints for this function are
464        BSUR_CONSTRAINT_ADDRESS_PIXEL_ALIGNED, BSUR_CONSTRAINT_WIDTH_POWER_2,
465        and BSUR_CONSTRAINT_HEIGHT_POWER_2.
466
467Returns:
468        BERR_SUCCESS - Surface was successfully created.
469        BERR_INVALID_PARAMETER - Input parameter value was invalid.
470        BERR_OUT_OF_SYSTEM_MEMORY - Unable to allocate memory for the handle.
471        BERR_OUT_OF_DEVICE_MEMORY - Unable to allocate memory for the surface
472        itself.
473
474See Also:
475        BSUR_Surface_Destroy
476****************************************************************************/
477BERR_Code BSUR_Surface_Create(
478        BMEM_Handle hMem,                /* [in] Handle to BMEM module */
479        uint32_t ulWidth,                /* [in] Width of surface in pixels */
480        uint32_t ulHeight,               /* [in] Height of surface in pixels */
481        uint32_t ulPitch,                /* [in] Pitch of surface in bytes */
482        void *pvPixelAddress,            /* [in] Pointer surface's first pixel */
483        BPXL_Format eFormat,             /* [in] Pixel format of surface */
484        BSUR_Palette_Handle hPalette,    /* [in] Palette to associate with */
485        uint32_t ulConstraintMask,       /* [in] Constraint mask */
486        BSUR_Surface_Settings *pSettings,/* [in] Extended settings, can be NULL*/
487        BSUR_Surface_Handle *phSurface   /* [out] Pointer to surface handle */
488);
489
490/***************************************************************************
491Summary:
492        Destroys the provided surface.
493
494Description:
495        If the pixel memory was allocated by the surface module it will be
496        freed. Associated palette handles are left untouched.
497
498        The user should call this function only after all modules are no
499        longer using this surface.
500
501        Failing to destroy all created surfaces will result in an error
502        when the module is closed with BSUR_Close.
503
504Returns:
505        BERR_SUCCESS - Palette was successfully destroyed.
506
507See Also:
508        BSUR_Surface_Create
509****************************************************************************/
510BERR_Code BSUR_Surface_Destroy(
511        BSUR_Surface_Handle hSurface     /* [in] Handle to surface to destroy */
512);
513
514/***************************************************************************
515Summary:
516        Sets the palette associated with a given surface.
517
518Description:
519        This will be allowed as long as the surface requires a palette and the
520        supplied palette contains at least the number of required entries.
521
522Returns:
523        BERR_SUCCESS - Surface's palette was successfully changed.
524        BERR_INVALID_PARAMETER - Input parameter value was invalid.
525****************************************************************************/
526BERR_Code BSUR_Surface_SetPalette(
527        BSUR_Surface_Handle hSurface,    /* [in] Handle to surface */
528        BSUR_Palette_Handle hPalette     /* [in] Handle to palette */
529);
530
531/***************************************************************************
532Summary:
533        Returns the pixel width and height of a given surface.
534
535Description:
536        Gets the width and height of the supplied surface.
537
538Returns:
539        BERR_SUCCESS - Returned dimensions are valid.:
540
541See Also:
542        BSUR_Surface_Create
543****************************************************************************/
544BERR_Code BSUR_Surface_GetDimensions(
545        BSUR_Surface_Handle hSurface,   /* [in] Handle to surface to examine */
546        uint32_t *pulWidth,             /* [out] Pointer to width in pixels*/
547        uint32_t *pulHeight             /* [out] Pointer to height in pixels */
548);
549
550/***************************************************************************
551Summary:
552        Returns the palette associated with a surface.
553
554Description:
555        If the surface does not have a palette associated with it, this
556        function will return an error.
557
558Returns:
559        BERR_SUCCESS - Returned palette handle is valid.
560        BERR_INVALID_PARAMETER - Surface does not contain a palette.
561****************************************************************************/
562BERR_Code BSUR_Surface_GetPalette(
563        BSUR_Surface_Handle hSurface,   /* [in] Handle to surface to examine */
564        BSUR_Palette_Handle *phPalette  /* [out] Pointer to palette handle */
565);
566
567/***************************************************************************
568Summary:
569        Returns the Constraint mask associated with the surface.
570
571Description:
572        The constraint mask is a bit mask describing which restrictions
573        were put on the properties of the surface when it was created.
574
575Returns:
576        BERR_SUCCESS - Returned Constraint mask is valid.
577****************************************************************************/
578BERR_Code BSUR_Surface_GetConstraintMask(
579        BSUR_Surface_Handle hSurface,   /* [in] Handle to surface to examine */
580        uint32_t *pulConstraintMask     /* [out] Pointer to constraint mask */
581);
582
583/***************************************************************************
584Summary:
585        Returns information about pixel memory.
586
587Description:
588        Returns pixel address and pitch of surface.
589
590Returns:
591        BERR_SUCCESS - Returned information is valid.:
592****************************************************************************/
593BERR_Code BSUR_Surface_GetAddress(
594        BSUR_Surface_Handle hSurface,   /* [in] Handle to surface to examine */
595        void **ppvPixelAddress,         /* [out] Pointer to pixel address */
596        uint32_t *pulPitch              /* [out] Pointer to pitch in bytes */
597);
598
599/***************************************************************************
600Summary:
601        Returns information about pixel memory at isr.
602
603Description:
604        Returns pixel address and pitch of surface.
605
606Returns:
607        BERR_SUCCESS - Returned information is valid.:
608
609See Also:
610        BSUR_Surface_GetAddress
611****************************************************************************/
612#define BSUR_Surface_GetAddress_isr(hSurface, ppvPixelAddress, pulPitch) \
613        BSUR_Surface_GetAddress(hSurface, ppvPixelAddress, pulPitch)
614
615/***************************************************************************
616Summary:
617        Returns the offset of the surface.
618
619Returns:
620        BERR_SUCCESS - Returned address is valid.
621****************************************************************************/
622BERR_Code BSUR_Surface_GetOffset(
623        BSUR_Surface_Handle hSurface,    /* [in] Handle to surface to examine */
624        uint32_t *pulOffset              /* [out] Pointer to surface offset */
625);
626
627/***************************************************************************
628Summary:
629        Returns offset of surface at isr.
630
631Returns:
632        BERR_SUCCESS - Returned information is valid.:
633****************************************************************************/
634#define BSUR_Surface_GetOffset_isr(hSurface, pulOffset) \
635        BSUR_Surface_GetOffset(hSurface, pulOffset)
636
637/***************************************************************************
638Summary:
639        Returns pixel format for the surface.
640
641Description:
642
643Returns:
644        BERR_SUCCESS - Returned information is valid.:
645****************************************************************************/
646BERR_Code BSUR_Surface_GetFormat(
647        BSUR_Surface_Handle hSurface,   /* [in] Handle to surface to examine */
648        BPXL_Format *peFormat           /* [out] Pointer to pixel format */
649);
650
651/***************************************************************************
652Summary:
653        Returns packet blit information for the surface.
654
655Description:
656
657Returns:
658        BERR_SUCCESS - Returned information is valid.:
659****************************************************************************/
660BERR_Code BSUR_Surface_GetPacketBlitInfo(
661        BSUR_Surface_Handle hSurface,   /* [in] Handle to surface to examine */
662        BPXL_Format *peFormat,          /* [out] Pointer to pixel format */
663        uint32_t *pulOffset,            /* [out] Pointer to surface offset */
664        uint32_t *pulPitch,             /* [out] Pointer to pitch in bytes */
665        uint32_t *pulWidth,             /* [out] Pointer to width in pixels*/
666        uint32_t *pulHeight             /* [out] Pointer to height in pixels*/
667);
668
669/***************************************************************************
670Summary:
671        Returns ID for the surface.
672
673Description:
674
675Returns:
676        BERR_SUCCESS - Returned information is valid.:
677****************************************************************************/
678BERR_Code BSUR_Surface_GetID(
679        BSUR_Surface_Handle hSurface,   /* [in] Handle to surface to examine */
680        uint32_t *pulID                 /* [out] Pointer to ID */
681);
682
683/***************************************************************************
684Summary:
685        Sets ID for the surface.
686
687Description:
688        Can only be set when current ID is zero (uninitialized).
689
690Returns:
691        BERR_SUCCESS - Returned information is valid.:
692****************************************************************************/
693BERR_Code BSUR_Surface_SetID(
694        BSUR_Surface_Handle hSurface,   /* [in] Handle to surface to examine */
695        uint32_t ulID                   /* [in] Surface ID */
696);
697
698/***************************************************************************
699Summary:
700        Gets surface TestFeature1 settings.
701
702Description:
703        This function gets the surface TestFeature1 settings that can be
704        specified through the BSUR_Surface_Settings structure when creating
705        a surface.
706
707Returns:
708        BERR_SUCCESS - Returned settings are valid.
709
710See Also:
711        BSUR_Surface_Create,
712        BSUR_Surface_Settings,
713        BSUR_TestFeature1_Settings,
714        BSUR_Surface_SetTestFeature1
715****************************************************************************/
716BERR_Code BSUR_Surface_GetTestFeature1(
717        BSUR_Surface_Handle hSurface,     /* [in] Handle to surface to examine */
718        BSUR_TestFeature1_Settings *pTestFeature1Settings  /* [out] Ptr to TestFeature1 settings */
719);
720
721#ifdef __cplusplus
722}
723#endif
724
725#endif /* #ifndef BSUR_H__ */
726
727/* end of file */
Note: See TracBrowser for help on using the repository browser.