Revert of Implement support for CHROMIUM_path_rendering pseudo extension (patchset...
authorjvanverth <jvanverth@google.com>
Thu, 2 Jul 2015 19:53:27 +0000 (12:53 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 2 Jul 2015 19:53:27 +0000 (12:53 -0700)
Reason for revert:
DEPS roll failing

Original issue's description:
> 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
>
> Committed: https://skia.googlesource.com/skia/+/eeef46d181f9f8db388ecea81df699fc1b3c9280

TBR=bsalomon@google.com,joshualitt@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:344330

Review URL: https://codereview.chromium.org/1223673002

include/gpu/gl/GrGLFunctions.h
include/gpu/gl/GrGLInterface.h
src/gpu/gl/GrGLCaps.cpp
src/gpu/gl/GrGLInterface.cpp
src/gpu/gl/GrGLPathRendering.cpp
src/gpu/gl/GrGLPathRendering.h
src/gpu/gl/builders/GrGLPathProgramBuilder.cpp
src/gpu/gl/builders/GrGLPathProgramBuilder.h
src/gpu/gl/builders/GrGLProgramBuilder.h

index aea6d2c22e6ca7e5d8eed413fc6e99a8656cb0da..f5240c5dc19d153b7301e6e23714ab9ac1cf7406 100644 (file)
@@ -257,8 +257,6 @@ typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilThenCoverFillPathInstancedProc
 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLStencilThenCoverStrokePathInstancedProc)(GrGLsizei numPaths, GrGLenum pathNameType, const GrGLvoid *paths, GrGLuint pathBase, GrGLint reference, GrGLuint mask, GrGLenum coverMode, GrGLenum transformType, const GrGLfloat *transformValues);
 // NV_path_rendering v1.3
 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLProgramPathFragmentInputGenProc)(GrGLuint program, GrGLint location, GrGLenum genMode, GrGLint components,const GrGLfloat *coeffs);
-// CHROMIUM_path_rendering
-typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBindFragmentInputLocationProc)(GrGLuint program, GrGLint location, const GrGLchar* name);
 
 /* ARB_program_interface_query */
 typedef GrGLint (GR_GL_FUNCTION_TYPE* GrGLGetProgramResourceLocationProc)(GrGLuint program, GrGLenum programInterface, const GrGLchar *name);
index 9d6025974085dbffe856b1313d11e7c5d9d2c6d3..9a717580285bdd487b1a2e8ff99c91934c2936fb 100644 (file)
@@ -350,8 +350,6 @@ public:
         GLPtr<GrGLStencilThenCoverStrokePathInstancedProc> fStencilThenCoverStrokePathInstanced;
         // NV_path_rendering v1.3
         GLPtr<GrGLProgramPathFragmentInputGenProc> fProgramPathFragmentInputGen;
-        // CHROMIUM_path_rendering
-        GLPtr<GrGLBindFragmentInputLocationProc> fBindFragmentInputLocation;
 
         /* NV_framebuffer_mixed_samples */
         GLPtr<GrGLCoverageModulationProc> fCoverageModulation;
index dc0cf2cd59d8fb7b0157910d7413124840fa44fb..539212c3a516336f977ce64680cf1c2ba04d15c6 100644 (file)
@@ -464,20 +464,16 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
 }
 
 bool GrGLCaps::hasPathRenderingSupport(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
-    bool hasChromiumPathRendering = ctxInfo.hasExtension("GL_CHROMIUM_path_rendering");
-
-    if (!(ctxInfo.hasExtension("GL_NV_path_rendering") || hasChromiumPathRendering)) {
+    if (!ctxInfo.hasExtension("GL_NV_path_rendering")) {
         return false;
     }
-
     if (kGL_GrGLStandard == ctxInfo.standard()) {
         if (ctxInfo.version() < GR_GL_VER(4, 3) &&
             !ctxInfo.hasExtension("GL_ARB_program_interface_query")) {
             return false;
         }
     } else {
-        if (!hasChromiumPathRendering &&
-            ctxInfo.version() < GR_GL_VER(3, 1)) {
+        if (ctxInfo.version() < GR_GL_VER(3, 1)) {
             return false;
         }
     }
index 9f58c732216c4bef9ea31197a07331c80e4e4b90..56f1e59275687e66996ba95f1c4954f0aa28fec6 100644 (file)
@@ -59,7 +59,6 @@ const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) {
     newInterface->fFunctions.fStencilThenCoverFillPathInstanced = NULL;
     newInterface->fFunctions.fStencilThenCoverStrokePathInstanced = NULL;
     newInterface->fFunctions.fProgramPathFragmentInputGen = NULL;
-    newInterface->fFunctions.fBindFragmentInputLocation = NULL;
     return newInterface;
 }
 
@@ -484,7 +483,7 @@ bool GrGLInterface::validate() const {
 #endif
     }
 
-    if (fExtensions.has("GL_NV_path_rendering") || fExtensions.has("GL_CHROMIUM_path_rendering")) {
+    if (fExtensions.has("GL_NV_path_rendering")) {
         if (NULL == fFunctions.fMatrixLoadf ||
             NULL == fFunctions.fMatrixLoadIdentity ||
             NULL == fFunctions.fPathCommands ||
@@ -516,11 +515,6 @@ 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")) {
index 7c77155b6c5638c22357004db033ad5cadf5b1f3..ffdbbdab261b3431fb405213e5e03f8c0f70cdc3 100644 (file)
@@ -61,9 +61,6 @@ static GrGLenum gr_stencil_op_to_gl_path_rendering_fill_mode(GrStencilOp op) {
 
 GrGLPathRendering::GrGLPathRendering(GrGLGpu* gpu)
     : GrPathRendering(gpu) {
-    const GrGLInterface* glInterface = gpu->glInterface();
-    fCaps.bindFragmentInputSupport =
-        NULL != glInterface->fFunctions.fBindFragmentInputLocation;
 }
 
 GrGLPathRendering::~GrGLPathRendering() {
index 5996e906bd5088c2adfdb83a1cff5092372dd51a..86cf1b1698ac8aed0e6f3d18d119ffb8a6588ce6 100644 (file)
@@ -46,10 +46,6 @@ public:
      */
     void abandonGpuResources();
 
-    bool shouldBindFragmentInputs() const {
-        return fCaps.bindFragmentInputSupport;
-    }
-
     // Functions for "separable shader" texturing support.
     void setProgramPathFragmentInputTransform(GrGLuint program, GrGLint location,
                                               GrGLenum genMode, GrGLint components,
@@ -69,13 +65,6 @@ protected:
     void onDrawPaths(const DrawPathArgs&, const GrPathRange*, const void* indices, PathIndexType,
                      const float transformValues[], PathTransformType, int count) override;
 private:
-    /**
-     * Mark certain functionality as not supported.
-     */
-    struct Caps {
-        bool bindFragmentInputSupport : 1;
-    };
-
     void flushPathStencilSettings(const GrStencilSettings&);
 
     struct MatrixState {
@@ -114,7 +103,6 @@ private:
     SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator;
     MatrixState fHWProjectionMatrixState;
     GrStencilSettings fHWPathStencilSettings;
-    Caps fCaps;
 };
 
 #endif
index 9bebe0d89e212b701ff9121861ee768f00fd2c0e..c9f88cd702b3d0636585731f460c4561ab5dcd69 100644 (file)
@@ -35,25 +35,9 @@ 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;
index d0c77fcdc7e81dc669e65cb1e4a07bc5267ded95..28260cf760ccbc2021bb187b3a02150bb8774617 100644 (file)
@@ -17,7 +17,6 @@ public:
 
     SeparableVaryingHandle addSeparableVarying(const char* name, GrGLVertToFrag* v,
                                                GrSLPrecision fsPrecision) override;
-    void bindProgramResourceLocations(GrGLuint programID) override;
     void resolveProgramResourceLocations(GrGLuint programID) override;
 
 private:
index 22b67ae58d1db7de0ec7062be295e129eda0a988..4b784aceea0aefc90d042626ed46aeaf3e0a9b50 100644 (file)
@@ -328,7 +328,7 @@ protected:
                       GrGLInstalledProc<Proc>*);
 
     GrGLProgram* finalize();
-    virtual void bindProgramResourceLocations(GrGLuint programID);
+    void bindProgramResourceLocations(GrGLuint programID);
     bool checkLinkStatus(GrGLuint programID);
     virtual void resolveProgramResourceLocations(GrGLuint programID);
     void cleanupProgram(GrGLuint programID, const SkTDArray<GrGLuint>& shaderIDs);