diff options
author | 2015-07-02 03:01:43 -0700 | |
---|---|---|
committer | 2015-07-02 03:01:43 -0700 | |
commit | eeef46d181f9f8db388ecea81df699fc1b3c9280 (patch) | |
tree | 3326e5f7aebcc7b35ac5b62dfca133e7b0683e1b /src/gpu/gl/GrGLPathRendering.h | |
parent | 4380f06a124c28a47dc99956d48c2d4c5bcb78e0 (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/GrGLPathRendering.h')
-rw-r--r-- | src/gpu/gl/GrGLPathRendering.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLPathRendering.h b/src/gpu/gl/GrGLPathRendering.h index 86cf1b1698..5996e906bd 100644 --- a/src/gpu/gl/GrGLPathRendering.h +++ b/src/gpu/gl/GrGLPathRendering.h @@ -46,6 +46,10 @@ 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, @@ -65,6 +69,13 @@ 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 { @@ -103,6 +114,7 @@ private: SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator; MatrixState fHWProjectionMatrixState; GrStencilSettings fHWPathStencilSettings; + Caps fCaps; }; #endif |