libhwcomposer: Add C2D support to copybit
Change-Id: I2f2c915bb92d5c459428078149a9709356ae83f1
Acked-by: Neti Ravi Kumar <ravineti@codeaurora.org>
diff --git a/libhwcomposer/hwc_copybit.h b/libhwcomposer/hwc_copybit.h
index 602898e..8390968 100644
--- a/libhwcomposer/hwc_copybit.h
+++ b/libhwcomposer/hwc_copybit.h
@@ -51,8 +51,11 @@
EGLDisplay dpy, EGLSurface surface,
functype_eglGetRenderBufferANDROID& LINK_eglGetRenderBufferANDROID,
functype_eglGetCurrentSurface LINK_eglGetCurrentSurface);
- static bool canUseCopybit(hwc_context_t* ctx, const hwc_layer_list_t* list,
- const int numYUVBuffers);
+ static bool canUseCopybitForYUV (hwc_context_t *ctx);
+ static bool canUseCopybitForRGB (hwc_context_t *ctx,
+ hwc_layer_list_t *list);
+ static bool validateParams (hwc_context_t *ctx,
+ const hwc_layer_list_t *list);
static void closeEglLib();
static void openEglLibAndGethandle();
private:
@@ -75,9 +78,10 @@
static functype_eglGetRenderBufferANDROID LINK_eglGetRenderBufferANDROID;
static functype_eglGetCurrentSurface LINK_eglGetCurrentSurface;
- static void getLayerResolution(const hwc_layer_t* layer, int& width,
- int& height);
+ static unsigned int getRGBRenderingArea (const hwc_layer_list_t *list);
+ static void getLayerResolution(const hwc_layer_t* layer,
+ unsigned int &width, unsigned int& height);
};
class CopybitEngine {