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

Commit 043f5ced authored by Alex Sakhartchouk's avatar Alex Sakhartchouk
Browse files

More rearrangement and renaming.

Change-Id: Ia922c5bff1734a29b786ba95065f81c8dedf90cd
parent b09aaeca
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
/*
 * Copyright (C) 2011 The Android Open Source Project
 * Copyright (C) 2011-2012 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -33,16 +33,12 @@
#include "rs_debug.rsh"
#include "rs_element.rsh"
#include "rs_math.rsh"
#include "rs_mesh.rsh"
#include "rs_matrix.rsh"
#include "rs_object.rsh"
#include "rs_program.rsh"
#include "rs_quaternion.rsh"
#include "rs_sampler.rsh"
#include "rs_time.rsh"



/**
 * Send a message back to the client.  Will not block and returns true
 * if the message was sendable and false if the fifo was full.
+4 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2011 The Android Open Source Project
 * Copyright (C) 2011-2012 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -23,6 +23,9 @@
#ifndef __RS_GRAPHICS_RSH__
#define __RS_GRAPHICS_RSH__

#include "rs_mesh.rsh"
#include "rs_program.rsh"

#if (defined(RS_VERSION) && (RS_VERSION >= 14))
/**
 * Set the color target used for all subsequent rendering calls
+5 −5
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@
 *         data
 */
extern uint32_t __attribute__((overloadable))
    rsMeshGetVertexAllocationCount(rs_mesh m);
    rsgMeshGetVertexAllocationCount(rs_mesh m);

/**
 * @param m mesh to get data from
@@ -63,7 +63,7 @@ extern uint32_t __attribute__((overloadable))
 *         containing index data
 */
extern uint32_t __attribute__((overloadable))
    rsMeshGetPrimitiveCount(rs_mesh m);
    rsgMeshGetPrimitiveCount(rs_mesh m);

/**
 * @param m mesh to get data from
@@ -71,7 +71,7 @@ extern uint32_t __attribute__((overloadable))
 * @return allocation containing vertex data
 */
extern rs_allocation __attribute__((overloadable))
    rsMeshGetVertexAllocation(rs_mesh m, uint32_t index);
    rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index);

/**
 * @param m mesh to get data from
@@ -79,7 +79,7 @@ extern rs_allocation __attribute__((overloadable))
 * @return allocation containing index data
 */
extern rs_allocation __attribute__((overloadable))
    rsMeshGetIndexAllocation(rs_mesh m, uint32_t index);
    rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index);

/**
 * @param m mesh to get data from
@@ -87,7 +87,7 @@ extern rs_allocation __attribute__((overloadable))
 * @return primitive describing how the mesh is rendered
 */
extern rs_primitive __attribute__((overloadable))
    rsMeshGetPrimitive(rs_mesh m, uint32_t index);
    rsgMeshGetPrimitive(rs_mesh m, uint32_t index);

#endif // __RS_MESH_RSH__
+11 −11
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
 * @param ps
 */
extern rs_depth_func __attribute__((overloadable))
    rsProgramStoreGetDepthFunc(rs_program_store ps);
    rsgProgramStoreGetDepthFunc(rs_program_store ps);

/**
 * @hide
@@ -64,7 +64,7 @@ extern rs_depth_func __attribute__((overloadable))
 * @param ps
 */
extern bool __attribute__((overloadable))
    rsProgramStoreGetDepthMask(rs_program_store ps);
    rsgProgramStoreGetDepthMask(rs_program_store ps);
/**
 * @hide
 * Get program store red component color mask
@@ -72,7 +72,7 @@ extern bool __attribute__((overloadable))
 * @param ps
 */
extern bool __attribute__((overloadable))
    rsProgramStoreGetColorMaskR(rs_program_store ps);
    rsgProgramStoreGetColorMaskR(rs_program_store ps);

/**
 * @hide
@@ -81,7 +81,7 @@ extern bool __attribute__((overloadable))
 * @param ps
 */
extern bool __attribute__((overloadable))
    rsProgramStoreGetColorMaskG(rs_program_store ps);
    rsgProgramStoreGetColorMaskG(rs_program_store ps);

/**
 * @hide
@@ -90,7 +90,7 @@ extern bool __attribute__((overloadable))
 * @param ps
 */
extern bool __attribute__((overloadable))
    rsProgramStoreGetColorMaskB(rs_program_store ps);
    rsgProgramStoreGetColorMaskB(rs_program_store ps);

/**
 * @hide
@@ -99,7 +99,7 @@ extern bool __attribute__((overloadable))
 * @param ps
 */
extern bool __attribute__((overloadable))
    rsProgramStoreGetColorMaskA(rs_program_store ps);
    rsgProgramStoreGetColorMaskA(rs_program_store ps);

/**
 * @hide
@@ -108,7 +108,7 @@ extern bool __attribute__((overloadable))
 * @param ps
 */
extern rs_blend_src_func __attribute__((overloadable))
        rsProgramStoreGetBlendSrcFunc(rs_program_store ps);
        rsgProgramStoreGetBlendSrcFunc(rs_program_store ps);

/**
 * @hide
@@ -117,7 +117,7 @@ extern rs_blend_src_func __attribute__((overloadable))
 * @param ps
 */
extern rs_blend_dst_func __attribute__((overloadable))
    rsProgramStoreGetBlendDstFunc(rs_program_store ps);
    rsgProgramStoreGetBlendDstFunc(rs_program_store ps);

/**
 * @hide
@@ -126,7 +126,7 @@ extern rs_blend_dst_func __attribute__((overloadable))
 * @param ps
 */
extern bool __attribute__((overloadable))
    rsProgramStoreGetDitherEnabled(rs_program_store ps);
    rsgProgramStoreGetDitherEnabled(rs_program_store ps);

/**
 * @hide
@@ -135,7 +135,7 @@ extern bool __attribute__((overloadable))
 * @param pr
 */
extern bool __attribute__((overloadable))
    rsProgramRasterGetPointSpriteEnabled(rs_program_raster pr);
    rsgProgramRasterGetPointSpriteEnabled(rs_program_raster pr);

/**
 * @hide
@@ -144,7 +144,7 @@ extern bool __attribute__((overloadable))
 * @param pr
 */
extern rs_cull_mode __attribute__((overloadable))
    rsProgramRasterGetCullMode(rs_program_raster pr);
    rsgProgramRasterGetCullMode(rs_program_raster pr);



+13 −13
Original line number Diff line number Diff line
@@ -11,29 +11,29 @@ rs_allocation indexAlloc2;
static bool test_mesh_getters() {
    bool failed = false;

    _RS_ASSERT(rsMeshGetVertexAllocationCount(mesh) == 2);
    _RS_ASSERT(rsMeshGetPrimitiveCount(mesh) == 3);
    _RS_ASSERT(rsgMeshGetVertexAllocationCount(mesh) == 2);
    _RS_ASSERT(rsgMeshGetPrimitiveCount(mesh) == 3);

    rs_allocation meshV0 = rsMeshGetVertexAllocation(mesh, 0);
    rs_allocation meshV1 = rsMeshGetVertexAllocation(mesh, 1);
    rs_allocation meshV2 = rsMeshGetVertexAllocation(mesh, 2);
    rs_allocation meshV0 = rsgMeshGetVertexAllocation(mesh, 0);
    rs_allocation meshV1 = rsgMeshGetVertexAllocation(mesh, 1);
    rs_allocation meshV2 = rsgMeshGetVertexAllocation(mesh, 2);
    _RS_ASSERT(meshV0.p == vertexAlloc0.p);
    _RS_ASSERT(meshV1.p == vertexAlloc1.p);
    _RS_ASSERT(!rsIsObject(meshV2));

    rs_allocation meshI0 = rsMeshGetIndexAllocation(mesh, 0);
    rs_allocation meshI1 = rsMeshGetIndexAllocation(mesh, 1);
    rs_allocation meshI2 = rsMeshGetIndexAllocation(mesh, 2);
    rs_allocation meshI3 = rsMeshGetIndexAllocation(mesh, 3);
    rs_allocation meshI0 = rsgMeshGetIndexAllocation(mesh, 0);
    rs_allocation meshI1 = rsgMeshGetIndexAllocation(mesh, 1);
    rs_allocation meshI2 = rsgMeshGetIndexAllocation(mesh, 2);
    rs_allocation meshI3 = rsgMeshGetIndexAllocation(mesh, 3);
    _RS_ASSERT(meshI0.p == indexAlloc0.p);
    _RS_ASSERT(!rsIsObject(meshI1));
    _RS_ASSERT(meshI2.p == indexAlloc2.p);
    _RS_ASSERT(!rsIsObject(meshI3));

    rs_primitive p0 = rsMeshGetPrimitive(mesh, 0);
    rs_primitive p1 = rsMeshGetPrimitive(mesh, 1);
    rs_primitive p2 = rsMeshGetPrimitive(mesh, 2);
    rs_primitive p3 = rsMeshGetPrimitive(mesh, 3);
    rs_primitive p0 = rsgMeshGetPrimitive(mesh, 0);
    rs_primitive p1 = rsgMeshGetPrimitive(mesh, 1);
    rs_primitive p2 = rsgMeshGetPrimitive(mesh, 2);
    rs_primitive p3 = rsgMeshGetPrimitive(mesh, 3);

    _RS_ASSERT(p0 == RS_PRIMITIVE_POINT);
    _RS_ASSERT(p1 == RS_PRIMITIVE_LINE);
Loading