[cairo-bugs] [Bug 90436] New: CAIRO_STATUS_NO_MEMORY after cairo_paint on 150x150 A8 image surface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed May 13 06:53:50 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=90436

            Bug ID: 90436
           Summary: CAIRO_STATUS_NO_MEMORY after cairo_paint on 150x150 A8
                    image surface
           Product: cairo
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
          Assignee: chris at chris-wilson.co.uk
          Reporter: freedesktoporg at sailer.dynip.lugs.ch
        QA Contact: cairo-bugs at cairographics.org

I am trying to paint a surface (250x160 pixel) derived by reading an SVG file
with rsvg and painting it on that surface on another A8 150x150 pixel image
surface.

This worked up to a few month before the 1.14.0 release (git 337ab1f is ok,
1.14.0 and 1.14.2 not). Now cairo_status after cairo_paint returns
CAIRO_STATUS_NO_MEMORY.

My code is below (full code at
http://svn.gna.org/viewcvs/vfrnav/trunk/src/metgraph.cc?revision=228&view=markup). 

Cairo::RefPtr<Cairo::ImageSurface>
sfc(Cairo::ImageSurface::create(Cairo::FORMAT_A8, 2 * get_width(), 2 *
get_height()));
Cairo::RefPtr<Cairo::Context> ctx(Cairo::Context::create(sfc));
std::random_shuffle(m_groups.begin(), m_groups.end());
int stride(sfc->get_stride());
const uint8_t *data(sfc->get_data());
    double invmaxdensity(1.0 / (255.0 * get_width() * get_height()));
    for (groups_t::iterator gi(m_groups.begin()), ge(m_groups.end()); gi != ge;
++gi) {
     for (int x = 0; x < 2; ++x)
     for (int y = 0; y < 2; ++y) {
     ctx->save();
     ctx->translate(-x * get_width(), -y * get_height());
     ctx->set_source(gi->get_pattern());
     ctx->paint();
     ctx->restore();
     }
342     sfc->flush();

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20150513/fde3fb88/attachment.html>


More information about the cairo-bugs mailing list