aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBatch.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@google.com>2015-01-28 06:54:30 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-28 06:54:30 -0800
commitc2893c5e3870d7e9a37ca146e7da88fba54977d5 (patch)
tree9efd98166a608e5ae24d35ab0dde1c7cb9b763b3 /src/gpu/GrBatch.cpp
parent8b0a05ae44911f9263be5936457b66a967b8a1fc (diff)
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
Diffstat (limited to 'src/gpu/GrBatch.cpp')
-rw-r--r--src/gpu/GrBatch.cpp35
1 files changed, 0 insertions, 35 deletions
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<GrMemoryPool*>(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);
-}