diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-17 14:06:49 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-17 14:06:49 +0000 |
commit | 07ea2db0260d8e6cd2bf605571b68b1c574b5a77 (patch) | |
tree | 8ccd8eb79f6dbee8a55ac5029eee07478cb29e39 /include/gpu | |
parent | 63ae1cfb10d0d14722df59cba0012f8a4370c090 (diff) |
Remove unnecessary GrContext flushes
Review URL: http://codereview.appspot.com/6446150/
git-svn-id: http://skia.googlecode.com/svn/trunk@5150 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrContext.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index c32b908625..0687dcf7b5 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -778,7 +778,9 @@ private: void setPaint(const GrPaint& paint); - GrDrawTarget* prepareToDraw(const GrPaint&, BufferedDraw); + /// Sets the paint and returns the target to draw into. The paint can be NULL in which case the + /// draw state is left unmodified. + GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw); void internalDrawPath(const GrPaint& paint, const SkPath& path, GrPathFill fill, const GrPoint* translate); @@ -884,15 +886,12 @@ public: GrTexture* detach() { GrTexture* temp = fTexture; - GrAssert(1 == temp->getRefCnt()); - // freeEntry will remove the texture cache's ref temp->ref(); fContext->freeEntry(fTexture); fTexture = NULL; temp->setFlag((GrTextureFlags) GrTexture::kReturnToCache_FlagBit); - GrAssert(1 == temp->getRefCnt()); return temp; } |