Index: src/gpu/batches/GrBatch.cpp |
diff --git a/src/gpu/batches/GrBatch.cpp b/src/gpu/batches/GrBatch.cpp |
index 50f94b3902fbbdbc134a0bf672359608f6283d21..6755cf94f76a788bcbdfa5a4dd0ae48a2874330f 100644 |
--- a/src/gpu/batches/GrBatch.cpp |
+++ b/src/gpu/batches/GrBatch.cpp |
@@ -23,9 +23,15 @@ namespace { |
static SkSpinlock gBatchSpinlock; |
class MemoryPoolAccessor { |
public: |
- MemoryPoolAccessor() { gBatchSpinlock.acquire(); } |
+// We know in the Android framework there is only one GrContext. |
+#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) |
+ MemoryPoolAccessor() {} |
+ ~MemoryPoolAccessor() {} |
+#else |
+ MemoryPoolAccessor() { gBatchSpinlock.acquire(); } |
~MemoryPoolAccessor() { gBatchSpinlock.release(); } |
+#endif |
GrMemoryPool* pool() const { |
static GrMemoryPool gPool(16384, 16384); |