android_hardware_qcom_display/libhwcomposer/hwc_service.h
Ramkumar Radhakrishnan 060e7797ed display: Add binder interface between hwcservice and its clients.
Add hwc_service.cpp and ihwc.cpp file to enable direct communication
to hwcomposer by the clients to set hwc system wide properties.

Create hwcomposer service singleton object in hwc_context_t structure.

Change-Id: I0d0879475951a618a453a23ee254ea651e8c6b88
2012-09-12 22:55:04 -05:00

42 lines
1.2 KiB
C++

#ifndef ANDROID_HWCOMPOSER_SERVICE_H
#define ANDROID_HWCOMPOSER_SERVICE_H
#include <utils/Errors.h>
#include <sys/types.h>
#include <cutils/log.h>
#include <binder/IServiceManager.h>
#include <ihwc.h>
#include <hwc_external.h>
namespace hwcService {
// ----------------------------------------------------------------------------
class HWComposerService : public BnHWComposer {
enum {
MAX_ACTIONSAFE_WIDTH = 10,
MAX_ACTIONSAFE_HEIGHT = MAX_ACTIONSAFE_WIDTH,
};
private:
HWComposerService();
public:
~HWComposerService();
static HWComposerService* getInstance();
virtual android::status_t getResolutionModeCount(int *modeCount);
virtual android::status_t getResolutionModes(int *EDIDModes, int count = 1);
virtual android::status_t getExternalDisplay(int *extDisp);
virtual android::status_t setHPDStatus(int enable);
virtual android::status_t setResolutionMode(int resMode);
virtual android::status_t setActionSafeDimension(int w, int h);
void setHwcContext(hwc_context_t *hwcCtx);
private:
static HWComposerService *sHwcService;
hwc_context_t *mHwcContext;
};
}; // namespace hwcService
#endif // ANDROID_HWCOMPOSER_SERVICE_H