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

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

Issue 212753002: Use fixed function pipeline only when drawing paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 8 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/GrGpuGL.cpp ('k') | src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL_program.cpp
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 10f10393e3b0f5310400b3e0b8238d4f5b4bdda4..0a7bb0e39ab5fc70f46ed153fc918e7fd1b0bda3 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -233,7 +233,7 @@ bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC
SkSTArray<8, const GrEffectStage*, true> coverageStages;
GrGLProgramDesc desc;
GrGLProgramDesc::Build(this->getDrawState(),
- kDrawPoints_DrawType == type,
+ type,
blendOpts,
srcCoeff,
dstCoeff,
@@ -343,27 +343,7 @@ void GrGpuGL::setupGeometry(const DrawInfo& info, size_t* indexOffsetInBytes) {
GrGLAttribArrayState* attribState =
fHWGeometryState.bindArrayAndBuffersToDraw(this, vbuf, ibuf);
- if (!fCurrentProgram->hasVertexShader()) {
- int posIdx = this->getDrawState().positionAttributeIndex();
- const GrVertexAttrib* vertexAttrib = this->getDrawState().getVertexAttribs() + posIdx;
- GrVertexAttribType attribType = vertexAttrib->fType;
- SkASSERT(!GrGLAttribTypeToLayout(attribType).fNormalized);
- SkASSERT(GrGLAttribTypeToLayout(attribType).fCount == 2);
-
- // Attrib at location 0 is defined to be bound to vertex in fixed-function pipe. Asserts
- // above should make sure position attribute goes to location 0 when below code is executed.
-
- attribState->set(this,
- 0,
- vbuf,
- GrGLAttribTypeToLayout(attribType).fCount,
- GrGLAttribTypeToLayout(attribType).fType,
- GrGLAttribTypeToLayout(attribType).fNormalized,
- stride,
- reinterpret_cast<GrGLvoid*>(
- vertexOffsetInBytes + vertexAttrib->fOffset));
- attribState->disableUnusedArrays(this, 1);
- } else {
+ if (fCurrentProgram->hasVertexShader()) {
int vertexAttribCount = this->getDrawState().getVertexAttribCount();
uint32_t usedAttribArraysMask = 0;
const GrVertexAttrib* vertexAttrib = this->getDrawState().getVertexAttribs();
« no previous file with comments | « src/gpu/gl/GrGpuGL.cpp ('k') | src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698