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

Unified Diff: src/gpu/GrProcessor.cpp

Issue 745663002: Adding GeometryData object (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 6 years, 1 month 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/GrGeometryProcessor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProcessor.cpp
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 01071dabfd7a42f9efeb56c1f2b2d55375a4d5ed..d850d6894a3782e04e827d723edb2110cac05abb 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -9,6 +9,7 @@
#include "GrBackendProcessorFactory.h"
#include "GrContext.h"
#include "GrCoordTransform.h"
+#include "GrGeometryData.h"
#include "GrInvariantOutput.h"
#include "GrMemoryPool.h"
#include "SkTLS.h"
@@ -152,3 +153,17 @@ bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con
}
return true;
}
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+/*
+ * GrGeometryData shares the same pool so it lives in this file too
+ */
+void* GrGeometryData::operator new(size_t size) {
+ return GrProcessor_Globals::GetTLS()->allocate(size);
+}
+
+void GrGeometryData::operator delete(void* target) {
+ GrProcessor_Globals::GetTLS()->release(target);
+}
+
« no previous file with comments | « src/gpu/GrGeometryProcessor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698