'../include/utils/SkMeshUtils.h',
'../include/utils/SkNinePatch.h',
'../include/utils/SkNWayCanvas.h',
+ '../include/utils/SkNullCanvas.h',
'../include/utils/SkParse.h',
'../include/utils/SkParsePaint.h',
'../include/utils/SkParsePath.h',
'../src/utils/SkMeshUtils.cpp',
'../src/utils/SkNinePatch.cpp',
'../src/utils/SkNWayCanvas.cpp',
+ '../src/utils/SkNullCanvas.cpp',
'../src/utils/SkOSFile.cpp',
'../src/utils/SkParse.cpp',
'../src/utils/SkParseColor.cpp',
--- /dev/null
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkNullCanvas_DEFINED
+#define SkNullCanvas_DEFINED
+
+#include "SkBitmap.h"
+
+class SkCanvas;
+
+/**
+ * Creates a canvas that draws nothing. This is useful for performance testing.
+ */
+SkCanvas* SkCreateNullCanvas();
+
+#endif
--- /dev/null
+/*
+ * 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);
+}