diff --git a/libs/hwui/tests/microbench/CanvasOpBench.cpp b/libs/hwui/tests/microbench/CanvasOpBench.cpp
new file mode 100644
index 0000000..ef5749e
--- /dev/null
+++ b/libs/hwui/tests/microbench/CanvasOpBench.cpp
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <benchmark/benchmark.h>
+
+#include "DisplayList.h"
+#include "hwui/Paint.h"
+#include "canvas/CanvasOpBuffer.h"
+#include "canvas/CanvasFrontend.h"
+#include "tests/common/TestUtils.h"
+
+using namespace android;
+using namespace android::uirenderer;
+
+void BM_CanvasOpBuffer_alloc(benchmark::State& benchState) {
+    while (benchState.KeepRunning()) {
+        auto displayList = new CanvasOpBuffer();
+        benchmark::DoNotOptimize(displayList);
+        delete displayList;
+    }
+}
+BENCHMARK(BM_CanvasOpBuffer_alloc);
+
+void BM_CanvasOpBuffer_record_saverestore(benchmark::State& benchState) {
+    CanvasFrontend<CanvasOpBuffer> canvas(100, 100);
+    while (benchState.KeepRunning()) {
+        canvas.reset(100, 100);
+        canvas.save(SaveFlags::MatrixClip);
+        canvas.save(SaveFlags::MatrixClip);
+        benchmark::DoNotOptimize(&canvas);
+        canvas.restore();
+        canvas.restore();
+        canvas.finish();
+    }
+}
+BENCHMARK(BM_CanvasOpBuffer_record_saverestore);
+
+void BM_CanvasOpBuffer_record_saverestoreWithReuse(benchmark::State& benchState) {
+    CanvasFrontend<CanvasOpBuffer> canvas(100, 100);
+
+    while (benchState.KeepRunning()) {
+        canvas.reset(100, 100);
+        canvas.save(SaveFlags::MatrixClip);
+        canvas.save(SaveFlags::MatrixClip);
+        benchmark::DoNotOptimize(&canvas);
+        canvas.restore();
+        canvas.restore();
+    }
+}
+BENCHMARK(BM_CanvasOpBuffer_record_saverestoreWithReuse);
+
+void BM_CanvasOpBuffer_record_simpleBitmapView(benchmark::State& benchState) {
+    CanvasFrontend<CanvasOpBuffer> canvas(100, 100);
+
+    Paint rectPaint;
+    sk_sp<Bitmap> iconBitmap(TestUtils::createBitmap(80, 80));
+
+    while (benchState.KeepRunning()) {
+        canvas.reset(100, 100);
+        {
+            canvas.save(SaveFlags::MatrixClip);
+            canvas.draw(CanvasOp<CanvasOpType::DrawRect> {
+                    .rect = SkRect::MakeWH(100, 100),
+                    .paint = rectPaint,
+            });
+            canvas.restore();
+        }
+        {
+            canvas.save(SaveFlags::MatrixClip);
+            canvas.translate(10, 10);
+            canvas.draw(CanvasOp<CanvasOpType::DrawImage> {
+                    iconBitmap,
+                    0,
+                    0,
+                    SkPaint{}
+            });
+            canvas.restore();
+        }
+        benchmark::DoNotOptimize(&canvas);
+        canvas.finish();
+    }
+}
+BENCHMARK(BM_CanvasOpBuffer_record_simpleBitmapView);
diff --git a/libs/hwui/tests/microbench/RenderNodeBench.cpp b/libs/hwui/tests/microbench/RenderNodeBench.cpp
index 206dcd5..011939a 100644
--- a/libs/hwui/tests/microbench/RenderNodeBench.cpp
+++ b/libs/hwui/tests/microbench/RenderNodeBench.cpp
@@ -30,3 +30,29 @@
     }
 }
 BENCHMARK(BM_RenderNode_create);
+
+void BM_RenderNode_recordSimple(benchmark::State& state) {
+    sp<RenderNode> node = new RenderNode();
+    std::unique_ptr<Canvas> canvas(Canvas::create_recording_canvas(100, 100));
+    delete canvas->finishRecording();
+
+    while (state.KeepRunning()) {
+        canvas->resetRecording(100, 100, node.get());
+        canvas->drawColor(0x00000000, SkBlendMode::kSrcOver);
+        node->setStagingDisplayList(canvas->finishRecording());
+    }
+}
+BENCHMARK(BM_RenderNode_recordSimple);
+
+void BM_RenderNode_recordSimpleWithReuse(benchmark::State& state) {
+    sp<RenderNode> node = new RenderNode();
+    std::unique_ptr<Canvas> canvas(Canvas::create_recording_canvas(100, 100));
+    delete canvas->finishRecording();
+
+    while (state.KeepRunning()) {
+        canvas->resetRecording(100, 100, node.get());
+        canvas->drawColor(0x00000000, SkBlendMode::kSrcOver);
+        canvas->finishRecording()->reuseDisplayList(node.get());
+    }
+}
+BENCHMARK(BM_RenderNode_recordSimpleWithReuse);
\ No newline at end of file
diff --git a/libs/hwui/tests/unit/SkiaDisplayListTests.cpp b/libs/hwui/tests/unit/SkiaDisplayListTests.cpp
index 2d34b09..c63f008 100644
--- a/libs/hwui/tests/unit/SkiaDisplayListTests.cpp
+++ b/libs/hwui/tests/unit/SkiaDisplayListTests.cpp
@@ -84,7 +84,7 @@
 
     // attach a displayList for reuse
     SkiaDisplayList skiaDL;
-    ASSERT_TRUE(skiaDL.reuseDisplayList(renderNode.get(), nullptr));
+    ASSERT_TRUE(skiaDL.reuseDisplayList(renderNode.get()));
 
     // detach the list that you just attempted to reuse
     availableList = renderNode->detachAvailableList();
