aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/DeferredCanvasBench.cpp
diff options
context:
space:
mode:
authorGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-20 14:25:04 +0000
committerGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-20 14:25:04 +0000
commit52805485581cff7e13134aa1465a2950f7bed007 (patch)
treec82961300c9b71ac8751764b69081624374784ec /bench/DeferredCanvasBench.cpp
parent607d08b7db477ae11dbafff0bbebaa91f5c9fd7a (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 'bench/DeferredCanvasBench.cpp')
-rw-r--r--bench/DeferredCanvasBench.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/bench/DeferredCanvasBench.cpp b/bench/DeferredCanvasBench.cpp
index 60873887a5..99c07bfe57 100644
--- a/bench/DeferredCanvasBench.cpp
+++ b/bench/DeferredCanvasBench.cpp
@@ -76,7 +76,7 @@ public:
protected:
virtual void initDeferredCanvas(SkDeferredCanvas& canvas) SK_OVERRIDE {
- canvas.setNotificationClient(SkNEW(SimpleNotificationClient))->unref();
+ canvas.setNotificationClient(&fNotificationClient);
}
virtual void drawInDeferredCanvas(SkDeferredCanvas& canvas) SK_OVERRIDE {
@@ -93,10 +93,12 @@ protected:
virtual void finalizeDeferredCanvas(SkDeferredCanvas& canvas) SK_OVERRIDE {
canvas.clear(0x0);
+ canvas.setNotificationClient(NULL);
}
private:
typedef DeferredCanvasBench INHERITED;
+ SimpleNotificationClient fNotificationClient;
};