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

Unified Diff: src/gpu/GrBatch.cpp

Issue 877393002: Revert of GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: Created 5 years, 11 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 | « src/gpu/GrBatch.h ('k') | src/gpu/GrBatchTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBatch.cpp
diff --git a/src/gpu/GrBatch.cpp b/src/gpu/GrBatch.cpp
deleted file mode 100644
index e1650a6bd31af3d6a5bd188c28b0ee7979889785..0000000000000000000000000000000000000000
--- 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);
-}
« no previous file with comments | « src/gpu/GrBatch.h ('k') | src/gpu/GrBatchTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698