Index: third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
index b473c93d473afff949de8b9adc669bd0279bc8fb..0084a06f13cc02ae0d3ce31223a8721771b1ce0d 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
+++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
@@ -31,8 +31,10 @@ class GraphicsContext; |
// Currently the limiting factor is TransformtionMatrix (in |
// BeginTransform3DDisplayItem), which requests 16-byte alignment. |
static const size_t kDisplayItemAlignment = WTF_ALIGN_OF(BeginTransform3DDisplayItem); |
-static const size_t kInitialDisplayItemsCapacity = 64; |
static const size_t kMaximumDisplayItemSize = sizeof(BeginTransform3DDisplayItem); |
+static const size_t kTypicalDisplayItemSize = sizeof(BeginTransform3DDisplayItem); |
+// 16 "typically sized items" is the same as this many large items: |
+static const size_t kInitialDisplayItemsCapacity = 8 * kTypicalDisplayItemSize / kMaximumDisplayItemSize + 1; |
class DisplayItems : public ContiguousContainer<DisplayItem, kDisplayItemAlignment> { |
public: |