Make GrDrawTarget.h and GrPathRenderer.h be private headers

Review URL: http://codereview.appspot.com/4894050/



git-svn-id: http://skia.googlecode.com/svn/trunk@2125 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2011-08-16 20:38:11 +00:00
parent 498776ad9f
commit 8b4a64d318
7 changed files with 18 additions and 10 deletions

View File

@ -12,16 +12,20 @@
#include "GrClip.h"
#include "GrPaint.h"
#include "GrPathRenderer.h"
class GrDefaultPathRenderer;
class GrDrawTarget;
class GrFontCache;
class GrGpu;
struct GrGpuStats;
class GrIndexBuffer;
class GrIndexBufferAllocPool;
class GrInOrderDrawBuffer;
class GrPathRenderer;
class GrResourceEntry;
class GrResourceCache;
class GrStencilBuffer;
class GrVertexBuffer;
class GrVertexBufferAllocPool;
@ -551,7 +555,7 @@ private:
GrFontCache* fFontCache;
GrPathRenderer* fCustomPathRenderer;
GrDefaultPathRenderer fDefaultPathRenderer;
GrDefaultPathRenderer* fDefaultPathRenderer;
GrVertexBufferAllocPool* fDrawBufferVBAllocPool;
GrIndexBufferAllocPool* fDrawBufferIBAllocPool;

View File

@ -61,6 +61,7 @@ GrContext::~GrContext() {
delete fDrawBuffer;
delete fDrawBufferVBAllocPool;
delete fDrawBufferIBAllocPool;
GrSafeUnref(fDefaultPathRenderer);
GrSafeUnref(fCustomPathRenderer);
GrSafeUnref(fAAFillRectIndexBuffer);
GrSafeUnref(fAAStrokeRectIndexBuffer);
@ -1706,14 +1707,14 @@ void GrContext::printStats() const {
fGpu->printStats();
}
GrContext::GrContext(GrGpu* gpu) :
fDefaultPathRenderer(gpu->supportsTwoSidedStencil(),
gpu->supportsStencilWrapOps()) {
GrContext::GrContext(GrGpu* gpu) {
fGpu = gpu;
fGpu->ref();
fGpu->setContext(this);
fDefaultPathRenderer =
new GrDefaultPathRenderer(gpu->supportsTwoSidedStencil(),
gpu->supportsStencilWrapOps());
fCustomPathRenderer = GrPathRenderer::CreatePathRenderer();
fGpu->setClipPathRenderer(fCustomPathRenderer);
@ -1785,8 +1786,8 @@ GrPathRenderer* GrContext::getPathRenderer(const GrPath& path,
fCustomPathRenderer->canDrawPath(path, fill)) {
return fCustomPathRenderer;
} else {
GrAssert(fDefaultPathRenderer.canDrawPath(path, fill));
return &fDefaultPathRenderer;
GrAssert(fDefaultPathRenderer->canDrawPath(path, fill));
return fDefaultPathRenderer;
}
}

View File

@ -62,6 +62,8 @@ GrGpu::GrGpu()
GrGpu::~GrGpu() {
this->releaseResources();
GrSafeUnref(fDefaultPathRenderer);
GrSafeUnref(fClientPathRenderer);
}
void GrGpu::abandonResources() {

View File

@ -87,7 +87,6 @@
'../gpu/include/GrColor.h',
'../gpu/include/GrConfig.h',
'../gpu/include/GrContext.h',
'../gpu/include/GrDrawTarget.h',
'../gpu/include/GrFontScaler.h',
'../gpu/include/GrGLConfig.h',
'../gpu/include/GrGLConfig_chrome.h',
@ -102,7 +101,6 @@
'../gpu/include/GrNoncopyable.h',
'../gpu/include/GrPaint.h',
'../gpu/include/GrPath.h',
'../gpu/include/GrPathRenderer.h',
'../gpu/include/GrPathSink.h',
'../gpu/include/GrPlotMgr.h',
'../gpu/include/GrPoint.h',
@ -138,6 +136,7 @@
'../gpu/src/GrContext.cpp',
'../gpu/src/GrCreatePathRenderer_none.cpp',
'../gpu/src/GrDrawTarget.cpp',
'../gpu/src/GrDrawTarget.h',
'../gpu/src/GrGeometryBuffer.h',
'../gpu/src/GrGLDefaultInterface_none.cpp',
'../gpu/src/GrGLIndexBuffer.cpp',
@ -169,6 +168,7 @@
'../gpu/src/GrMatrix.cpp',
'../gpu/src/GrMemory.cpp',
'../gpu/src/GrPathRenderer.cpp',
'../gpu/src/GrPathRenderer.h',
'../gpu/src/GrPathUtils.cpp',
'../gpu/src/GrPathUtils.h',
'../gpu/src/GrRectanizer.cpp',

View File

@ -24,6 +24,7 @@
#include "SkTypeface.h"
#include "GrGLInterface.h"
#include "GrRenderTarget.h"
#include "SkPDFDevice.h"
#include "SkPDFDocument.h"