Android Hardware Abstraction Layer
Data Structures | Macros | Typedefs | Enumerations
gralloc.h File Reference
#include <system/window.h>
#include <system/graphics.h>
#include <hardware/hardware.h>
#include <stdint.h>
#include <sys/cdefs.h>
#include <sys/types.h>
#include <cutils/native_handle.h>
#include <hardware/fb.h>

Go to the source code of this file.

Data Structures

struct  gralloc_module_t
 
struct  alloc_device_t
 

Macros

#define GRALLOC_MODULE_API_VERSION_0_1   HARDWARE_MODULE_API_VERSION(0, 1)
 
#define GRALLOC_MODULE_API_VERSION_0_2   HARDWARE_MODULE_API_VERSION(0, 2)
 
#define GRALLOC_DEVICE_API_VERSION_0_1   HARDWARE_DEVICE_API_VERSION(0, 1)
 
#define GRALLOC_HARDWARE_MODULE_ID   "gralloc"
 
#define GRALLOC_HARDWARE_GPU0   "gpu0"
 

Typedefs

typedef struct gralloc_module_t gralloc_module_t
 
typedef struct alloc_device_t alloc_device_t
 

Enumerations

enum  {
  GRALLOC_USAGE_SW_READ_NEVER = 0x00000000, GRALLOC_USAGE_SW_READ_RARELY = 0x00000002, GRALLOC_USAGE_SW_READ_OFTEN = 0x00000003, GRALLOC_USAGE_SW_READ_MASK = 0x0000000F,
  GRALLOC_USAGE_SW_WRITE_NEVER = 0x00000000, GRALLOC_USAGE_SW_WRITE_RARELY = 0x00000020, GRALLOC_USAGE_SW_WRITE_OFTEN = 0x00000030, GRALLOC_USAGE_SW_WRITE_MASK = 0x000000F0,
  GRALLOC_USAGE_HW_TEXTURE = 0x00000100, GRALLOC_USAGE_HW_RENDER = 0x00000200, GRALLOC_USAGE_HW_2D = 0x00000400, GRALLOC_USAGE_HW_COMPOSER = 0x00000800,
  GRALLOC_USAGE_HW_FB = 0x00001000, GRALLOC_USAGE_HW_VIDEO_ENCODER = 0x00010000, GRALLOC_USAGE_HW_CAMERA_WRITE = 0x00020000, GRALLOC_USAGE_HW_CAMERA_READ = 0x00040000,
  GRALLOC_USAGE_HW_CAMERA_ZSL = 0x00060000, GRALLOC_USAGE_HW_CAMERA_MASK = 0x00060000, GRALLOC_USAGE_HW_MASK = 0x00071F00, GRALLOC_USAGE_RENDERSCRIPT = 0x00100000,
  GRALLOC_USAGE_EXTERNAL_DISP = 0x00002000, GRALLOC_USAGE_PROTECTED = 0x00004000, GRALLOC_USAGE_PRIVATE_0 = 0x10000000, GRALLOC_USAGE_PRIVATE_1 = 0x20000000,
  GRALLOC_USAGE_PRIVATE_2 = 0x40000000, GRALLOC_USAGE_PRIVATE_3 = 0x80000000, GRALLOC_USAGE_PRIVATE_MASK = 0xF0000000
}
 

Macro Definition Documentation

#define GRALLOC_DEVICE_API_VERSION_0_1   HARDWARE_DEVICE_API_VERSION(0, 1)

Definition at line 52 of file gralloc.h.

#define GRALLOC_HARDWARE_GPU0   "gpu0"

Name of the graphics device to open

Definition at line 63 of file gralloc.h.

#define GRALLOC_HARDWARE_MODULE_ID   "gralloc"

The id of this module

Definition at line 57 of file gralloc.h.

#define GRALLOC_MODULE_API_VERSION_0_1   HARDWARE_MODULE_API_VERSION(0, 1)

Module versioning information for the Gralloc hardware module, based on gralloc_module_t.common.module_api_version.

Version History:

GRALLOC_MODULE_API_VERSION_0_1: Initial Gralloc hardware module API.

GRALLOC_MODULE_API_VERSION_0_2: Add support for flexible YCbCr format with (*lock_ycbcr)() method.

Definition at line 49 of file gralloc.h.

#define GRALLOC_MODULE_API_VERSION_0_2   HARDWARE_MODULE_API_VERSION(0, 2)

Definition at line 50 of file gralloc.h.

Typedef Documentation

Every device data structure must begin with hw_device_t followed by module specific public methods and attributes.

Every hardware module must have a data structure named HAL_MODULE_INFO_SYM and the fields of this data structure must begin with hw_module_t followed by module specific information.

Enumeration Type Documentation

anonymous enum
Enumerator
GRALLOC_USAGE_SW_READ_NEVER 
GRALLOC_USAGE_SW_READ_RARELY 
GRALLOC_USAGE_SW_READ_OFTEN 
GRALLOC_USAGE_SW_READ_MASK 
GRALLOC_USAGE_SW_WRITE_NEVER 
GRALLOC_USAGE_SW_WRITE_RARELY 
GRALLOC_USAGE_SW_WRITE_OFTEN 
GRALLOC_USAGE_SW_WRITE_MASK 
GRALLOC_USAGE_HW_TEXTURE 
GRALLOC_USAGE_HW_RENDER 
GRALLOC_USAGE_HW_2D 
GRALLOC_USAGE_HW_COMPOSER 
GRALLOC_USAGE_HW_FB 
GRALLOC_USAGE_HW_VIDEO_ENCODER 
GRALLOC_USAGE_HW_CAMERA_WRITE 
GRALLOC_USAGE_HW_CAMERA_READ 
GRALLOC_USAGE_HW_CAMERA_ZSL 
GRALLOC_USAGE_HW_CAMERA_MASK 
GRALLOC_USAGE_HW_MASK 
GRALLOC_USAGE_RENDERSCRIPT 
GRALLOC_USAGE_EXTERNAL_DISP 
GRALLOC_USAGE_PROTECTED 
GRALLOC_USAGE_PRIVATE_0 
GRALLOC_USAGE_PRIVATE_1 
GRALLOC_USAGE_PRIVATE_2 
GRALLOC_USAGE_PRIVATE_3 
GRALLOC_USAGE_PRIVATE_MASK 

Definition at line 65 of file gralloc.h.