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
diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h
index f531371..ff32351 100644
--- a/include/utils/SkDeferredCanvas.h
+++ b/include/utils/SkDeferredCanvas.h
@@ -48,8 +48,11 @@
/**
* 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 @@
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.