From 28f6ab4b6e63c7d1d8d46cc6998f91fbb39bfef9 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Tue, 23 Oct 2012 14:21:11 +0000 Subject: [PATCH] Reorder the vertex attributes to be friendlier to android. Review URL: https://codereview.appspot.com/6742068 git-svn-id: http://skia.googlecode.com/svn/trunk@6044 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/gl/GrGLProgram.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h index 5f504f25cb..520f6a0359 100644 --- a/src/gpu/gl/GrGLProgram.h +++ b/src/gpu/gl/GrGLProgram.h @@ -58,15 +58,13 @@ public: const Desc& getDesc() { return fDesc; } /** - * Attribute indices. These should not overlap. Matrices consume 3 slots. + * Attribute indices. These should not overlap. */ static int PositionAttributeIdx() { return 0; } - static int TexCoordAttributeIdx(int tcIdx) { return 1 + tcIdx; } - static int ColorAttributeIdx() { return 1 + GrDrawState::kMaxTexCoords; } - static int CoverageAttributeIdx() { - return 2 + GrDrawState::kMaxTexCoords; - } - static int EdgeAttributeIdx() { return 3 + GrDrawState::kMaxTexCoords; } + static int ColorAttributeIdx() { return 1; } + static int CoverageAttributeIdx() { return 2; } + static int EdgeAttributeIdx() { return 3; } + static int TexCoordAttributeIdx(int tcIdx) { return 4 + tcIdx; } /** * This function uploads uniforms and calls each GrCustomStage's setData. It is called before a -- 2.34.1