overlay: Remove obsolete code from pipe config path
Remove obsolete / unused code from pipe config path like pipe crop
modification for rotator downscale, 3D, pipestate.
Change-Id: I34ec80dce8736f65069794f21fbd56922304cb8b
diff --git a/liboverlay/pipes/overlayGenPipe.cpp b/liboverlay/pipes/overlayGenPipe.cpp
index 41cb271..aebaebf 100644
--- a/liboverlay/pipes/overlayGenPipe.cpp
+++ b/liboverlay/pipes/overlayGenPipe.cpp
@@ -32,18 +32,16 @@
namespace overlay {
-GenericPipe::GenericPipe(const int& dpy) : mDpy(dpy), mRotDownscaleOpt(false),
- pipeState(CLOSED), mCtrl(new Ctrl(dpy)), mData(new Data(dpy)) {
+GenericPipe::GenericPipe(const int& dpy) : mDpy(dpy),
+ mCtrl(new Ctrl(dpy)), mData(new Data(dpy)) {
}
GenericPipe::~GenericPipe() {
delete mCtrl;
delete mData;
- setClosed();
}
void GenericPipe::setSource(const utils::PipeArgs& args) {
- mRotDownscaleOpt = args.rotFlags & utils::ROT_DOWNSCALE_ENABLED;
mCtrl->setSource(args);
}
@@ -73,26 +71,10 @@
}
bool GenericPipe::commit() {
- bool ret = false;
- int downscale_factor = utils::ROT_DS_NONE;
-
- if(mRotDownscaleOpt) {
- ovutils::Dim src(mCtrl->getCrop());
- ovutils::Dim dst(mCtrl->getPosition());
- downscale_factor = ovutils::getDownscaleFactor(
- src.w, src.h, dst.w, dst.h);
- }
-
- mCtrl->setDownscale(downscale_factor);
- ret = mCtrl->commit();
-
- pipeState = ret ? OPEN : CLOSED;
- return ret;
+ return mCtrl->commit();
}
bool GenericPipe::queueBuffer(int fd, uint32_t offset) {
- //TODO Move pipe-id transfer to CtrlData class. Make ctrl and data private.
- OVASSERT(isOpen(), "State is closed, cannot queueBuffer");
int pipeId = mCtrl->getPipeId();
OVASSERT(-1 != pipeId, "Ctrl ID should not be -1");
// set pipe id from ctrl to data
@@ -101,10 +83,6 @@
return mData->queueBuffer(fd, offset);
}
-int GenericPipe::getCtrlFd() const {
- return mCtrl->getFd();
-}
-
utils::Dim GenericPipe::getCrop() const
{
return mCtrl->getCrop();
@@ -117,7 +95,6 @@
void GenericPipe::dump() const
{
ALOGE("== Dump Generic pipe start ==");
- ALOGE("pipe state = %d", (int)pipeState);
mCtrl->dump();
mData->dump();
ALOGE("== Dump Generic pipe end ==");
@@ -128,19 +105,6 @@
mData->getDump(buf, len);
}
-bool GenericPipe::isClosed() const {
- return (pipeState == CLOSED);
-}
-
-bool GenericPipe::isOpen() const {
- return (pipeState == OPEN);
-}
-
-bool GenericPipe::setClosed() {
- pipeState = CLOSED;
- return true;
-}
-
int GenericPipe::getPipeId() {
return mCtrl->getPipeId();
}