hwc: Clean up scattered definitions of commonly used constants/values
Clean up scattered definitions of commonly used constants/values.
There is no need in re-defining these in several places.
Change-Id: I22c082b56646cb02d5ae4733d110afc81aaff50a
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 3696c05..5cecbaa 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -488,8 +488,8 @@
if(extOrientation & HAL_TRANSFORM_ROT_90) {
// Swap width/height for input position
swapWidthHeight(actualWidth, actualHeight);
- getAspectRatioPosition((int)fbWidth, (int)fbHeight, (int)actualWidth,
- (int)actualHeight, rect);
+ qdutils::getAspectRatioPosition((int)fbWidth, (int)fbHeight,
+ (int)actualWidth, (int)actualHeight, rect);
xPos = rect.left;
yPos = rect.top;
width = float(rect.right - rect.left);
@@ -520,7 +520,7 @@
xRatio = (float)(outPos.x - xPos)/width;
// GetaspectRatio -- tricky to get the correct aspect ratio
// But we need to do this.
- getAspectRatioPosition((int)width, (int)height,
+ qdutils::getAspectRatioPosition((int)width, (int)height,
(int)width,(int)height, r);
xPos = r.left;
yPos = r.top;
@@ -603,7 +603,7 @@
if(!isPrimaryPortrait(ctx)) {
swap(srcWidth, srcHeight);
} // Get Aspect Ratio for external
- getAspectRatioPosition(dstWidth, dstHeight, srcWidth,
+ qdutils::getAspectRatioPosition(dstWidth, dstHeight, srcWidth,
srcHeight, displayFrame);
// Crop - this is needed, because for sidesync, the dest fb will
// be in portrait orientation, so update the crop to not show the
diff --git a/libhwcomposer/hwc_vsync.cpp b/libhwcomposer/hwc_vsync.cpp
index 6c6ba63..66988f7 100644
--- a/libhwcomposer/hwc_vsync.cpp
+++ b/libhwcomposer/hwc_vsync.cpp
@@ -27,16 +27,17 @@
#include <sys/prctl.h>
#include <poll.h>
#include "hwc_utils.h"
+#include "qd_utils.h"
#include "string.h"
#include "external.h"
#include "overlay.h"
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
+using namespace qdutils;
namespace qhwc {
#define HWC_VSYNC_THREAD_NAME "hwcVsyncThread"
-#define MAX_SYSFS_FILE_PATH 255
#define PANEL_ON_STR "panel_power_on ="
#define ARRAY_LENGTH(array) (sizeof((array))/sizeof((array)[0]))
#define MAX_THERMAL_LEVEL 3