summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-12-08 15:02:15 -0800
committerAndreas Gampe <agampe@google.com>2014-12-08 15:02:15 -0800
commit12102980abf11dc65a42a0303885c8c4e1cb7dda (patch)
tree2fa9cdf96d6faf32a272b4d0fcaac6a36df0236f
parentc7d7763e1230229aa2c82b53252f752b1f83aab0 (diff)
downloadhwcomposer-lollipop-wear-release.tar.gz
HWComposer: Remove unused variables and functionsandroid-wear-5.0.0_r1lollipop-wear-release
For build-system CFLAGS clean-up, remove unused variables and functions. Bug: 18632512 Change-Id: Ie04cb2113efb4b544d674d16f3127c2468fae7c6
-rwxr-xr-xcommon/base/HwcLayerList.cpp6
-rw-r--r--common/base/HwcModule.cpp16
-rw-r--r--ips/anniedale/AnnCursorPlane.cpp4
-rwxr-xr-xips/anniedale/AnnOverlayPlane.cpp1
-rwxr-xr-xips/anniedale/PlaneCapabilities.cpp3
-rwxr-xr-xips/common/OverlayPlaneBase.cpp3
-rw-r--r--ips/common/RotationBufferProvider.cpp4
-rw-r--r--ips/common/WsbmWrapper.c2
8 files changed, 4 insertions, 35 deletions
diff --git a/common/base/HwcLayerList.cpp b/common/base/HwcLayerList.cpp
index a6326fc..24aa5d6 100755
--- a/common/base/HwcLayerList.cpp
+++ b/common/base/HwcLayerList.cpp
@@ -114,7 +114,6 @@ bool HwcLayerList::checkSupported(int planeType, HwcLayer *hwcLayer)
bool HwcLayerList::checkRgbOverlaySupported(HwcLayer *hwcLayer)
{
- bool valid = false;
hwc_layer_1_t& layer = *(hwcLayer->getLayer());
// if layer was forced to use FB
@@ -146,7 +145,6 @@ bool HwcLayerList::checkRgbOverlaySupported(HwcLayer *hwcLayer)
return false;
}
- uint32_t h = hwcLayer->getBufferHeight();
const stride_t& stride = hwcLayer->getBufferStride();
if (stride.rgb.stride > 4096) {
return false;
@@ -176,7 +174,6 @@ bool HwcLayerList::checkRgbOverlaySupported(HwcLayer *hwcLayer)
bool HwcLayerList::checkCursorSupported(HwcLayer *hwcLayer)
{
- bool valid = false;
hwc_layer_1_t& layer = *(hwcLayer->getLayer());
// if layer was forced to use FB
@@ -260,7 +257,6 @@ bool HwcLayerList::initialize()
mOverlayCandidates.setCapacity(mLayerCount);
mCursorCandidates.setCapacity(mLayerCount);
mZOrderConfig.setCapacity(mLayerCount);
- Hwcomposer& hwc = Hwcomposer::getInstance();
PriorityVector rgbOverlayLayers;
rgbOverlayLayers.setCapacity(mLayerCount);
@@ -798,8 +794,6 @@ void HwcLayerList::setupSmartComposition()
bool HwcLayerList::update(hwc_display_contents_1_t *list)
{
- bool ret;
-
// basic check to make sure the consistance
if (!list) {
ELOGTRACE("null layer list");
diff --git a/common/base/HwcModule.cpp b/common/base/HwcModule.cpp
index ce8d478..152f8e4 100644
--- a/common/base/HwcModule.cpp
+++ b/common/base/HwcModule.cpp
@@ -124,19 +124,6 @@ static int hwc_eventControl(struct hwc_composer_device_1 *dev,
return 0;
}
-static int hwc_blank(hwc_composer_device_1_t *dev, int disp, int blank)
-{
- ATRACE_CALL();
- GET_HWC_RETURN_ERROR_IF_NULL();
- bool ret = hwc->blank(disp, blank);
- if (ret == false) {
- ELOGTRACE("failed to blank disp %d, blank %d", disp, blank);
- return -EINVAL;
- }
-
- return 0;
-}
-
static int hwc_getDisplayConfigs(hwc_composer_device_1_t *dev,
int disp,
uint32_t *configs,
@@ -222,6 +209,8 @@ static int hwc_setActiveConfig(hwc_composer_device_1_t *dev, int disp, int index
return 0;
}
+// Todo: add hwc_setCursorPositionAsync after supporting patches
+/*
static int hwc_setCursorPositionAsync(hwc_composer_device_1_t *dev, int disp, int x, int y)
{
ATRACE_CALL();
@@ -234,6 +223,7 @@ static int hwc_setCursorPositionAsync(hwc_composer_device_1_t *dev, int disp, in
return 0;
}
+*/
//------------------------------------------------------------------------------
diff --git a/ips/anniedale/AnnCursorPlane.cpp b/ips/anniedale/AnnCursorPlane.cpp
index e85a529..6280490 100644
--- a/ips/anniedale/AnnCursorPlane.cpp
+++ b/ips/anniedale/AnnCursorPlane.cpp
@@ -97,8 +97,6 @@ bool AnnCursorPlane::setDataBuffer(BufferMapper& mapper)
// setup plane position
int dstX = mPosition.x;
int dstY = mPosition.y;
- int dstW = mPosition.w;
- int dstH = mPosition.h;
if (h < w) {
cursorSize = h;
@@ -148,7 +146,6 @@ bool AnnCursorPlane::setDataBuffer(BufferMapper& mapper)
uint8_t *p = (uint8_t *)(mapper.getCpuAddress(0));
uint8_t *srcPixel;
uint32_t stride = mapper.getStride().rgb.stride;
- uint8_t temp;
if (!p) {
return false;
}
@@ -158,7 +155,6 @@ bool AnnCursorPlane::setDataBuffer(BufferMapper& mapper)
for (int i = 0; i < cursorSize; i++) {
for (int j = 0; j < cursorSize; j++) {
srcPixel = p + i*stride + j*4;
- temp = srcPixel[0];
if (i >= mCrop.h || j >= mCrop.w) {
if (srcPixel[0] == 0 &&
srcPixel[3] == 0xff)
diff --git a/ips/anniedale/AnnOverlayPlane.cpp b/ips/anniedale/AnnOverlayPlane.cpp
index 8b63101..c10b630 100755
--- a/ips/anniedale/AnnOverlayPlane.cpp
+++ b/ips/anniedale/AnnOverlayPlane.cpp
@@ -227,7 +227,6 @@ bool AnnOverlayPlane::bufferOffsetSetup(BufferMapper& mapper)
uint32_t yStride = mapper.getStride().yuv.yStride;
uint32_t uvStride = mapper.getStride().yuv.uvStride;
- uint32_t w = mapper.getWidth();
uint32_t h = mapper.getHeight();
uint32_t srcX= mapper.getCrop().x;
uint32_t srcY= mapper.getCrop().y;
diff --git a/ips/anniedale/PlaneCapabilities.cpp b/ips/anniedale/PlaneCapabilities.cpp
index 736fff1..1856d4e 100755
--- a/ips/anniedale/PlaneCapabilities.cpp
+++ b/ips/anniedale/PlaneCapabilities.cpp
@@ -77,8 +77,6 @@ bool PlaneCapabilities::isFormatSupported(int planeType, HwcLayer *hwcLayer)
bool PlaneCapabilities::isSizeSupported(int planeType, HwcLayer *hwcLayer)
{
uint32_t format = hwcLayer->getFormat();
- uint32_t w = hwcLayer->getBufferWidth();
- uint32_t h = hwcLayer->getBufferHeight();
const stride_t& stride = hwcLayer->getBufferStride();
bool isYUVPacked;
@@ -138,7 +136,6 @@ bool PlaneCapabilities::isSizeSupported(int planeType, HwcLayer *hwcLayer)
bool PlaneCapabilities::isBlendingSupported(int planeType, HwcLayer *hwcLayer)
{
uint32_t blending = (uint32_t)hwcLayer->getLayer()->blending;
- uint8_t planeAlpha = hwcLayer->getLayer()->planeAlpha;
if (planeType == DisplayPlane::PLANE_SPRITE || planeType == DisplayPlane::PLANE_PRIMARY) {
// support premultipled & none blanding
diff --git a/ips/common/OverlayPlaneBase.cpp b/ips/common/OverlayPlaneBase.cpp
index 2a41177..6ef76ae 100755
--- a/ips/common/OverlayPlaneBase.cpp
+++ b/ips/common/OverlayPlaneBase.cpp
@@ -345,9 +345,7 @@ BufferMapper* OverlayPlaneBase::getTTMMapper(BufferMapper& grallocMapper, struct
uint32_t yStride, uvStride;
stride_t stride;
int srcX, srcY, srcW, srcH;
- int tmp;
- DataBuffer *buf;
ssize_t index;
TTMBufferMapper *mapper;
bool ret;
@@ -667,7 +665,6 @@ bool OverlayPlaneBase::bufferOffsetSetup(BufferMapper& mapper)
uint32_t gttOffsetInBytes = (mapper.getGttOffsetInPage(0) << 12);
uint32_t yStride = mapper.getStride().yuv.yStride;
uint32_t uvStride = mapper.getStride().yuv.uvStride;
- uint32_t w = mapper.getWidth();
uint32_t h = mapper.getHeight();
uint32_t srcX= mapper.getCrop().x;
uint32_t srcY= mapper.getCrop().y;
diff --git a/ips/common/RotationBufferProvider.cpp b/ips/common/RotationBufferProvider.cpp
index 22fdf60..3c23b6b 100644
--- a/ips/common/RotationBufferProvider.cpp
+++ b/ips/common/RotationBufferProvider.cpp
@@ -380,7 +380,6 @@ bool RotationBufferProvider::setupRotationBuffer(VideoPayloadBuffer *payload, in
uint32_t setup_Begin = getMilliseconds();
#endif
VAStatus vaStatus;
- int stride;
bool ret = false;
if (payload->format != VA_FOURCC_NV12 || payload->width == 0 || payload->height == 0) {
@@ -513,7 +512,7 @@ bool RotationBufferProvider::setupRotationBuffer(VideoPayloadBuffer *payload, in
bool RotationBufferProvider::prepareBufferInfo(int w, int h, int stride, VideoPayloadBuffer *payload, void *user_pt)
{
- int chroma_offset, size;
+ int size;
void *buf = NULL;
payload->width = payload->crop_width = w;
@@ -525,7 +524,6 @@ bool RotationBufferProvider::prepareBufferInfo(int w, int h, int stride, VideoPa
payload->chroma_v_stride = stride;
payload->client_transform = 0;
- chroma_offset = stride * h;
size = stride * h + stride * h / 2;
ssize_t index;
diff --git a/ips/common/WsbmWrapper.c b/ips/common/WsbmWrapper.c
index 08ddefc..41ff986 100644
--- a/ips/common/WsbmWrapper.c
+++ b/ips/common/WsbmWrapper.c
@@ -156,7 +156,6 @@ int psbWsbmAllocateFromUB(uint32_t size, uint32_t align, void ** buf, void *user
{
struct _WsbmBufferObject * wsbmBuf = NULL;
int ret = 0;
- int offset = 0;
ALOGTRACE("size %d", align_to(size, 4096));
@@ -195,7 +194,6 @@ int psbWsbmAllocateTTMBuffer(uint32_t size, uint32_t align, void ** buf)
{
struct _WsbmBufferObject * wsbmBuf = NULL;
int ret = 0;
- int offset = 0;
ALOGTRACE("size %d", align_to(size, 4096));