libgralloc: Use new GFX API to calculate stride
Use new GFX API compute_aligned_width_and_height to get the stride
value for RGB surfaces.
Backward compatible with GFX old API when old GFX library is used.
Change-Id: I15b0954602b816bf4e88f48622494144fc77c14f
diff --git a/libgralloc/gr.h b/libgralloc/gr.h
index 5343c35..1949f45 100644
--- a/libgralloc/gr.h
+++ b/libgralloc/gr.h
@@ -89,12 +89,13 @@
~AdrenoMemInfo();
/*
- * Function to compute the adreno stride based on the width and format.
+ * Function to compute the adreno aligned width and aligned height
+ * based on the width and format.
*
- * @return stride.
+ * @return aligned width, aligned height
*/
- int getStride(int width, int format);
-
+ void getAlignedWidthAndHeight(int width, int height, int format,
+ int& alignedw, int &alignedh);
private:
// Pointer to the padding library.
void *libadreno_utils;
@@ -104,5 +105,15 @@
int surface_tile_height,
int screen_tile_height,
int padding_threshold);
+ // link to the surface padding library.
+ void (*LINK_adreno_compute_aligned_width_and_height) (int width,
+ int height,
+ int bpp,
+ int tile_mode,
+ int raster_mode,
+ int padding_threshold,
+ int *aligned_w,
+ int *aligned_h);
+
};
#endif /* GR_H_ */