Re: Using Cairo GL surface as the main surface and supply cairo_image_surface as pattern won't work

"Henry (Yu) Song" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Maybe send your sample code to me?  By the way which branch do you use.  1.14.2-rebase-wip is the latest branch based on 1.14.2.  Your code might have a major performance problem.   If your app requires fill those multiple image surfaces to gl surface for every frame, the performance will be terrible.


> On Aug 14, 2015, at 8:20 AM, Chunlin Ye <[email protected]> wrote:
> 
> I am tweaking an Cairo app on Android, and using the https://github.com/SRA-SiliconValley/cairogles as the GL based cairo.
> 
> For now I use cairo_gl_surface_create_for_egl to create an gl surface, call it Prime Surface, and my app create multiple layer of cairo_image_surface which created by cairo_image_surface_create_for_data and using them as pattern to draw onto the Prime Surface.
> 
> The drawing code are something like: 
> 
> cairo_pattern_t *pattern = cairo_pattern_create_for_surface(r->surface);
> int surfaceWidth = cairo_image_surface_get_width(r->surface);
> int surfaceHeight = cairo_image_surface_get_height(r->surface);
> cairo_rectangle(cr, 0, 0, surfaceWidth, surfaceHeight);
> cairo_set_source(cr, pattern);
> cairo_fill(cr);
> 
> but this do not work. I also tried:
> 
> cairo_set_source_surface(cr, image_surface, 0, 0);  
> cairo_paint(cr);
> 
> 
> don’t work too.
> 
> Do anybody know what causing this problem?
> 
> 
> 
> -- 
> cairo mailing list
> [email protected]
> http://lists.cairographics.org/mailman/listinfo/cairo

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.