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

Commit bcd3b56a authored by Louis Huemiller's avatar Louis Huemiller Committed by Android (Google) Code Review
Browse files

Merge "Hardware Composer Test hwcCommit set blend type" into honeycomb

parents f6e4c0b5 67669367
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -1284,21 +1284,24 @@ uint32_t numOverlapping(uint32_t backgroundFormat, uint32_t foregroundFormat,
                        uint32_t backgroundBlend, uint32_t foregroundBlend)
                        uint32_t backgroundBlend, uint32_t foregroundBlend)
{
{
    list<Rectangle> rectList;
    list<Rectangle> rectList;

    Rectangle background(backgroundFormat, startDim, startDim);
    Rectangle background(backgroundFormat, startDim, startDim);
    Rectangle foreground(foregroundFormat, startDim, startDim);
    background.blend = backgroundBlend;
    rectList.push_back(background);


    // TODO: Handle cases where startDim is so small that adding 5
    // TODO: Handle cases where startDim is so small that adding 5
    //       causes frames not to overlap.
    //       causes frames not to overlap.
    // TODO: Handle cases where startDim is so large that adding 5
    // TODO: Handle cases where startDim is so large that adding 5
    //       cause a portion or all of the foreground displayFrame
    //       cause a portion or all of the foreground displayFrame
    //       to be off the display.
    //       to be off the display.
    Rectangle foreground(foregroundFormat, startDim, startDim);
    foreground.displayFrame.left += 5;
    foreground.displayFrame.left += 5;
    foreground.displayFrame.top += 5;
    foreground.displayFrame.top += 5;
    foreground.displayFrame.right += 5;
    foreground.displayFrame.right += 5;
    foreground.displayFrame.bottom += 5;
    foreground.displayFrame.bottom += 5;

    background.blend = foregroundBlend;
    rectList.push_back(background);
    rectList.push_back(foreground);
    rectList.push_back(foreground);

    uint32_t num = numOverlays(rectList);
    uint32_t num = numOverlays(rectList);


    return num;
    return num;