这篇教程C++ ALOGD_IF函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ALOGD_IF函数的典型用法代码示例。如果您正苦于以下问题:C++ ALOGD_IF函数的具体用法?C++ ALOGD_IF怎么用?C++ ALOGD_IF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ALOGD_IF函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ALOGD_IFint 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,
示例2: initResolutionvoid 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,
示例3: ALOGD_IFbool 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,
示例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,
示例5: ALOGD_IFvoid ExtDisplayObserver::setHwcContext(hwc_context_t* hwcCtx) { ALOGD_IF(EXT_OBSERVER_DEBUG, "%s", __FUNCTION__); if(hwcCtx) { mHwcContext = hwcCtx; } return;}
开发者ID:threader,项目名称:hardware_qcom_display,代码行数:7,
示例6: _lvoid 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,
示例7: getInstancebool 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,
示例8: ALOGD_IFstatus_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,
示例9: ALOGE_IFbool 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,
示例10: sprintfbool 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,
示例11: openbool 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,
示例12: ALOGD_IFvoid 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,
示例13: getOutputConnectionbool 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,
示例14: ALOGD_IF// Connection and Mode settingbool 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,
示例15: mWbFdAssertiveDisplay::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,
示例16: _lbool 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,
示例17: teardownWfdstatic 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,
示例18: ALOGD_IFbool 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,
示例19: handle_ueventstatic 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 C++ ALOGE_IF函数代码示例 C++ ALOGD函数代码示例
|