Commit f3007e11 authored by Viktor Lidholt's avatar Viktor Lidholt

Adds cull rect to sprite performance test

parent 9b29b5fa
...@@ -191,7 +191,8 @@ class TestPerformanceAtlas extends Node { ...@@ -191,7 +191,8 @@ class TestPerformanceAtlas extends Node {
transforms.add(createTransform(512.0, 512.0, rects[0].size.width / 2.0, rects[0].size.height / 2.0, rotation, 1.0)); transforms.add(createTransform(512.0, 512.0, rects[0].size.width / 2.0, rects[0].size.height / 2.0, rotation, 1.0));
// Draw atlas // Draw atlas
canvas.drawAtlas(_spriteSheet.image, transforms, rects, null, null, null, cachedPaint); Rect cullRect = spriteBox.visibleArea;
canvas.drawAtlas(_spriteSheet.image, transforms, rects, null, null, cullRect, cachedPaint);
} }
void update(double dt) { void update(double dt) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment