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

Commit 9edb96b5 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Update tessellation tracing"

parents a847fdfd 87f9df88
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -16,7 +16,7 @@


#define LOG_TAG "OpenGLRenderer"
#define LOG_TAG "OpenGLRenderer"
#define LOG_NDEBUG 1
#define LOG_NDEBUG 1
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
#define ATRACE_TAG ATRACE_TAG_VIEW


#define VERTEX_DEBUG 0
#define VERTEX_DEBUG 0


+6 −0
Original line number Original line Diff line number Diff line
@@ -15,9 +15,11 @@
 */
 */


#define LOG_TAG "OpenGLRenderer"
#define LOG_TAG "OpenGLRenderer"
#define ATRACE_TAG ATRACE_TAG_VIEW


#include <math.h>
#include <math.h>
#include <utils/Log.h>
#include <utils/Log.h>
#include <utils/Trace.h>


#include "AmbientShadow.h"
#include "AmbientShadow.h"
#include "ShadowTessellator.h"
#include "ShadowTessellator.h"
@@ -34,6 +36,8 @@ static inline T max(T a, T b) {
void ShadowTessellator::tessellateAmbientShadow(const Vector3* casterPolygon,
void ShadowTessellator::tessellateAmbientShadow(const Vector3* casterPolygon,
        int casterVertexCount, const Vector3& centroid3d,
        int casterVertexCount, const Vector3& centroid3d,
        VertexBuffer& shadowVertexBuffer) {
        VertexBuffer& shadowVertexBuffer) {
    ATRACE_CALL();

    // A bunch of parameters to tweak the shadow.
    // A bunch of parameters to tweak the shadow.
    // TODO: Allow some of these changable by debug settings or APIs.
    // TODO: Allow some of these changable by debug settings or APIs.
    const float heightFactor = 128;
    const float heightFactor = 128;
@@ -47,6 +51,8 @@ void ShadowTessellator::tessellateAmbientShadow(const Vector3* casterPolygon,
void ShadowTessellator::tessellateSpotShadow(const Vector3* casterPolygon, int casterVertexCount,
void ShadowTessellator::tessellateSpotShadow(const Vector3* casterPolygon, int casterVertexCount,
        const Vector3& lightPosScale, const mat4& receiverTransform,
        const Vector3& lightPosScale, const mat4& receiverTransform,
        int screenWidth, int screenHeight, VertexBuffer& shadowVertexBuffer) {
        int screenWidth, int screenHeight, VertexBuffer& shadowVertexBuffer) {
    ATRACE_CALL();

    // A bunch of parameters to tweak the shadow.
    // A bunch of parameters to tweak the shadow.
    // TODO: Allow some of these changable by debug settings or APIs.
    // TODO: Allow some of these changable by debug settings or APIs.
    int maximal = max(screenWidth, screenHeight);
    int maximal = max(screenWidth, screenHeight);