summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/common/native.h
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-03-05 10:40:15 +0800
committerChia-I Wu <olv@lunarg.com>2010-03-05 11:32:11 +0800
commit89a75b763467d83d4d402c91db55548682be14f0 (patch)
tree3b964f7b0a37bf7ca1112cec40edfbb6e502c97c /src/gallium/state_trackers/egl/common/native.h
parente38f28ddedd6d4902ae18b1bf243e67d4b16decb (diff)
st/egl: Move modeset interface to native_modeset.h.
native.h is getting more and more complex. Move the independent modeset interface to native_modeset.h to simplify native.h a little.
Diffstat (limited to 'src/gallium/state_trackers/egl/common/native.h')
-rw-r--r--src/gallium/state_trackers/egl/common/native.h57
1 files changed, 2 insertions, 55 deletions
diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h
index 1bf2804db5..4533b3abf9 100644
--- a/src/gallium/state_trackers/egl/common/native.h
+++ b/src/gallium/state_trackers/egl/common/native.h
@@ -34,6 +34,8 @@
#include "pipe/p_context.h"
#include "pipe/p_state.h"
+#include "native_modeset.h"
+
/**
* Only color buffers are listed. The others are allocated privately through,
* for example, st_renderbuffer_alloc_storage().
@@ -122,18 +124,6 @@ struct native_config {
boolean scanout_bit;
};
-struct native_connector {
- int dummy;
-};
-
-struct native_mode {
- const char *desc;
- int width, height;
- int refresh_rate;
-};
-
-struct native_display_modeset;
-
/**
* A pipe winsys abstracts the OS. A pipe screen abstracts the graphcis
* hardware. A native display consists of a pipe winsys, a pipe screen, and
@@ -206,49 +196,6 @@ struct native_display {
};
/**
- * Mode setting interface of the native display. It exposes the mode setting
- * capabilities of the underlying graphics hardware.
- */
-struct native_display_modeset {
- /**
- * Get the available physical connectors and the number of CRTCs.
- */
- const struct native_connector **(*get_connectors)(struct native_display *ndpy,
- int *num_connectors,
- int *num_crtcs);
-
- /**
- * Get the current supported modes of a connector. The returned modes may
- * change every time this function is called and those from previous calls
- * might become invalid.
- */
- const struct native_mode **(*get_modes)(struct native_display *ndpy,
- const struct native_connector *nconn,
- int *num_modes);
-
- /**
- * Create a scan-out surface. Required unless no config has
- * GLX_SCREEN_BIT_MESA set.
- */
- struct native_surface *(*create_scanout_surface)(struct native_display *ndpy,
- const struct native_config *nconf,
- uint width, uint height);
-
- /**
- * Program the CRTC to output the surface to the given connectors with the
- * given mode. When surface is not given, the CRTC is disabled.
- *
- * This interface does not export a way to query capabilities of the CRTCs.
- * The native display usually needs to dynamically map the index to a CRTC
- * that supports the given connectors.
- */
- boolean (*program)(struct native_display *ndpy, int crtc_idx,
- struct native_surface *nsurf, uint x, uint y,
- const struct native_connector **nconns, int num_nconns,
- const struct native_mode *nmode);
-};
-
-/**
* The handler for events that a native display may generate. The events are
* generated asynchronously and the handler may be called by any thread at any
* time.