aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMiniRecorder.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-09-28 10:33:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-28 10:33:02 -0700
commit449d9b7e2d1b2e20963f18639c6e541ef953f069 (patch)
tree0510fb4fd639ebd7e43a2388d5d545a3f0259c18 /src/core/SkMiniRecorder.cpp
parent476506d070dbc59b158acc1a00c34bff95ab2968 (diff)
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
Diffstat (limited to 'src/core/SkMiniRecorder.cpp')
-rw-r--r--src/core/SkMiniRecorder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkMiniRecorder.cpp b/src/core/SkMiniRecorder.cpp
index 0a4859f379..ea179d78b3 100644
--- a/src/core/SkMiniRecorder.cpp
+++ b/src/core/SkMiniRecorder.cpp
@@ -70,7 +70,7 @@ SkMiniRecorder::~SkMiniRecorder() {
#define TRY_TO_STORE(Type, ...) \
if (fState != State::kEmpty) { return false; } \
fState = State::k##Type; \
- new (fBuffer.get()) Type(__VA_ARGS__); \
+ new (fBuffer.get()) Type{__VA_ARGS__}; \
return true
bool SkMiniRecorder::drawBitmapRect(const SkBitmap& bm, const SkRect* src, const SkRect& dst,