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

Unified Diff: src/pipe/SkGPipeWrite.cpp

Issue 267863002: 4x allocation in PipeController is probably overkill. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move Created 6 years, 8 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 | « no previous file | src/pipe/utils/SamplePipeControllers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/SkGPipeWrite.cpp
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index 82848f8a6ff1af1aa7b81b6147f791c658bcb4b3..ad3d97affc9a3c298a6e0f20922935416eea3ca3 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -479,6 +479,7 @@ bool SkGPipeCanvas::needOpBytes(size_t needed) {
// out.
this->doNotify();
size_t blockSize = SkTMax<size_t>(MIN_BLOCK_SIZE, needed);
+ blockSize += 128; // TODO(mtklein, scroggo): why do we need this extra padding?
scroggo 2014/05/02 16:15:42 Might we be passing too small a number into needOp
void* block = fController->requestBlock(blockSize, &fBlockSize);
if (NULL == block) {
// Do not notify the readers, which would call this function again.
« no previous file with comments | « no previous file | src/pipe/utils/SamplePipeControllers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698