aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2015-02-18 11:36:35 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-18 11:36:35 -0800
commit5a105ff05303ac82a867b8b84a1edd145bd46218 (patch)
tree5d40b0cc23f9520d766bd5a12c2e7fb3d6132e4f /src/gpu/gl
parent0aa94798c976c617b254503c44e47f9b3aa4d5d4 (diff)
Use uint16s for texture coordinates when rendering text.
Allows us to push more vertices into a given vertex buffer, with a slight performance improvement. Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b Review URL: https://codereview.chromium.org/917373002
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLVertexArray.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLVertexArray.h b/src/gpu/gl/GrGLVertexArray.h
index f795ed85d2..4143ad4e3b 100644
--- a/src/gpu/gl/GrGLVertexArray.h
+++ b/src/gpu/gl/GrGLVertexArray.h
@@ -34,6 +34,7 @@ static inline const GrGLAttribLayout& GrGLAttribTypeToLayout(GrVertexAttribType
{4, GR_GL_FLOAT, false}, // kVec4f_GrVertexAttribType
{1, GR_GL_UNSIGNED_BYTE, true}, // kUByte_GrVertexAttribType
{4, GR_GL_UNSIGNED_BYTE, true}, // kVec4ub_GrVertexAttribType
+ {2, GR_GL_SHORT, false}, // kVec2s_GrVertexAttribType
};
GR_STATIC_ASSERT(0 == kFloat_GrVertexAttribType);
GR_STATIC_ASSERT(1 == kVec2f_GrVertexAttribType);
@@ -41,6 +42,7 @@ static inline const GrGLAttribLayout& GrGLAttribTypeToLayout(GrVertexAttribType
GR_STATIC_ASSERT(3 == kVec4f_GrVertexAttribType);
GR_STATIC_ASSERT(4 == kUByte_GrVertexAttribType);
GR_STATIC_ASSERT(5 == kVec4ub_GrVertexAttribType);
+ GR_STATIC_ASSERT(6 == kVec2s_GrVertexAttribType);
GR_STATIC_ASSERT(SK_ARRAY_COUNT(kLayouts) == kGrVertexAttribTypeCount);
return kLayouts[type];
}