Discuz! Board

标题: 换一个思路 [打印本页]

作者: zangcf    时间: 2016-4-4 23:28
标题: 换一个思路
定义,修改文件:/home/doraemon/temp_android/6572/808/alps/frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp::
    info->w = hwc.getWidth(type);
    info->h = hwc.getHeight(type);
//zcfdebug++<<
    info->w = hwc.getWidth(type);
    info->h = hwc.getHeight(type)/2;

ALOGE(" zcfdebug here (info->w=%d, info->h=%d)",
                int(info->w), int(info->h));
//zcfdebug>>++
    info->xdpi = xdpi;
    info->ydpi = ydpi;
    info->fps = float(1e9 / hwc.getRefreshPeriod(type));

    // All non-virtual displays are currently considered secure.
第二步骤,修改旋转:
/home/doraemon/temp_android/6572/808/alps/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
    @Override
    public int rotationForOrientationLw(int orientation, int lastRotation) {
        synchronized (mLock) {
            int sensorRotation = mOrientationListener.getProposedRotation(); // may be -1
            if (sensorRotation < 0) {
                sensorRotation = lastRotation;
                return Surface.ROTATION_90;    //zcfdebug++
            }
            if(true)return Surface.ROTATION_90;    //zcfdebug++




作者: zangcf    时间: 2016-4-4 23:29
此时,如果再对frameworkbuffer进行memcpy操作是不是就可以了?
作者: zangcf    时间: 2016-4-4 23:54
上面操作还是不行的,下面需要看看上层如何操作buffer




欢迎光临 Discuz! Board (http://47.89.242.157:9000/bbs/discuz/) Powered by Discuz! X3.2