Index: src/core/SkPictureRecord.cpp |
=================================================================== |
--- src/core/SkPictureRecord.cpp (revision 13655) |
+++ src/core/SkPictureRecord.cpp (working copy) |
@@ -34,7 +34,8 @@ |
, fStateTree(NULL) |
, fFlattenableHeap(HEAP_BLOCK_SIZE) |
, fPaints(&fFlattenableHeap) |
- , fRecordFlags(flags) { |
+ , fRecordFlags(flags) |
+ , fOptsEnabled(true) { |
#ifdef SK_DEBUG_SIZE |
fPointBytes = fRectBytes = fTextBytes = 0; |
fPointWrites = fRectWrites = fTextWrites = 0; |
@@ -627,7 +628,7 @@ |
} |
size_t opt = 0; |
- if (!(fRecordFlags & SkPicture::kDisableRecordOptimizations_RecordingFlag)) { |
+ if (fOptsEnabled) { |
for (opt = 0; opt < SK_ARRAY_COUNT(gPictureRecordOpts); ++opt) { |
if (0 != (gPictureRecordOpts[opt].fFlags & kSkipIfBBoxHierarchy_Flag) |
&& NULL != fBoundingHierarchy) { |
@@ -642,8 +643,7 @@ |
} |
} |
- if ((fRecordFlags & SkPicture::kDisableRecordOptimizations_RecordingFlag) || |
- SK_ARRAY_COUNT(gPictureRecordOpts) == opt) { |
+ if (!fOptsEnabled || SK_ARRAY_COUNT(gPictureRecordOpts) == opt) { |
// No optimization fired so add the RESTORE |
this->recordRestore(); |
} |