Index: src/core/SkPictureRecord.cpp |
=================================================================== |
--- src/core/SkPictureRecord.cpp (revision 9089) |
+++ src/core/SkPictureRecord.cpp (working copy) |
@@ -931,19 +931,9 @@ |
void SkPictureRecord::drawRRect(const SkRRect& rrect, const SkPaint& paint) { |
robertphillips
2013/05/10 14:08:40
Could also move these into the final else block
|
uint32_t initialOffset, size; |
if (rrect.isRect()) { |
- // op + paint index + rect |
- size = 2 * kUInt32Size + sizeof(SkRect); |
- initialOffset = this->addDraw(DRAW_RECT, &size); |
- SkASSERT(initialOffset+getPaintOffset(DRAW_RECT, size) == fWriter.size()); |
- addPaint(paint); |
- addRect(rrect.getBounds()); |
+ this->SkPictureRecord::drawRect(rrect.getBounds(), paint); |
} else if (rrect.isOval()) { |
- // op + paint index + rect |
- size = 2 * kUInt32Size + sizeof(SkRect); |
- initialOffset = this->addDraw(DRAW_OVAL, &size); |
- SkASSERT(initialOffset+getPaintOffset(DRAW_OVAL, size) == fWriter.size()); |
- addPaint(paint); |
- addRect(rrect.getBounds()); |
+ this->SkPictureRecord::drawOval(rrect.getBounds(), paint); |
} else { |
// op + paint index + rrect |
size = 2 * kUInt32Size + SkRRect::kSizeInMemory; |
@@ -951,8 +941,8 @@ |
SkASSERT(initialOffset+getPaintOffset(DRAW_RRECT, size) == fWriter.size()); |
addPaint(paint); |
addRRect(rrect); |
+ validate(initialOffset, size); |
} |
- validate(initialOffset, size); |
} |
void SkPictureRecord::drawPath(const SkPath& path, const SkPaint& paint) { |