• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ALOGD_IF函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ALOGD_IF函数的典型用法代码示例。如果您正苦于以下问题:C++ ALOGD_IF函数的具体用法?C++ ALOGD_IF怎么用?C++ ALOGD_IF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ALOGD_IF函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ALOGD_IF

int ExynosHWCService::setForceMirrorMode(unsigned int mode)
{
    ALOGD_IF(HWC_SERVICE_DEBUG, "%s::mode=%d", __func__, mode);
    mHWCCtx->force_mirror_mode = mode;
    mHWCCtx->procs->invalidate(mHWCCtx->procs);
    return NO_ERROR;
}
开发者ID:childofthehorn,项目名称:android_hardware_samsung_slsi_exynos5-insignal,代码行数:7,代码来源:ExynosHWCService.cpp


示例2: initResolution

void VirtualDisplay::setAttributes() {
    if(mHwcContext) {
        uint32_t &extW = mHwcContext->dpyAttr[HWC_DISPLAY_VIRTUAL].xres;
        uint32_t &extH = mHwcContext->dpyAttr[HWC_DISPLAY_VIRTUAL].yres;
        uint32_t priW = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].xres;
        uint32_t priH = mHwcContext->dpyAttr[HWC_DISPLAY_PRIMARY].yres;

        initResolution(extW, extH);

        // Dynamic Resolution Change depends on MDP downscaling.
        // MDP downscale property will be ignored to exercise DRC use case.
        // If DRC is in progress, ext WxH will have non-zero values.
        bool isDRC = (extW > 0) && (extH > 0);

        if(!qdutils::MDPVersion::getInstance().is8x26()
                && (mHwcContext->mMDPDownscaleEnabled || isDRC)) {

            // maxArea represents the maximum resolution between
            // primary and virtual display.
            uint32_t maxArea = max((extW * extH), (priW * priH));

            setToPrimary(maxArea, priW, priH, extW, extH);

            setDownScaleMode(maxArea);
        }
        mHwcContext->dpyAttr[HWC_DISPLAY_VIRTUAL].vsync_period =
                1000000000l /60;
        ALOGD_IF(DEBUG,"%s: Setting Virtual Attr: res(%d x %d)",__FUNCTION__,
                 mVInfo.xres, mVInfo.yres);
    }
}
开发者ID:AdrianoMartins,项目名称:platform_hardware_qcom_display,代码行数:31,代码来源:virtual.cpp


示例3: ALOGD_IF

bool IntelHWComposer::handleDynamicModeSetting(void *data)
{
    bool ret = false;

    ALOGD_IF(ALLOW_HWC_PRINT, "%s: handle Dynamic mode setting!\n", __func__);
    // check HDMI timing
    if (!mDrm->isDrmModeChanged((intel_display_mode_t*)data)){
        ALOGD("Same HDMI timing, ignore this setting");
        return true;
    }
    // send plug-out to SF for mode changing on the same device
    // otherwise SF will bypass the plug-in message as there is
    // no connection change;
    ret = handleHotplugEvent(0, NULL);
    if (!ret) {
        ALOGW("%s: send fake unplug event failed!\n", __func__);
        goto out;
    }

    // then change the mode and send plug-in to SF
    ret = handleHotplugEvent(1, data);
    if (!ret) {
        ALOGW("%s: send plug in event failed!\n", __func__);
        goto out;
    }
out:
    return ret;
}
开发者ID:yutokt,项目名称:android_vendor_intel,代码行数:28,代码来源:IntelHWComposer.cpp


示例4: if

/* Do this only on brightness ADC. */
void LightSensor::configureRange(uint16_t adc_count)
{
    if (!settings.allow_reconfig)
        return;

    bool increase;

    if (adc_count <= RANGE_DEC_THRESHOLD)
        increase = false;
    else if (adc_count >= RANGE_INC_THRESHOLD)
        increase = true;
    else
        return;

    if (increase && settings.range != APS_12D_RANGE_15P36_TO_64000)
        settings.range = static_cast<aps_12d_range>(settings.range + 1);
    else if (!increase && settings.range != APS_12D_RANGE_0P24_TO_1000)
        settings.range = static_cast<aps_12d_range>(settings.range - 1);
    else
        return;

    ALOGD_IF(LIGHT_DEBUG, "LightSensor: New range %d", settings.range);

    if (ioctl(dev_fd, APS_IOCTL_SET_SETTINGS, &settings))
        ALOGE("LightSensor: Failed to set settings");
}
开发者ID:darkankka,项目名称:device_huawei_u8800,代码行数:27,代码来源:LightSensor.cpp


示例5: ALOGD_IF

void ExtDisplayObserver::setHwcContext(hwc_context_t* hwcCtx) {
    ALOGD_IF(EXT_OBSERVER_DEBUG, "%s", __FUNCTION__);
    if(hwcCtx) {
        mHwcContext = hwcCtx;
    }
    return;
}
开发者ID:threader,项目名称:hardware_qcom_display,代码行数:7,代码来源:hwc_ext_observer.cpp


示例6: _l

void SensorDevice::enableAllSensors() {
    Mutex::Autolock _l(mLock);
    mDisabledClients.clear();
    const int halVersion = getHalDeviceVersion();
    for (size_t i = 0; i< mActivationCount.size(); ++i) {
        Info& info = mActivationCount.editValueAt(i);
        if (info.batchParams.isEmpty()) continue;
        info.selectBatchParams();
        const int sensor_handle = mActivationCount.keyAt(i);
        ALOGD_IF(DEBUG_CONNECTIONS, "\t>> reenable actuating h/w sensor enable handle=%d ",
                   sensor_handle);
        status_t err(NO_ERROR);
        if (halVersion > SENSORS_DEVICE_API_VERSION_1_0) {
            err = mSensorDevice->batch(mSensorDevice, sensor_handle,
                 info.bestBatchParams.flags, info.bestBatchParams.batchDelay,
                 info.bestBatchParams.batchTimeout);
            ALOGE_IF(err, "Error calling batch on sensor %d (%s)", sensor_handle, strerror(-err));
        }

        if (err == NO_ERROR) {
            err = mSensorDevice->activate(
                    reinterpret_cast<struct sensors_poll_device_t *>(mSensorDevice),
                    sensor_handle, 1);
            ALOGE_IF(err, "Error activating sensor %d (%s)", sensor_handle, strerror(-err));
        }

        if (halVersion <= SENSORS_DEVICE_API_VERSION_1_0) {
             err = mSensorDevice->setDelay(
                    reinterpret_cast<struct sensors_poll_device_t *>(mSensorDevice),
                    sensor_handle, info.bestBatchParams.batchDelay);
             ALOGE_IF(err, "Error calling setDelay sensor %d (%s)", sensor_handle, strerror(-err));
        }
    }
}
开发者ID:BlissRoms-AOSP,项目名称:platform_frameworks_native,代码行数:34,代码来源:SensorDevice.cpp


示例7: getInstance

bool CopyBit::canUseCopybitForRGB(hwc_context_t *ctx,
                                        hwc_display_contents_1_t *list,
                                        int dpy) {
    int compositionType = qdutils::QCCompositionType::
                                    getInstance().getCompositionType();

    if (compositionType & qdutils::COMPOSITION_TYPE_DYN) {
        // DYN Composition:
        // use copybit, if (TotalRGBRenderArea < threashold * FB Area)
        // this is done based on perf inputs in ICS
        // TODO: Above condition needs to be re-evaluated in JB
        int fbWidth =  ctx->dpyAttr[dpy].xres;
        int fbHeight =  ctx->dpyAttr[dpy].yres;
        unsigned int fbArea = (fbWidth * fbHeight);
        unsigned int renderArea = getRGBRenderingArea(list);
            ALOGD_IF (DEBUG_COPYBIT, "%s:renderArea %u, fbArea %u",
                                  __FUNCTION__, renderArea, fbArea);
        if (renderArea < (mDynThreshold * fbArea))
            return true;
    } else if ((compositionType & qdutils::COMPOSITION_TYPE_MDP)) {
        // MDP composition, use COPYBIT always
        return true;
    } else if ((compositionType & qdutils::COMPOSITION_TYPE_C2D)) {
        // C2D composition, use COPYBIT
        return true;
    }
    return false;
}
开发者ID:OpenSEMC,项目名称:android_hardware_qcom_display,代码行数:28,代码来源:hwc_copybit.cpp


示例8: ALOGD_IF

status_t SensorDevice::flush(void* ident, int handle) {
    if (getHalDeviceVersion() < SENSORS_DEVICE_API_VERSION_1_1) {
        return INVALID_OPERATION;
    }
    ALOGD_IF(DEBUG_CONNECTIONS, "\t>>> actuating h/w flush %d", handle);
    return mSensorDevice->flush(mSensorDevice, handle);
}
开发者ID:Mi-PAD-DEVS,项目名称:mocha_patches,代码行数:7,代码来源:SensorDevice.cpp


示例9: ALOGE_IF

bool GenericPipe::init()
{
    ALOGE_IF(DEBUG_OVERLAY, "GenericPipe init");
    mRotDownscaleOpt = false;

    int fbNum = Overlay::getFbForDpy(mDpy);
    if( fbNum < 0 ) {
        ALOGE("%s: Invalid FB for the display: %d",__FUNCTION__, mDpy);
        return false;
    }

    ALOGD_IF(DEBUG_OVERLAY,"%s: mFbNum:%d",__FUNCTION__, fbNum);


    if(!mCtrlData.ctrl.init(fbNum)) {
        ALOGE("GenericPipe failed to init ctrl");
        return false;
    }

    if(!mCtrlData.data.init(fbNum)) {
        ALOGE("GenericPipe failed to init data");
        return false;
    }

    return true;
}
开发者ID:ProtoDroidDevs,项目名称:android_hardware_qcom_display-caf,代码行数:26,代码来源:overlayGenPipe.cpp


示例10: sprintf

bool ExternalDisplay::writeHPDOption(int userOption) const
{
    bool ret = true;
    char sysFsHPDFilePath[255];
    sprintf(sysFsHPDFilePath ,"/sys/devices/virtual/graphics/fb%d/hpd",
                                mHdmiFbNum);
    int hdmiHPDFile = open(sysFsHPDFilePath,O_RDWR, 0);
    if (hdmiHPDFile < 0) {
        ALOGE("%s: state file '%s' not found : ret%d err str: %s", __FUNCTION__,
                                sysFsHPDFilePath, hdmiHPDFile, strerror(errno));
        ret = false;
    } else {
        int err = -1;
        ALOGD_IF(DEBUG, "%s: option = %d", __FUNCTION__, userOption);
        if(userOption)
            err = write(hdmiHPDFile, "1", 2);
        else
            err = write(hdmiHPDFile, "0" , 2);
        if (err <= 0) {
            ALOGE("%s: file write failed '%s'", __FUNCTION__, sysFsHPDFilePath);
            ret = false;
        }
        close(hdmiHPDFile);
    }
    return ret;
}
开发者ID:DarthInferno,项目名称:device_sony_nozomi,代码行数:26,代码来源:external.cpp


示例11: open

bool ExternalDisplay::writeHPDOption(int userOption) const
{
    bool ret = true;
    int hdmiHPDFile = open(SYSFS_HPD,O_RDWR, 0);
    if (hdmiHPDFile < 0) {
        ALOGE("%s: state file '%s' not found : ret%d"
                           "err str: %s",  __FUNCTION__, SYSFS_HPD, hdmiHPDFile,
                           strerror(errno));
        ret = false;
    } else {
        int err = -1;
        ALOGD_IF(DEBUG, "%s: option = %d", __FUNCTION__,
                 userOption);
        if(userOption)
            err = write(hdmiHPDFile, "1", 2);
        else
            err = write(hdmiHPDFile, "0" , 2);
        if (err <= 0) {
            ALOGE("%s: file write failed '%s'",
                     __FUNCTION__, SYSFS_HPD);
            ret = false;
        }
        close(hdmiHPDFile);
    }
    return ret;
}
开发者ID:sattarvoybek,项目名称:android_hardware_qcom_display-legacy-caf,代码行数:26,代码来源:hwc_external.cpp


示例12: ALOGD_IF

void ExternalDisplay::setExternalDisplay(int connected)
{

    hwc_context_t* ctx = mHwcContext;
    if(ctx) {
        ALOGD_IF(DEBUG, "%s: status = %d", __FUNCTION__,
                 connected);
        if(connected) {
            readResolution();
            //Get the best mode and set
            // TODO: Move this to activate
            setResolution(getBestMode());
            setDpyAttr();
            //enable hdmi vsync
        } else {
            // Disable the hdmi vsync
            closeFrameBuffer();
            resetInfo();
        }
        // Store the external display
        mExternalDisplay = connected;
        const char* prop = (connected) ? "1" : "0";
        // set system property
        property_set("hw.hdmiON", prop);
    }
    return;
}
开发者ID:AndroidStudio,项目名称:android-4.2_r1,代码行数:27,代码来源:external.cpp


示例13: getOutputConnection

bool IntelHWComposerDrm::detectMDSModeChange()
{

#ifdef TARGET_HAS_MULTIPLE_DISPLAY

    drmModeConnection hdmi = getOutputConnection(OUTPUT_HDMI);
    int mdsMode = 0;
    if (mMonitor != 0) {
        mdsMode = mMonitor->getDisplayMode();
        ALOGD_IF(ALLOW_MONITOR_PRINT, "%s: get MDS Mode %d", __func__, mdsMode);
        //TODO: overlay only support OVERLAY_EXTEND and OVERLAY_MIPI0
        if (mdsMode == OVERLAY_EXTEND && hdmi == DRM_MODE_CONNECTED)
            setDisplayMode(OVERLAY_EXTEND);
        else if (mdsMode == OVERLAY_CLONE_MIPI0)
            setDisplayMode(OVERLAY_CLONE_MIPI0);
        else
            setDisplayMode(OVERLAY_MIPI0);
    } else
#endif
    {
        setDisplayMode(OVERLAY_MIPI0);
    }

    return true;
}
开发者ID:yutokt,项目名称:android_vendor_intel,代码行数:25,代码来源:IntelHWComposerDrm.cpp


示例14: ALOGD_IF

// Connection and Mode setting
bool IntelHWComposerDrm::detectDisplayConnection(int disp)
{
    ALOGD_IF(ALLOW_MONITOR_PRINT,
              "%s: detecting display %d drm mode info...\n", __func__, disp);

    //get mipi0 info
    drmModeConnectorPtr connector = NULL;
    drmModeModeInfoPtr mode = NULL;
    uint32_t connector_type;

    connector = getConnector(disp);
    if (!connector) {
        ALOGW("%s: fail to get drm connector\n", __func__);
        return false;
    }

    //update connection status
    setOutputConnection(disp, connector->connection);

    if (connector->connection != DRM_MODE_CONNECTED) {
        freeConnector(connector);
        return false;
    }

    //update mode info
    mode = getSelectMode(NULL, connector);
    if (mode)
        setOutputMode(disp, mode, 1);

    freeConnector(connector);

    return true;
}
开发者ID:yutokt,项目名称:android_vendor_intel,代码行数:34,代码来源:IntelHWComposerDrm.cpp


示例15: mWbFd

AssertiveDisplay::AssertiveDisplay(hwc_context_t *ctx) : mWbFd(-1),
        mDoable(false), mFeatureEnabled(false),
        mDest(overlay::utils::OV_INVALID) {
    int fd = openWbFb();
    if(fd >= 0) {
        //Values in ad node:
        //-1 means feature is disabled on device
        // 0 means feature exists but turned off, will be turned on by hwc
        // 1 means feature is turned on by hwc
        // Plus, we do this feature only on split primary displays.
        // Plus, we do this feature only if ro.qcom.ad=2

        char property[PROPERTY_VALUE_MAX];
        const int ENABLED = 2;
        int val = 0;

        if(property_get("ro.qcom.ad", property, "0") > 0) {
            val = atoi(property);
        }

        if(adRead() >= 0 && isDisplaySplit(ctx, HWC_DISPLAY_PRIMARY) &&
                val == ENABLED) {
            ALOGD_IF(DEBUG, "Assertive display feature supported");
            mFeatureEnabled = true;
        }
        closeWbFb(fd);
    }
}
开发者ID:Sharlion,项目名称:android_hardware_qcom_display_s2005,代码行数:28,代码来源:hwc_ad.cpp


示例16: _l

bool egl_display_t::HibernationMachine::incWakeCount(WakeRefStrength strength) {
    Mutex::Autolock _l(mLock);
    ALOGE_IF(mWakeCount < 0 || mWakeCount == INT32_MAX,
             "Invalid WakeCount (%d) on enter\n", mWakeCount);

    mWakeCount++;
    if (strength == STRONG)
        mAttemptHibernation = false;

    if (CC_UNLIKELY(mHibernating)) {
        ALOGV("Awakening\n");
        egl_connection_t* const cnx = &gEGLImpl;

        // These conditions should be guaranteed before entering hibernation;
        // we don't want to get into a state where we can't wake up.
        ALOGD_IF(!mDpyValid || !cnx->egl.eglAwakenProcessIMG,
                 "Invalid hibernation state, unable to awaken\n");

        if (!cnx->egl.eglAwakenProcessIMG()) {
            ALOGE("Failed to awaken EGL implementation\n");
            return false;
        }
        mHibernating = false;
    }
    return true;
}
开发者ID:shevchenator,项目名称:wand_frameworks,代码行数:26,代码来源:egl_display.cpp


示例17: teardownWfd

static void teardownWfd(hwc_context_t* ctx) {
    // Teardown WFD display
    ALOGD_IF(UEVENT_DEBUG,"Received HDMI connection request when WFD is "
            "active");
    {
        Locker::Autolock _l(ctx->mDrawLock);
        clear(ctx, HWC_DISPLAY_VIRTUAL);
        ctx->dpyAttr[HWC_DISPLAY_VIRTUAL].connected = false;
        ctx->dpyAttr[HWC_DISPLAY_VIRTUAL].isActive = false;
    }

    ctx->mVirtualDisplay->teardown();

    /* Need to send hotplug only when connected WFD in proprietary path */
    if(ctx->mVirtualonExtActive) {
        ALOGE_IF(UEVENT_DEBUG,"%s: Sending EXTERNAL OFFLINE"
                "hotplug event for wfd display", __FUNCTION__);
        ctx->proc->hotplug(ctx->proc, HWC_DISPLAY_EXTERNAL,
                EXTERNAL_OFFLINE);
        {
            Locker::Autolock _l(ctx->mDrawLock);
            ctx->mVirtualonExtActive = false;
        }
    }
    /* Wait for few frames for SF to tear down the WFD session. */
    usleep(ctx->dpyAttr[HWC_DISPLAY_PRIMARY].vsync_period
            * 2 / 1000);
}
开发者ID:AdrianoMartins,项目名称:platform_hardware_qcom_display,代码行数:28,代码来源:hwc_uevents.cpp


示例18: ALOGD_IF

bool IdleInvalidator::setIdleTimeout(const uint32_t& timeout) {
    ALOGD_IF(II_DEBUG, "IdleInvalidator::%s timeout %d",
            __FUNCTION__, timeout);

    // Open a sysfs node to send the timeout value to driver.
    int fd = open(IDLE_TIME_PATH, O_WRONLY);

    if (fd < 0) {
        ALOGE ("%s:Unable to open %s node %s",
                __FUNCTION__, IDLE_TIME_PATH, strerror(errno));
        return false;
    }

    char strSleepTime[64];
    snprintf(strSleepTime, sizeof(strSleepTime), "%d", timeout);

    // Notify driver about the timeout value
    ssize_t len = pwrite(fd, strSleepTime, strlen(strSleepTime), 0);
    if(len < -1) {
        ALOGE ("%s:Unable to write into %s node %s",
                __FUNCTION__, IDLE_TIME_PATH, strerror(errno));
        close(fd);
        return false;
    }

    close(fd);
    return true;
}
开发者ID:Dm47021,项目名称:android_hardware_qcom,代码行数:28,代码来源:idle_invalidator.cpp


示例19: handle_uevent

static void handle_uevent(hwc_context_t* ctx, const char* udata, int len)
{
    int vsync = 0;
    int64_t timestamp = 0;
    const char *str = udata;

    if(!strcasestr(str, "@/devices/virtual/graphics/fb")) {
        ALOGD_IF(DEBUG, "%s: Not Ext Disp Event ", __FUNCTION__);
        return;
    }

    // parse HDMI events
    // The event will be of the form:
    // [email protected]/devices/virtual/graphics/fb1 ACTION=change
    // DEVPATH=/devices/virtual/graphics/fb1
    // SUBSYSTEM=graphics HDCP_STATE=FAIL MAJOR=29
    // for now just parsing onlin/offline info is enough
    str = udata;
    if(!(strncmp(str,"[email protected]",strlen("[email protected]")))) {
        strncpy(ctx->mHDMIEvent,str,strlen(str));
        ctx->hdmi_pending = true;
        //Invalidate
        hwc_procs* proc = (hwc_procs*)ctx->device.reserved_proc[0];
        if(!proc) {
            ALOGE("%s: HWC proc not registered", __FUNCTION__);
        } else {
            proc->invalidate(proc);
        }
    } else if(!(strncmp(str,"[email protected]",strlen("[email protected]")))) {
        ctx->hdmi_pending = false;
        ctx->mExtDisplay->processUEventOffline(str);
    }
}
开发者ID:sattarvoybek,项目名称:android_hardware_qcom_display-legacy-caf,代码行数:33,代码来源:hwc_uevents.cpp


示例20: IntelDisplayPlane

IntelSpritePlane::IntelSpritePlane(int fd, int index, IntelBufferManager *bm)
    : IntelDisplayPlane(fd, IntelDisplayPlane::DISPLAY_PLANE_SPRITE, index, bm)
{
    bool ret;
    ALOGD_IF(ALLOW_SPRITE_PRINT, "%s\n", __func__);

    // create data buffer
    IntelDisplayBuffer *dataBuffer = new IntelDisplayDataBuffer(0, 0, 0);
    if (!dataBuffer) {
        ALOGE("%s: Failed to create sprite data buffer\n", __func__);
        return;
    }

    // create sprite context
    IntelSpriteContext *spriteContext = new IntelSpriteContext();
    if (!spriteContext) {
        ALOGE("%s: Failed to create sprite context\n", __func__);
        goto sprite_create_err;
    }

    // initialized successfully
    mDataBuffer = dataBuffer;
    mContext = spriteContext;
    mInitialized = true;
    return;
sprite_create_err:
    delete dataBuffer;
}
开发者ID:yutokt,项目名称:android_vendor_intel,代码行数:28,代码来源:IntelSpritePlane.cpp



注:本文中的ALOGD_IF函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ALOGE_IF函数代码示例发布时间:2022-05-30
下一篇:
C++ ALOGD函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap