Ejemplo n.º 1
0
bool DisplayDevice::prepare(hwc_display_contents_1_t *display)
{

    log.v("DisplayDevice::prepare");

    if (!initCheck())
        return false;

    Mutex::Autolock _l(mLock);

    if (mConnection != DEVICE_CONNECTED)
        return true;

    if (!display)
        return true;

    // check if geometry is changed
    if (display->flags & HWC_GEOMETRY_CHANGED)
        onGeometryChanged(display);

    if (!mLayerList) {
        log.e("prepare: null HWC layer list");
        return false;
    }

    // update list with new list
    return mLayerList->update(display);
}
Ejemplo n.º 2
0
LRESULT BSPanel::handlePositionChanges(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    switch (uMsg)
    {
    case WM_WINDOWPOSCHANGED:
        onGeometryChanged(*(WINDOWPOS *)lParam);
        break;
    }
    return 0;
}
Ejemplo n.º 3
0
CDiagramProxyWidget::CDiagramProxyWidget(CDiagram *d)
	: CDiagramNode(d),
	  m_widget(NULL),
	  m_proxy(NULL)
{
	m_proxy = new QGraphicsProxyWidget(this);
	m_proxy->setParentItem(this);
	m_proxy->setVisible(true);
	
	connect(this, SIGNAL(geometryChanged()), this, SLOT(onGeometryChanged()));
}
bool IntelHDMIDisplayDevice::prepare(hwc_display_contents_1_t *list)
{
    ALOGD_IF(ALLOW_HWC_PRINT, "%s", __func__);

    if (!initCheck()) {
        ALOGE("%s: failed to initialize HWComposer\n", __func__);
        return false;
    }

    if (mIsBlank) {
        //ALOGW("%s: HWC is blank, bypass", __func__);
        return false;
    }

    int index = checkTrickMode(list, false);
    bool findHint = (index >= 0);
    bool forceCheckingList = (findHint != mVideoSeekingActive);
    mVideoSeekingActive = findHint;

    if (!list || (list->flags & HWC_GEOMETRY_CHANGED) || forceCheckingList) {
        onGeometryChanged(list);

        if (findHint) {
            hwc_layer_1_t *layer = &list->hwLayers[index];
            if (layer != NULL)
                layer->compositionType = HWC_FRAMEBUFFER;
        }
    }

    // handle hotplug event here
    if (mHotplugEvent) {
        ALOGD_IF(ALLOW_HWC_PRINT, "%s: reset hotplug event flag\n", __func__);
        mHotplugEvent = false;
    }

    // handle buffer changing. setup data buffer.
    if (list && !updateLayersData(list)) {
        ALOGD_IF(ALLOW_HWC_PRINT, "prepare: revisiting layer list\n");
        revisitLayerList(list, false);
    }
    if (mForceSwapBuffer && !mGraphicPlaneVisible) {
        ALOGD_IF(ALLOW_HWC_PRINT, "Ebable HDMI gfx plane due to forcing swap buffer");
        enableHDMIGraphicPlane(true);
    }
    return true;
}