diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-02-14 16:51:21 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-02-14 16:51:21 +0000 |
commit | 1c13c9668a889e56a0c85b51b9f28139c25b76ff (patch) | |
tree | 0319884473e77141a574ab07333c6ed4797f7485 /gpu/include/GrContext.h | |
parent | dd53d91b60e368f1bbff6fb22d796765205ae25d (diff) |
Refactor how Gr handles vertex and index data. GrGpu and GrInOrderDrawBuffer both GrBufferAllocPool to manage reserved and set-to-array vertex and index data.
rietveld issue 4188049
git-svn-id: http://skia.googlecode.com/svn/trunk@786 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/include/GrContext.h')
-rw-r--r-- | gpu/include/GrContext.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gpu/include/GrContext.h b/gpu/include/GrContext.h index ccc045e73c..6b9c3f3009 100644 --- a/gpu/include/GrContext.h +++ b/gpu/include/GrContext.h @@ -20,12 +20,13 @@ #include "GrClip.h"
#include "GrGpu.h"
#include "GrTextureCache.h"
-#include "GrInOrderDrawBuffer.h"
-#include "GrVertexBufferAllocPool.h"
#include "GrPaint.h"
class GrFontCache;
class GrPathIter;
+class GrVertexBufferAllocPool;
+class GrIndexBufferAllocPool;
+class GrInOrderDrawBuffer;
class GrContext : public GrRefCnt {
public:
@@ -236,21 +237,21 @@ public: * @param paint describes how to color pixels.
* @param strokeWidth If strokeWidth < 0, then the rect is filled, else
* the rect is mitered stroked based on strokeWidth. If
- * strokeWidth == 0, then the stroke is always a single
+ * strokeWidth == 0, then the stroke is always a single
* pixel thick.
- * @param matrix Optional matrix applied to the rect. Applied before
+ * @param matrix Optional matrix applied to the rect. Applied before
* context's matrix or the paint's matrix.
* The rects coords are used to access the paint (through texture matrix)
*/
- void drawRect(const GrPaint& paint,
- const GrRect&,
+ void drawRect(const GrPaint& paint,
+ const GrRect&,
GrScalar strokeWidth = -1,
const GrMatrix* matrix = NULL);
/**
* Maps a rect of paint coordinates onto the a rect of destination
* coordinates. Each rect can optionally be transformed. The srcRect
- * is stretched over the dstRect. The dstRect is transformed by the
+ * is stretched over the dstRect. The dstRect is transformed by the
* context's matrix and the srcRect is transformed by the paint's matrix.
* Additional optional matrices can be provided by parameters.
*
@@ -453,8 +454,9 @@ private: GrTextureCache* fTextureCache;
GrFontCache* fFontCache;
- GrVertexBufferAllocPool fVBAllocPool;
- GrInOrderDrawBuffer fTextDrawBuffer;
+ GrVertexBufferAllocPool* fTextVBAllocPool;
+ GrIndexBufferAllocPool* fTextIBAllocPool;
+ GrInOrderDrawBuffer* fTextDrawBuffer;
GrContext(GrGpu* gpu);
|