mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
2e61318914
This removes cogl_framebuffer_get_color_format() since the actual internal format isn't strictly controlled by us. CoglFramebuffer::format has been renamed to ::internal_format to make it clearer that it only really represents the premultiplication status. The plan is to make most of the work involved in creating a texture happen lazily when allocating so this patch also changes _cogl_framebuffer_init() to not take a format argument anymore since we won't know the format of offscreen framebuffers until the framebuffer is allocated, after the corresponding texture has been allocated. In the case of offscreen framebuffers we now update the framebuffer internal_format during allocation. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 8cc9e1c8bd2fac8b2a95087249c23c952d5e379f) Note: Since we can't break API compatibility on the 1.x branch this actually keeps the cogl_framebuffer_get_color_format() api but moves it into a new deprecated/cogl-framebuffer-deprecated.c file and it now returns the newly name ::internal_format.
56 lines
1.9 KiB
C
56 lines
1.9 KiB
C
/*
|
|
* Cogl
|
|
*
|
|
* An object oriented GL/GLES Abstraction/Utility Layer
|
|
*
|
|
* Copyright (C) 2014 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_FRAMEBUFFER_DEPRECATED_H__
|
|
#define __COGL_FRAMEBUFFER_DEPRECATED_H__
|
|
|
|
#include <cogl/cogl-macros.h>
|
|
|
|
/* XXX: Since this api was marked unstable, maybe we can just
|
|
* remove this api if we can't find anyone is using it. */
|
|
/**
|
|
* cogl_framebuffer_get_color_format:
|
|
* @framebuffer: A #CoglFramebuffer framebuffer
|
|
*
|
|
* Queries the common #CoglPixelFormat of all color buffers attached
|
|
* to this framebuffer. For an offscreen framebuffer created with
|
|
* cogl_offscreen_new_with_texture() this will correspond to the format
|
|
* of the texture.
|
|
*
|
|
* This API is deprecated because it is missleading to report a
|
|
* #CoglPixelFormat for the internal format of the @framebuffer since
|
|
* #CoglPixelFormat is such a precise format description and it's
|
|
* only the set of components and the premultiplied alpha status
|
|
* that is really known.
|
|
*
|
|
* Since: 1.8
|
|
* Stability: unstable
|
|
* Deprecated 1.18: Removed since it is misleading
|
|
*/
|
|
COGL_DEPRECATED_IN_1_18
|
|
CoglPixelFormat
|
|
cogl_framebuffer_get_color_format (CoglFramebuffer *framebuffer);
|
|
|
|
#endif /* __COGL_FRAMEBUFFER_DEPRECATED_H__ */
|