hwc: Minor bug fixes.
Some minor bug fixes. Change-Id: Ie8c2f58b9c6db6e77739e4693da503f6f963827d
This commit is contained in:
committed by
Iliyan Malchev
parent
56f610dd23
commit
649cda6710
@@ -75,16 +75,23 @@ static void hwc_registerProcs(struct hwc_composer_device_1* dev,
|
||||
init_uevent_thread(ctx);
|
||||
}
|
||||
|
||||
//Helper
|
||||
static void reset() {
|
||||
//reset for this draw round
|
||||
VideoOverlay::reset();
|
||||
ExtOnly::reset();
|
||||
UIMirrorOverlay::reset();
|
||||
ExtOnly::reset();
|
||||
//TODO MDPComp
|
||||
}
|
||||
|
||||
static int hwc_prepare(hwc_composer_device_1 *dev, size_t numDisplays,
|
||||
hwc_display_contents_1_t** displays)
|
||||
{
|
||||
hwc_context_t* ctx = (hwc_context_t*)(dev);
|
||||
ctx->overlayInUse = false;
|
||||
|
||||
//reset for this draw round
|
||||
VideoOverlay::reset();
|
||||
ExtOnly::reset();
|
||||
UIMirrorOverlay::reset();
|
||||
reset();
|
||||
|
||||
//If securing of h/w in progress skip comp using overlay.
|
||||
if(ctx->mSecuring == true) return 0;
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#define DEBUG 0
|
||||
#ifndef HWC_OBSERVER_H
|
||||
#define HWC_OBSERVER_H
|
||||
#define UEVENT_DEBUG 0
|
||||
#include <hardware_legacy/uevent.h>
|
||||
#include <utils/Log.h>
|
||||
#include <sys/resource.h>
|
||||
@@ -43,7 +41,7 @@ static void handle_uevent(hwc_context_t* ctx, const char* udata, int len)
|
||||
int hdmiconnected = ctx->mExtDisplay->getExternalDisplay();
|
||||
|
||||
if(!strcasestr(str, "@/devices/virtual/graphics/fb")) {
|
||||
ALOGD_IF(DEBUG, "%s: Not Ext Disp Event ", __FUNCTION__);
|
||||
ALOGD_IF(UEVENT_DEBUG, "%s: Not Ext Disp Event ", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -113,4 +111,3 @@ void init_uevent_thread(hwc_context_t* ctx)
|
||||
}
|
||||
|
||||
}; //namespace
|
||||
#endif //HWC_OBSERVER_H
|
||||
|
||||
@@ -52,7 +52,7 @@ bool VideoOverlay::prepare(hwc_context_t *ctx, hwc_display_contents_1_t *list) {
|
||||
ccLayer = &list->hwLayers[sCCLayerIndex];
|
||||
|
||||
if(configure(ctx, yuvLayer, ccLayer)) {
|
||||
markFlags(&list->hwLayers[sYuvLayerIndex]);
|
||||
markFlags(yuvLayer, ccLayer);
|
||||
sIsModeOn = true;
|
||||
}
|
||||
}
|
||||
@@ -90,15 +90,23 @@ void VideoOverlay::chooseState(hwc_context_t *ctx) {
|
||||
ovutils::getStateString(sState));
|
||||
}
|
||||
|
||||
void VideoOverlay::markFlags(hwc_layer_1_t *layer) {
|
||||
void VideoOverlay::markFlags(hwc_layer_1_t *yuvLayer, hwc_layer_1_t *ccLayer) {
|
||||
switch(sState) {
|
||||
case ovutils::OV_2D_VIDEO_ON_PANEL:
|
||||
case ovutils::OV_2D_VIDEO_ON_PANEL_TV:
|
||||
layer->compositionType = HWC_OVERLAY;
|
||||
layer->hints |= HWC_HINT_CLEAR_FB;
|
||||
if(yuvLayer) {
|
||||
yuvLayer->compositionType = HWC_OVERLAY;
|
||||
yuvLayer->hints |= HWC_HINT_CLEAR_FB;
|
||||
}
|
||||
if(ccLayer) {
|
||||
ccLayer->compositionType = HWC_OVERLAY;
|
||||
}
|
||||
break;
|
||||
case ovutils::OV_2D_VIDEO_ON_TV:
|
||||
break; //dont update flags.
|
||||
if(ccLayer) {
|
||||
ccLayer->compositionType = HWC_OVERLAY;
|
||||
}
|
||||
break; //dont update video layer flags.
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ private:
|
||||
static bool configure(hwc_context_t *ctx, hwc_layer_1_t *yuvlayer,
|
||||
hwc_layer_1_t *ccLayer);
|
||||
//Marks layer flags if this feature is used
|
||||
static void markFlags(hwc_layer_1_t *layer);
|
||||
static void markFlags(hwc_layer_1_t *yuvLayer, hwc_layer_1_t *ccLayer);
|
||||
//returns yuv count
|
||||
static int getYuvCount();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user