pitch = (((w * pixmap->drawable.bitsPerPixel + 7) / 8) + 3) & ~3;
screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, pitch, NULL);
- if (type == GLAMOR_MEMORY_MAP || glamor_check_fbo_size(glamor_priv, w, h)) {
+ if (type == GLAMOR_MEMORY_MAP || usage == GLAMOR_CREATE_NO_LARGE ||
+ glamor_check_fbo_size(glamor_priv, w, h))
+ {
pixmap_priv->type = type;
fbo = glamor_create_fbo(glamor_priv, w, h, format, usage);
}
glamor_pixmap_type_t type);
extern _X_EXPORT void glamor_destroy_textured_pixmap(PixmapPtr pixmap);
extern _X_EXPORT void glamor_block_handler(ScreenPtr screen);
+
extern _X_EXPORT PixmapPtr glamor_create_pixmap(ScreenPtr screen, int w, int h,
int depth, unsigned int usage);
+#define GLAMOR_CREATE_PIXMAP_CPU 0x100
+#define GLAMOR_CREATE_PIXMAP_FIXUP 0x101
+#define GLAMOR_CREATE_FBO_NO_FBO 0x103
+#define GLAMOR_CREATE_PIXMAP_MAP 0x104
+#define GLAMOR_CREATE_NO_LARGE 0x105
+
/* @glamor_egl_exchange_buffers: Exchange the underlying buffers(KHR image,fbo).
*
* @front: front pixmap.
GLint tex = 0;
int cache_flag;
- if (!glamor_check_fbo_size(glamor_priv, w, h))
- return NULL;
-
if (flag == GLAMOR_CREATE_FBO_NO_FBO)
goto new_fbo;
pixmap = pScreen->CreatePixmap(pScreen,
CACHE_PICTURE_SIZE,
CACHE_PICTURE_SIZE + MASK_CACHE_MAX_SIZE,
- depth, 0);
+ depth, GLAMOR_CREATE_NO_LARGE);
if (!pixmap)
goto bail;
INT16 x_dest, INT16 y_dest,
CARD16 width, CARD16 height)
{
- glamor_screen_private *glamor_priv;
glamor_pixmap_clipped_regions *clipped_dest_regions;
glamor_pixmap_clipped_regions *clipped_source_regions;
glamor_pixmap_clipped_regions *clipped_mask_regions;
else
mask_repeat_type = RepeatNone;
- glamor_priv = dest_pixmap_priv->base.glamor_priv;
- fixed_block_width = glamor_priv->max_fbo_size;
- fixed_block_height = glamor_priv->max_fbo_size;
+ fixed_block_width = dest_pixmap_priv->large.block_w;
+ fixed_block_height = dest_pixmap_priv->large.block_h;
/* If we got an totally out-of-box region for a source or mask
* region without repeat, we need to set it as null_source and
* give it a solid color (0,0,0,0). */
/*compute the correct block width and height whose transformed source/mask
*region can fit into one texture.*/
- if (force_clip || fixed_block_width < glamor_priv->max_fbo_size
- || fixed_block_height < glamor_priv->max_fbo_size)
+ if (force_clip || fixed_block_width < dest_pixmap_priv->large.block_w
+ || fixed_block_height < dest_pixmap_priv->large.block_h)
clipped_dest_regions =
glamor_compute_clipped_regions_ext(dest_pixmap_priv, region,
&n_dest_regions,
clipped_regions =
glamor_compute_clipped_regions_ext(pixmap_priv, ®ion,
&n_region,
- pixmap_priv->base.
- glamor_priv->max_fbo_size,
- pixmap_priv->base.
- glamor_priv->max_fbo_size, 0,
+ pixmap_priv->large.block_w,
+ pixmap_priv->large.block_h,
+ 0,
0);
DEBUGF("prepare upload %dx%d to a large pixmap %p\n", w, h, pixmap);
for (i = 0; i < n_region; i++) {
clipped_regions =
glamor_compute_clipped_regions_ext(pixmap_priv, ®ion,
&n_region,
- pixmap_priv->base.
- glamor_priv->max_fbo_size,
- pixmap_priv->base.
- glamor_priv->max_fbo_size, 0,
+ pixmap_priv->large.block_w,
+ pixmap_priv->large.block_h,
+ 0,
0);
DEBUGF("start download large pixmap %p %dx%d \n", pixmap, w, h);
GLAMOR_GL_ES2 // OPENGL ES2.0 API
};
-#define GLAMOR_CREATE_PIXMAP_CPU 0x100
-#define GLAMOR_CREATE_PIXMAP_FIXUP 0x101
-#define GLAMOR_CREATE_FBO_NO_FBO 0x103
-#define GLAMOR_CREATE_PIXMAP_MAP 0x104
-
-#define GLAMOR_CREATE_TEXTURE_EXACT_SIZE 0x104
-
#define GLAMOR_NUM_GLYPH_CACHE_FORMATS 2
#define GLAMOR_COMPOSITE_VBO_VERT_CNT (64*1024)
screen_pixmap = pScreen->CreatePixmap(pScreen,
pScreen->width,
pScreen->height,
- pScreen->rootDepth, 0);
+ pScreen->rootDepth,
+ GLAMOR_CREATE_NO_LARGE);
+
pScreen->SetScreenPixmap(screen_pixmap);
/* Tell the GLX code what to GL texture to read from. */