Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0190067f authored by Christopher Lais's avatar Christopher Lais Committed by Steve Kondik
Browse files

surfaceflinger: more NO_RGBX_8888 hacks

Nasty hack to make RenderScript RGBX_8888 surfaces work on devices
without RGBX_8888.

Change-Id: I92b12ea6dd0ad3c7969f3d6d027bf423e88681d3
parent a4e7aefd
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -305,7 +305,7 @@ sp<SurfaceControl> SurfaceComposerClient::createSurface(
        sp<ISurface> surface = mClient->createSurface(&data, pid, name,
        sp<ISurface> surface = mClient->createSurface(&data, pid, name,
                display, w, h, format, flags);
                display, w, h, format, flags);
        if (surface != 0) {
        if (surface != 0) {
            result = new SurfaceControl(this, surface, data, w, h, format, flags);
            result = new SurfaceControl(this, surface, data, w, h, data.format, flags);
        }
        }
    }
    }
    return result;
    return result;
+6 −0
Original line number Original line Diff line number Diff line
@@ -1185,6 +1185,12 @@ sp<ISurface> SurfaceFlinger::createSurface(const sp<Client>& client, int pid,
            params->width = w;
            params->width = w;
            params->height = h;
            params->height = h;
            params->format = format;
            params->format = format;

#ifdef NO_RGBX_8888
            if (params->format == PIXEL_FORMAT_RGBX_8888)
                params->format = PIXEL_FORMAT_RGBA_8888;
#endif

            if (normalLayer != 0) {
            if (normalLayer != 0) {
                Mutex::Autolock _l(mStateLock);
                Mutex::Autolock _l(mStateLock);
                mLayerMap.add(surfaceHandle->asBinder(), normalLayer);
                mLayerMap.add(surfaceHandle->asBinder(), normalLayer);