Lines 2247-2268
st_theme_node_prerender_shadow (StThemeNodePaintState *state)
Link Here
|
2247 |
COGL_TEXTURE_NO_SLICING, |
2247 |
COGL_TEXTURE_NO_SLICING, |
2248 |
COGL_PIXEL_FORMAT_ANY); |
2248 |
COGL_PIXEL_FORMAT_ANY); |
2249 |
if (buffer != COGL_INVALID_HANDLE) |
2249 |
if (buffer != COGL_INVALID_HANDLE) |
2250 |
offscreen = cogl_offscreen_new_with_texture (buffer); |
|
|
2251 |
|
2252 |
if (offscreen != COGL_INVALID_HANDLE) |
2253 |
{ |
2250 |
{ |
2254 |
ClutterActorBox box = { 0, 0, state->box_shadow_width, state->box_shadow_height}; |
2251 |
CoglError *error = NULL; |
|
|
2252 |
|
2253 |
offscreen = cogl_offscreen_new_with_texture (buffer); |
2254 |
|
2255 |
if (cogl_framebuffer_allocate (COGL_FRAMEBUFFER (offscreen), &error)) |
2256 |
{ |
2257 |
ClutterActorBox box = { 0, 0, state->box_shadow_width, state->box_shadow_height}; |
2258 |
|
2259 |
cogl_framebuffer_orthographic (offscreen, 0, 0, |
2260 |
state->box_shadow_width, |
2261 |
state->box_shadow_height, 0, 1.0); |
2262 |
cogl_framebuffer_clear4f (offscreen, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0); |
2255 |
|
2263 |
|
2256 |
cogl_framebuffer_orthographic (offscreen, 0, 0, |
2264 |
st_theme_node_paint_borders (state, offscreen, &box, 0xFF); |
2257 |
state->box_shadow_width, |
|
|
2258 |
state->box_shadow_height, 0, 1.0); |
2259 |
cogl_framebuffer_clear4f (offscreen, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 0); |
2260 |
|
2265 |
|
2261 |
st_theme_node_paint_borders (state, offscreen, &box, 0xFF); |
2266 |
cogl_handle_unref (offscreen); |
2262 |
cogl_handle_unref (offscreen); |
|
|
2263 |
|
2267 |
|
2264 |
state->box_shadow_pipeline = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node), |
2268 |
state->box_shadow_pipeline = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node), |
2265 |
buffer); |
2269 |
buffer); |
|
|
2270 |
} |
2271 |
else |
2272 |
{ |
2273 |
cogl_handle_unref (offscreen); |
2274 |
|
2275 |
cogl_error_free (error); |
2276 |
} |
2266 |
} |
2277 |
} |
2267 |
|
2278 |
|
2268 |
if (buffer != COGL_INVALID_HANDLE) |
2279 |
if (buffer != COGL_INVALID_HANDLE) |