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

Unified Diff: src/gpu/gl/builders/GrGLPathProgramBuilder.cpp

Issue 1192663002: Implement support for CHROMIUM_path_rendering pseudo extension (Closed) Base URL: https://skia.googlesource.com/skia.git@chromium-pathrendering-prepare-03
Patch Set: rebase Created 5 years, 5 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/builders/GrGLPathProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLPathProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLPathProgramBuilder.cpp b/src/gpu/gl/builders/GrGLPathProgramBuilder.cpp
index c9f88cd702b3d0636585731f460c4561ab5dcd69..9bebe0d89e212b701ff9121861ee768f00fd2c0e 100644
--- a/src/gpu/gl/builders/GrGLPathProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLPathProgramBuilder.cpp
@@ -35,9 +35,25 @@ GrGLProgramBuilder::SeparableVaryingHandle GrGLPathProgramBuilder::addSeparableV
return SeparableVaryingHandle::CreateFromSeparableVaryingIndex(varyingInfo.fLocation);
}
+void GrGLPathProgramBuilder::bindProgramResourceLocations(GrGLuint programID) {
+ this->INHERITED::bindProgramResourceLocations(programID);
+ if (!fGpu->glPathRendering()->shouldBindFragmentInputs()) {
+ return;
+ }
+ int count = fSeparableVaryingInfos.count();
+ for (int i = 0; i < count; ++i) {
+ GL_CALL(BindFragmentInputLocation(programID,
+ i,
+ fSeparableVaryingInfos[i].fVariable.c_str()));
+ fSeparableVaryingInfos[i].fLocation = i;
+ }
+}
+
void GrGLPathProgramBuilder::resolveProgramResourceLocations(GrGLuint programID) {
this->INHERITED::resolveProgramResourceLocations(programID);
-
+ if (fGpu->glPathRendering()->shouldBindFragmentInputs()) {
+ return;
+ }
int count = fSeparableVaryingInfos.count();
for (int i = 0; i < count; ++i) {
GrGLint location;
« no previous file with comments | « src/gpu/gl/builders/GrGLPathProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698