aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRecordDraw.h
diff options
context:
space:
mode:
authorGravatar danakj <danakj@chromium.org>2014-11-03 12:43:30 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-03 12:43:30 -0800
commitd239d425148e5c1445b6a99d9bc33348c41197bc (patch)
tree3b3a2e897126d2e71d9f6577ee91dbff7a506ecd /src/core/SkRecordDraw.h
parent50408adfd23994cdbb5c531ff6366e4e9d29ee6d (diff)
Add comments to SkRecordDraw to help people follow.
The calls to visit() to execute the SkRecord::Draw::operator() code path is not clear to read, so adding some comments to help other new-comers follow this through to the SkCanvas calls. R=mtklein@chromium.org Review URL: https://codereview.chromium.org/695403003
Diffstat (limited to 'src/core/SkRecordDraw.h')
-rw-r--r--src/core/SkRecordDraw.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkRecordDraw.h b/src/core/SkRecordDraw.h
index 701e8352c5..f3f00881ea 100644
--- a/src/core/SkRecordDraw.h
+++ b/src/core/SkRecordDraw.h
@@ -37,6 +37,9 @@ public:
: fInitialCTM(initialCTM ? *initialCTM : canvas->getTotalMatrix())
, fCanvas(canvas) {}
+ // This operator calls methods on the |canvas|. The various draw() wrapper
+ // methods around SkCanvas are defined by the DRAW() macro in
+ // SkRecordDraw.cpp.
template <typename T> void operator()(const T& r) {
this->draw(r);
}