Index: src/core/SkPictureRecord.h |
=================================================================== |
--- src/core/SkPictureRecord.h (revision 8010) |
+++ src/core/SkPictureRecord.h (working copy) |
@@ -102,6 +102,7 @@ |
void beginRecording(); |
void endRecording(); |
+ static bool canRecordBounds(DrawType op); |
private: |
void recordRestoreOffsetPlaceholder(SkRegion::Op); |
void fillRestoreOffsetPlaceholdersForCurrentStackLevel( |
@@ -110,8 +111,9 @@ |
SkTDArray<int32_t> fRestoreOffsetStack; |
int fFirstSavedLayerIndex; |
enum { |
- kNoSavedLayerIndex = -1 |
+ kNoSavedLayerIndex = -1, |
}; |
+ static const uint32_t kInvalidOffset = ~0; |
/* |
* Write the 'drawType' operation and chunk size to the skp. 'size' |
@@ -133,10 +135,8 @@ |
#ifdef SK_DEBUG_TRACE |
SkDebugf("add %s\n", DrawTypeToString(drawType)); |
#endif |
- |
SkASSERT(0 != *size); |
SkASSERT(((uint8_t) drawType) == drawType); |
- |
if (0 != (*size & ~MASK_24) || *size == MASK_24) { |
fWriter.writeInt(PACK_8_24(drawType, MASK_24)); |
*size += 1; |
@@ -144,10 +144,14 @@ |
} else { |
fWriter.writeInt(PACK_8_24(drawType, *size)); |
} |
- |
+ fLastDrawRejected = false; |
return offset; |
} |
+ uint32_t addDrawWithBounds(DrawType drawType, uint32_t* size, const SkPaint* paint, |
+ const SkRect* localBounds); |
+ bool recordBounds() const { return fRecordFlags & SkPicture::kRecordBounds_RecordingFlag; } |
+ |
void addInt(int value) { |
fWriter.writeInt(value); |
} |
@@ -219,6 +223,7 @@ |
// Allocated in the constructor and managed by this class. |
SkBitmapHeap* fBitmapHeap; |
+ bool fLastDrawRejected; |
private: |
SkChunkFlatController fFlattenableHeap; |