1 /* 2 * GPAC - Multimedia Framework C SDK 3 * 4 * Authors: Jean Le Feuvre 5 * Copyright (c) Telecom ParisTech 2006-2012 6 * All rights reserved 7 * 8 * This file is part of GPAC / Scene Compositor sub-project 9 * 10 * GPAC is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU Lesser General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 * GPAC is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License for more details. 19 * 20 * You should have received a copy of the GNU Lesser General Public 21 * License along with this library; see the file COPYING. If not, write to 22 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 24 */ 25 26 27 #ifndef OFFSCREEN_CACHE_H 28 #define OFFSCREEN_CACHE_H 29 30 #include "drawable.h" 31 32 typedef struct _group_cache 33 { 34 /*gpac texture object*/ 35 GF_TextureHandler txh; 36 /*drawable representing the cached group*/ 37 Drawable *drawable; 38 39 Fixed opacity; 40 Bool force_recompute; 41 /*user scale (zoom and AR) of the group*/ 42 Fixed scale; 43 SFVec2f orig_vp; 44 45 } GroupCache; 46 47 GroupCache *group_cache_new(GF_Compositor *compositor, GF_Node *node); 48 void group_cache_del(GroupCache *cache); 49 50 /*returns 1 if cache is being recomputed due to dirty subtree*/ 51 Bool group_cache_traverse(GF_Node *node, GroupCache *cache, GF_TraverseState *tr_state, Bool force_recompute, Bool is_mpeg4, Bool auto_fit_vp); 52 53 void group_cache_draw(GroupCache *cache, GF_TraverseState *tr_state); 54 Fixed group_cache_check_coverage_increase(GF_Rect *ctx, GF_Rect *grp_bounds, DrawableContext *curr, DrawableContext* first_child); 55 56 57 58 #endif /*OFFSCREEN_CACHE_H*/ 59 60