diff options
author | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-20 14:25:04 +0000 |
---|---|---|
committer | junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-20 14:25:04 +0000 |
commit | 52805485581cff7e13134aa1465a2950f7bed007 (patch) | |
tree | c82961300c9b71ac8751764b69081624374784ec /include/utils | |
parent | 607d08b7db477ae11dbafff0bbebaa91f5c9fd7a (diff) |
Stop refcounting SkDeferredCanvas::NotificationClient
User code (i.e. WebKit) is now responsible for the lifetime scope of the notification client.
With http://trac.webkit.org/changeset/125804 skia-side ref counting has become unnecessary and undesirable.
Review URL: https://codereview.appspot.com/6443146
git-svn-id: http://skia.googlecode.com/svn/trunk@5169 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/utils')
-rw-r--r-- | include/utils/SkDeferredCanvas.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h index f5313713ec..ff3235136d 100644 --- a/include/utils/SkDeferredCanvas.h +++ b/include/utils/SkDeferredCanvas.h @@ -48,8 +48,11 @@ public: /** * Specify a NotificationClient to be used by this canvas. Calling * setNotificationClient will release the previously set - * NotificationClient, if any. Takes a reference on the notification - * client. + * NotificationClient, if any. SkDeferredCanvas does not take ownership + * of the notification client. Therefore user code is resposible + * for its destruction. The notification client must be unregistered + * by calling setNotificationClient(NULL) if it is destroyed before + * this canvas. * Note: Must be called after the device is set with setDevice. * * @param notificationClient interface for dispatching notifications @@ -167,10 +170,8 @@ public: virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE; public: - class NotificationClient : public SkRefCnt { + class NotificationClient { public: - SK_DECLARE_INST_COUNT(NotificationClient) - /** * Called before executing one or several draw commands, which means * once per flush when deferred rendering is enabled. |