summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/video
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2013-08-06 04:05:49 +0000
committer Aaron Giles <aaron@aarongiles.com>2013-08-06 04:05:49 +0000
commitcb513fef5bccba3e765708f0d8044d2ea18be415 (patch)
treececc17dda4a6c964b1e800e077958a68aea8f3cb /src/emu/video
parentb8f66ce559f88b159da04d456f9de9a85c29e766 (diff)
A little more primary_screen removal.
Diffstat (limited to 'src/emu/video')
-rw-r--r--src/emu/video/polynew.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/emu/video/polynew.h b/src/emu/video/polynew.h
index c0f1fec468b..2b51d3f3607 100644
--- a/src/emu/video/polynew.h
+++ b/src/emu/video/polynew.h
@@ -120,10 +120,12 @@ public:
// construction/destruction
poly_manager(running_machine &machine, UINT8 flags = 0);
+ poly_manager(screen_device &screen, UINT8 flags = 0);
virtual ~poly_manager();
// getters
running_machine &machine() const { return m_machine; }
+ screen_device &screen() const { assert(m_screen != NULL); return *m_screen; }
// synchronization
void wait(const char *debug_reason = "general");
@@ -247,6 +249,7 @@ private:
// queue management
running_machine & m_machine;
+ screen_device * m_screen;
osd_work_queue * m_queue; // work queue
// arrays
@@ -279,6 +282,7 @@ private:
template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(running_machine &machine, UINT8 flags)
: m_machine(machine),
+ m_screen(NULL),
m_queue(NULL),
m_polygon(machine, *this),
m_object(machine, *this),
@@ -302,6 +306,33 @@ poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(runnin
}
+template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
+poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(screen_device &screen, UINT8 flags)
+ : m_machine(screen.machine()),
+ m_screen(&screen),
+ m_queue(NULL),
+ m_polygon(screen.machine(), *this),
+ m_object(screen.machine(), *this),
+ m_unit(screen.machine(), *this),
+ m_flags(flags),
+ m_triangles(0),
+ m_quads(0),
+ m_pixels(0)
+{
+#if KEEP_STATISTICS
+ memset(m_conflicts, 0, sizeof(m_conflicts));
+ memset(m_resolved, 0, sizeof(m_resolved));
+#endif
+
+ // create the work queue
+ if (!(flags & POLYFLAG_NO_WORK_QUEUE))
+ m_queue = osd_work_queue_alloc(WORK_QUEUE_FLAG_MULTI | WORK_QUEUE_FLAG_HIGH_FREQ);
+
+ // request a pre-save callback for synchronization
+ machine().save().register_presave(save_prepost_delegate(FUNC(poly_manager::presave), this));
+}
+
+
//-------------------------------------------------
// ~poly_manager - destructor
//-------------------------------------------------