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

Unified Diff: src/gpu/gl/GrGpuGL.h

Issue 437473002: Wrap NV_path_rendering API with GrGLPathRendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix builds more 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
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL.h
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index e67197219d8c389b26c128342c6fb2f639777f86..b39aedb82417f273e552c7adf53dbf463eb207ab 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -24,7 +24,7 @@
#define PROGRAM_CACHE_STATS
#endif
-class GrGLNameAllocator;
+class GrGLPathRendering;
class GrGpuGL : public GrGpu {
public:
@@ -40,6 +40,11 @@ public:
GrGLSLGeneration glslGeneration() const { return fGLContext.glslGeneration(); }
const GrGLCaps& glCaps() const { return *fGLContext.caps(); }
+ GrGLPathRendering* pathRendering() const {
+ SkASSERT(glCaps().pathRenderingSupport());
+ return fPathRendering.get();
+ }
+
virtual void discard(GrRenderTarget*) SK_OVERRIDE;
// Used by GrGLProgram and GrGLPathTexGenProgramEffects to configure OpenGL
@@ -104,11 +109,6 @@ public:
fHWGeometryState.notifyIndexBufferDelete(id);
}
- // These functions should be used to generate and delete GL path names. They have their own
- // allocator that runs on the client side, so they are much faster than going through GenPaths.
- GrGLuint createGLPathObject();
- void deleteGLPathObject(GrGLuint);
-
protected:
virtual bool onCopySurface(GrSurface* dst,
GrSurface* src,
@@ -470,7 +470,7 @@ private:
// from our loop that tries stencil formats and calls check fb status.
int fLastSuccessfulStencilFmtIdx;
- SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator;
+ SkAutoTDelete<GrGLPathRendering> fPathRendering;
typedef GrGpu INHERITED;
};
« no previous file with comments | « src/gpu/gl/GrGLPathRendering.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698