From dbccc88f84e5330ce6e52512fcefd375ee2eda49 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Fri, 8 Jul 2011 18:53:39 +0000 Subject: [PATCH] be sure to allocate space for kDone_DrawOp before we write it (thanks Yang) git-svn-id: http://skia.googlecode.com/svn/trunk@1831 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/pipe/SkGPipeWrite.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp index fa93113946..f56fe2798b 100644 --- a/src/pipe/SkGPipeWrite.cpp +++ b/src/pipe/SkGPipeWrite.cpp @@ -84,8 +84,10 @@ public: void finish() { if (!fDone) { - this->writeOp(kDone_DrawOp); - this->doNotify(); + if (this->needOpBytes()) { + this->writeOp(kDone_DrawOp); + this->doNotify(); + } fDone = true; } }