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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrGpuGL_DEFINED 8 #ifndef GrGpuGL_DEFINED
9 #define GrGpuGL_DEFINED 9 #define GrGpuGL_DEFINED
10 10
11 #include "GrBinHashKey.h" 11 #include "GrBinHashKey.h"
12 #include "GrDrawState.h" 12 #include "GrDrawState.h"
13 #include "GrGLContext.h" 13 #include "GrGLContext.h"
14 #include "GrGLIRect.h" 14 #include "GrGLIRect.h"
15 #include "GrGLIndexBuffer.h" 15 #include "GrGLIndexBuffer.h"
16 #include "GrGLProgram.h" 16 #include "GrGLProgram.h"
17 #include "GrGLStencilBuffer.h" 17 #include "GrGLStencilBuffer.h"
18 #include "GrGLTexture.h" 18 #include "GrGLTexture.h"
19 #include "GrGLVertexArray.h" 19 #include "GrGLVertexArray.h"
20 #include "GrGLVertexBuffer.h" 20 #include "GrGLVertexBuffer.h"
21 #include "GrGpu.h" 21 #include "GrGpu.h"
22 #include "GrTHashTable.h" 22 #include "GrTHashTable.h"
23 #include "SkTypes.h" 23 #include "SkTypes.h"
24 24
25 #ifdef SK_DEVELOPER 25 #ifdef SK_DEVELOPER
26 #define PROGRAM_CACHE_STATS 26 #define PROGRAM_CACHE_STATS
27 #endif 27 #endif
28 28
29 class GrGLNameAllocator;
30
29 class GrGpuGL : public GrGpu { 31 class GrGpuGL : public GrGpu {
30 public: 32 public:
31 GrGpuGL(const GrGLContext& ctx, GrContext* context); 33 GrGpuGL(const GrGLContext& ctx, GrContext* context);
32 virtual ~GrGpuGL(); 34 virtual ~GrGpuGL();
33 35
34 const GrGLContext& glContext() const { return fGLContext; } 36 const GrGLContext& glContext() const { return fGLContext; }
35 37
36 const GrGLInterface* glInterface() const { return fGLContext.interface(); } 38 const GrGLInterface* glInterface() const { return fGLContext.interface(); }
37 const GrGLContextInfo& ctxInfo() const { return fGLContext; } 39 const GrGLContextInfo& ctxInfo() const { return fGLContext; }
38 GrGLStandard glStandard() const { return fGLContext.standard(); } 40 GrGLStandard glStandard() const { return fGLContext.standard(); }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 101 }
100 void notifyVertexBufferDelete(GrGLuint id) { 102 void notifyVertexBufferDelete(GrGLuint id) {
101 fHWGeometryState.notifyVertexBufferDelete(id); 103 fHWGeometryState.notifyVertexBufferDelete(id);
102 } 104 }
103 void notifyIndexBufferDelete(GrGLuint id) { 105 void notifyIndexBufferDelete(GrGLuint id) {
104 fHWGeometryState.notifyIndexBufferDelete(id); 106 fHWGeometryState.notifyIndexBufferDelete(id);
105 } 107 }
106 void notifyTextureDelete(GrGLTexture* texture); 108 void notifyTextureDelete(GrGLTexture* texture);
107 void notifyRenderTargetDelete(GrRenderTarget* renderTarget); 109 void notifyRenderTargetDelete(GrRenderTarget* renderTarget);
108 110
111 GrGLuint createGLPathObject();
112 void deleteGLPathObject(GrGLuint);
113
109 protected: 114 protected:
110 virtual bool onCopySurface(GrSurface* dst, 115 virtual bool onCopySurface(GrSurface* dst,
111 GrSurface* src, 116 GrSurface* src,
112 const SkIRect& srcRect, 117 const SkIRect& srcRect,
113 const SkIPoint& dstPoint) SK_OVERRIDE; 118 const SkIPoint& dstPoint) SK_OVERRIDE;
114 119
115 virtual bool onCanCopySurface(GrSurface* dst, 120 virtual bool onCanCopySurface(GrSurface* dst,
116 GrSurface* src, 121 GrSurface* src,
117 const SkIRect& srcRect, 122 const SkIRect& srcRect,
118 const SkIPoint& dstPoint) SK_OVERRIDE; 123 const SkIPoint& dstPoint) SK_OVERRIDE;
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 GrGLfloat fCoefficients[3 * 3]; 457 GrGLfloat fCoefficients[3 * 3];
453 }; 458 };
454 int fHWActivePathTexGenSets; 459 int fHWActivePathTexGenSets;
455 SkTArray<PathTexGenData, true> fHWPathTexGenSettings; 460 SkTArray<PathTexGenData, true> fHWPathTexGenSettings;
456 ///@} 461 ///@}
457 462
458 // we record what stencil format worked last time to hopefully exit early 463 // we record what stencil format worked last time to hopefully exit early
459 // from our loop that tries stencil formats and calls check fb status. 464 // from our loop that tries stencil formats and calls check fb status.
460 int fLastSuccessfulStencilFmtIdx; 465 int fLastSuccessfulStencilFmtIdx;
461 466
467 SkAutoTDelete<GrGLNameAllocator> fPathNameAllocator;
468
462 typedef GrGpu INHERITED; 469 typedef GrGpu INHERITED;
463 }; 470 };
464 471
465 #endif 472 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698