aboutsummaryrefslogtreecommitdiff
path: root/samplecode
diff options
context:
space:
mode:
authorreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-03-30 21:02:14 +0000
committerreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-03-30 21:02:14 +0000
commitaefd2bc75738963b9b6579897be32bfbc8fb00af (patch)
treeaf2a10646259a721b27e84c97e13b75b50882696 /samplecode
parentf459a4949d4edb179e015cf12635d26c596fd17c (diff)
Add SkChunkAlloc::unalloc() to undo the last allocation, useful if the caller wants to treat the allocats like temp memory (see PictureRecord)
Call unalloc if a paint (or other cached object) is already in our list for picture recording Use correct CompareType macro in SkCanvas::quickReject git-svn-id: http://skia.googlecode.com/svn/trunk@138 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleApp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 3a819029d0..635fde1dc0 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -299,12 +299,12 @@ void SampleWindow::afterChildren(SkCanvas* orig) {
case kRaster_CanvasType:
break;
case kPicture_CanvasType:
- if (false) {
+ if (true) {
SkPicture* pict = new SkPicture(*fPicture);
fPicture->unref();
orig->drawPicture(*pict);
pict->unref();
- } if (true) {
+ } else if (true) {
SkDynamicMemoryWStream ostream;
fPicture->serialize(&ostream);
fPicture->unref();