Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1669853002: Improve GLSL integer support (Closed) Base URL: https://skia.googlesource.com/skia.git@uploat_dratindirect
Patch Set: rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLCreateNullInterface.cpp ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index f916b4f436eb5f62b67b0bf7ac725d16b2941128..cd28ecaab5b93d248da0911effa9f4e4b6a6b9c2 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -1759,9 +1759,7 @@ void GrGLGpu::setupGeometry(const GrPrimitiveProcessor& primProc,
attribState->set(this,
attribIndex,
vbuf->bufferID(),
- GrGLAttribTypeToLayout(attribType).fCount,
- GrGLAttribTypeToLayout(attribType).fType,
- GrGLAttribTypeToLayout(attribType).fNormalized,
+ attribType,
stride,
reinterpret_cast<GrGLvoid*>(vertexOffsetInBytes + offset));
offset += attrib.fOffset;
@@ -2540,7 +2538,7 @@ void GrGLGpu::stampRectUsingProgram(GrGLuint program, const SkRect& bounds, GrGL
GrGLAttribArrayState* attribs =
this->fHWGeometryState.bindArrayAndBufferToDraw(this, arrayBuffer);
- attribs->set(this, 0, arrayBuffer, 2, GR_GL_FLOAT, false, 2 * sizeof(GrGLfloat), 0);
+ attribs->set(this, 0, arrayBuffer, kVec2f_GrVertexAttribType, 2 * sizeof(GrGLfloat), 0);
attribs->disableUnusedArrays(this, 0x1);
GL_CALL(Uniform4f(posXformUniform, bounds.width(), bounds.height(), bounds.left(),
@@ -3481,7 +3479,8 @@ void GrGLGpu::drawDebugWireRect(GrRenderTarget* rt, const SkIRect& rect, GrColor
GrGLAttribArrayState* attribs =
fHWGeometryState.bindArrayAndBufferToDraw(this, fWireRectArrayBuffer);
- attribs->set(this, 0, fWireRectArrayBuffer, 2, GR_GL_FLOAT, false, 2 * sizeof(GrGLfloat), 0);
+ attribs->set(this, 0, fWireRectArrayBuffer, kVec2f_GrVertexAttribType, 2 * sizeof(GrGLfloat),
+ 0);
attribs->disableUnusedArrays(this, 0x1);
GL_CALL(Uniform4fv(fWireRectProgram.fRectUniform, 1, edges));
@@ -3526,7 +3525,8 @@ void GrGLGpu::copySurfaceAsDraw(GrSurface* dst,
GrGLAttribArrayState* attribs =
fHWGeometryState.bindArrayAndBufferToDraw(this, fCopyProgramArrayBuffer);
- attribs->set(this, 0, fCopyProgramArrayBuffer, 2, GR_GL_FLOAT, false, 2 * sizeof(GrGLfloat), 0);
+ attribs->set(this, 0, fCopyProgramArrayBuffer, kVec2f_GrVertexAttribType, 2 * sizeof(GrGLfloat),
+ 0);
attribs->disableUnusedArrays(this, 0x1);
// dst rect edges in NDC (-1 to 1)
« no previous file with comments | « src/gpu/gl/GrGLCreateNullInterface.cpp ('k') | src/gpu/gl/GrGLInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698