4
* A Low Level GPU Graphics and Utilities API
6
* Copyright (C) 2007,2008,2009,2010 Intel Corporation.
8
* Permission is hereby granted, free of charge, to any person
9
* obtaining a copy of this software and associated documentation
10
* files (the "Software"), to deal in the Software without
11
* restriction, including without limitation the rights to use, copy,
12
* modify, merge, publish, distribute, sublicense, and/or sell copies
13
* of the Software, and to permit persons to whom the Software is
14
* furnished to do so, subject to the following conditions:
16
* The above copyright notice and this permission notice shall be
17
* included in all copies or substantial portions of the Software.
19
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
23
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
24
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
40
#include "cogl-clip-state.h"
41
#include "cogl-clip-stack.h"
42
#include "cogl-context-private.h"
43
#include "cogl-framebuffer-private.h"
44
#include "cogl-journal-private.h"
45
#include "cogl-util.h"
46
#include "cogl-matrix-private.h"
47
#include "cogl1-context.h"
50
cogl_clip_push_window_rectangle (int x_offset,
55
cogl_framebuffer_push_scissor_clip (cogl_get_draw_framebuffer (),
56
x_offset, y_offset, width, height);
59
/* XXX: This is deprecated API */
61
cogl_clip_push_window_rect (float x_offset,
66
cogl_clip_push_window_rectangle (x_offset, y_offset, width, height);
70
cogl_clip_push_rectangle (float x_1,
75
cogl_framebuffer_push_rectangle_clip (cogl_get_draw_framebuffer (),
79
/* XXX: Deprecated API */
81
cogl_clip_push (float x_offset,
86
cogl_clip_push_rectangle (x_offset,
93
cogl_clip_push_primitive (CoglPrimitive *primitive,
99
cogl_framebuffer_push_primitive_clip (cogl_get_draw_framebuffer (),
110
cogl_framebuffer_pop_clip (cogl_get_draw_framebuffer ());
114
cogl_clip_stack_save (void)
116
/* This function was just used to temporarily switch the clip stack
117
* when using an offscreen buffer. This is no longer needed because
118
* each framebuffer maintains its own clip stack. The function is
119
* documented to do nothing since version 1.2 */
123
cogl_clip_stack_restore (void)
125
/* Do nothing. See cogl_clip_stack_save() */
128
/* XXX: This should never have been made public API! */
130
cogl_clip_ensure (void)
134
* This API shouldn't be used by anyone and the documented semantics
135
* are basically vague enough that we can get away with doing