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

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

Issue 367643004: Implement NVPR on GLES (Closed) Base URL: https://skia.googlesource.com/skia.git@02-path-program-fragment
Patch Set: rebase Created 6 years, 4 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
Index: src/gpu/gl/GrGLProgramDesc.cpp
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index e1a319104d1d66b2b215cab22fc5457170ef00ac..90365f768bd81f5df18a075174175982a027e828 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -102,9 +102,10 @@ bool GrGLProgramDesc::Build(const GrDrawState& drawState,
bool readsDst = false;
bool readFragPosition = false;
- // We use vertexshader-less shader programs only when drawing paths.
- bool hasVertexCode = !(GrGpu::kDrawPath_DrawType == drawType ||
- GrGpu::kDrawPaths_DrawType == drawType);
+
+ // Provide option for shader programs without vertex shader only when drawing paths.
+ bool hasVertexCode = !GrGpu::IsPathRenderingDrawType(drawType);
+
int numStages = 0;
if (!skipColor) {
numStages += drawState.numColorStages() - firstEffectiveColorStage;
@@ -118,7 +119,6 @@ bool GrGLProgramDesc::Build(const GrDrawState& drawState,
desc->fKey.push_back_n(kEffectKeyOffsetsAndLengthOffset + 2 * sizeof(uint16_t) * numStages);
int offsetAndSizeIndex = 0;
-
bool effectKeySuccess = true;
if (!skipColor) {
for (int s = firstEffectiveColorStage; s < drawState.numColorStages(); ++s) {

Powered by Google App Engine
This is Rietveld 408576698