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

Commit ceae02e2 authored by Stephen Hines's avatar Stephen Hines Committed by Android (Google) Code Review
Browse files

Merge "Clean up use of rsSetObject/rsClearObject."

parents b969d2d9 c32b9940
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static void computeGaussianWeights() {

static void copyInput() {
    rs_allocation ain;
    rsSetObject(&ain,rsGetAllocation(InPixel));
    ain = rsGetAllocation(InPixel);
    uint32_t dimx = rsAllocationGetDimX(ain);
    uint32_t dimy = rsAllocationGetDimY(ain);
    for (uint32_t y = 0; y < dimy; y++) {
+5 −9
Original line number Diff line number Diff line
@@ -109,11 +109,11 @@ static void setupOffscreenTarget() {
static void displayFontSamples(int fillNum) {

    rs_font fonts[5];
    rsSetObject(&fonts[0], gFontSans);
    rsSetObject(&fonts[1], gFontSerif);
    rsSetObject(&fonts[2], gFontSerifBold);
    rsSetObject(&fonts[3], gFontSerifBoldItalic);
    rsSetObject(&fonts[4], gFontSans);
    fonts[0] = gFontSans;
    fonts[1] = gFontSerif;
    fonts[2] = gFontSerifBold;
    fonts[3] = gFontSerifBoldItalic;
    fonts[4] = gFontSans;

    uint width = gRenderSurfaceW;
    uint height = gRenderSurfaceH;
@@ -140,10 +140,6 @@ static void displayFontSamples(int fillNum) {
            }
        }
    }

    for (int i = 0; i < 5; i ++) {
        rsClearObject(&fonts[i]);
    }
}

static void bindProgramVertexOrtho() {
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ int root(void) {
    rsgBindFont(gFont);

    rs_allocation listAlloc;
    rsSetObject(&listAlloc, rsGetAllocation(gList));
    listAlloc = rsGetAllocation(gList);
    int allocSize = rsAllocationGetDimX(listAlloc);

    int width = rsgGetWidth();
+4 −4
Original line number Diff line number Diff line
@@ -48,17 +48,17 @@ static bool basic_test(uint32_t index) {

    struct my_struct structTest;

    rsSetObject(&fontTestLocal, fontTest);
    fontTestLocal = fontTest;
    //allocationTestLocal = allocationTest;

    rsSetObject(&fontTest, fontTestLocal);
    fontTest = fontTestLocal;
    //allocationTest = allocationTestLocal;

    /*for (int i = 0; i < 4; i++) {
        rsSetObject(&fontTestLocalArray[i], fontTestLocal);
        fontTestLocalArray[i] = fontTestLocal;
    }*/

    /*rsSetObject(&fontTest, fontTestLocalArray[3]);*/
    /*fontTest = fontTestLocalArray[3];*/

    return failed;
}