From c2893c5e3870d7e9a37ca146e7da88fba54977d5 Mon Sep 17 00:00:00 2001 From: joshualitt Date: Wed, 28 Jan 2015 06:54:30 -0800 Subject: Revert of GrBatchPrototype (patchset #32 id:630001 of https://codereview.chromium.org/845103005/) Reason for revert: One last try to fix mac perf regression Original issue's description: > GrBatchPrototype > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/d15e4e45374275c045572b304c229237c4a82be4 > > Committed: https://skia.googlesource.com/skia/+/d5a7db4a867c7e6ccf8451a053d987b470099198 TBR=bsalomon@google.com,kkinnunen@nvidia.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/877393002 --- src/gpu/GrBatch.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/gpu/GrBatch.cpp (limited to 'src/gpu/GrBatch.cpp') diff --git a/src/gpu/GrBatch.cpp b/src/gpu/GrBatch.cpp deleted file mode 100644 index e1650a6bd3..0000000000 --- a/src/gpu/GrBatch.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "GrBatch.h" - -#include "GrMemoryPool.h" -#include "SkTLS.h" - -// TODO I noticed a small benefit to using a larger exclusive pool for batches. Its very small, -// but seems to be mostly consistent. There is a lot in flux right now, but we should really -// revisit this when batch is everywhere - -class GrBatch_Globals { -public: - static GrMemoryPool* GetTLS() { - return (GrMemoryPool*)SkTLS::Get(CreateTLS, DeleteTLS); - } - -private: - static void* CreateTLS() { - return SkNEW_ARGS(GrMemoryPool, (16384, 16384)); - } - - static void DeleteTLS(void* pool) { - SkDELETE(reinterpret_cast(pool)); - } -}; - -int32_t GrBatch::gCurrBatchClassID = - GrBatch::kIllegalBatchClassID; - -void* GrBatch::operator new(size_t size) { - return GrBatch_Globals::GetTLS()->allocate(size); -} - -void GrBatch::operator delete(void* target) { - GrBatch_Globals::GetTLS()->release(target); -} -- cgit v1.2.3