diff options
author | 2012-08-23 18:14:13 +0000 | |
---|---|---|
committer | 2012-08-23 18:14:13 +0000 | |
commit | d6176b0dcacb124539e0cfd051e6d93a9782f020 (patch) | |
tree | 9e6f4b465e54c9b26e1ba70cd8890b55abb08464 /src/gpu/GrGpu.cpp | |
parent | fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (diff) |
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part II of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6474054
git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r-- | src/gpu/GrGpu.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp index 923f711cc7..f38b819556 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp @@ -147,7 +147,7 @@ GrTexture* GrGpu::createTexture(const GrTextureDesc& desc, const void* srcData, size_t rowBytes) { this->handleDirtyContext(); GrTexture* tex = this->onCreateTexture(desc, srcData, rowBytes); - if (NULL != tex && + if (NULL != tex && (kRenderTarget_GrTextureFlagBit & desc.fFlags) && !(kNoStencil_GrTextureFlagBit & desc.fFlags)) { GrAssert(NULL != tex->asRenderTarget()); @@ -162,7 +162,7 @@ GrTexture* GrGpu::createTexture(const GrTextureDesc& desc, bool GrGpu::attachStencilBufferToRenderTarget(GrRenderTarget* rt) { GrAssert(NULL == rt->getStencilBuffer()); - GrStencilBuffer* sb = + GrStencilBuffer* sb = this->getContext()->findStencilBuffer(rt->width(), rt->height(), rt->numSamples()); @@ -233,11 +233,11 @@ GrPath* GrGpu::createPath(const SkPath& path) { return this->onCreatePath(path); } -void GrGpu::clear(const GrIRect* rect, - GrColor color, +void GrGpu::clear(const GrIRect* rect, + GrColor color, GrRenderTarget* renderTarget) { GrRenderTarget* oldRT = NULL; - if (NULL != renderTarget && + if (NULL != renderTarget && renderTarget != this->drawState()->getRenderTarget()) { oldRT = this->drawState()->getRenderTarget(); this->drawState()->setRenderTarget(renderTarget); @@ -489,12 +489,12 @@ bool GrGpu::onReserveVertexSpace(GrVertexLayout vertexLayout, int vertexCount, void** vertices) { GeometryPoolState& geomPoolState = fGeomPoolStateStack.back(); - + GrAssert(vertexCount > 0); GrAssert(NULL != vertices); - + this->prepareVertexPool(); - + *vertices = fVertexPool->makeSpace(vertexLayout, vertexCount, &geomPoolState.fPoolVertexBuffer, @@ -508,7 +508,7 @@ bool GrGpu::onReserveVertexSpace(GrVertexLayout vertexLayout, bool GrGpu::onReserveIndexSpace(int indexCount, void** indices) { GeometryPoolState& geomPoolState = fGeomPoolStateStack.back(); - + GrAssert(indexCount > 0); GrAssert(NULL != indices); |