From b73fe2484813d0177dffd9970abbff0617e248bc Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 7 Jul 2016 09:56:26 -0700 Subject: [PATCH] PR feedback --- libraries/gpu/src/gpu/Batch.cpp | 12 ++++++------ libraries/gpu/src/gpu/Batch.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/gpu/src/gpu/Batch.cpp b/libraries/gpu/src/gpu/Batch.cpp index 2c4c29cee9..9161ee3642 100644 --- a/libraries/gpu/src/gpu/Batch.cpp +++ b/libraries/gpu/src/gpu/Batch.cpp @@ -30,12 +30,12 @@ ProfileRangeBatch::~ProfileRangeBatch() { using namespace gpu; -size_t Batch::_commandsMax { 128 }; -size_t Batch::_commandOffsetsMax { 128 }; -size_t Batch::_paramsMax { 128 }; -size_t Batch::_dataMax { 128 }; -size_t Batch::_objectsMax { 128 }; -size_t Batch::_drawCallInfosMax { 128 }; +size_t Batch::_commandsMax { BATCH_PREALLOCATE_MIN }; +size_t Batch::_commandOffsetsMax { BATCH_PREALLOCATE_MIN }; +size_t Batch::_paramsMax { BATCH_PREALLOCATE_MIN }; +size_t Batch::_dataMax { BATCH_PREALLOCATE_MIN }; +size_t Batch::_objectsMax { BATCH_PREALLOCATE_MIN }; +size_t Batch::_drawCallInfosMax { BATCH_PREALLOCATE_MIN }; Batch::Batch() { _commands.reserve(_commandsMax); diff --git a/libraries/gpu/src/gpu/Batch.h b/libraries/gpu/src/gpu/Batch.h index 628e9e2d04..9cf1ca8269 100644 --- a/libraries/gpu/src/gpu/Batch.h +++ b/libraries/gpu/src/gpu/Batch.h @@ -26,7 +26,7 @@ #include "Transform.h" class QDebug; - +#define BATCH_PREALLOCATE_MIN 128 namespace gpu { enum ReservedSlot { @@ -481,7 +481,7 @@ protected: }; template -size_t Batch::Cache::_max = 128; +size_t Batch::Cache::_max = BATCH_PREALLOCATE_MIN; }