simplify code in SkRecords.h
- use C++11 features ({} init, move constructors) to eliminate the need
for explicit constructors
- collapse RECORD0...RECORD8 into just one RECORD macro
- explicitly tag record types instead of using member detectors.
Removing member detectors makes this code significantly less fragile.
This exposes a few places where we didn't really think through what to do
with SkDrawable. I've marked them TODO for now.
BUG=skia:
Review URL: https://codereview.chromium.org/1360943003
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 9eccca1..0605d17 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -70,7 +70,7 @@
if (fMiniRecorder) { \
this->flushMiniRecorder(); \
} \
- new (fRecord->append<SkRecords::T>()) SkRecords::T(__VA_ARGS__)
+ new (fRecord->append<SkRecords::T>()) SkRecords::T{__VA_ARGS__}
#define TRY_MINIRECORDER(method, ...) \
if (fMiniRecorder && fMiniRecorder->method(__VA_ARGS__)) { return; }