aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-11 15:39:15 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-11 15:39:15 +0000
commit19bbd3d02ea0be435ff47e9e389d2c3abf9f6872 (patch)
tree46028199cca45975201dcf4fc3c483df3f738185 /src
parent64aef2bacd1f5c25ffd9347aabd6265c9b60c0f4 (diff)
Null canvas
Review URL: http://codereview.appspot.com/6117051/ git-svn-id: http://skia.googlecode.com/svn/trunk@4220 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/utils/SkNullCanvas.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/utils/SkNullCanvas.cpp b/src/utils/SkNullCanvas.cpp
new file mode 100644
index 0000000000..2dc448f21a
--- /dev/null
+++ b/src/utils/SkNullCanvas.cpp
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkNullCanvas.h"
+
+#include "SkCanvas.h"
+#include "SKNWayCanvas.h"
+
+
+SkCanvas* SkCreateNullCanvas() {
+ // An N-Way canvas forwards calls to N canvas's. When N == 0 it's
+ // effectively a null canvas.
+ return SkNEW(SkNWayCanvas);
+}