diff options
author | Robert Bragg <robert@linux.intel.com> | 2013-04-21 13:05:04 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2013-10-13 18:07:12 +0100 |
commit | 15d77251ffbcbd346f7103dc57e29f441ec58d5e (patch) | |
tree | 2c256a271625ead541f7d2f42b2af94e15e91de5 /cogl/cogl-mode-private.h | |
parent | 03317859f73735a769eb422de91fcbdf21417337 (diff) | |
download | cogl-15d77251ffbcbd346f7103dc57e29f441ec58d5e.tar.gz |
stash: Expose api to configure outputswip/outputs
Previously it was only possible to read the state of outputs. This patch
introduces apis for configuring outputs including setting new modes and
setting up hardware overlays.
This notably has a different style to the XRandR/KMS apis that expose
a model of components that can be assembled into a display pipeline. For
example the KMS api lets you make a pipeline like this:
framebuffers -> crtc [+planes] -> encoder -> connector
This Cogl api instead exposes an object (CoglOutput) that represents a
full display/output pipeline and then lets you hook sources into that
pipeline via CoglOverlay objects whereby a source may be scaled and
positioned relative to the full output resolution and multiple overlays
may be stacked to be composed before display.
With this api all output changes are batched up until
cogl_renderer_commit_outputs() is called and on failure we will role
back to the previous state. This is also unlike the KMS api where errors
can be reported while you may only be part way through configuring the
outputs as desired and there is no role back mechanism.
With this api we also hope to cover more capabilities with a portable
api whereas the portable KMS api is very minimal and depends on device
specific ioctls for more complete control.
Diffstat (limited to 'cogl/cogl-mode-private.h')
-rw-r--r-- | cogl/cogl-mode-private.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/cogl/cogl-mode-private.h b/cogl/cogl-mode-private.h new file mode 100644 index 00000000..fddd1cad --- /dev/null +++ b/cogl/cogl-mode-private.h @@ -0,0 +1,58 @@ +/* + * Cogl + * + * An object oriented GL/GLES Abstraction/Utility Layer + * + * Copyright (C) 2013 Intel Corporation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + * + * + */ + +#ifndef _COGL_MODE_PRIVATE_H_ +#define _COGL_MODE_PRIVATE_H_ + +#include "cogl-mode.h" +#include "cogl-object-private.h" + +struct _CoglMode +{ + CoglObjectClass _parent; + + char *name; + + /* NB: _cogl_mode_equal() expects everything from the width member + * to the end of the struct to be comparable using memcmp(). + */ + int width; + int height; + + float refresh_rate; + +#if 0 + uint32_t clock; + uint16_t hdisplay, hsync_start, hsync_end, htotal, hskew; + uint16_t vdisplay, vsync_start, vsync_end, vtotal, vscan; + + uint32_t flags; + uint32_t type; +#endif +}; + +CoglMode * +_cogl_mode_new (const char *name); + +#endif /* _COGL_MODE_PRIVATE_H_ */ |