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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 639933003: Add SkBBoxHierarchy::reserve() as an optional size hint. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 2 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/SkBBoxHierarchy.h ('k') | src/core/SkTileGrid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecordDraw.cpp
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index af2037044899b087299baf8230ed5e0605e3aaa5..45324b8cecba03a10346a0abab4a2a192f5becde 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -162,6 +162,7 @@ public:
// Finally feed all stored bounds into the BBH. They'll be returned in this order.
SkASSERT(bbh);
+ bbh->reserve(record.count());
for (unsigned i = 0; i < record.count(); i++) {
if (!fBounds[i].isEmpty()) {
bbh->insert(i, fBounds[i], true/*ok to defer*/);
« no previous file with comments | « src/core/SkBBoxHierarchy.h ('k') | src/core/SkTileGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698