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

Unified Diff: src/core/SkCanvas.cpp

Issue 2485853005: Revert of Make SkSmallAllocator obey the RAII invariants and be expandable (Closed)
Patch Set: Created 4 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/core/SkBlitter.cpp ('k') | src/core/SkDrawLooper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 980a5e447b13c416add858516fef6113be115a94..cd4dcbc2a509349838e5957b76f4535f00083c0c 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -495,11 +495,9 @@
}
if (SkDrawLooper* looper = paint.getLooper()) {
- fLooperContext = fLooperContextAllocator.createWithIniterT<SkDrawLooper::Context>(
- looper->contextSize(),
- [&](void* buffer) {
- return looper->createContext(canvas, buffer);
- });
+ void* buffer = fLooperContextAllocator.reserveT<SkDrawLooper::Context>(
+ looper->contextSize());
+ fLooperContext = looper->createContext(canvas, buffer);
fIsSimple = false;
} else {
fLooperContext = nullptr;
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkDrawLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698