Merge pull request #2563 from open-osrs/mirror-garbage
mirror: prevent 50 garbage objs per second
This commit is contained in:
@@ -95,6 +95,7 @@ public class Hooks implements Callbacks
|
|||||||
|
|
||||||
private static final GameTick GAME_TICK = GameTick.INSTANCE;
|
private static final GameTick GAME_TICK = GameTick.INSTANCE;
|
||||||
private static final BeforeRender BEFORE_RENDER = BeforeRender.INSTANCE;
|
private static final BeforeRender BEFORE_RENDER = BeforeRender.INSTANCE;
|
||||||
|
private static final DrawFinished drawFinishedEvent = new DrawFinished();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
@@ -394,8 +395,8 @@ public class Hooks implements Callbacks
|
|||||||
finalImage = image;
|
finalImage = image;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawFinished event = new DrawFinished(copy(finalImage));
|
drawFinishedEvent.image = finalImage;
|
||||||
eventBus.post(DrawFinished.class, event);
|
eventBus.post(DrawFinished.class, drawFinishedEvent);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,11 +24,9 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.events;
|
package net.runelite.client.events;
|
||||||
|
|
||||||
import lombok.Value;
|
|
||||||
import net.runelite.api.events.Event;
|
import net.runelite.api.events.Event;
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
|
|
||||||
@Value
|
|
||||||
public class DrawFinished implements Event
|
public class DrawFinished implements Event
|
||||||
{
|
{
|
||||||
public Image image;
|
public Image image;
|
||||||
|
|||||||
Reference in New Issue
Block a user