aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLInterface.cpp
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2015-07-02 03:01:43 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-02 03:01:43 -0700
commiteeef46d181f9f8db388ecea81df699fc1b3c9280 (patch)
tree3326e5f7aebcc7b35ac5b62dfca133e7b0683e1b /src/gpu/gl/GrGLInterface.cpp
parent4380f06a124c28a47dc99956d48c2d4c5bcb78e0 (diff)
Implement support for CHROMIUM_path_rendering pseudo extension
Implement support for path rendering in Chromium through CHROMIUM_path_rendering pseudo extension. The extension defines a new pseudo-gl function, BindFragmentInputLocation. This behaves similarly to the BindUniformLocation pseudo-gl function. The idea is to assign fragment input location to a fragment input before linking the program. BUG=chromium:344330 Review URL: https://codereview.chromium.org/1192663002
Diffstat (limited to 'src/gpu/gl/GrGLInterface.cpp')
-rw-r--r--src/gpu/gl/GrGLInterface.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 56f1e59275..9f58c73221 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -59,6 +59,7 @@ const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) {
newInterface->fFunctions.fStencilThenCoverFillPathInstanced = NULL;
newInterface->fFunctions.fStencilThenCoverStrokePathInstanced = NULL;
newInterface->fFunctions.fProgramPathFragmentInputGen = NULL;
+ newInterface->fFunctions.fBindFragmentInputLocation = NULL;
return newInterface;
}
@@ -483,7 +484,7 @@ bool GrGLInterface::validate() const {
#endif
}
- if (fExtensions.has("GL_NV_path_rendering")) {
+ if (fExtensions.has("GL_NV_path_rendering") || fExtensions.has("GL_CHROMIUM_path_rendering")) {
if (NULL == fFunctions.fMatrixLoadf ||
NULL == fFunctions.fMatrixLoadIdentity ||
NULL == fFunctions.fPathCommands ||
@@ -515,6 +516,11 @@ bool GrGLInterface::validate() const {
) {
RETURN_FALSE_INTERFACE
}
+ if (fExtensions.has("GL_CHROMIUM_path_rendering")) {
+ if (NULL == fFunctions.fBindFragmentInputLocation) {
+ RETURN_FALSE_INTERFACE
+ }
+ }
}
if (fExtensions.has("GL_EXT_raster_multisample")) {