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

Commit 68eccdad authored by Riley Andrews's avatar Riley Andrews
Browse files

Add cursor flags into SpriteController to suppor async cursor updates.

- This is fairly blindly taken from nvidia's implementation.

Change-Id: I825ecbd9cb4b394793dce079591b37efca546bbe
parent 03cab4cb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -156,6 +156,11 @@ public class SurfaceControl {

    // 0x1000 is reserved for an independent DRM protected flag in framework

    /**
     * Surface creation flag: Window represents a cursor glyph.
     */
    public static final int CURSOR_WINDOW = 0x00002000;

    /**
     * Surface creation flag: Creates a normal surface.
     * This is the default.
+2 −1
Original line number Diff line number Diff line
@@ -370,7 +370,8 @@ sp<SurfaceControl> SpriteController::obtainSurface(int32_t width, int32_t height

    sp<SurfaceControl> surfaceControl = mSurfaceComposerClient->createSurface(
            String8("Sprite"), width, height, PIXEL_FORMAT_RGBA_8888,
            ISurfaceComposerClient::eHidden);
            ISurfaceComposerClient::eHidden |
            ISurfaceComposerClient::eCursorWindow);
    if (surfaceControl == NULL || !surfaceControl->isValid()) {
        ALOGE("Error creating sprite surface.");
        return NULL;