hwc: resolve compiler warnings

- remove unused variables.
- fix incorrect castings.

Change-Id: I7661edb4539a3ffc7d4aedbb9f633bc5ba1dc149
This commit is contained in:
Arun Kumar K.R
2014-01-21 23:08:28 -08:00
parent a6fe50e686
commit 2aa44c66fa
14 changed files with 55 additions and 80 deletions

View File

@@ -105,9 +105,8 @@ static void hwc_registerProcs(struct hwc_composer_device_1* dev,
//Helper
static void reset(hwc_context_t *ctx, int numDisplays,
hwc_display_contents_1_t** displays) {
ctx->numActiveDisplays = 0;
for(int i = 0; i < HWC_NUM_DISPLAY_TYPES; i++) {
for(int i = 0; i < numDisplays; i++) {
hwc_display_contents_1_t *list = displays[i];
// XXX:SurfaceFlinger no longer guarantees that this
// value is reset on every prepare. However, for the layer
@@ -660,7 +659,7 @@ int hwc_getDisplayConfigs(struct hwc_composer_device_1* dev, int disp,
}
int hwc_getDisplayAttributes(struct hwc_composer_device_1* dev, int disp,
uint32_t config, const uint32_t* attributes, int32_t* values) {
uint32_t /*config*/, const uint32_t* attributes, int32_t* values) {
hwc_context_t* ctx = (hwc_context_t*)(dev);
disp = getDpyforExternalDisplay(ctx, disp);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -270,12 +270,12 @@ bool AssertiveDisplay::draw(hwc_context_t *ctx, int fd, uint32_t offset) {
return true;
}
int AssertiveDisplay::getDstFd(hwc_context_t *ctx) const {
int AssertiveDisplay::getDstFd() const {
overlay::Writeback *wb = overlay::Writeback::getInstance();
return wb->getDstFd();
}
uint32_t AssertiveDisplay::getDstOffset(hwc_context_t *ctx) const {
uint32_t AssertiveDisplay::getDstOffset() const {
overlay::Writeback *wb = overlay::Writeback::getInstance();
return wb->getOffset();
}

View File

@@ -51,8 +51,8 @@ public:
}
bool isDoable() const { return mDoable; }
bool isModeOn() const { return (mWbFd >= 0); }
int getDstFd(hwc_context_t *ctx) const;
uint32_t getDstOffset(hwc_context_t *ctx) const;
int getDstFd() const;
uint32_t getDstOffset() const;
private:
//State of feature turned on and off

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 The Android Open Source Project
* Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
* Copyright (C) 2012-2014, The Linux Foundation. All rights reserved.
*
* Not a Contribution.
*
@@ -162,8 +162,6 @@ bool CopyBit::prepare(hwc_context_t *ctx, hwc_display_contents_1_t *list,
bool useCopybitForYUV = canUseCopybitForYUV(ctx);
bool useCopybitForRGB = canUseCopybitForRGB(ctx, list, dpy);
LayerProp *layerProp = ctx->layerProp[dpy];
size_t fbLayerIndex = ctx->listStats[dpy].fbLayerIndex;
hwc_layer_1_t *fbLayer = &list->hwLayers[fbLayerIndex];
// Following are MDP3 limitations for which we
// need to fallback to GPU composition:
@@ -326,7 +324,7 @@ bool CopyBit::draw(hwc_context_t *ctx, hwc_display_contents_1_t *list,
list->hwLayers[i].acquireFenceFd = -1;
}
retVal = drawLayerUsingCopybit(ctx, &(list->hwLayers[i]),
renderBuffer, dpy, !i);
renderBuffer, !i);
copybitLayerCount++;
if(retVal < 0) {
ALOGE("%s : drawLayerUsingCopybit failed", __FUNCTION__);
@@ -347,7 +345,7 @@ bool CopyBit::draw(hwc_context_t *ctx, hwc_display_contents_1_t *list,
}
int CopyBit::drawLayerUsingCopybit(hwc_context_t *dev, hwc_layer_1_t *layer,
private_handle_t *renderBuffer, int dpy, bool isFG)
private_handle_t *renderBuffer, bool isFG)
{
hwc_context_t* ctx = (hwc_context_t*)(dev);
int err = 0, acquireFd;

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 The Android Open Source Project
* Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
* Copyright (C) 2012-2014, The Linux Foundation. All rights reserved.
*
* Not a Contribution, Apache license notifications and license are retained
* for attribution purposes only.
@@ -54,7 +54,7 @@ private:
struct copybit_device_t *mEngine;
// Helper functions for copybit composition
int drawLayerUsingCopybit(hwc_context_t *dev, hwc_layer_1_t *layer,
private_handle_t *renderBuffer, int dpy, bool isFG);
private_handle_t *renderBuffer, bool isFG);
int fillColorUsingCopybit(hwc_layer_1_t *layer,
private_handle_t *renderBuffer);
bool canUseCopybitForYUV (hwc_context_t *ctx);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2013, Linux Foundation. All rights reserved.
* Copyright (c) 2012-2014, Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -38,6 +38,9 @@
#include <comptype.h>
#include <SkBitmap.h>
#include <SkImageEncoder.h>
#ifdef STDC_FORMAT_MACROS
#include <inttypes.h>
#endif
namespace qhwc {
@@ -308,7 +311,7 @@ void HwcDebug::dumpLayer(size_t layerIndex, hwc_layer_1_t hwLayers[])
char dumpFilename[PATH_MAX];
SkBitmap *tempSkBmp = new SkBitmap();
SkBitmap::Config tempSkBmpConfig = SkBitmap::kNo_Config;
sprintf(dumpFilename, "%s/sfdump%03d.layer%d.%s.png", mDumpDirPng,
sprintf(dumpFilename, "%s/sfdump%03d.layer%zu.%s.png", mDumpDirPng,
mDumpCntrPng, layerIndex, mDisplayName);
switch (hnd->format) {
@@ -344,7 +347,7 @@ void HwcDebug::dumpLayer(size_t layerIndex, hwc_layer_1_t hwLayers[])
if (needDumpRaw && hnd->base) {
char dumpFilename[PATH_MAX];
bool bResult = false;
sprintf(dumpFilename, "%s/sfdump%03d.layer%d.%dx%d.%s.%s.raw",
sprintf(dumpFilename, "%s/sfdump%03d.layer%zu.%dx%d.%s.%s.raw",
mDumpDirRaw, mDumpCntrRaw,
layerIndex, getWidth(hnd), getHeight(hnd),
pixFormatStr, mDisplayName);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
* Copyright (C) 2012-2014, The Linux Foundation. All rights reserved.
* Not a Contribution, Apache license notifications and license are retained
* for attribution purposes only.
*
@@ -300,7 +300,6 @@ bool MDPComp::isSupportedForMDPComp(hwc_context_t *ctx, hwc_layer_1_t* layer) {
}
bool MDPComp::isValidDimension(hwc_context_t *ctx, hwc_layer_1_t *layer) {
const int dpy = HWC_DISPLAY_PRIMARY;
private_handle_t *hnd = (private_handle_t *)layer->handle;
if(!hnd) {
@@ -316,9 +315,6 @@ bool MDPComp::isValidDimension(hwc_context_t *ctx, hwc_layer_1_t *layer) {
if(!isSecureBuffer(hnd) && isNonIntegralSourceCrop(layer->sourceCropf))
return false;
int hw_w = ctx->dpyAttr[mDpy].xres;
int hw_h = ctx->dpyAttr[mDpy].yres;
hwc_rect_t crop = integerizeSourceCrop(layer->sourceCropf);
hwc_rect_t dst = layer->displayFrame;
int crop_w = crop.right - crop.left;
@@ -407,7 +403,6 @@ ovutils::eDest MDPComp::getMdpPipe(hwc_context_t *ctx, ePipeType type,
bool MDPComp::isFrameDoable(hwc_context_t *ctx) {
bool ret = true;
const int numAppLayers = ctx->listStats[mDpy].numAppLayers;
if(!isEnabled()) {
ALOGD_IF(isDebug(),"%s: MDP Comp. not enabled.", __FUNCTION__);
@@ -458,7 +453,6 @@ bool MDPComp::validateAndApplyROI(hwc_context_t *ctx,
hwc_rect_t dstRect = layer->displayFrame;
hwc_rect_t srcRect = integerizeSourceCrop(layer->sourceCropf);
int transform = layer->transform;
hwc_rect_t res = getIntersection(visibleRect, dstRect);
@@ -515,7 +509,6 @@ void MDPComp::generateROI(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
hwc_rect_t dstRect = list->hwLayers[index].displayFrame;
hwc_rect_t srcRect = integerizeSourceCrop(
list->hwLayers[index].sourceCropf);
int transform = list->hwLayers[index].transform;
/* Intersect against display boundaries */
roi = getUnion(roi, dstRect);
@@ -729,7 +722,7 @@ bool MDPComp::cacheBasedComp(hwc_context_t *ctx,
bool MDPComp::loadBasedCompPreferGPU(hwc_context_t *ctx,
hwc_display_contents_1_t* list) {
if(not isLoadBasedCompDoable(ctx, list)) {
if(not isLoadBasedCompDoable(ctx)) {
return false;
}
@@ -840,7 +833,7 @@ bool MDPComp::loadBasedCompPreferGPU(hwc_context_t *ctx,
bool MDPComp::loadBasedCompPreferMDP(hwc_context_t *ctx,
hwc_display_contents_1_t* list) {
if(not isLoadBasedCompDoable(ctx, list)) {
if(not isLoadBasedCompDoable(ctx)) {
return false;
}
@@ -919,8 +912,7 @@ bool MDPComp::loadBasedCompPreferMDP(hwc_context_t *ctx,
return true;
}
bool MDPComp::isLoadBasedCompDoable(hwc_context_t *ctx,
hwc_display_contents_1_t* list) {
bool MDPComp::isLoadBasedCompDoable(hwc_context_t *ctx) {
if(mDpy or isSecurePresent(ctx, mDpy) or
isYuvPresent(ctx, mDpy)) {
return false;
@@ -1174,7 +1166,6 @@ void MDPComp::updateLayerCache(hwc_context_t* ctx,
int fbCount = 0;
for(int i = 0; i < numAppLayers; i++) {
hwc_layer_1_t* layer = &list->hwLayers[i];
if (mCachedFrame.hnd[i] == list->hwLayers[i].handle) {
if(!mCurrentFrame.drop[i])
fbCount++;
@@ -1484,12 +1475,9 @@ int MDPComp::prepare(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
return ret;
}
bool MDPComp::allocSplitVGPipesfor4k2k(hwc_context_t *ctx,
hwc_display_contents_1_t* list, int index) {
bool MDPComp::allocSplitVGPipesfor4k2k(hwc_context_t *ctx, int index) {
bool bRet = true;
hwc_layer_1_t* layer = &list->hwLayers[index];
private_handle_t *hnd = (private_handle_t *)layer->handle;
int mdpIndex = mCurrentFrame.layerToMDP[index];
PipeLayerPair& info = mCurrentFrame.mdpToLayer[mdpIndex];
info.pipeInfo = new MdpYUVPipeInfo;
@@ -1514,10 +1502,10 @@ bool MDPComp::allocSplitVGPipesfor4k2k(hwc_context_t *ctx,
}
return bRet;
}
//=============MDPCompNonSplit===================================================
//=============MDPCompNonSplit==================================================
void MDPCompNonSplit::adjustForSourceSplit(hwc_context_t *ctx,
hwc_display_contents_1_t* list){
hwc_display_contents_1_t*) {
//As we split 4kx2k yuv layer and program to 2 VG pipes
//(if available) increase mdpcount accordingly
mCurrentFrame.mdpCount += ctx->listStats[mDpy].yuv4k2kCount;
@@ -1618,7 +1606,7 @@ bool MDPCompNonSplit::allocLayerPipes(hwc_context_t *ctx,
hwc_layer_1_t* layer = &list->hwLayers[index];
private_handle_t *hnd = (private_handle_t *)layer->handle;
if(is4kx2kYuvBuffer(hnd) && sEnable4k2kYUVSplit){
if(allocSplitVGPipesfor4k2k(ctx, list, index)){
if(allocSplitVGPipesfor4k2k(ctx, index)){
continue;
}
}
@@ -1810,7 +1798,6 @@ int MDPCompSplit::pipesNeeded(hwc_context_t *ctx,
hwc_display_contents_1_t* list,
int mixer) {
int pipesNeeded = 0;
const int xres = ctx->dpyAttr[mDpy].xres;
const int lSplit = getLeftSplit(ctx, mDpy);
@@ -1909,7 +1896,6 @@ bool MDPCompSplit::areVGPipesAvailable(hwc_context_t *ctx,
bool MDPCompSplit::acquireMDPPipes(hwc_context_t *ctx, hwc_layer_1_t* layer,
MdpPipeInfoSplit& pipe_info,
ePipeType type) {
const int xres = ctx->dpyAttr[mDpy].xres;
const int lSplit = getLeftSplit(ctx, mDpy);
hwc_rect_t dst = layer->displayFrame;
@@ -1943,7 +1929,7 @@ bool MDPCompSplit::allocLayerPipes(hwc_context_t *ctx,
const int lSplit = getLeftSplit(ctx, mDpy);
if(is4kx2kYuvBuffer(hnd) && sEnable4k2kYUVSplit){
if((dst.left > lSplit)||(dst.right < lSplit)){
if(allocSplitVGPipesfor4k2k(ctx, list, index)){
if(allocSplitVGPipesfor4k2k(ctx, index)){
continue;
}
}
@@ -2104,8 +2090,8 @@ bool MDPCompSplit::draw(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
if(ctx->mAD->isModeOn()) {
if(ctx->mAD->draw(ctx, fd, offset)) {
fd = ctx->mAD->getDstFd(ctx);
offset = ctx->mAD->getDstOffset(ctx);
fd = ctx->mAD->getDstFd();
offset = ctx->mAD->getDstOffset();
}
}

View File

@@ -172,8 +172,7 @@ protected:
bool loadBasedCompPreferMDP(hwc_context_t *ctx,
hwc_display_contents_1_t* list);
/* Checks if its worth doing load based partial comp */
bool isLoadBasedCompDoable(hwc_context_t *ctx,
hwc_display_contents_1_t* list);
bool isLoadBasedCompDoable(hwc_context_t *ctx);
/* checks for conditions where only video can be bypassed */
bool tryVideoOnly(hwc_context_t *ctx, hwc_display_contents_1_t* list);
bool videoOnlyComp(hwc_context_t *ctx, hwc_display_contents_1_t* list,
@@ -246,8 +245,7 @@ protected:
struct LayerCache mCachedFrame;
//Enable 4kx2k yuv layer split
static bool sEnable4k2kYUVSplit;
bool allocSplitVGPipesfor4k2k(hwc_context_t *ctx,
hwc_display_contents_1_t* list, int index);
bool allocSplitVGPipesfor4k2k(hwc_context_t *ctx, int index);
};
class MDPCompNonSplit : public MDPComp {

View File

@@ -130,8 +130,9 @@ static void getDisplayAttributes(hwc_context_t* ctx, const Parcel* inParcel,
//XXX: Need to check what to return for HDMI
outParcel->writeInt32(ctx->mMDP.panel);
}
static void setHSIC(hwc_context_t* ctx, const Parcel* inParcel) {
static void setHSIC(const Parcel* inParcel) {
int dpy = inParcel->readInt32();
ALOGD_IF(0, "In %s: dpy = %d", __FUNCTION__, dpy);
HSICData_t hsic_data;
hsic_data.hue = inParcel->readInt32();
hsic_data.saturation = inParcel->readFloat();
@@ -191,7 +192,6 @@ status_t QClient::notifyCallback(uint32_t command, const Parcel* inParcel,
return vpuCommand(mHwcContext, command, inParcel, outParcel);
}
#endif
switch(command) {
case IQService::SECURING:
securing(mHwcContext, inParcel->readInt32());
@@ -219,7 +219,7 @@ status_t QClient::notifyCallback(uint32_t command, const Parcel* inParcel,
getDisplayAttributes(mHwcContext, inParcel, outParcel);
break;
case IQService::SET_HSIC_DATA:
setHSIC(mHwcContext, inParcel);
setHSIC(inParcel);
case IQService::PAUSE_WFD:
pauseWFD(mHwcContext, inParcel->readInt32());
break;

View File

@@ -494,7 +494,6 @@ void getAspectRatioPosition(hwc_context_t* ctx, int dpy, int extOrientation,
getAspectRatioPosition(width, height, width, height, r);
xPos = r.left;
yPos = r.top;
float tempWidth = r.right - r.left;
float tempHeight = r.bottom - r.top;
yRatio = yPos/height;
wRatio = outPos.w/width;
@@ -799,7 +798,7 @@ void setListStats(hwc_context_t *ctx,
ctx->dpyAttr[dpy].mActionSafePresent = isActionSafePresent(ctx, dpy);
trimList(ctx, list, dpy);
optimizeLayerRects(ctx, list, dpy);
optimizeLayerRects(list);
for (size_t i = 0; i < (size_t)ctx->listStats[dpy].numAppLayers; i++) {
hwc_layer_1_t const* layer = &list->hwLayers[i];
@@ -1009,8 +1008,6 @@ void calculate_crop_rects(hwc_rect_t& crop, hwc_rect_t& dst,
const int& sci_t = scissor.top;
const int& sci_r = scissor.right;
const int& sci_b = scissor.bottom;
int sci_w = abs(sci_r - sci_l);
int sci_h = abs(sci_b - sci_t);
double leftCutRatio = 0.0, rightCutRatio = 0.0, topCutRatio = 0.0,
bottomCutRatio = 0.0;
@@ -1117,14 +1114,12 @@ hwc_rect_t deductRect(const hwc_rect_t& rect1, const hwc_rect_t& rect2) {
return res;
}
void optimizeLayerRects(hwc_context_t *ctx,
const hwc_display_contents_1_t *list, const int& dpy) {
void optimizeLayerRects(const hwc_display_contents_1_t *list) {
int i=list->numHwLayers-2;
hwc_rect_t irect;
while(i > 0) {
//see if there is no blending required.
//If it is opaque see if we can substract this region from below layers.
//If it is opaque see if we can substract this region from below
//layers.
if(list->hwLayers[i].blending == HWC_BLENDING_NONE) {
int j= i-1;
hwc_rect_t& topframe =
@@ -1210,7 +1205,6 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
int retireFd = -1;
int fbFd = -1;
bool swapzero = false;
int mdpVersion = qdutils::MDPVersion::getInstance().getMDPVersion();
struct mdp_buf_sync data;
memset(&data, 0, sizeof(data));
@@ -1556,7 +1550,6 @@ int configureNonSplit(hwc_context_t *ctx, hwc_layer_1_t *layer,
int rotFlags = ovutils::ROT_FLAGS_NONE;
uint32_t format = ovutils::getMdpFormat(hnd->format, isTileRendered(hnd));
Whf whf(getWidth(hnd), getHeight(hnd), format, hnd->size);
LayerProp *layerProp = ctx->layerProp[dpy];
#ifdef VPU_TARGET
if(ctx->mVPUClient != NULL &&
@@ -1597,7 +1590,7 @@ int configureNonSplit(hwc_context_t *ctx, hwc_layer_1_t *layer,
*rot = ctx->mRotMgr->getNext();
if(*rot == NULL) return -1;
if(!dpy)
BwcPM::setBwc(ctx, crop, dst, transform, mdpFlags);
BwcPM::setBwc(crop, dst, transform, mdpFlags);
//Configure rotator for pre-rotation
if(configRotator(*rot, whf, crop, mdpFlags, orient, downscale) < 0) {
ALOGE("%s: configRotator failed!", __FUNCTION__);
@@ -1674,7 +1667,6 @@ int configureSplit(hwc_context_t *ctx, hwc_layer_1_t *layer,
int rotFlags = ROT_FLAGS_NONE;
uint32_t format = ovutils::getMdpFormat(hnd->format, isTileRendered(hnd));
Whf whf(getWidth(hnd), getHeight(hnd), format, hnd->size);
LayerProp *layerProp = ctx->layerProp[dpy];
#ifdef VPU_TARGET
if(ctx->mVPUClient != NULL &&
@@ -1815,8 +1807,6 @@ int configureSourceSplit(hwc_context_t *ctx, hwc_layer_1_t *layer,
MetaData_t *metadata = (MetaData_t *)hnd->base_metadata;
int hw_w = ctx->dpyAttr[dpy].xres;
int hw_h = ctx->dpyAttr[dpy].yres;
hwc_rect_t crop = integerizeSourceCrop(layer->sourceCropf);;
hwc_rect_t dst = layer->displayFrame;
int transform = layer->transform;
@@ -1838,7 +1828,7 @@ int configureSourceSplit(hwc_context_t *ctx, hwc_layer_1_t *layer,
(*rot) = ctx->mRotMgr->getNext();
if((*rot) == NULL) return -1;
if(!dpy)
BwcPM::setBwc(ctx, crop, dst, transform, mdpFlagsL);
BwcPM::setBwc(crop, dst, transform, mdpFlagsL);
//Configure rotator for pre-rotation
if(configRotator(*rot, whf, crop, mdpFlagsL, orient, downscale) < 0) {
ALOGE("%s: configRotator failed!", __FUNCTION__);
@@ -1998,7 +1988,7 @@ bool canUseMDPforVirtualDisplay(hwc_context_t* ctx,
return true;
}
void BwcPM::setBwc(hwc_context_t *ctx, const hwc_rect_t& crop,
void BwcPM::setBwc(const hwc_rect_t& crop,
const hwc_rect_t& dst, const int& transform,
ovutils::eMdpFlags& mdpFlags) {
//Target doesnt support Bwc

View File

@@ -136,7 +136,7 @@ struct VsyncState {
};
struct BwcPM {
static void setBwc(hwc_context_t *ctx, const hwc_rect_t& crop,
static void setBwc(const hwc_rect_t& crop,
const hwc_rect_t& dst, const int& transform,
ovutils::eMdpFlags& mdpFlags);
};
@@ -247,8 +247,7 @@ bool isValidRect(const hwc_rect_t& rect);
hwc_rect_t deductRect(const hwc_rect_t& rect1, const hwc_rect_t& rect2);
hwc_rect_t getIntersection(const hwc_rect_t& rect1, const hwc_rect_t& rect2);
hwc_rect_t getUnion(const hwc_rect_t& rect1, const hwc_rect_t& rect2);
void optimizeLayerRects(hwc_context_t *ctx,
const hwc_display_contents_1_t *list, const int& dpy);
void optimizeLayerRects(const hwc_display_contents_1_t *list);
bool areLayersIntersecting(const hwc_layer_1_t* layer1,
const hwc_layer_1_t* layer2);
@@ -395,7 +394,7 @@ static inline bool isSecureDisplayBuffer(const private_handle_t* hnd) {
static inline int getWidth(const private_handle_t* hnd) {
if(isYuvBuffer(hnd)) {
MetaData_t *metadata = (MetaData_t *)hnd->base_metadata;
MetaData_t *metadata = reinterpret_cast<MetaData_t*>(hnd->base_metadata);
if(metadata && metadata->operation & UPDATE_BUFFER_GEOMETRY) {
return metadata->bufferDim.sliceWidth;
}
@@ -405,7 +404,7 @@ static inline int getWidth(const private_handle_t* hnd) {
static inline int getHeight(const private_handle_t* hnd) {
if(isYuvBuffer(hnd)) {
MetaData_t *metadata = (MetaData_t *)hnd->base_metadata;
MetaData_t *metadata = reinterpret_cast<MetaData_t*>(hnd->base_metadata);
if(metadata && metadata->operation & UPDATE_BUFFER_GEOMETRY) {
return metadata->bufferDim.sliceHeight;
}

View File

@@ -62,7 +62,7 @@ void HWCVirtualVDS::init(hwc_context_t *ctx) {
ctx->mMDPComp[dpy]->reset();
}
void HWCVirtualVDS::destroy(hwc_context_t *ctx, size_t numDisplays,
void HWCVirtualVDS::destroy(hwc_context_t *ctx, size_t /*numDisplays*/,
hwc_display_contents_1_t** displays) {
int dpy = HWC_DISPLAY_VIRTUAL;

View File

@@ -75,11 +75,11 @@ public:
// instantiates mdpcomp, copybit and fbupdate objects and initialize those
// objects for virtual display during virtual display connect. This function
// is no-op for V4L2 design
virtual void init(hwc_context_t *ctx) {};
virtual void init(hwc_context_t *) {};
// Destroys mdpcomp, copybit and fbupdate objects and for virtual display
// during virtual display disconnect. This function is no-op for V4L2 design
virtual void destroy(hwc_context_t *ctx, size_t numDisplays,
hwc_display_contents_1_t** displays){};
virtual void destroy(hwc_context_t *, size_t ,
hwc_display_contents_1_t** ) {};
};
}; //namespace

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 The Android Open Source Project
* Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
* Copyright (C) 2012-2014, The Linux Foundation. All rights reserved.
*
* Not a Contribution, Apache license notifications and license are
* retained for attribution purposes only.
@@ -30,6 +30,8 @@
#include "string.h"
#include "external.h"
#include "overlay.h"
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
namespace qhwc {
@@ -133,7 +135,7 @@ static void *vsync_loop(void *param)
}
// send timestamp to SurfaceFlinger
ALOGD_IF (logvsync,
"%s: timestamp %llu sent to SF for dpy=%d",
"%s: timestamp %"PRIu64" sent to SF for dpy=%d",
__FUNCTION__, timestamp[dpy], dpy);
ctx->proc->vsync(ctx->proc, dpy, timestamp[dpy]);
}