Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: src/core/SkPictureRecord.cpp

Issue 21564008: use SkTDynamicHash in picture recording (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: er, actually, the remove i removed was necessary Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPictureFlat.cpp ('k') | tests/FlatDataTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/core/SkPictureFlat.cpp ('k') | tests/FlatDataTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698