Index: src/core/SkPictureRecord.cpp |
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp |
index 7a853816ae72b702b0915c5829587a593bf933a0..0ec9eaf74d0c812b01bea81893d39ff61fb94d80 100644 |
--- a/src/core/SkPictureRecord.cpp |
+++ b/src/core/SkPictureRecord.cpp |
@@ -401,16 +401,13 @@ static bool merge_savelayer_paint_into_drawbitmp(SkWriter32* writer, |
SkColorGetA(saveLayerPaint->getColor())); |
dbmPaint->setColor(newColor); |
- const SkFlatData* data = paintDict->findAndReturnFlat(*dbmPaint); |
- if (NULL == data) { |
- return false; |
- } |
+ const int paintIndex = paintDict->find(*dbmPaint); |
// kill the saveLayer and alter the DBMR2R's paint to be the modified one |
convert_command_to_noop(writer, saveLayerInfo.fOffset); |
uint32_t* ptr = writer->peek32(dbmInfo.fOffset+dbmPaintOffset); |
SkASSERT(dbmPaintId == *ptr); |
- *ptr = data->index(); |
+ *ptr = paintIndex; |
return true; |
} |