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

Unified Diff: src/gpu/batches/GrBatch.cpp

Issue 1772023003: Lazy init batch unique ID (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment Created 4 years, 9 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/batches/GrBatch.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrBatch.cpp
diff --git a/src/gpu/batches/GrBatch.cpp b/src/gpu/batches/GrBatch.cpp
index 8af1c1e0880ddd0673cbeeb1adf628c25c47b69f..900f889ff870f759ba09ab7dbf1d7c26d527ef42 100644
--- a/src/gpu/batches/GrBatch.cpp
+++ b/src/gpu/batches/GrBatch.cpp
@@ -36,7 +36,7 @@ public:
int32_t GrBatch::gCurrBatchClassID = GrBatch::kIllegalBatchID;
-GrBATCH_SPEW(int32_t GrBatch::gCurrBatchUniqueID = GrBatch::kIllegalBatchID;)
+int32_t GrBatch::gCurrBatchUniqueID = GrBatch::kIllegalBatchID;
void* GrBatch::operator new(size_t size) {
return MemoryPoolAccessor().pool()->allocate(size);
@@ -48,10 +48,7 @@ void GrBatch::operator delete(void* target) {
GrBatch::GrBatch(uint32_t classID)
: fClassID(classID)
-#if GR_BATCH_SPEW
- , fUniqueID(GenBatchID())
-#endif
-{
+ , fUniqueID(kIllegalBatchID) {
SkDEBUGCODE(fUsed = false;)
}
« no previous file with comments | « src/gpu/batches/GrBatch.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698