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

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

Issue 304403003: Generate path names on the client side (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 6 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/GrGLPath.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 f548af5f6aabd4cecd853f1c6af289287e478b46..f8541cff8686d8df518993cd2166d3bcc4e99166 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -26,6 +26,8 @@
#define PROGRAM_CACHE_STATS
#endif
+class GrGLNameAllocator;
+
class GrGpuGL : public GrGpu {
public:
GrGpuGL(const GrGLContext& ctx, GrContext* context);
@@ -106,6 +108,11 @@ public:
void notifyTextureDelete(GrGLTexture* texture);
void notifyRenderTargetDelete(GrRenderTarget* renderTarget);
+ // 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,
@@ -459,6 +466,8 @@ private:
// from our loop that tries stencil formats and calls check fb status.
int fLastSuccessfulStencilFmtIdx;
+ SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator;
+
typedef GrGpu INHERITED;
};
« no previous file with comments | « src/gpu/gl/GrGLPath.cpp ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698