tizen 2.4 release accepted/tizen_2.4_mobile tizen_2.4 accepted/tizen/2.4/mobile/20151029.033152 submit/tizen_2.4/20151028.064148 tizen_2.4_mobile_release
authorjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 07:40:41 +0000 (16:40 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 07:40:41 +0000 (16:40 +0900)
334 files changed:
.gitignore
Makefile.am [changed mode: 0644->0755]
boilerplate/Makefile.sources [changed mode: 0644->0755]
boilerplate/Makefile.win32.features
boilerplate/cairo-boilerplate-egl.c [changed mode: 0644->0755]
boilerplate/cairo-boilerplate-evas-gl.c [changed mode: 0644->0755]
build/Makefile.win32.features
build/Makefile.win32.features-h
build/configure.ac.features [changed mode: 0644->0755]
build/configure.ac.warnings
configure.ac [changed mode: 0644->0755]
doc/cairo-evas-gl_doc.h
packaging/cairo.spec
src/Makefile.am [changed mode: 0644->0755]
src/Makefile.am.analysis [changed mode: 0644->0755]
src/Makefile.win32 [changed mode: 0644->0755]
src/Makefile.win32.features
src/README [changed mode: 0644->0755]
src/cairo-analysis-surface-private.h [changed mode: 0644->0755]
src/cairo-analysis-surface.c [changed mode: 0644->0755]
src/cairo-arc-private.h [changed mode: 0644->0755]
src/cairo-arc.c [changed mode: 0644->0755]
src/cairo-array-private.h [changed mode: 0644->0755]
src/cairo-array.c [changed mode: 0644->0755]
src/cairo-atomic-private.h [changed mode: 0644->0755]
src/cairo-atomic.c [changed mode: 0644->0755]
src/cairo-backend-private.h [changed mode: 0644->0755]
src/cairo-base64-stream.c [changed mode: 0644->0755]
src/cairo-base85-stream.c [changed mode: 0644->0755]
src/cairo-bentley-ottmann-rectangular.c [changed mode: 0644->0755]
src/cairo-bentley-ottmann-rectilinear.c [changed mode: 0644->0755]
src/cairo-bentley-ottmann.c [changed mode: 0644->0755]
src/cairo-beos-surface.cpp [changed mode: 0644->0755]
src/cairo-beos.h [changed mode: 0644->0755]
src/cairo-botor-scan-converter.c [changed mode: 0644->0755]
src/cairo-box-inline.h [changed mode: 0644->0755]
src/cairo-boxes-intersect.c [changed mode: 0644->0755]
src/cairo-boxes-private.h [changed mode: 0644->0755]
src/cairo-boxes.c [changed mode: 0644->0755]
src/cairo-cache-private.h [changed mode: 0644->0755]
src/cairo-cache.c [changed mode: 0644->0755]
src/cairo-cff-subset.c [changed mode: 0644->0755]
src/cairo-clip-boxes.c [changed mode: 0644->0755]
src/cairo-clip-inline.h [changed mode: 0644->0755]
src/cairo-clip-polygon.c [changed mode: 0644->0755]
src/cairo-clip-private.h [changed mode: 0644->0755]
src/cairo-clip-region.c [changed mode: 0644->0755]
src/cairo-clip-surface.c [changed mode: 0644->0755]
src/cairo-clip-tor-scan-converter.c [changed mode: 0644->0755]
src/cairo-clip.c [changed mode: 0644->0755]
src/cairo-cogl-context-private.h [changed mode: 0644->0755]
src/cairo-cogl-context.c [changed mode: 0644->0755]
src/cairo-cogl-gradient-private.h [changed mode: 0644->0755]
src/cairo-cogl-gradient.c [changed mode: 0644->0755]
src/cairo-cogl-private.h [changed mode: 0644->0755]
src/cairo-cogl-surface.c [changed mode: 0644->0755]
src/cairo-cogl-utils-private.h [changed mode: 0644->0755]
src/cairo-cogl-utils.c [changed mode: 0644->0755]
src/cairo-cogl.h [changed mode: 0644->0755]
src/cairo-color.c [changed mode: 0644->0755]
src/cairo-combsort-inline.h [changed mode: 0644->0755]
src/cairo-compiler-private.h [changed mode: 0644->0755]
src/cairo-composite-rectangles-private.h [changed mode: 0644->0755]
src/cairo-compositor.c [changed mode: 0644->0755]
src/cairo-contour-inline.h [changed mode: 0644->0755]
src/cairo-contour-private.h [changed mode: 0644->0755]
src/cairo-contour.c [changed mode: 0644->0755]
src/cairo-damage-private.h [changed mode: 0644->0755]
src/cairo-damage.c [changed mode: 0644->0755]
src/cairo-debug.c [changed mode: 0644->0755]
src/cairo-default-context-private.h [changed mode: 0644->0755]
src/cairo-default-context.c
src/cairo-deflate-stream.c [changed mode: 0644->0755]
src/cairo-deprecated.h [changed mode: 0644->0755]
src/cairo-device-private.h [changed mode: 0644->0755]
src/cairo-device.c
src/cairo-directfb-surface.c [changed mode: 0644->0755]
src/cairo-directfb.h [changed mode: 0644->0755]
src/cairo-drm.h [changed mode: 0644->0755]
src/cairo-egl-context.c [changed mode: 0644->0755]
src/cairo-error-inline.h [changed mode: 0644->0755]
src/cairo-error-private.h [changed mode: 0644->0755]
src/cairo-error.c [changed mode: 0644->0755]
src/cairo-evas-gl-context.c
src/cairo-evas-gl.h
src/cairo-fallback-compositor.c [changed mode: 0644->0755]
src/cairo-features-uninstalled.pc.in [changed mode: 0644->0755]
src/cairo-features.pc.in [changed mode: 0644->0755]
src/cairo-filters-private.h [changed mode: 0644->0755]
src/cairo-filters.c [changed mode: 0644->0755]
src/cairo-fixed-private.h [changed mode: 0644->0755]
src/cairo-fixed-type-private.h [changed mode: 0644->0755]
src/cairo-fixed.c [changed mode: 0644->0755]
src/cairo-font-face-twin-data.c [changed mode: 0644->0755]
src/cairo-font-face-twin.c [changed mode: 0644->0755]
src/cairo-font-face.c [changed mode: 0644->0755]
src/cairo-fontconfig-private.h [changed mode: 0644->0755]
src/cairo-freed-pool-private.h [changed mode: 0644->0755]
src/cairo-freed-pool.c [changed mode: 0644->0755]
src/cairo-freelist-private.h [changed mode: 0644->0755]
src/cairo-freelist-type-private.h [changed mode: 0644->0755]
src/cairo-freelist.c [changed mode: 0644->0755]
src/cairo-ft-font.c
src/cairo-ft-private.h [changed mode: 0644->0755]
src/cairo-ft.h [changed mode: 0644->0755]
src/cairo-gl-composite.c [changed mode: 0644->0755]
src/cairo-gl-device.c
src/cairo-gl-dispatch-private.h [changed mode: 0644->0755]
src/cairo-gl-dispatch.c [changed mode: 0644->0755]
src/cairo-gl-ext-def-private.h [changed mode: 0644->0755]
src/cairo-gl-glyphs.c [changed mode: 0644->0755]
src/cairo-gl-gradient-private.h
src/cairo-gl-gradient.c [changed mode: 0644->0755]
src/cairo-gl-hairline-stroke.c [changed mode: 0644->0755]
src/cairo-gl-info.c [changed mode: 0644->0755]
src/cairo-gl-msaa-compositor.c [changed mode: 0644->0755]
src/cairo-gl-operand.c
src/cairo-gl-private.h
src/cairo-gl-shaders.c [changed mode: 0644->0755]
src/cairo-gl-source.c [changed mode: 0644->0755]
src/cairo-gl-spans-compositor.c [changed mode: 0644->0755]
src/cairo-gl-surface-legacy.c [changed mode: 0644->0755]
src/cairo-gl-surface.c [changed mode: 0644->0755]
src/cairo-gl-traps-compositor.c [changed mode: 0644->0755]
src/cairo-glx-context.c [changed mode: 0644->0755]
src/cairo-gstate-private.h [changed mode: 0644->0755]
src/cairo-gstate.c
src/cairo-hash-private.h [changed mode: 0644->0755]
src/cairo-hash.c [changed mode: 0644->0755]
src/cairo-hull.c [changed mode: 0644->0755]
src/cairo-image-compositor.c
src/cairo-image-filters.c
src/cairo-image-info-private.h [changed mode: 0644->0755]
src/cairo-image-info.c [changed mode: 0644->0755]
src/cairo-image-mask-compositor.c [changed mode: 0644->0755]
src/cairo-image-surface-inline.h [changed mode: 0644->0755]
src/cairo-image-surface-private.h [changed mode: 0644->0755]
src/cairo-image-surface.c [changed mode: 0644->0755]
src/cairo-list-inline.h [changed mode: 0644->0755]
src/cairo-list-private.h [changed mode: 0644->0755]
src/cairo-lzw.c [changed mode: 0644->0755]
src/cairo-malloc-private.h [changed mode: 0644->0755]
src/cairo-mask-compositor.c [changed mode: 0644->0755]
src/cairo-matrix.c [changed mode: 0644->0755]
src/cairo-mempool-private.h [changed mode: 0644->0755]
src/cairo-mempool.c [changed mode: 0644->0755]
src/cairo-mesh-pattern-rasterizer.c [changed mode: 0644->0755]
src/cairo-misc.c [changed mode: 0644->0755]
src/cairo-mono-scan-converter.c [changed mode: 0644->0755]
src/cairo-mutex-impl-private.h [changed mode: 0644->0755]
src/cairo-mutex-list-private.h [changed mode: 0644->0755]
src/cairo-mutex-private.h [changed mode: 0644->0755]
src/cairo-mutex-type-private.h [changed mode: 0644->0755]
src/cairo-mutex.c [changed mode: 0644->0755]
src/cairo-no-compositor.c [changed mode: 0644->0755]
src/cairo-observer.c [changed mode: 0644->0755]
src/cairo-os2-private.h [changed mode: 0644->0755]
src/cairo-os2-surface.c [changed mode: 0644->0755]
src/cairo-os2.h [changed mode: 0644->0755]
src/cairo-output-stream-private.h [changed mode: 0644->0755]
src/cairo-output-stream.c [changed mode: 0644->0755]
src/cairo-paginated-private.h [changed mode: 0644->0755]
src/cairo-paginated-surface-private.h [changed mode: 0644->0755]
src/cairo-paginated-surface.c [changed mode: 0644->0755]
src/cairo-path-fill.c [changed mode: 0644->0755]
src/cairo-path-fixed-private.h [changed mode: 0644->0755]
src/cairo-path-fixed.c [changed mode: 0644->0755]
src/cairo-path-in-fill.c [changed mode: 0644->0755]
src/cairo-path-private.h [changed mode: 0644->0755]
src/cairo-path-stroke-boxes.c [changed mode: 0644->0755]
src/cairo-path-stroke-polygon.c [changed mode: 0644->0755]
src/cairo-path-stroke-traps.c [changed mode: 0644->0755]
src/cairo-path-stroke-tristrip.c [changed mode: 0644->0755]
src/cairo-path.c [changed mode: 0644->0755]
src/cairo-pattern-inline.h [changed mode: 0644->0755]
src/cairo-pdf-operators-private.h [changed mode: 0644->0755]
src/cairo-pdf-operators.c [changed mode: 0644->0755]
src/cairo-pdf-shading-private.h [changed mode: 0644->0755]
src/cairo-pdf-shading.c [changed mode: 0644->0755]
src/cairo-pdf-surface-private.h [changed mode: 0644->0755]
src/cairo-pdf-surface.c [changed mode: 0644->0755]
src/cairo-pdf.h [changed mode: 0644->0755]
src/cairo-pen.c [changed mode: 0644->0755]
src/cairo-png.c [changed mode: 0644->0755]
src/cairo-polygon-intersect.c [changed mode: 0644->0755]
src/cairo-polygon-reduce.c [changed mode: 0644->0755]
src/cairo-polygon.c [changed mode: 0644->0755]
src/cairo-private.h [changed mode: 0644->0755]
src/cairo-ps-surface-private.h [changed mode: 0644->0755]
src/cairo-ps-surface.c [changed mode: 0644->0755]
src/cairo-ps.h [changed mode: 0644->0755]
src/cairo-qt-surface.cpp [changed mode: 0644->0755]
src/cairo-qt.h [changed mode: 0644->0755]
src/cairo-quartz-font.c [changed mode: 0644->0755]
src/cairo-quartz-image-surface.c [changed mode: 0644->0755]
src/cairo-quartz-image.h [changed mode: 0644->0755]
src/cairo-quartz-private.h [changed mode: 0644->0755]
src/cairo-quartz.h [changed mode: 0644->0755]
src/cairo-raster-source-pattern.c [changed mode: 0644->0755]
src/cairo-recording-surface-inline.h [changed mode: 0644->0755]
src/cairo-recording-surface-private.h [changed mode: 0644->0755]
src/cairo-rectangle.c [changed mode: 0644->0755]
src/cairo-rectangular-scan-converter.c [changed mode: 0644->0755]
src/cairo-reference-count-private.h [changed mode: 0644->0755]
src/cairo-region-private.h [changed mode: 0644->0755]
src/cairo-region.c [changed mode: 0644->0755]
src/cairo-rtree-private.h [changed mode: 0644->0755]
src/cairo-rtree.c [changed mode: 0644->0755]
src/cairo-scaled-font-private.h [changed mode: 0644->0755]
src/cairo-scaled-font-subsets-private.h [changed mode: 0644->0755]
src/cairo-scaled-font-subsets.c [changed mode: 0644->0755]
src/cairo-scaled-font.c [changed mode: 0644->0755]
src/cairo-script-private.h [changed mode: 0644->0755]
src/cairo-script-surface.c [changed mode: 0644->0755]
src/cairo-script.h [changed mode: 0644->0755]
src/cairo-shape-mask-compositor.c [changed mode: 0644->0755]
src/cairo-skia-surface.cpp [changed mode: 0644->0755]
src/cairo-skia.h [changed mode: 0644->0755]
src/cairo-slope-private.h [changed mode: 0644->0755]
src/cairo-slope.c [changed mode: 0644->0755]
src/cairo-spans-compositor-private.h [changed mode: 0644->0755]
src/cairo-spans-private.h [changed mode: 0644->0755]
src/cairo-spans.c [changed mode: 0644->0755]
src/cairo-spline.c [changed mode: 0644->0755]
src/cairo-stroke-dash-private.h [changed mode: 0644->0755]
src/cairo-stroke-dash.c [changed mode: 0644->0755]
src/cairo-stroke-style.c [changed mode: 0644->0755]
src/cairo-surface-backend-private.h [changed mode: 0644->0755]
src/cairo-surface-clipper-private.h [changed mode: 0644->0755]
src/cairo-surface-clipper.c [changed mode: 0644->0755]
src/cairo-surface-fallback-private.h [changed mode: 0644->0755]
src/cairo-surface-fallback.c [changed mode: 0644->0755]
src/cairo-surface-inline.h [changed mode: 0644->0755]
src/cairo-surface-observer-inline.h [changed mode: 0644->0755]
src/cairo-surface-observer-private.h [changed mode: 0644->0755]
src/cairo-surface-observer.c [changed mode: 0644->0755]
src/cairo-surface-offset-private.h [changed mode: 0644->0755]
src/cairo-surface-offset.c [changed mode: 0644->0755]
src/cairo-surface-private.h [changed mode: 0644->0755]
src/cairo-surface-scale-translate-private.h [changed mode: 0644->0755]
src/cairo-surface-scale-translate.c [changed mode: 0644->0755]
src/cairo-surface-shadow-private.h [changed mode: 0644->0755]
src/cairo-surface-snapshot-inline.h [changed mode: 0644->0755]
src/cairo-surface-snapshot-private.h [changed mode: 0644->0755]
src/cairo-surface-snapshot.c [changed mode: 0644->0755]
src/cairo-surface-subsurface-inline.h [changed mode: 0644->0755]
src/cairo-surface-subsurface-private.h [changed mode: 0644->0755]
src/cairo-surface-subsurface.c [changed mode: 0644->0755]
src/cairo-surface-wrapper-private.h [changed mode: 0644->0755]
src/cairo-surface-wrapper.c [changed mode: 0644->0755]
src/cairo-surface.c
src/cairo-svg-surface-private.h [changed mode: 0644->0755]
src/cairo-svg-surface.c [changed mode: 0644->0755]
src/cairo-svg.h [changed mode: 0644->0755]
src/cairo-tee-surface-private.h [changed mode: 0644->0755]
src/cairo-tee-surface.c [changed mode: 0644->0755]
src/cairo-tee.h [changed mode: 0644->0755]
src/cairo-tg-allocator-private.h [changed mode: 0644->0755]
src/cairo-tg-composite-extents-private.h [changed mode: 0644->0755]
src/cairo-tg-journal-private.h [changed mode: 0644->0755]
src/cairo-tg-journal.c [changed mode: 0644->0755]
src/cairo-tg-private.h [changed mode: 0644->0755]
src/cairo-tg-surface.c [changed mode: 0644->0755]
src/cairo-tg.h [changed mode: 0644->0755]
src/cairo-thread-local-private.h [changed mode: 0644->0755]
src/cairo-time-private.h [changed mode: 0644->0755]
src/cairo-time.c [changed mode: 0644->0755]
src/cairo-tor-scan-converter.c [changed mode: 0644->0755]
src/cairo-tor22-scan-converter.c [changed mode: 0644->0755]
src/cairo-toy-font-face.c [changed mode: 0644->0755]
src/cairo-traps-compositor.c
src/cairo-traps-private.h [changed mode: 0644->0755]
src/cairo-traps.c [changed mode: 0644->0755]
src/cairo-tristrip-private.h [changed mode: 0644->0755]
src/cairo-tristrip.c [changed mode: 0644->0755]
src/cairo-truetype-subset-private.h [changed mode: 0644->0755]
src/cairo-truetype-subset.c [changed mode: 0644->0755]
src/cairo-ttrace.h [new file with mode: 0644]
src/cairo-type1-fallback.c [changed mode: 0644->0755]
src/cairo-type1-glyph-names.c [changed mode: 0644->0755]
src/cairo-type1-private.h [changed mode: 0644->0755]
src/cairo-type1-subset.c [changed mode: 0644->0755]
src/cairo-type3-glyph-surface-private.h [changed mode: 0644->0755]
src/cairo-type3-glyph-surface.c [changed mode: 0644->0755]
src/cairo-unicode.c [changed mode: 0644->0755]
src/cairo-uninstalled.pc.in [changed mode: 0644->0755]
src/cairo-user-font-private.h [changed mode: 0644->0755]
src/cairo-user-font.c [changed mode: 0644->0755]
src/cairo-version.c [changed mode: 0644->0755]
src/cairo-version.h [changed mode: 0644->0755]
src/cairo-vg-surface.c [changed mode: 0644->0755]
src/cairo-vg.h [changed mode: 0644->0755]
src/cairo-wgl-context.c [changed mode: 0644->0755]
src/cairo-wideint-private.h [changed mode: 0644->0755]
src/cairo-wideint-type-private.h [changed mode: 0644->0755]
src/cairo-wideint.c [changed mode: 0644->0755]
src/cairo-win32.h [changed mode: 0644->0755]
src/cairo-xcb-connection-core.c [changed mode: 0644->0755]
src/cairo-xcb-connection-render.c [changed mode: 0644->0755]
src/cairo-xcb-connection-shm.c [changed mode: 0644->0755]
src/cairo-xcb-connection.c [changed mode: 0644->0755]
src/cairo-xcb-private.h [changed mode: 0644->0755]
src/cairo-xcb-screen.c [changed mode: 0644->0755]
src/cairo-xcb-shm.c [changed mode: 0644->0755]
src/cairo-xcb-surface-core.c [changed mode: 0644->0755]
src/cairo-xcb-surface-render.c
src/cairo-xcb.h [changed mode: 0644->0755]
src/cairo-xlib-core-compositor.c [changed mode: 0644->0755]
src/cairo-xlib-fallback-compositor.c [changed mode: 0644->0755]
src/cairo-xlib-private.h [changed mode: 0644->0755]
src/cairo-xlib-screen.c [changed mode: 0644->0755]
src/cairo-xlib-source.c [changed mode: 0644->0755]
src/cairo-xlib-surface-private.h [changed mode: 0644->0755]
src/cairo-xlib-surface-shm.c [changed mode: 0644->0755]
src/cairo-xlib-surface.c [changed mode: 0644->0755]
src/cairo-xlib-visual.c [changed mode: 0644->0755]
src/cairo-xlib-xcb-surface.c [changed mode: 0644->0755]
src/cairo-xlib-xrender-private.h [changed mode: 0644->0755]
src/cairo-xlib-xrender.h [changed mode: 0644->0755]
src/cairo-xlib.h [changed mode: 0644->0755]
src/cairo-xml-surface.c [changed mode: 0644->0755]
src/cairo-xml.h [changed mode: 0644->0755]
src/cairo.c
src/cairo.pc.in [changed mode: 0644->0755]
src/check-has-hidden-symbols.c [changed mode: 0644->0755]
src/check-link.c [changed mode: 0644->0755]
src/test-base-compositor-surface.c [changed mode: 0644->0755]
src/test-compositor-surface-private.h [changed mode: 0644->0755]
src/test-compositor-surface.c [changed mode: 0644->0755]
src/test-compositor-surface.h [changed mode: 0644->0755]
src/test-null-compositor-surface.h [changed mode: 0644->0755]
src/test-paginated-surface.c [changed mode: 0644->0755]
src/test-paginated-surface.h [changed mode: 0644->0755]
util/Makefile.am [changed mode: 0644->0755]

index cef6930..a84060e 100644 (file)
@@ -1,7 +1,7 @@
 .deps
 .libs
 .perf
-cairo-*.*.*
+#cairo-*.*.*
 ChangeLog*
 Makefile
 Makefile.in
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 8efe856..2d6f130 100644 (file)
@@ -567,6 +567,15 @@ enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_trace_cxx_sources)
 enabled_cairo_boilerplate_sources += $(cairo_boilerplate_trace_sources)
 endif
 
+all_cairo_boilerplate_private += $(cairo_boilerplate_ttrace_private) $(cairo_boilerplate_ttrace_headers)
+all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_ttrace_cxx_sources)
+all_cairo_boilerplate_sources += $(cairo_boilerplate_ttrace_sources)
+ifeq ($(CAIRO_HAS_TTRACE),1)
+enabled_cairo_boilerplate_private += $(cairo_boilerplate_ttrace_private) $(cairo_boilerplate_ttrace_headers)
+enabled_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_ttrace_cxx_sources)
+enabled_cairo_boilerplate_sources += $(cairo_boilerplate_ttrace_sources)
+endif
+
 all_cairo_boilerplate_private += $(cairo_boilerplate_interpreter_private) $(cairo_boilerplate_interpreter_headers)
 all_cairo_boilerplate_cxx_sources += $(cairo_boilerplate_interpreter_cxx_sources)
 all_cairo_boilerplate_sources += $(cairo_boilerplate_interpreter_sources)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index cf7721a..e336d2f 100644 (file)
@@ -43,5 +43,6 @@ CAIRO_HAS_OPENMP=0
 CAIRO_HAS_PTHREAD=0
 CAIRO_HAS_GOBJECT_FUNCTIONS=0
 CAIRO_HAS_TRACE=0
+CAIRO_HAS_TTRACE=0
 CAIRO_HAS_INTERPRETER=1
 CAIRO_HAS_SYMBOL_LOOKUP=0
index f5164d7..3136dab 100644 (file)
@@ -139,6 +139,9 @@ endif
 ifeq ($(CAIRO_HAS_TRACE),1)
        @echo "#define CAIRO_HAS_TRACE 1" >> $(top_srcdir)/src/cairo-features.h
 endif
+ifeq ($(CAIRO_HAS_TTRACE),1)
+       @echo "#define CAIRO_HAS_TTRACE 1" >> $(top_srcdir)/src/cairo-features.h
+endif
 ifeq ($(CAIRO_HAS_INTERPRETER),1)
        @echo "#define CAIRO_HAS_INTERPRETER 1" >> $(top_srcdir)/src/cairo-features.h
 endif
old mode 100644 (file)
new mode 100755 (executable)
index 0457bf3..7000663
@@ -384,6 +384,7 @@ AC_DEFUN([CAIRO_REPORT],
        echo "  PDF:           $use_pdf"
        echo "  SVG:           $use_svg"
        echo "  OpenGL:        $use_gl"
+       echo "  EvasGL:        $use_evasgl"
        echo "  OpenGL ES 2.0: $use_glesv2"
        echo "  OpenGL ES 3.0: $use_glesv3"
        echo "  BeOS:          $use_beos"
@@ -409,6 +410,7 @@ AC_DEFUN([CAIRO_REPORT],
        echo ""
        echo "The following features and utilities:"
        echo "  cairo-trace:                $use_trace"
+       echo "  cairo-ttrace:               $use_ttrace"
        echo "  cairo-script-interpreter:   $use_interpreter"
        echo ""
        echo "And the following internal features:"
index f984eb2..2c4e34d 100644 (file)
@@ -35,17 +35,6 @@ MAYBE_WARN="$MAYBE_WARN -erroff=E_ENUM_TYPE_MISMATCH_ARG \
 
 dnl We also abuse the warning-flag facility to enable other compiler
 dnl options.  Namely, the following:
-
-dnl -flto working really needs a test link, not just a compile
-
-safe_MAYBE_WARN="$MAYBE_WARN"
-MAYBE_WARN="$MAYBE_WARN -flto"
-AC_TRY_LINK([],[
-       int main(int argc, char **argv) { return 0; }
-],[],[
-       MAYBE_WARN="$safe_MAYBE_WARN"
-])
-
 MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common"
 
 dnl Also to turn various gcc/glibc-specific preprocessor checks
old mode 100644 (file)
new mode 100755 (executable)
index 80f97ed..74f35fa
@@ -13,6 +13,7 @@ AC_CONFIG_HEADERS(config.h)
 
 AM_INIT_AUTOMAKE([1.11 foreign -Wall no-define no-dist-gzip dist-xz])
 AM_SILENT_RULES([yes])
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Workaround for Automake 1.12
 
 # Initialize libtool
 LT_PREREQ([2.2])
@@ -49,6 +50,16 @@ AC_CHECK_LIB(z, compress,
         [have_libz="no (requires zlib http://www.gzip.org/zlib/)"])],
         [have_libz="no (requires zlib http://www.gzip.org/zlib/)"])
 
+AC_CHECK_LIB(ttrace, traceBegin,
+        [AC_CHECK_HEADER(ttrace.h, [
+         have_ttrace=yes
+         AC_DEFINE(HAVE_TTRACE, 1, [Define to 1 if you have ttrace available])
+         ttrace_LIBS="-lttrace"
+        ],
+        [have_ttrace="no (requires ttrace)"])],
+        [have_ttrace="no (requires ttraec)"])
+LIBS="$ttrace_LIBS $LIBS"
+
 save_LIBS="$LIBS"
 AC_CHECK_LIB(lzo2, lzo2a_decompress,
         [AC_CHECK_HEADER(lzo/lzo2a.h, [
@@ -843,6 +854,12 @@ CAIRO_ENABLE(trace, cairo-trace, auto, [
        fi
 ])
 
+CAIRO_ENABLE(ttrace, cairo-ttrace, no, [
+        if test "x$have_ttrace" != "xyes"; then
+                use_ttrace="no (requires ttrace)"
+        fi
+])
+
 CAIRO_ENABLE(interpreter, cairo-script-interpreter, yes, [
        if test "x$have_libz" != "xyes"; then
                use_interpreter="no (requires zlib)"
index fb010cb..65185cf 100755 (executable)
@@ -46,6 +46,7 @@
  * In Tizen, Cairo provides gl backend in order to do hardware-accelerated rendering.
  * Since the EGL is not public supported in Tizen, Cairo Evas_GL has been provided to user interfaces instead to allow indirect access to EGL layer.
  *
+ *
  * Features    :\n
  *     - Support a new cairo_device structure for interface to the underlying GL or EvasGL.\n
  *     - Support a new cairo_surface structure for representing GL or Evas_GL_Surface object that cairo can render to.\n
index 341b9c5..578d00c 100755 (executable)
@@ -4,7 +4,7 @@ Summary:    A vector graphics library
 Version:    1.12.14
 Release:    10
 Group:      System/Libraries
-License:    LGPL-2.1+ or MPL-1.1
+License:    MPL-1.1 or LGPL-2.1+
 URL:        http://www.cairographics.org
 Source0:    http://cairographics.org/releases/%{name}-%{version}.tar.gz
 Source1001: packaging/cairo.manifest
@@ -26,10 +26,11 @@ BuildRequires:  pkgconfig(xcb)
 BuildRequires:  pkgconfig(xcb-render)
 #BuildRequires:  pkgconfig(xcb-renderutil)
 BuildRequires:  pkgconfig(xcb-shm)
-BuildRequires:  pkgconfig(opengl-es-20)
+BuildRequires:  pkgconfig(gles20)
 BuildRequires:  pkgconfig(ecore)
 BuildRequires:  pkgconfig(evas)
-BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(ttrace)
+
 #BuildRequires:  pkgconfig(librsvg-2.0)
 BuildRequires:  binutils-devel
 BuildRequires:  which
@@ -62,15 +63,16 @@ NOCONFIGURE=1 ./autogen.sh
     --x-libraries=%{_libdir} \
     --disable-gtk-doc \
 %ifarch %ix86
-    --enable-xcb \
+    --enable-xcb\
     --enable-egl=no \
     --enable-glesv2=no \
-    --enable-evasgl=yes \
+    --enable-evasgl=yes\
 %else
     --enable-xcb \
     --enable-egl=yes \
     --enable-glesv2=yes \
-    --enable-evasgl=yes
+    --enable-evasgl=yes \
+    --enable-ttrace=no
 %endif
 
 make %{?jobs:-j%jobs}
@@ -88,14 +90,20 @@ cat COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1 > %{buildroot}/usr/share/license/%{
 
 %files
 %manifest cairo.manifest
-%{_libdir}/libcairo.so.*
+%{_libdir}/libcairo.so*
+%if "%{?tizen_profile_name}" == "tv"
+%{_libdir}/libcairo-*.so.*
+%endif
 /usr/share/license/%{name}
-%exclude %{_libdir}/libcairo-*.so.*
 
 %files devel
 %manifest cairo.manifest
 %{_includedir}/*
-%{_libdir}/libcairo*.so
+%{_libdir}/libcairo-*.so
+%if "%{?tizen_profile_name}" == "mobile"
+%{_libdir}/libcairo-*.so.*
+%endif
+%if "%{?tizen_profile_name}" == "wearable"
 %{_libdir}/libcairo-*.so.*
+%endif
 %{_libdir}/pkgconfig/*
-
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 2681170..3d73731 100644 (file)
@@ -717,6 +717,15 @@ enabled_cairo_cxx_sources += $(cairo_trace_cxx_sources)
 enabled_cairo_sources += $(cairo_trace_sources)
 endif
 
+all_cairo_private += $(cairo_ttrace_private) $(cairo_ttrace_headers)
+all_cairo_cxx_sources += $(cairo_ttrace_cxx_sources)
+all_cairo_sources += $(cairo_ttrace_sources)
+ifeq ($(CAIRO_HAS_TTRACE),1)
+enabled_cairo_private += $(cairo_ttrace_private) $(cairo_ttrace_headers)
+enabled_cairo_cxx_sources += $(cairo_ttrace_cxx_sources)
+enabled_cairo_sources += $(cairo_ttrace_sources)
+endif
+
 all_cairo_private += $(cairo_interpreter_private) $(cairo_interpreter_headers)
 all_cairo_cxx_sources += $(cairo_interpreter_cxx_sources)
 all_cairo_sources += $(cairo_interpreter_sources)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 7259add..a782f3b
@@ -1691,7 +1691,9 @@ _cairo_bentley_ottmann_tessellate_polygon (cairo_traps_t   *traps,
     cairo_bo_event_t **event_ptrs;
     cairo_bo_start_event_t *stack_event_y[64];
     cairo_bo_start_event_t **event_y = NULL;
-    int i, num_events, y, ymin = 0, ymax = 0;
+    int i, num_events, y;
+    int ymin= 0;
+    int ymax= 0;
     cairo_status_t status;
 
     num_events = polygon->num_edges;
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 515305b..ea82ca6
@@ -199,8 +199,8 @@ floored_muldivrem(int x, int a, int b)
 {
     struct quorem qr;
     long long xa = (long long)x*a;
-    qr.quo = xa/b;
-    qr.rem = xa%b;
+    qr.quo = (int32_t)(xa/b);
+    qr.rem = (int32_t)(xa%b);
     if ((xa>=0) != (b>=0) && qr.rem) {
        qr.quo--;
        qr.rem += b;
@@ -456,7 +456,8 @@ edges_compare_x_for_y (const cairo_edge_t *a,
        HAVE_BX      = 0x2,
        HAVE_BOTH    = HAVE_AX | HAVE_BX
     } have_ax_bx = HAVE_BOTH;
-    int32_t ax, bx;
+    int32_t ax = 0;
+       int32_t bx = 0;
 
     /* XXX given we have x and dx? */
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index e32a5a9..ac581da
@@ -439,8 +439,8 @@ floored_muldivrem(int x, int a, int b)
 {
     struct quorem qr;
     long long xa = (long long)x*a;
-    qr.quo = xa/b;
-    qr.rem = xa%b;
+    qr.quo = (int32_t)(xa/b);
+    qr.rem = (int32_t)(xa%b);
     if ((xa>=0) != (b>=0) && qr.rem) {
        qr.quo -= 1;
        qr.rem += b;
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 0c4d34c..7f5087a
@@ -40,6 +40,7 @@
 #include "cairo-compositor-private.h"
 #include "cairo-damage-private.h"
 #include "cairo-error-private.h"
+#include "cairo-ttrace.h"
 
 cairo_int_status_t
 _cairo_compositor_paint (const cairo_compositor_t      *compositor,
@@ -48,6 +49,7 @@ _cairo_compositor_paint (const cairo_compositor_t     *compositor,
                         const cairo_pattern_t          *source,
                         const cairo_clip_t             *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_composite_rectangles_t extents;
     cairo_int_status_t status;
     cairo_bool_t initialized = TRUE;
@@ -66,8 +68,10 @@ _cairo_compositor_paint (const cairo_compositor_t    *compositor,
                                                             surface,
                                                             op, source,
                                                             clip);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     do {
        while (compositor->paint == NULL)
@@ -82,8 +86,10 @@ _cairo_compositor_paint (const cairo_compositor_t    *compositor,
                                                                 clip);
            initialized = TRUE;
 
-           if (unlikely (status))
+           if (unlikely (status)) {
+               CAIRO_TRACE_END (__func__);
                return status;
+           }
        }
 
        status = compositor->paint (compositor, &extents);
@@ -102,6 +108,7 @@ _cairo_compositor_paint (const cairo_compositor_t   *compositor,
 
     _cairo_composite_rectangles_fini (&extents);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -113,6 +120,7 @@ _cairo_compositor_mask (const cairo_compositor_t    *compositor,
                        const cairo_pattern_t           *mask,
                        const cairo_clip_t              *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_composite_rectangles_t extents;
     cairo_int_status_t status;
     cairo_bool_t initialized = TRUE;
@@ -130,8 +138,10 @@ _cairo_compositor_mask (const cairo_compositor_t   *compositor,
                                                            surface,
                                                            op, source,
                                                            mask, clip);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     do {
        while (compositor->mask == NULL)
@@ -146,8 +156,10 @@ _cairo_compositor_mask (const cairo_compositor_t   *compositor,
                                                                mask, clip);
            initialized = TRUE;
 
-           if (unlikely (status))
+           if (unlikely (status)) {
+               CAIRO_TRACE_END (__func__);
                return status;
+           }
        }
 
        status = compositor->mask (compositor, &extents);
@@ -166,6 +178,7 @@ _cairo_compositor_mask (const cairo_compositor_t    *compositor,
 
     _cairo_composite_rectangles_fini (&extents);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -182,14 +195,17 @@ _cairo_compositor_stroke (const cairo_compositor_t        *compositor,
                          cairo_antialias_t              antialias,
                          const cairo_clip_t            *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_composite_rectangles_t extents;
     cairo_int_status_t status;
     cairo_bool_t initialized = TRUE;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
 
-    if (_cairo_pen_vertices_needed (tolerance, style->line_width/2, ctm) <= 1)
+    if (_cairo_pen_vertices_needed (tolerance, style->line_width/2, ctm) <= 1) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_INT_STATUS_NOTHING_TO_DO;
+    }
 
     if (compositor->lazy_init) {
        status = _cairo_composite_rectangles_lazy_init_for_stroke (&extents,
@@ -205,8 +221,10 @@ _cairo_compositor_stroke (const cairo_compositor_t *compositor,
                                                              op, source,
                                                              path, style,
                                                              ctm, clip);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     do {
        while (compositor->stroke == NULL)
@@ -225,8 +243,10 @@ _cairo_compositor_stroke (const cairo_compositor_t *compositor,
                                                                  clip);
            initialized = TRUE;
 
-           if (unlikely (status))
+           if (unlikely (status)) {
+               CAIRO_TRACE_END (__func__);
                return status;
+           }
        }
 
        status = compositor->stroke (compositor, &extents,
@@ -247,6 +267,7 @@ _cairo_compositor_stroke (const cairo_compositor_t  *compositor,
 
     _cairo_composite_rectangles_fini (&extents);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -261,6 +282,7 @@ _cairo_compositor_fill (const cairo_compositor_t    *compositor,
                        cairo_antialias_t                antialias,
                        const cairo_clip_t              *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_composite_rectangles_t extents;
     cairo_int_status_t status;
     cairo_bool_t initialized = TRUE;
@@ -279,8 +301,10 @@ _cairo_compositor_fill (const cairo_compositor_t   *compositor,
                                                            surface,
                                                            op, source,
                                                            path, clip);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     do {
        while (compositor->fill == NULL)
@@ -295,8 +319,10 @@ _cairo_compositor_fill (const cairo_compositor_t   *compositor,
                                                                path, clip);
            initialized = TRUE;
 
-           if (unlikely (status))
+           if (unlikely (status)) {
+               CAIRO_TRACE_END (__func__);
                return status;
+           }
        }
 
        status = compositor->fill (compositor, &extents,
@@ -316,6 +342,7 @@ _cairo_compositor_fill (const cairo_compositor_t    *compositor,
 
     _cairo_composite_rectangles_fini (&extents);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -329,6 +356,7 @@ _cairo_compositor_glyphs (const cairo_compositor_t          *compositor,
                          cairo_scaled_font_t                   *scaled_font,
                          const cairo_clip_t                    *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_composite_rectangles_t extents;
     cairo_bool_t overlap;
     cairo_int_status_t status;
@@ -349,8 +377,10 @@ _cairo_compositor_glyphs (const cairo_compositor_t         *compositor,
                                                             scaled_font,
                                                             glyphs, num_glyphs,
                                                             clip, &overlap);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     do {
        while (compositor->glyphs == NULL)
@@ -366,8 +396,10 @@ _cairo_compositor_glyphs (const cairo_compositor_t         *compositor,
                                                                 clip, &overlap);
            initialized = TRUE;
 
-           if (unlikely (status))
+           if (unlikely (status)) {
+               CAIRO_TRACE_END (__func__);
                return status;
+           }
        }
 
        status = compositor->glyphs (compositor, &extents,
@@ -387,5 +419,6 @@ _cairo_compositor_glyphs (const cairo_compositor_t          *compositor,
 
     _cairo_composite_rectangles_fini (&extents);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index b7a38d2..478d44b 100755 (executable)
@@ -49,6 +49,7 @@
 #include "cairo-freed-pool-private.h"
 #include "cairo-path-private.h"
 #include "cairo-pattern-private.h"
+#include "cairo-ttrace.h"
 
 #define CAIRO_TOLERANCE_MINIMUM        _cairo_fixed_to_double(1)
 
@@ -88,6 +89,7 @@ _cairo_default_context_fini (cairo_default_context_t *cr)
 static void
 _cairo_default_context_destroy (void *abstract_cr)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_default_context_t *cr = abstract_cr;
 
     _cairo_default_context_fini (cr);
@@ -95,6 +97,7 @@ _cairo_default_context_destroy (void *abstract_cr)
     /* mark the context as invalid to protect against misuse */
     cr->base.status = CAIRO_STATUS_NULL_POINTER;
     _freed_pool_put (&context_pool, cr);
+    CAIRO_TRACE_END (__func__);
 }
 
 static cairo_surface_t *
@@ -287,13 +290,16 @@ _current_source_matches_solid (const cairo_pattern_t *pattern,
 static cairo_status_t
 _cairo_default_context_set_source_rgba (void *abstract_cr, double red, double green, double blue, double alpha)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_default_context_t *cr = abstract_cr;
     cairo_pattern_t *pattern;
     cairo_status_t status;
 
     if (_current_source_matches_solid (cr->gstate->source,
-                                      red, green, blue, alpha))
+                                      red, green, blue, alpha)) {
+        CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     /* push the current pattern to the freed lists */
     _cairo_default_context_set_source (cr, (cairo_pattern_t *) &_cairo_pattern_black);
@@ -302,12 +308,14 @@ _cairo_default_context_set_source_rgba (void *abstract_cr, double red, double gr
     if (unlikely (pattern->status)) {
         status = pattern->status;
         cairo_pattern_destroy (pattern);
+        CAIRO_TRACE_END (__func__);
         return pattern->status;
     }
 
     status = _cairo_default_context_set_source (cr, pattern);
     cairo_pattern_destroy (pattern);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -957,9 +965,12 @@ _cairo_default_context_append_path (void *abstract_cr,
 static cairo_status_t
 _cairo_default_context_paint (void *abstract_cr)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_default_context_t *cr = abstract_cr;
 
-    return _cairo_gstate_paint (cr->gstate);
+    cairo_status_t status = _cairo_gstate_paint (cr->gstate);
+    CAIRO_TRACE_END (__func__);
+    return status;
 }
 
 static cairo_status_t
@@ -1532,21 +1543,26 @@ _cairo_default_context_init (cairo_default_context_t *cr, void *target)
 cairo_t *
 _cairo_default_context_create (void *target)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_default_context_t *cr;
     cairo_status_t status;
 
     cr = _freed_pool_get (&context_pool);
     if (unlikely (cr == NULL)) {
        cr = malloc (sizeof (cairo_default_context_t));
-       if (unlikely (cr == NULL))
+       if (unlikely (cr == NULL)) {
+           CAIRO_TRACE_END (__func__);
            return _cairo_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
+       }
     }
 
     status = _cairo_default_context_init (cr, target);
     if (unlikely (status)) {
        _freed_pool_put (&context_pool, cr);
+       CAIRO_TRACE_END (__func__);
        return _cairo_create_in_error (status);
     }
 
+    CAIRO_TRACE_END (__func__);
     return &cr->base;
 }
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index e845912..f981671 100755 (executable)
@@ -37,6 +37,7 @@
 #include "cairo-device-private.h"
 #include "cairo-error-private.h"
 #include "cairo-list-inline.h"
+#include "cairo-ttrace.h"
 
 /**
  * SECTION:cairo-device
@@ -169,6 +170,7 @@ void
 _cairo_device_init (cairo_device_t *device,
                    const cairo_device_backend_t *backend)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     CAIRO_REFERENCE_COUNT_INIT (&device->ref_count, 1);
     device->status = CAIRO_STATUS_SUCCESS;
 
@@ -183,6 +185,7 @@ _cairo_device_init (cairo_device_t *device,
 
     cairo_list_init (&device->shadow_caches);
     device->shadow_caches_size = 0;
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -330,17 +333,21 @@ slim_hidden_def (cairo_device_finish);
 void
 cairo_device_destroy (cairo_device_t *device)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_user_data_array_t user_data;
 
     if (device == NULL ||
        CAIRO_REFERENCE_COUNT_IS_INVALID (&device->ref_count))
     {
+        CAIRO_TRACE_END (__func__);
        return;
     }
 
     assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&device->ref_count));
-    if (! _cairo_reference_count_dec_and_test (&device->ref_count))
+    if (! _cairo_reference_count_dec_and_test (&device->ref_count)) {
+        CAIRO_TRACE_END (__func__);
        return;
+    }
 
     while (! cairo_list_is_empty (&device->shadow_caches)) {
        cairo_shadow_cache_t *shadow;
@@ -365,6 +372,7 @@ cairo_device_destroy (cairo_device_t *device)
     device->backend->destroy (device);
 
     _cairo_user_data_array_fini (&user_data);
+    CAIRO_TRACE_END (__func__);
 
 }
 slim_hidden_def (cairo_device_destroy);
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index fa52a04..a5e1db4
@@ -41,6 +41,7 @@
 #include "cairo-gl-private.h"
 
 #include "cairo-error-private.h"
+#include "cairo-ttrace.h"
 
 #if CAIRO_HAS_EVASGL_SURFACE && CAIRO_HAS_GLESV2_SURFACE
 extern void glActiveTexture (GLenum texture);
@@ -134,12 +135,16 @@ _egl_query_current_state (cairo_egl_context_t *ctx)
 
     /* If any of the values were none, assume they are all none. Not all
        drivers seem well behaved when it comes to using these values across
-       multiple threads. */
+       multiple threads. (2013-3-29)*/
+    /* In case of supporting the EGL_KHR_surfaceless_context extension,
+       the below code do not fit and dummy_surface is not created. (2015-7-22)*/
+    if (ctx->dummy_surface) {
     if (ctx->previous_surface == EGL_NO_SURFACE ||
         ctx->previous_context == EGL_NO_CONTEXT || ctx->previous_display == EGL_NO_DISPLAY) {
         ctx->previous_surface = EGL_NO_SURFACE;
         ctx->previous_context = EGL_NO_CONTEXT;
         ctx->previous_display = EGL_NO_DISPLAY;
+        }
     }
 }
 
@@ -153,9 +158,14 @@ _egl_acquire (void *abstract_ctx)
     if (!_context_acquisition_changed_egl_state (ctx, current_surface))
        return;
 
-    _cairo_gl_context_reset (&ctx->base);
+    /* If current context is not cairo-gl context, some problem can be occurred at gl API
+       in _cairo_gl_context_reset() when it is called before eglMakeCurrent().
+       So, _cairo_gl_context_reset() should be moved after eglMakeCurrent(). (2015-9-15)*/
+
+    //_cairo_gl_context_reset (&ctx->base);
     eglMakeCurrent (ctx->display,
                    current_surface, current_surface, ctx->context);
+    _cairo_gl_context_reset (&ctx->base);
 
     ctx->current_surface = current_surface;
 }
@@ -192,21 +202,25 @@ static void
 _egl_swap_buffers (void *abstract_ctx,
                   cairo_gl_surface_t *abstract_surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_egl_context_t *ctx = abstract_ctx;
     cairo_egl_surface_t *surface = (cairo_egl_surface_t *) abstract_surface;
 
     eglSwapBuffers (ctx->display, surface->egl);
+    CAIRO_TRACE_END (__func__);
 }
 
 static void
 _egl_destroy (void *abstract_ctx)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_egl_context_t *ctx = abstract_ctx;
 
     eglMakeCurrent (ctx->display,
                    EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
     if (ctx->dummy_surface != EGL_NO_SURFACE)
         eglDestroySurface (ctx->display, ctx->dummy_surface);
+    CAIRO_TRACE_END (__func__);
 }
 
 static cairo_bool_t
@@ -282,6 +296,7 @@ _cairo_egl_get_proc_address (void *data, const char *name)
 cairo_device_t *
 cairo_egl_device_create (EGLDisplay dpy, EGLContext egl)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_egl_context_t *ctx;
     cairo_status_t status;
     int attribs[] = {
@@ -293,8 +308,10 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl)
     EGLint numConfigs;
 
     ctx = calloc (1, sizeof (cairo_egl_context_t));
-    if (unlikely (ctx == NULL))
+    if (unlikely (ctx == NULL)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_gl_context_create_in_error (CAIRO_STATUS_NO_MEMORY);
+    }
 
     ctx->display = dpy;
     ctx->context = egl;
@@ -328,11 +345,13 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl)
        ctx->dummy_surface = eglCreatePbufferSurface (dpy, config, attribs);
        if (ctx->dummy_surface == NULL) {
            free (ctx);
+           CAIRO_TRACE_END (__func__);
            return _cairo_gl_context_create_in_error (CAIRO_STATUS_NO_MEMORY);
        }
 
        if (!eglMakeCurrent (dpy, ctx->dummy_surface, ctx->dummy_surface, egl)) {
            free (ctx);
+           CAIRO_TRACE_END (__func__);
            return _cairo_gl_context_create_in_error (CAIRO_STATUS_NO_MEMORY);
        }
     }
@@ -341,6 +360,7 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl)
                                      _cairo_egl_get_proc_address, NULL);
     if (unlikely (status)) {
        free (ctx);
+       CAIRO_TRACE_END (__func__);
        return _cairo_gl_context_create_in_error (status);
     }
 
@@ -349,6 +369,7 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl)
        if (ctx->dummy_surface != EGL_NO_SURFACE)
            eglDestroySurface (dpy, ctx->dummy_surface);
        free (ctx);
+       CAIRO_TRACE_END (__func__);
        return _cairo_gl_context_create_in_error (status);
     }
 
@@ -356,6 +377,7 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl)
 
     ctx->current_surface = EGL_NO_SURFACE;
 
+    CAIRO_TRACE_END (__func__);
     return &ctx->base.base;
 }
 
@@ -365,25 +387,35 @@ cairo_gl_surface_create_for_egl (cairo_device_t   *device,
                                 int             width,
                                 int             height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_egl_surface_t *surface;
 
-    if (unlikely (device->status))
+    if (unlikely (device->status)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (device->status);
+    }
 
-    if (device->backend->type != CAIRO_DEVICE_TYPE_GL)
+    if (device->backend->type != CAIRO_DEVICE_TYPE_GL) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH));
+    }
 
-    if (width <= 0 || height <= 0)
+    if (width <= 0 || height <= 0) {
+       CAIRO_TRACE_END (__func__);
         return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
+    }
 
     surface = calloc (1, sizeof (cairo_egl_surface_t));
-    if (unlikely (surface == NULL))
+    if (unlikely (surface == NULL)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
+    }
 
     _cairo_gl_surface_init (device, &surface->base,
                            CAIRO_CONTENT_COLOR_ALPHA, width, height);
     surface->egl = egl;
 
+    CAIRO_TRACE_END (__func__);
     return &surface->base.base;
 }
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 3f256cb..012398a 100755 (executable)
@@ -44,8 +44,8 @@
 #if CAIRO_HAS_DLSYM
 #include <dlfcn.h>
 #endif
-
 #include "cairo-evas-gl.h"
+#include "cairo-ttrace.h"
 
 typedef struct _cairo_evas_gl_context {
     cairo_gl_context_t base;
@@ -168,7 +168,11 @@ _cairo_evas_gl_get_proc_addr (void *data, const char *name)
        { offsetof (Evas_GL_API, glRenderbufferStorage  ), "glRenderbufferStorage" },
        { offsetof (Evas_GL_API, glFramebufferRenderbuffer), "glFramebufferRenderbuffer" },
        { offsetof (Evas_GL_API, glDeleteRenderbuffers  ), "glDeleteRenderbuffers" },
-       /* multisampling functions, none supported in efl-1.12.0 */
+       /* multisampling functions */
+       { offsetof (Evas_GL_API, glFramebufferTexture2DMultisampleEXT   ), "glFramebufferTexture2DMultisampleEXT" },
+       { offsetof (Evas_GL_API, glRenderbufferStorageMultisampleEXT    ), "glRenderbufferStorageMultisampleEXT" },
+       { offsetof (Evas_GL_API, glFramebufferTexture2DMultisampleIMG   ), "glFramebufferTexture2DMultisampleIMG" },
+       { offsetof (Evas_GL_API, glRenderbufferStorageMultisampleIMG    ), "glRenderbufferStorageMultisampleIMG" },
        { 0, NULL }
     };
 
@@ -218,8 +222,13 @@ _evas_gl_acquire (void *abstract_ctx)
     if (!_context_acquisition_changed_evas_gl_state (ctx, current_surface))
        return;
 
-    _cairo_gl_context_reset (&ctx->base);
+    /* If current context is not cairo-gl context, some problem can be occurred at gl API
+       in _cairo_gl_context_reset() when it is called before eglMakeCurrent().
+       So, _cairo_gl_context_reset() should be moved after eglMakeCurrent(). (2015-9-15)*/
+
+    //_cairo_gl_context_reset (&ctx->base);
     evas_gl_make_current (ctx->evas_gl, current_surface, ctx->context);
+    _cairo_gl_context_reset (&ctx->base);
 
     ctx->current_surface = current_surface;
     //ctx->base.current_target = &ctx->dummy_surface->base;
@@ -302,7 +311,7 @@ cairo_evas_gl_device_create (Evas_GL *evas_gl,
     ctx->dummy_surface = evas_gl_pbuffer_surface_create (ctx->evas_gl,
                                                         evas_cfg,
                                                         1, 1, NULL);
-    //evas_gl_config_free (evas_cfg);
+    evas_gl_config_free (evas_cfg);
 
     if (ctx->dummy_surface == NULL) {
         free (ctx);
@@ -348,30 +357,41 @@ cairo_gl_surface_create_for_evas_gl (cairo_device_t       *device,
                                     int                 width,
                                     int                 height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_evas_gl_surface_t *surface;
 
        if ((! device)||(cairo_device_status(device)!= CAIRO_STATUS_SUCCESS)){
                fprintf (stderr, "cairo_gl_surface_create_for_evas_gl(): cairo device is NULL or not available\n");
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error(CAIRO_STATUS_NULL_POINTER);
        }
 
-    if (unlikely (device->status))
+    if (unlikely (device->status)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (device->status);
+    }
 
        if (! evas_surface || ! evas_config) {
                fprintf (stderr, "cairo_gl_surface_create_for_evas_gl(): evas_surface or evas_config is NULL\n");
-       return _cairo_surface_create_in_error (CAIRO_STATUS_NULL_POINTER);
+           CAIRO_TRACE_END (__func__);
+           return _cairo_surface_create_in_error (CAIRO_STATUS_NULL_POINTER);
        }
 
-    if (device->backend->type != CAIRO_DEVICE_TYPE_GL)
+    if (device->backend->type != CAIRO_DEVICE_TYPE_GL) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH));
+    }
 
-    if (width <= 0 || height <= 0)
+    if (width <= 0 || height <= 0) {
+       CAIRO_TRACE_END (__func__);
         return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
+    }
 
     surface = calloc (1, sizeof (cairo_evas_gl_surface_t));
-    if (unlikely (surface == NULL))
+    if (unlikely (surface == NULL)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
+    }
 
     _cairo_gl_surface_init (device, &surface->base,
                            CAIRO_CONTENT_COLOR_ALPHA, width, height);
@@ -389,6 +409,7 @@ cairo_gl_surface_create_for_evas_gl (cairo_device_t *device,
 
     surface->surface = evas_surface;
 
+    CAIRO_TRACE_END (__func__);
     return &surface->base.base;
 }
 
index bfd93ba..8dc926a 100755 (executable)
@@ -130,7 +130,7 @@ cairo_gl_surface_create_for_texture (cairo_device_t *abstract_device,
  *
  * @param[in] abstract_surface        The given cairo_surface_t object
  *
- * @return the surface width or NULL on failure
+ * @return the surface width or 0 on failure
  *     The error value on failure can be retrieved with cairo_status().
  */
 
@@ -144,7 +144,7 @@ cairo_gl_surface_get_width (cairo_surface_t *abstract_surface);
  *
  * @param[in] abstract_surface         The given cairo_surface_t object
  *
- * @return the surface height or NULL on failure
+ * @return the surface height or 0 on failure
  *     The error value on failure can be retrieved with cairo_status().
  */
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 55ee02c..2fa8c9d 100755 (executable)
@@ -1154,7 +1154,7 @@ _get_bitmap_surface (FT_Bitmap                 *bitmap,
                dest = data;
                for (i = height; i; i--) {
                    memcpy (dest, source, bitmap->pitch);
-                   memset (dest + bitmap->pitch, '\0', stride - bitmap->pitch);
+                   memset (dest + bitmap->pitch,'\0', stride-bitmap->pitch);
 
                    source += bitmap->pitch;
                    dest += stride;
@@ -1210,26 +1210,26 @@ _get_bitmap_surface (FT_Bitmap               *bitmap,
                                        assert (own_buffer != 0);
                                        assert (bitmap->pixel_mode != FT_PIXEL_MODE_GRAY);
 
-                                       data = bitmap->buffer;
-                                       stride = bitmap->pitch;
-                                       format = CAIRO_FORMAT_ARGB32;
+           data = bitmap->buffer;
+           stride = bitmap->pitch;
+           format = CAIRO_FORMAT_ARGB32;
                        }
        }
        break;
        // color font
     case FT_PIXEL_MODE_BGRA:
                stride = bitmap->pitch;
-               if (own_buffer) {
-                       data = bitmap->buffer;
-               } else {
-                       data = _cairo_malloc_ab (height, stride);
-                       if (!data)
+       if (own_buffer) {
+               data = bitmap->buffer;
+       } else {
+               data = _cairo_malloc_ab (height, stride);
+               if (!data)
                        return _cairo_error (CAIRO_STATUS_NO_MEMORY);
 
-                       memcpy (data, bitmap->buffer, stride * height);
+               memcpy (data, bitmap->buffer, stride * height);
                }
 
-               format = CAIRO_FORMAT_ARGB32;
+       format = CAIRO_FORMAT_ARGB32;
                component_alpha = FALSE;
        break;
     case FT_PIXEL_MODE_GRAY2:
@@ -2191,10 +2191,10 @@ _cairo_ft_scaled_glyph_init (void                       *abstract_font,
        vertical_layout = TRUE;
     }
 
-       #ifdef FT_LOAD_COLOR
+    #ifdef FT_LOAD_COLOR
                /*Color-glyph support */
-               load_flags |= FT_LOAD_COLOR;
-       #endif
+    load_flags |= FT_LOAD_COLOR;
+    #endif
 
     error = FT_Load_Glyph (face,
                           _cairo_scaled_glyph_index(scaled_glyph),
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index c9f7782..0e24f9b
@@ -51,6 +51,7 @@
 #include "cairo-clip-private.h"
 #include "cairo-error-private.h"
 #include "cairo-image-surface-private.h"
+#include "cairo-ttrace.h"
 
 cairo_int_status_t
 _cairo_gl_composite_set_source (cairo_gl_composite_t *setup,
@@ -830,14 +831,17 @@ cairo_status_t
 _cairo_gl_composite_begin (cairo_gl_composite_t *setup,
                           cairo_gl_context_t **ctx_out)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_context_t *ctx;
     cairo_status_t status;
 
     assert (setup->dst);
 
     status = _cairo_gl_context_acquire (setup->dst->base.device, &ctx);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     setup->dst->content_cleared = FALSE;
 
@@ -860,12 +864,14 @@ FAIL:
     if (unlikely (status))
         status = _cairo_gl_context_release (ctx, status);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
 static inline void
 _cairo_gl_composite_draw_tristrip (cairo_gl_context_t *ctx)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_array_t* indices = &ctx->tristrip_indices;
     const unsigned short *indices_array = _cairo_array_index_const (indices, 0);
 
@@ -882,11 +888,13 @@ _cairo_gl_composite_draw_tristrip (cairo_gl_context_t *ctx)
 
     ctx->dispatch.DrawElements (GL_TRIANGLE_STRIP, _cairo_array_num_elements (indices), GL_UNSIGNED_SHORT, indices_array);
     _cairo_array_truncate (indices, 0);
+    CAIRO_TRACE_END (__func__);
 }
 
 static inline void
 _cairo_gl_composite_draw_line (cairo_gl_context_t *ctx)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     GLenum type = GL_LINE_STRIP;
     cairo_array_t* indices = &ctx->tristrip_indices;
     const unsigned short *indices_array = _cairo_array_index_const (indices, 0);
@@ -907,12 +915,14 @@ _cairo_gl_composite_draw_line (cairo_gl_context_t *ctx)
 
     ctx->dispatch.DrawElements (type, _cairo_array_num_elements (indices), GL_UNSIGNED_SHORT, indices_array);
     _cairo_array_truncate (indices, 0);
+    CAIRO_TRACE_END (__func__);
 }
 
 static inline void
 _cairo_gl_composite_draw_triangles (cairo_gl_context_t *ctx,
                                    unsigned int count)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     if (! ctx->pre_shader) {
         ctx->dispatch.DrawArrays (GL_TRIANGLES, 0, count);
     } else {
@@ -926,16 +936,19 @@ _cairo_gl_composite_draw_triangles (cairo_gl_context_t *ctx,
         _cairo_gl_set_operator (ctx, CAIRO_OPERATOR_ADD, TRUE);
         ctx->dispatch.DrawArrays (GL_TRIANGLES, 0, count);
     }
+    CAIRO_TRACE_END (__func__);
 }
 
 static void
 _cairo_gl_composite_draw_triangles_with_clip_region (cairo_gl_context_t *ctx,
                                                     unsigned int count)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     int i, num_rectangles;
 
     if (!ctx->clip_region) {
        _cairo_gl_composite_draw_triangles (ctx, count);
+        CAIRO_TRACE_END (__func__);
        return;
     }
 
@@ -949,6 +962,7 @@ _cairo_gl_composite_draw_triangles_with_clip_region (cairo_gl_context_t *ctx,
        _enable_scissor_buffer (ctx);
        _cairo_gl_composite_draw_triangles (ctx, count);
     }
+    CAIRO_TRACE_END (__func__);
 }
 
 static void
@@ -960,11 +974,14 @@ _cairo_gl_composite_unmap_vertex_buffer (cairo_gl_context_t *ctx)
 void
 _cairo_gl_composite_flush (cairo_gl_context_t *ctx)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     unsigned int count;
     int i;
 
-    if (_cairo_gl_context_is_flushed (ctx))
+    if (_cairo_gl_context_is_flushed (ctx)) {
+       CAIRO_TRACE_END (__func__);
         return;
+    }
 
     count = ctx->vb_offset / ctx->vertex_size;
     _cairo_gl_composite_unmap_vertex_buffer (ctx);
@@ -984,6 +1001,7 @@ _cairo_gl_composite_flush (cairo_gl_context_t *ctx)
        _cairo_gl_glyph_cache_unlock (&ctx->glyph_cache[i]);
 
     _cairo_gl_image_cache_unlock (ctx);
+    CAIRO_TRACE_END (__func__);
 }
 
 static void
@@ -1459,18 +1477,22 @@ _cairo_gl_composite_init (cairo_gl_composite_t *setup,
                           cairo_gl_surface_t *dst,
                           cairo_bool_t assume_component_alpha)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
     memset (setup, 0, sizeof (cairo_gl_composite_t));
 
     status = _cairo_gl_composite_set_operator (setup, op,
                                               assume_component_alpha);
-    if (status)
+    if (status) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     setup->dst = dst;
     setup->clip_region = dst->clip_region;
 
+    CAIRO_TRACE_END (__func__);
     return CAIRO_STATUS_SUCCESS;
 }
 
index a22ac63..30c1d64 100755 (executable)
 #include "cairo-error-private.h"
 #include "cairo-gl-private.h"
 #include "cairo-rtree-private.h"
-
-#if CAIRO_HAS_EVASGL_SURFACE
-#include "cairo-evas-gl.h"
-#endif
+#include "cairo-ttrace.h"
 
 #define MAX_MSAA_SAMPLES 4
 
@@ -259,6 +256,7 @@ test_can_read_bgra (cairo_gl_context_t *ctx, cairo_gl_flavor_t gl_flavor)
 cairo_status_t
 _cairo_gl_context_init (cairo_gl_context_t *ctx)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
     cairo_gl_dispatch_t *dispatch = &ctx->dispatch;
     int gl_version = _cairo_gl_get_version (dispatch);
@@ -288,8 +286,10 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx)
     cairo_list_init (&ctx->fonts);
 
     /* Support only GL version >= 1.3 */
-    if (gl_version < CAIRO_GL_VERSION_ENCODE (1, 3))
+    if (gl_version < CAIRO_GL_VERSION_ENCODE (1, 3)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_error (CAIRO_STATUS_DEVICE_ERROR);
+    }
 
     /* Check for required extensions */
     if (is_desktop) {
@@ -299,8 +299,10 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx)
        } else if (_cairo_gl_has_extension (&ctx->dispatch, "GL_ARB_texture_rectangle")) {
            ctx->tex_target = GL_TEXTURE_RECTANGLE;
            ctx->has_npot_repeat = FALSE;
-       } else
+       } else {
+           CAIRO_TRACE_END (__func__);
            return _cairo_error (CAIRO_STATUS_DEVICE_ERROR);
+       }
     } else {
        ctx->tex_target = GL_TEXTURE_2D;
        if (_cairo_gl_has_extension (&ctx->dispatch, "GL_OES_texture_npot") ||
@@ -311,11 +313,15 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx)
     }
 
     if (is_desktop && gl_version < CAIRO_GL_VERSION_ENCODE (2, 1) &&
-       ! _cairo_gl_has_extension (&ctx->dispatch, "GL_ARB_pixel_buffer_object"))
+       ! _cairo_gl_has_extension (&ctx->dispatch, "GL_ARB_pixel_buffer_object")) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_error (CAIRO_STATUS_DEVICE_ERROR);
+    }
 
-    if (is_gles && ! _cairo_gl_has_extension (&ctx->dispatch, "GL_EXT_texture_format_BGRA8888"))
+    if (is_gles && ! _cairo_gl_has_extension (&ctx->dispatch, "GL_EXT_texture_format_BGRA8888")) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_error (CAIRO_STATUS_DEVICE_ERROR);
+    }
 
     ctx->has_map_buffer =
        is_desktop || (is_gles && _cairo_gl_has_extension (&ctx->dispatch, "GL_OES_mapbuffer"));
@@ -332,7 +338,7 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx)
     ctx->num_samples = 1;
     ctx->msaa_type = CAIRO_GL_NONE_MULTISAMPLE_TO_TEXTURE;
 
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_EVASGL_SURFACE
+#if CAIRO_HAS_GL_SURFACE
     if (is_desktop && ctx->has_packed_depth_stencil &&
        (gl_version >= CAIRO_GL_VERSION_ENCODE (3, 0) ||
         _cairo_gl_has_extension (&ctx->dispatch, "GL_ARB_framebuffer_object") ||
@@ -343,44 +349,41 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx)
 #endif
 
 #if (CAIRO_HAS_GLESV2_SURFACE || CAIRO_HAS_EVASGL_SURFACE) && GL_MAX_SAMPLES_EXT
-    if (is_gles && ctx->has_packed_depth_stencil &&
+    if (is_gles && ctx->has_packed_depth_stencil && ctx->num_samples <= 1 &&
        _cairo_gl_has_extension (&ctx->dispatch, "GL_EXT_multisampled_render_to_texture")) {
    ctx->dispatch.GetIntegerv(GL_MAX_SAMPLES_EXT, &ctx->num_samples);
-   ctx->msaa_type = CAIRO_GL_EXT_MULTISAMPLE_TO_TEXTURE;
+   if (ctx->num_samples > 1)
+            ctx->msaa_type = CAIRO_GL_EXT_MULTISAMPLE_TO_TEXTURE;
     }
 #endif
 
 #if (CAIRO_HAS_GLESV2_SURFACE || CAIRO_HAS_EVASGL_SURFACE) && GL_MAX_SAMPLES_IMG
-    if (ctx->msaa_type == CAIRO_GL_NONE_MULTISAMPLE_TO_TEXTURE &&
+    if (ctx->num_samples == 1 &&
    is_gles &&
    ctx->has_packed_depth_stencil &&
        _cairo_gl_has_extension (&ctx->dispatch, "GL_IMG_multisampled_render_to_texture")) {
    ctx->dispatch.GetIntegerv(GL_MAX_SAMPLES_IMG, &ctx->num_samples);
-   ctx->msaa_type = CAIRO_GL_IMG_MULTISAMPLE_TO_TEXTURE;
+   if (ctx->num_samples > 1)
+            ctx->msaa_type = CAIRO_GL_IMG_MULTISAMPLE_TO_TEXTURE;
     }
 #endif
 
 #if (CAIRO_HAS_GLESV2_SURFACE || CAIRO_HAS_EVASGL_SURFACE) && GL_MAX_SAMPLES_ANGLE
-    if (ctx->msaa_type == CAIRO_GL_NONE_MULTISAMPLE_TO_TEXTURE &&
-    is_gles &&
-    ctx->has_packed_depth_stencil &&
+    if (ctx->num_samples == 1 &&
+   is_gles &&
+   ctx->has_packed_depth_stencil &&
        _cairo_gl_has_extension (&ctx->dispatch, "GL_ANGLE_framebuffer_blit") &&
-    _cairo_gl_has_extension (&ctx->dispatch, "GL_ANGLE_framebuffer_multisample")) {
-    ctx->dispatch.GetIntegerv(GL_MAX_SAMPLES_ANGLE, &ctx->num_samples);
-       ctx->has_angle_multisampling = TRUE;
+   _cairo_gl_has_extension (&ctx->dispatch, "GL_ANGLE_framebuffer_multisample")) {
+   ctx->dispatch.GetIntegerv(GL_MAX_SAMPLES_ANGLE, &ctx->num_samples);
+         if (ctx->num_samples > 1)
+       ctx->has_angle_multisampling = TRUE;
     }
 #endif
 
-#if CAIRO_HAS_GLESV3_SURFACE || CAIRO_HAS_EVASGL_SURFACE
-    if (ctx->msaa_type == CAIRO_GL_NONE_MULTISAMPLE_TO_TEXTURE &&
+#if CAIRO_HAS_GLESV3_SURFACE
+    if (ctx->num_samples == 1 &&
    is_gles && ctx->has_packed_depth_stencil) {
     ctx->dispatch.GetIntegerv(GL_MAX_SAMPLES, &ctx->num_samples);
-       /* this is work around for evasgl. At this moment, if
-          we still get samples == 1, it means gles2 does not have any
-          support for extensions we have supported
-          */
-          if (gl_flavor == CAIRO_GL_FLAVOR_ES2)
-               ctx->num_samples = 1;
     }
 #endif
 
@@ -399,20 +402,25 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx)
     ctx->gl_flavor = gl_flavor;
 
     status = _cairo_gl_context_init_shaders (ctx);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
         return status;
+    }
 
     status = _cairo_cache_init (&ctx->gradients,
                                 _cairo_gl_gradient_equal,
                                 NULL,
                                 (cairo_destroy_func_t) _cairo_gl_gradient_destroy,
                                 CAIRO_GL_GRADIENT_CACHE_SIZE);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
         return status;
+    }
 
     ctx->vb = malloc (CAIRO_GL_VBO_SIZE);
     if (unlikely (ctx->vb == NULL)) {
            _cairo_cache_fini (&ctx->gradients);
+            CAIRO_TRACE_END (__func__);
            return _cairo_error (CAIRO_STATUS_NO_MEMORY);
     }
 
@@ -447,6 +455,7 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx)
 
     _cairo_gl_context_reset (ctx);
 
+    CAIRO_TRACE_END (__func__);
     return CAIRO_STATUS_SUCCESS;
 }
 
@@ -476,7 +485,7 @@ _get_depth_stencil_format (cairo_gl_context_t *ctx)
 {
     /* This is necessary to properly handle the situation where both
        OpenGL and OpenGLES are active and returning a sane default. */
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_EVASGL_SURFACE
+#if CAIRO_HAS_GL_SURFACE
     if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP)
        return GL_DEPTH_STENCIL;
 #endif
@@ -499,6 +508,7 @@ static void
 _cairo_gl_clear_framebuffer (cairo_gl_context_t *ctx,
                             cairo_gl_surface_t *surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP)
        return;
 
@@ -507,6 +517,7 @@ _cairo_gl_clear_framebuffer (cairo_gl_context_t *ctx,
        _disable_stencil_buffer (ctx);
        ctx->dispatch.Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
     }
+    CAIRO_TRACE_END (__func__);
 }
 
 #if CAIRO_HAS_GLESV2_SURFACE || CAIRO_HAS_EVASGL_SURFACE
@@ -514,11 +525,16 @@ static void
 _cairo_gl_ensure_msaa_gles_framebuffer (cairo_gl_context_t *ctx,
                                        cairo_gl_surface_t *surface)
 {
-    if (ctx->has_angle_multisampling)
+    CAIRO_TRACE_BEGIN (__func__);
+    if (ctx->has_angle_multisampling) {
+        CAIRO_TRACE_END (__func__);
        return;
+    }
 
-    if (surface->msaa_active)
+    if (surface->msaa_active) {
+        CAIRO_TRACE_END (__func__);
        return;
+    }
 
     ctx->dispatch.FramebufferTexture2DMultisample(GL_FRAMEBUFFER,
                                                  GL_COLOR_ATTACHMENT0,
@@ -529,6 +545,7 @@ _cairo_gl_ensure_msaa_gles_framebuffer (cairo_gl_context_t *ctx,
 
     /* From now on MSAA will always be active on this surface. */
     surface->msaa_active = TRUE;
+    CAIRO_TRACE_END (__func__);
 }
 #endif
 
@@ -536,11 +553,14 @@ void
 _cairo_gl_ensure_framebuffer (cairo_gl_context_t *ctx,
                               cairo_gl_surface_t *surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     GLenum status;
     cairo_gl_dispatch_t *dispatch = &ctx->dispatch;
 
-    if (likely (surface->fb))
+    if (likely (surface->fb)) {
+       CAIRO_TRACE_END (__func__);
         return;
+    }
 
     /* Create a framebuffer object wrapping the texture so that we can render
      * to it.
@@ -564,7 +584,7 @@ _cairo_gl_ensure_framebuffer (cairo_gl_context_t *ctx,
                                        surface->tex,
                                        0);
 
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_EVASGL_SURFACE
+#if CAIRO_HAS_GL_SURFACE
     if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP &&
         ctx->dispatch.DrawBuffer &&
         ctx->dispatch.ReadBuffer) {
@@ -591,22 +611,28 @@ _cairo_gl_ensure_framebuffer (cairo_gl_context_t *ctx,
                 "destination is framebuffer incomplete: %s [%#x]\n",
                 str, status);
     }
+    CAIRO_TRACE_END (__func__);
 }
 
 static void
 _cairo_gl_ensure_multisampling (cairo_gl_context_t *ctx,
                                cairo_gl_surface_t *surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     GLenum rgba;
 
     if (ctx->gl_flavor == CAIRO_GL_FLAVOR_ES2 &&
-       ! ctx->has_angle_multisampling)
+       ! ctx->has_angle_multisampling) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     assert (surface->supports_msaa);
 
-    if (surface->msaa_fb)
+    if (surface->msaa_fb) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     /* We maintain a separate framebuffer for multisampling operations.
        This allows us to do a fast paint to the non-multisampling framebuffer
@@ -647,6 +673,7 @@ _cairo_gl_ensure_multisampling (cairo_gl_context_t *ctx,
        surface->msaa_rb = 0;
        ctx->dispatch.DeleteRenderbuffers (1, &surface->msaa_fb);
        surface->msaa_fb = 0;
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
@@ -656,15 +683,19 @@ _cairo_gl_ensure_multisampling (cairo_gl_context_t *ctx,
     // reset cached clear colors
     memset (&ctx->states_cache.clear_red, 0, sizeof (GLclampf) * 4);
     ctx->dispatch.Clear (GL_COLOR_BUFFER_BIT);
+    CAIRO_TRACE_END (__func__);
 }
 
 static cairo_bool_t
 _cairo_gl_ensure_msaa_depth_stencil_buffer (cairo_gl_context_t *ctx,
                                            cairo_gl_surface_t *surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_dispatch_t *dispatch = &ctx->dispatch;
-    if (surface->msaa_depth_stencil)
+    if (surface->msaa_depth_stencil) {
+        CAIRO_TRACE_END (__func__);
        return TRUE;
+    }
 
     _cairo_gl_ensure_multisampling (ctx, surface);
 
@@ -678,7 +709,7 @@ _cairo_gl_ensure_msaa_depth_stencil_buffer (cairo_gl_context_t *ctx,
                                              surface->width,
                                              surface->height);
 
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_GLESV3_SURFACE || CAIRO_HAS_EVASGL_SURFACE
+#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_GLESV3_SURFACE
     if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP ||
        ctx->gl_flavor == CAIRO_GL_FLAVOR_ES3) {
        dispatch->FramebufferRenderbuffer (GL_FRAMEBUFFER,
@@ -704,9 +735,11 @@ _cairo_gl_ensure_msaa_depth_stencil_buffer (cairo_gl_context_t *ctx,
     if (dispatch->CheckFramebufferStatus (GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
        dispatch->DeleteRenderbuffers (1, &surface->msaa_depth_stencil);
        surface->msaa_depth_stencil = 0;
+        CAIRO_TRACE_END (__func__);
        return FALSE;
     }
 
+    CAIRO_TRACE_END (__func__);
     return TRUE;
 }
 
@@ -714,10 +747,13 @@ static cairo_bool_t
 _cairo_gl_ensure_depth_stencil_buffer (cairo_gl_context_t *ctx,
                                       cairo_gl_surface_t *surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_dispatch_t *dispatch = &ctx->dispatch;
 
-    if (surface->depth_stencil)
+    if (surface->depth_stencil) {
+        CAIRO_TRACE_END (__func__);
        return TRUE;
+    }
 
     _cairo_gl_ensure_framebuffer (ctx, surface);
 
@@ -734,9 +770,11 @@ _cairo_gl_ensure_depth_stencil_buffer (cairo_gl_context_t *ctx,
     if (dispatch->CheckFramebufferStatus (GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
        dispatch->DeleteRenderbuffers (1, &surface->depth_stencil);
        surface->depth_stencil = 0;
+        CAIRO_TRACE_END (__func__);
        return FALSE;
     }
 
+    CAIRO_TRACE_END (__func__);
     return TRUE;
 }
 
@@ -799,7 +837,8 @@ static void
 bind_multisample_framebuffer (cairo_gl_context_t *ctx,
                               cairo_gl_surface_t *surface)
 {
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_EVASGL_SURFACE
+    CAIRO_TRACE_BEGIN (__func__);
+#if CAIRO_HAS_GL_SURFACE
     cairo_bool_t stencil_test_enabled, scissor_test_enabled;
     cairo_bool_t has_stencil_cache;
     GLbitfield mask;
@@ -818,64 +857,69 @@ bind_multisample_framebuffer (cairo_gl_context_t *ctx,
     _cairo_gl_ensure_multisampling (ctx, surface);
 
     if (surface->msaa_active) {
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_EVASGL_SURFACE
+#if CAIRO_HAS_GL_SURFACE
        if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP)
            ctx->dispatch.Enable (GL_MULTISAMPLE);
 
 #endif
        ctx->dispatch.BindFramebuffer (GL_FRAMEBUFFER, surface->msaa_fb);
+        CAIRO_TRACE_END (__func__);
        return;
     }
 
     _cairo_gl_composite_flush (ctx);
 
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_EVASGL_SURFACE
+#if CAIRO_HAS_GL_SURFACE
     /* we must disable scissor and stencil test */
     if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP) {
-    _disable_stencil_buffer (ctx);
-    _disable_scissor_buffer (ctx);
+       _disable_stencil_buffer (ctx);
+       _disable_scissor_buffer (ctx);
 
        ctx->dispatch.Enable (GL_MULTISAMPLE);
 
-    if (has_stencil_cache)
-       mask |= GL_STENCIL_BUFFER_BIT;
-
-    /* The last time we drew to the surface, we were not using multisampling,
-       so we need to blit from the non-multisampling framebuffer into the
-       multisampling framebuffer. */
-    ctx->dispatch.BindFramebuffer (GL_DRAW_FRAMEBUFFER, surface->msaa_fb);
-    ctx->dispatch.BindFramebuffer (GL_READ_FRAMEBUFFER, surface->fb);
-    ctx->dispatch.BlitFramebuffer (0, 0, surface->width, surface->height,
-                                  0, 0, surface->width, surface->height,
-                                  mask, GL_NEAREST);
-    surface->content_synced = TRUE;
+       if (has_stencil_cache)
+           mask |= GL_STENCIL_BUFFER_BIT;
+
+       /* The last time we drew to the surface, we were not using multisampling,
+        so we need to blit from the non-multisampling framebuffer into the
+        multisampling framebuffer. */
+       ctx->dispatch.BindFramebuffer (GL_DRAW_FRAMEBUFFER, surface->msaa_fb);
+       ctx->dispatch.BindFramebuffer (GL_READ_FRAMEBUFFER, surface->fb);
+       ctx->dispatch.BlitFramebuffer (0, 0, surface->width, surface->height,
+                                      0, 0, surface->width, surface->height,
+                                      mask, GL_NEAREST);
+       surface->content_synced = TRUE;
     }
 #endif
     ctx->dispatch.BindFramebuffer (GL_FRAMEBUFFER, surface->msaa_fb);
 
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_EVASGL_SURFACE
+#if CAIRO_HAS_GL_SURFACE
     if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP) {
-    /* re-enable stencil and scissor test */
-    if (scissor_test_enabled)
-       _enable_scissor_buffer (ctx);
-    if (stencil_test_enabled)
-       _enable_stencil_buffer (ctx);
+       /* re-enable stencil and scissor test */
+       if (scissor_test_enabled)
+           _enable_scissor_buffer (ctx);
+       if (stencil_test_enabled)
+           _enable_stencil_buffer (ctx);
     }
 #endif
+    CAIRO_TRACE_END (__func__);
 }
 
 static void
 bind_singlesample_framebuffer (cairo_gl_context_t *ctx,
                               cairo_gl_surface_t *surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_bool_t has_stencil_cache = surface->clip_on_stencil_buffer ? TRUE : FALSE;
     cairo_bool_t stencil_test_enabled = ctx->states_cache.stencil_test_enabled;
     cairo_bool_t scissor_test_enabled = ctx->states_cache.scissor_test_enabled;
     GLbitfield mask = GL_COLOR_BUFFER_BIT;
 
     if (ctx->gl_flavor == CAIRO_GL_FLAVOR_ES2 &&
-       ! ctx->has_angle_multisampling)
+       ! ctx->has_angle_multisampling) {
+        CAIRO_TRACE_END (__func__);
        return;
+    }
 
     _cairo_gl_ensure_framebuffer (ctx, surface);
 
@@ -885,6 +929,7 @@ bind_singlesample_framebuffer (cairo_gl_context_t *ctx,
            ctx->dispatch.Disable (GL_MULTISAMPLE);
 #endif
        ctx->dispatch.BindFramebuffer (GL_FRAMEBUFFER, surface->fb);
+        CAIRO_TRACE_END (__func__);
        return;
     }
 
@@ -906,15 +951,9 @@ bind_singlesample_framebuffer (cairo_gl_context_t *ctx,
        non-multisampling framebuffer. */
 #if CAIRO_HAS_GLESV2_SURFACE || CAIRO_HAS_EVASGL_SURFACE
     if (ctx->gl_flavor == CAIRO_GL_FLAVOR_ES2) {
-    ctx->dispatch.BindFramebuffer (GL_DRAW_FRAMEBUFFER_ANGLE, surface->fb);
-    ctx->dispatch.BindFramebuffer (GL_READ_FRAMEBUFFER_ANGLE, surface->msaa_fb);
+       ctx->dispatch.BindFramebuffer (GL_DRAW_FRAMEBUFFER_ANGLE, surface->fb);
+       ctx->dispatch.BindFramebuffer (GL_READ_FRAMEBUFFER_ANGLE, surface->msaa_fb);
     }
-#if CAIRO_HAS_EVASGL_SURFACE
-    else {
-       ctx->dispatch.BindFramebuffer (GL_DRAW_FRAMEBUFFER, surface->fb);
-       ctx->dispatch.BindFramebuffer (GL_READ_FRAMEBUFFER, surface->msaa_fb);
-    }
-#endif
 #else
     ctx->dispatch.BindFramebuffer (GL_DRAW_FRAMEBUFFER, surface->fb);
     ctx->dispatch.BindFramebuffer (GL_READ_FRAMEBUFFER, surface->msaa_fb);
@@ -930,6 +969,7 @@ bind_singlesample_framebuffer (cairo_gl_context_t *ctx,
        _enable_scissor_buffer (ctx);
     if (stencil_test_enabled)
        _enable_stencil_buffer (ctx);
+    CAIRO_TRACE_END (__func__);
 }
 
 void
@@ -937,6 +977,7 @@ _cairo_gl_context_bind_framebuffer (cairo_gl_context_t *ctx,
                                    cairo_gl_surface_t *surface,
                                    cairo_bool_t multisampling)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     if (_cairo_gl_surface_is_texture (surface)) {
        /* OpenGL ES surfaces only have either a multisample framebuffer or a
         * singlesample framebuffer, so we cannot switch back and forth. */
@@ -945,6 +986,7 @@ _cairo_gl_context_bind_framebuffer (cairo_gl_context_t *ctx,
            _cairo_gl_ensure_framebuffer (ctx, surface);
            ctx->dispatch.BindFramebuffer (GL_FRAMEBUFFER, surface->fb);
            _cairo_gl_clear_framebuffer (ctx, surface);
+           CAIRO_TRACE_END (__func__);
            return;
        }
 
@@ -957,7 +999,7 @@ _cairo_gl_context_bind_framebuffer (cairo_gl_context_t *ctx,
        ctx->dispatch.BindFramebuffer (GL_FRAMEBUFFER, 0);
 #endif
 
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_EVASGL_SURFACE
+#if CAIRO_HAS_GL_SURFACE
        if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP) {
            if (multisampling)
                ctx->dispatch.Enable (GL_MULTISAMPLE);
@@ -975,6 +1017,7 @@ _cairo_gl_context_bind_framebuffer (cairo_gl_context_t *ctx,
 
     if (ctx->gl_flavor != CAIRO_GL_FLAVOR_DESKTOP && multisampling)
        _cairo_gl_clear_framebuffer (ctx, surface);
+    CAIRO_TRACE_END (__func__);
 }
 
 void
@@ -982,6 +1025,7 @@ _cairo_gl_context_set_destination (cairo_gl_context_t *ctx,
                                    cairo_gl_surface_t *surface,
                                    cairo_bool_t multisampling)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_bool_t changing_surface, changing_sampling;
 
     /* The decision whether or not to use multisampling happens when
@@ -996,11 +1040,13 @@ _cairo_gl_context_set_destination (cairo_gl_context_t *ctx,
     if (! changing_surface && ! changing_sampling) {
        if (surface->needs_update)
            _cairo_gl_composite_flush (ctx);
+        CAIRO_TRACE_END (__func__);
        return;
     }
     if (! changing_surface) {
        _cairo_gl_composite_flush (ctx);
        _cairo_gl_context_bind_framebuffer (ctx, surface, multisampling);
+        CAIRO_TRACE_END (__func__);
        return;
     }
 
@@ -1016,7 +1062,7 @@ _cairo_gl_context_set_destination (cairo_gl_context_t *ctx,
     _cairo_gl_context_bind_framebuffer (ctx, surface, multisampling);
 
     if (! _cairo_gl_surface_is_texture (surface)) {
-#if CAIRO_HAS_GL_SURFACE || CAIRO_HAS_EVASGL_SURFACE
+#if CAIRO_HAS_GL_SURFACE
        if (ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP &&
        ctx->dispatch.DrawBuffer &&
        ctx->dispatch.ReadBuffer) {
@@ -1040,6 +1086,7 @@ _cairo_gl_context_set_destination (cairo_gl_context_t *ctx,
     else
        _gl_identity_ortho (ctx->modelviewprojection_matrix,
                            0, surface->width, surface->height, 0);
+    CAIRO_TRACE_END (__func__);
 }
 
 void
@@ -1055,10 +1102,12 @@ cairo_gl_device_set_thread_aware (cairo_device_t        *device,
        _cairo_error_throw (CAIRO_STATUS_DEVICE_TYPE_MISMATCH);
        return;
     }
-    if(thread_aware == 0 || thread_aware == 1){
+    if(thread_aware == 0 || thread_aware == 1)
+    {
        ((cairo_gl_context_t *) device)->thread_aware = thread_aware;
     }
-    else{
+    else
+    {
        _cairo_device_set_error (device, CAIRO_STATUS_INVALID_STATUS);
        return;
     }
@@ -1066,6 +1115,20 @@ cairo_gl_device_set_thread_aware (cairo_device_t *device,
 
 void _cairo_gl_context_reset (cairo_gl_context_t *ctx)
 {
+    cairo_gl_shader_t *shader = ctx->current_shader;
+    GLint current_program;
+
+    /* reset current shader, this is because if cairo shadres a same
+     * context other extern libraries or applications, the current
+     * program may well be changed, in this case, we must set cairo
+     * to use cairo program
+     */
+    if (shader) {
+    ctx->dispatch.GetIntegerv (GL_CURRENT_PROGRAM, &current_program);
+    if ((GLint)(ctx->current_shader->program) != current_program)
+       _cairo_gl_set_shader (ctx, shader);
+    }
+
     ctx->states_cache.viewport_box.width = 0;
     ctx->states_cache.viewport_box.height = 0;
 
@@ -1085,8 +1148,8 @@ void _cairo_gl_context_reset (cairo_gl_context_t *ctx)
 
     ctx->states_cache.depth_mask = FALSE;
 
-       /* FIXME: this is hack to fix mali driver*/
-       ctx->dispatch.Disable (GL_DITHER);
+    /* FIXME: this is hack to fix mali driver */
+    ctx->dispatch.Disable (GL_DITHER);
 
-       ctx->current_shader = NULL;
+    //ctx->current_shader = NULL;
 }
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index a261947..c9d4179
 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
 #endif
 
+#ifndef GL_READ_FRAMEBUFFER_ANGLE
+#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
+#endif
+
+#ifndef GL_DRAW_FRAMEBUFFER_ANGLE
+#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
+#endif
+
 #endif /* CAIRO_GL_EXT_DEF_PRIVATE_H */
old mode 100644 (file)
new mode 100755 (executable)
index 8e5892e..777fe79
@@ -179,7 +179,7 @@ static cairo_status_t
 cairo_gl_context_get_glyph_cache (cairo_gl_context_t *ctx,
                                  cairo_format_t format,
                                cairo_bool_t has_component_alpha,
-                 cairo_gl_glyph_cache_t **cache_out)
+                                  cairo_gl_glyph_cache_t **cache_out)
 {
     cairo_gl_glyph_cache_t *cache;
     cairo_content_t content;
@@ -190,12 +190,11 @@ cairo_gl_context_get_glyph_cache (cairo_gl_context_t *ctx,
     case CAIRO_FORMAT_ARGB32:
     case CAIRO_FORMAT_RGB24:
                if (has_component_alpha) {
-                       cache = &ctx->glyph_cache[0];
+       cache = &ctx->glyph_cache[0];
                } else {
                        cache = &ctx->glyph_cache[2];
                }
         content = CAIRO_CONTENT_COLOR_ALPHA;
-               break;
        break;
     case CAIRO_FORMAT_A8:
     case CAIRO_FORMAT_A1:
@@ -350,7 +349,7 @@ render_glyphs (cairo_gl_surface_t *dst,
                _cairo_gl_composite_set_source_operand (&setup, &cache->surface->operand);
                *is_color_glyph = TRUE;
        } else {
-               _cairo_gl_composite_set_mask_operand (&setup, &cache->surface->operand);
+           _cairo_gl_composite_set_mask_operand (&setup, &cache->surface->operand);
                *is_color_glyph = FALSE;
        }
 
@@ -455,7 +454,7 @@ render_glyphs_via_mask (cairo_gl_surface_t *dst,
     }
 
     /* Create the mask if it has not yet been initialized or it was too small and deleted above. */
-    if (! ctx->glyph_mask) {
+    if(!ctx->glyph_mask) {
        width = MAX (width, info->extents.width);
        height = MAX (height, info->extents.height);
        /* XXX: For non-CA, this should be CAIRO_CONTENT_ALPHA to save memory */
@@ -522,10 +521,10 @@ render_glyphs_via_mask (cairo_gl_surface_t *dst,
                                }
                }
        else
-               status = _cairo_surface_mask (&dst->base, op,
+       status = _cairo_surface_mask (&dst->base, op,
                                      &source_pattern.base,
-                                                       &mask_pattern.base,
-                                                       clip);
+                                     &mask_pattern.base,
+                                     clip);
 
        _cairo_clip_destroy (clip);
 
index 024549e..8133acd 100755 (executable)
 
 #include "cairo-gl.h"
 
-#if 0
-#if CAIRO_HAS_EVASGL_SURFACE
-#include <Evas_GL.h>
-#else
-       #if CAIRO_HAS_GL_SURFACE
-       #include <GL/gl.h>
-       #include <GL/glext.h>
-       #elif CAIRO_HAS_GLESV2_SURFACE
-       #include <GLES2/gl2.h>
-       #include <GLES2/gl2ext.h>
-       #elif CAIRO_HAS_GLESV3_SURFACE
-       #include <GLES3/gl3.h>
-       #include <GLES3/gl3ext.h>
-       #endif
-#endif
-#endif
-
 #define CAIRO_GL_GRADIENT_CACHE_SIZE 4096
 
 /* XXX: Declare in a better place */
old mode 100644 (file)
new mode 100755 (executable)
index ddf869e..2f8c725
@@ -290,7 +290,7 @@ _cairo_gl_gradient_create (cairo_gl_context_t           *ctx,
 
     ctx->dispatch.TexImage2D (ctx->tex_target, 0, internal_format,
                              tex_width, 1, 0,
-                 GL_BGRA, GL_UNSIGNED_BYTE, data);
+                             GL_BGRA, GL_UNSIGNED_BYTE, data);
 
     free (data);
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 7ce5c7a..8754424
@@ -47,6 +47,7 @@
 #include "cairo-gl-private.h"
 #include "cairo-path-private.h"
 #include "cairo-traps-private.h"
+#include "cairo-ttrace.h"
 
 static cairo_bool_t
 can_use_msaa_compositor (cairo_gl_surface_t *surface,
@@ -237,15 +238,19 @@ _cairo_gl_msaa_compositor_draw_clip (cairo_gl_context_t *ctx,
                                     cairo_gl_composite_t *setup,
                                     cairo_clip_t *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
     cairo_traps_t traps;
 
     status = _clip_to_traps (clip, &traps);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
     status = _draw_traps (ctx, setup, &traps);
 
     _cairo_traps_fini (&traps);
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -419,18 +424,22 @@ static void
 _cairo_gl_msaa_compositor_set_clip (cairo_composite_rectangles_t *composite,
                                    cairo_gl_composite_t *setup)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     uint32_t is_bounded;
 
     /* We don't need to check CAIRO_OPERATOR_BOUND_BY_MASK in these
        situations. */
     is_bounded = composite->is_bounded;
     composite->is_bounded = CAIRO_OPERATOR_BOUND_BY_SOURCE;
-    if (_cairo_composite_rectangles_can_reduce_clip (composite, composite->clip))
+    if (_cairo_composite_rectangles_can_reduce_clip (composite, composite->clip)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     _cairo_gl_composite_set_clip (setup, composite->clip);
 
     composite->is_bounded = is_bounded;
+    CAIRO_TRACE_END (__func__);
 }
 
 static cairo_bool_t
@@ -483,6 +492,7 @@ static cairo_int_status_t
 _cairo_gl_msaa_compositor_mask_source_operator (const cairo_compositor_t *compositor,
                                                cairo_composite_rectangles_t *composite)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_composite_t setup;
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *) composite->surface;
     cairo_gl_context_t *ctx = NULL;
@@ -501,22 +511,31 @@ _cairo_gl_msaa_compositor_mask_source_operator (const cairo_compositor_t *compos
        status = _clip_to_traps (clip, &traps);
        if (unlikely (status)) {
            _cairo_traps_fini (&traps);
+           CAIRO_TRACE_END (__func__);
            return status;
        }
     }
 
     if (! is_pixel_aligned) {
        status = _blit_texture_to_renderbuffer (dst);
-       if (unlikely (status))
+       if (unlikely (status)) {
+           if (clip)
+               _cairo_traps_fini (&traps);
+           CAIRO_TRACE_END (__func__);
            return status;
+       }
     }
 
     status = _cairo_gl_composite_init (&setup,
                                       CAIRO_OPERATOR_DEST_OUT,
                                       dst,
                                       FALSE /* assume_component_alpha */);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       if (clip)
+           _cairo_traps_fini (&traps);
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
     status = _cairo_gl_composite_set_source (&setup,
                                             composite->original_mask_pattern,
                                             &composite->mask_sample_area,
@@ -580,6 +599,7 @@ finish:
     if (clip)
        _cairo_traps_fini (&traps);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -587,6 +607,7 @@ static cairo_int_status_t
 _cairo_gl_msaa_compositor_mask (const cairo_compositor_t       *compositor,
                                cairo_composite_rectangles_t    *composite)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_composite_t setup;
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *) composite->surface;
     cairo_gl_context_t *ctx = NULL;
@@ -595,12 +616,16 @@ _cairo_gl_msaa_compositor_mask (const cairo_compositor_t  *compositor,
     cairo_clip_t *clip = composite->clip;
     cairo_bool_t is_pixel_aligned = FALSE;
 
-    if (! can_use_msaa_compositor (dst, CAIRO_ANTIALIAS_DEFAULT))
+    if (! can_use_msaa_compositor (dst, CAIRO_ANTIALIAS_DEFAULT)) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_INT_STATUS_UNSUPPORTED;
+    }
 
     if (composite->op == CAIRO_OPERATOR_CLEAR &&
-       composite->original_mask_pattern != NULL)
+       composite->original_mask_pattern != NULL) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_INT_STATUS_UNSUPPORTED;
+    }
 
     /* GL compositing operators cannot properly represent a mask operation
        using the SOURCE compositing operator in one pass. This only matters if
@@ -613,6 +638,7 @@ _cairo_gl_msaa_compositor_mask (const cairo_compositor_t    *compositor,
 
        if (! _cairo_pattern_is_opaque (&composite->source_pattern.base,
                                      &composite->source_sample_area)) {
+           CAIRO_TRACE_END (__func__);
            return _cairo_gl_msaa_compositor_mask_source_operator (compositor, composite);
        }
 
@@ -623,8 +649,10 @@ _cairo_gl_msaa_compositor_mask (const cairo_compositor_t   *compositor,
     if (_should_use_unbounded_surface (composite)) {
        cairo_surface_t* surface = _prepare_unbounded_surface (dst);
 
-       if (unlikely (surface == NULL))
+       if (unlikely (surface == NULL)) {
+           CAIRO_TRACE_END (__func__);
            return CAIRO_INT_STATUS_UNSUPPORTED;
+       }
 
        /* This may be a paint operation. */
        if (composite->original_mask_pattern == NULL) {
@@ -642,9 +670,11 @@ _cairo_gl_msaa_compositor_mask (const cairo_compositor_t   *compositor,
 
        if (unlikely (status)) {
            cairo_surface_destroy (surface);
+           CAIRO_TRACE_END (__func__);
            return status;
        }
 
+       CAIRO_TRACE_END (__func__);
        return _paint_back_unbounded_surface (compositor, composite, surface);
     }
 
@@ -655,16 +685,20 @@ _cairo_gl_msaa_compositor_mask (const cairo_compositor_t  *compositor,
 
     if (! is_pixel_aligned) {
        status = _blit_texture_to_renderbuffer (dst);
-       if (unlikely (status))
+       if (unlikely (status)) {
+           CAIRO_TRACE_END (__func__);
            return status;
+       }
     }
 
     status = _cairo_gl_composite_init (&setup,
                                       op,
                                       dst,
                                       FALSE /* assume_component_alpha */);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = _cairo_gl_composite_set_source (&setup,
                                             composite->original_source_pattern,
@@ -737,6 +771,7 @@ finish:
     if (ctx)
        status = _cairo_gl_context_release (ctx, status);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -904,14 +939,17 @@ _cairo_gl_msaa_compositor_stroke (const cairo_compositor_t        *compositor,
                                  double                         tolerance,
                                  cairo_antialias_t              antialias)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *) composite->surface;
     struct _tristrip_composite_info info;
     cairo_bool_t use_color_attribute;
     cairo_rectangle_int_t stroke_extents;
 
-    if (! can_use_msaa_compositor (dst, antialias))
+    if (! can_use_msaa_compositor (dst, antialias)) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_INT_STATUS_UNSUPPORTED;
+    }
 
     if (! _cairo_path_fixed_stroke_is_rectilinear (path)) {
        _cairo_path_fixed_approximate_fill_extents (path, &stroke_extents);
@@ -922,6 +960,7 @@ _cairo_gl_msaa_compositor_stroke (const cairo_compositor_t  *compositor,
                 stroke_extents.height < 10) ||
                (stroke_extents.height / stroke_extents.width > 10 &&
                 stroke_extents.width < 10)) {
+               CAIRO_TRACE_END (__func__);
                return CAIRO_INT_STATUS_UNSUPPORTED;
            }
        }
@@ -930,8 +969,10 @@ _cairo_gl_msaa_compositor_stroke (const cairo_compositor_t *compositor,
     if (composite->is_bounded == FALSE) {
        cairo_surface_t* surface = _prepare_unbounded_surface (dst);
 
-       if (unlikely (surface == NULL))
+       if (unlikely (surface == NULL)) {
+           CAIRO_TRACE_END (__func__);
            return CAIRO_INT_STATUS_UNSUPPORTED;
+       }
 
        status = _cairo_compositor_stroke (compositor, surface,
                                           CAIRO_OPERATOR_SOURCE,
@@ -940,24 +981,30 @@ _cairo_gl_msaa_compositor_stroke (const cairo_compositor_t        *compositor,
                                           tolerance, antialias, NULL);
        if (unlikely (status)) {
            cairo_surface_destroy (surface);
+           CAIRO_TRACE_END (__func__);
            return status;
        }
 
+       CAIRO_TRACE_END (__func__);
        return _paint_back_unbounded_surface (compositor, composite, surface);
     }
 
     if (antialias != CAIRO_ANTIALIAS_NONE) {
        status = _blit_texture_to_renderbuffer (dst);
-       if (unlikely (status))
+       if (unlikely (status)) {
+           CAIRO_TRACE_END (__func__);
            return status;
+       }
     }
 
     status = _cairo_gl_composite_init (&info.setup,
                                       composite->op,
                                       dst,
                                       FALSE /* assume_component_alpha */);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     info.ctx = NULL;
     use_color_attribute = _cairo_gl_hairline_style_is_hairline (style, ctm);
@@ -1034,6 +1081,7 @@ finish:
     if (info.ctx)
        status = _cairo_gl_context_release (info.ctx, status);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1069,6 +1117,7 @@ _cairo_gl_msaa_compositor_fill (const cairo_compositor_t  *compositor,
                                double                           tolerance,
                                cairo_antialias_t                antialias)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_composite_t setup;
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *) composite->surface;
     cairo_gl_context_t *ctx = NULL;
@@ -1077,8 +1126,10 @@ _cairo_gl_msaa_compositor_fill (const cairo_compositor_t *compositor,
     cairo_bool_t draw_path_with_traps;
     cairo_rectangle_int_t fill_extents;
 
-    if (! can_use_msaa_compositor (dst, antialias))
+    if (! can_use_msaa_compositor (dst, antialias)) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_INT_STATUS_UNSUPPORTED;
+    }
 
     if (! _cairo_path_fixed_fill_is_rectilinear (path)) {
        _cairo_path_fixed_approximate_fill_extents (path, &fill_extents);
@@ -1088,6 +1139,7 @@ _cairo_gl_msaa_compositor_fill (const cairo_compositor_t  *compositor,
                 fill_extents.height < 10) ||
                (fill_extents.height / fill_extents.width > 10 &&
                 fill_extents.width < 10)) {
+               CAIRO_TRACE_END (__func__);
                return CAIRO_INT_STATUS_UNSUPPORTED;
            }
        }
@@ -1096,8 +1148,10 @@ _cairo_gl_msaa_compositor_fill (const cairo_compositor_t *compositor,
     if (composite->is_bounded == FALSE) {
        cairo_surface_t* surface = _prepare_unbounded_surface (dst);
 
-       if (unlikely (surface == NULL))
+       if (unlikely (surface == NULL)) {
+           CAIRO_TRACE_END (__func__);
            return CAIRO_INT_STATUS_UNSUPPORTED;
+       }
 
 
        status = _cairo_compositor_fill (compositor, surface,
@@ -1108,16 +1162,20 @@ _cairo_gl_msaa_compositor_fill (const cairo_compositor_t        *compositor,
 
        if (unlikely (status)) {
            cairo_surface_destroy (surface);
+           CAIRO_TRACE_END (__func__);
            return status;
        }
 
+       CAIRO_TRACE_END (__func__);
        return _paint_back_unbounded_surface (compositor, composite, surface);
     }
 
     if (antialias != CAIRO_ANTIALIAS_NONE) {
        status = _blit_texture_to_renderbuffer (dst);
-       if (unlikely (status))
+       if (unlikely (status)) {
+           CAIRO_TRACE_END (__func__);
            return status;
+       }
     }
 
     draw_path_with_traps = ! _cairo_path_fixed_is_simple_quad (path);
@@ -1171,6 +1229,7 @@ cleanup_traps:
     if (draw_path_with_traps)
        _cairo_traps_fini (&traps);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1182,6 +1241,7 @@ _cairo_gl_msaa_compositor_glyphs (const cairo_compositor_t        *compositor,
                                  int                            num_glyphs,
                                  cairo_bool_t                   overlap)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
     cairo_surface_t *src = NULL;
     int src_x, src_y;
@@ -1190,17 +1250,23 @@ _cairo_gl_msaa_compositor_glyphs (const cairo_compositor_t      *compositor,
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *) composite->surface;
 
     query_surface_capabilities (dst);
-    if (! dst->supports_stencil)
+    if (! dst->supports_stencil) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_INT_STATUS_UNSUPPORTED;
+    }
 
-    if (composite->op == CAIRO_OPERATOR_CLEAR)
+    if (composite->op == CAIRO_OPERATOR_CLEAR) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_INT_STATUS_UNSUPPORTED;
+    }
 
     if (composite->is_bounded == FALSE) {
        cairo_surface_t* surface = _prepare_unbounded_surface (dst);
 
-       if (unlikely (surface == NULL))
+       if (unlikely (surface == NULL)) {
+           CAIRO_TRACE_END (__func__);
            return CAIRO_INT_STATUS_UNSUPPORTED;
+       }
 
        status = _cairo_compositor_glyphs (compositor, surface,
                                           CAIRO_OPERATOR_SOURCE,
@@ -1210,9 +1276,11 @@ _cairo_gl_msaa_compositor_glyphs (const cairo_compositor_t       *compositor,
 
        if (unlikely (status)) {
            cairo_surface_destroy (surface);
+           CAIRO_TRACE_END (__func__);
            return status;
        }
 
+       CAIRO_TRACE_END (__func__);
        return _paint_back_unbounded_surface (compositor, composite, surface);
     }
 
@@ -1254,7 +1322,7 @@ _cairo_gl_msaa_compositor_glyphs (const cairo_compositor_t        *compositor,
 
 finish:
        cairo_surface_destroy (src);
-
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1262,6 +1330,7 @@ static void
 _cairo_gl_msaa_compositor_init (cairo_compositor_t      *compositor,
                                const cairo_compositor_t *delegate)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     compositor->delegate = delegate;
     compositor->lazy_init = TRUE;
 
@@ -1270,6 +1339,7 @@ _cairo_gl_msaa_compositor_init (cairo_compositor_t         *compositor,
     compositor->fill = _cairo_gl_msaa_compositor_fill;
     compositor->stroke = _cairo_gl_msaa_compositor_stroke;
     compositor->glyphs = _cairo_gl_msaa_compositor_glyphs;
+    CAIRO_TRACE_END (__func__);
 }
 
 const cairo_compositor_t *
index 8c21e69..3aab855 100755 (executable)
@@ -562,11 +562,10 @@ _cairo_gl_subsurface_operand_init (cairo_gl_operand_t *operand,
            operand->texture.p2.x = (double) blur_extents.width / (double) blur_surface->width;
            operand->texture.p2.y = (double) blur_extents.height / (double) blur_surface->height;
 
-               operand->texture.p1.x += 0.5 / blur_surface->width;
-               operand->texture.p1.y += 0.5 / blur_surface->height;
-               operand->texture.p2.x -= 0.5 / blur_surface->width;
-               operand->texture.p2.y -= 0.5 / blur_surface->height;
-
+           operand->texture.p1.x += 0.5 / blur_surface->width;
+           operand->texture.p1.y += 0.5 / blur_surface->height;
+           operand->texture.p2.x -= 0.5 / blur_surface->width;
+           operand->texture.p2.y -= 0.5 / blur_surface->height;
 
            operand->texture.surface = blur_surface;
            operand->texture.owns_surface = NULL;
@@ -597,11 +596,10 @@ _cairo_gl_subsurface_operand_init (cairo_gl_operand_t *operand,
        operand->texture.p2.x = image_node->p2.x;
        operand->texture.p2.y = image_node->p2.y;
 
-           operand->texture.p1.x += 0.5 / ctx->image_cache->surface->width;
-           operand->texture.p1.y += 0.5 / ctx->image_cache->surface->height;
-           operand->texture.p2.x -= 0.5 / ctx->image_cache->surface->width;
-           operand->texture.p2.y -= 0.5 / ctx->image_cache->surface->height;
-
+       operand->texture.p1.x += 0.5 / ctx->image_cache->surface->width;
+       operand->texture.p1.y += 0.5 / ctx->image_cache->surface->height;
+       operand->texture.p2.x -= 0.5 / ctx->image_cache->surface->width;
+       operand->texture.p2.y -= 0.5 / ctx->image_cache->surface->height;
 
        cairo_matrix_multiply (&attributes->matrix,
                               &matrix,
@@ -703,11 +701,10 @@ _cairo_gl_surface_operand_init (cairo_gl_operand_t *operand,
            operand->texture.p2.x = (double) blur_extents.width / (double) blur_surface->width;
            operand->texture.p2.y = (double) blur_extents.height / (double) blur_surface->height;
 
-               operand->texture.p1.x += 0.5 / blur_surface->width;
-               operand->texture.p1.y += 0.5 / blur_surface->height;
-               operand->texture.p2.x -= 0.5 / blur_surface->width;
-               operand->texture.p2.y -= 0.5 / blur_surface->height;
-
+           operand->texture.p1.x += 0.5 / blur_surface->width;
+           operand->texture.p1.y += 0.5 / blur_surface->height;
+           operand->texture.p2.x -= 0.5 / blur_surface->width;
+           operand->texture.p2.y -= 0.5 / blur_surface->height;
 
            operand->texture.surface = blur_surface;
            operand->texture.owns_surface = NULL;
@@ -733,11 +730,10 @@ _cairo_gl_surface_operand_init (cairo_gl_operand_t *operand,
        operand->texture.p2.x = image_node->p2.x;
        operand->texture.p2.y = image_node->p2.y;
 
-           operand->texture.p1.x += 0.5 / ctx->image_cache->surface->width;
-           operand->texture.p1.y += 0.5 / ctx->image_cache->surface->height;
-           operand->texture.p2.x -= 0.5 / ctx->image_cache->surface->width;
-           operand->texture.p2.y -= 0.5 / ctx->image_cache->surface->height;
-
+       operand->texture.p1.x += 0.5 / ctx->image_cache->surface->width;
+       operand->texture.p1.y += 0.5 / ctx->image_cache->surface->height;
+       operand->texture.p2.x -= 0.5 / ctx->image_cache->surface->width;
+       operand->texture.p2.y -= 0.5 / ctx->image_cache->surface->height;
 
        operand->texture.surface = ctx->image_cache->surface;
        operand->texture.owns_surface = NULL;
index c46a3e8..04304e1 100755 (executable)
@@ -76,7 +76,6 @@
   #endif
 #endif
 
-
 #include "cairo-gl-ext-def-private.h"
 
 #define DEBUG_GL 0
@@ -406,7 +405,7 @@ typedef struct _cairo_gl_dispatch {
     void (*ClearStencil) (GLint s);
     void (*ColorMask) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
     void (*DeleteTextures) (GLsizei n, const GLuint *textures);
-       void (*DepthMask)(GLboolean flag);
+    void (*DepthMask) (GLboolean flag);
     void (*Disable) (GLenum cap);
     void (*DrawArrays) (GLenum mode, GLint first, GLsizei count);
     void (*DrawElements) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index ac19a13..52e08fb
@@ -50,6 +50,7 @@
 #include "cairo-surface-backend-private.h"
 #include "cairo-surface-shadow-private.h"
 #include "cairo-surface-scale-translate-private.h"
+#include "cairo-ttrace.h"
 
 static const cairo_surface_backend_t _cairo_gl_surface_backend;
 
@@ -67,13 +68,16 @@ _cairo_gl_surface_shadow_surface (void *surface,
                                  int width, int height,
                                  int *width_out, int *height_out)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     int shadow_width, shadow_height;
     cairo_gl_surface_t *shadow_surface = NULL;
 
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *)surface;
     cairo_gl_context_t *ctx = (cairo_gl_context_t *)dst->base.device;
-    if (ctx == NULL)
+    if (ctx == NULL) {
+       CAIRO_TRACE_END (__func__);
        return NULL;
+    }
 
     shadow_surface = ctx->shadow_scratch_surfaces[0];
 
@@ -86,6 +90,7 @@ _cairo_gl_surface_shadow_surface (void *surface,
               shadow_height >= height) {
                *width_out = width;
                *height_out = height;
+               CAIRO_TRACE_END (__func__);
                return cairo_surface_reference (&shadow_surface->base);
            }
            else {
@@ -161,6 +166,7 @@ _cairo_gl_surface_shadow_surface (void *surface,
                                                  shadow_height);
        if (unlikely (shadow_surface->base.status)) {
            cairo_surface_destroy (&shadow_surface->base);
+           CAIRO_TRACE_END (__func__);
            return NULL;
        }
 
@@ -191,6 +197,7 @@ _cairo_gl_surface_shadow_surface (void *surface,
            *height_out *= 0.5;
     }
 
+    CAIRO_TRACE_END (__func__);
     return cairo_surface_reference (&shadow_surface->base);
 }
 
@@ -199,15 +206,20 @@ _cairo_gl_surface_shadow_mask_surface (void *surface,
                                       int width, int height,
                                       unsigned int index)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_surface_t *mask_surface = NULL;
 
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *)surface;
     cairo_gl_context_t *ctx = (cairo_gl_context_t *)dst->base.device;
-    if (ctx == NULL)
+    if (ctx == NULL) {
+       CAIRO_TRACE_END (__func__);
        return NULL;
+    }
 
-    if (index > 1)
+    if (index > 1) {
+       CAIRO_TRACE_END (__func__);
        return NULL;
+    }
 
     mask_surface = ctx->shadow_masks[index];
 
@@ -228,6 +240,7 @@ _cairo_gl_surface_shadow_mask_surface (void *surface,
                                                  height);
        if (unlikely (mask_surface->base.status)) {
            cairo_surface_destroy (&mask_surface->base);
+           CAIRO_TRACE_END (__func__);
            return NULL;
        }
        _cairo_surface_release_device_reference (&mask_surface->base);
@@ -237,7 +250,7 @@ _cairo_gl_surface_shadow_mask_surface (void *surface,
 
     mask_surface->needs_to_cache = FALSE;
     mask_surface->force_no_cache = TRUE;
-
+    CAIRO_TRACE_END (__func__);
     return cairo_surface_reference (&mask_surface->base);
 }
 
@@ -246,13 +259,16 @@ _cairo_gl_surface_glyph_shadow_surface (void *surface,
                                        int width, int height,
                                        cairo_bool_t for_source)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     int shadow_width, shadow_height;
     cairo_gl_surface_t *shadow_surface = NULL;
 
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *)surface;
     cairo_gl_context_t *ctx = (cairo_gl_context_t *)dst->base.device;
-    if (ctx == NULL)
+    if (ctx == NULL) {
+       CAIRO_TRACE_END (__func__);
        return NULL;
+    }
 
     if (! for_source)
        shadow_surface = ctx->shadow_scratch_surfaces[1];
@@ -277,6 +293,7 @@ _cairo_gl_surface_glyph_shadow_surface (void *surface,
                                                  width, height);
        if (unlikely (shadow_surface->base.status)) {
            cairo_surface_destroy (&shadow_surface->base);
+           CAIRO_TRACE_END (__func__);
            return NULL;
        }
        _cairo_surface_release_device_reference (&shadow_surface->base);
@@ -290,6 +307,7 @@ _cairo_gl_surface_glyph_shadow_surface (void *surface,
     shadow_surface->needs_to_cache = FALSE;
     shadow_surface->force_no_cache = TRUE;
 
+    CAIRO_TRACE_END (__func__);
     return cairo_surface_reference (&shadow_surface->base);
 }
 
@@ -298,15 +316,20 @@ _cairo_gl_surface_glyph_shadow_mask_surface (void *surface,
                                             int width, int height,
                                             unsigned index)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_surface_t *mask_surface = NULL;
 
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *)surface;
     cairo_gl_context_t *ctx = (cairo_gl_context_t *)dst->base.device;
-    if (ctx == NULL)
+    if (ctx == NULL) {
+       CAIRO_TRACE_END (__func__);
        return NULL;
+    }
 
-    if (index > 1)
+    if (index > 1) {
+       CAIRO_TRACE_END (__func__);
        return NULL;
+    }
 
     mask_surface = ctx->shadow_masks[index + 2];
 
@@ -327,6 +350,7 @@ _cairo_gl_surface_glyph_shadow_mask_surface (void *surface,
                                                  height);
        if (unlikely (mask_surface->base.status)) {
            cairo_surface_destroy (&mask_surface->base);
+           CAIRO_TRACE_END (__func__);
            return NULL;
        }
        _cairo_surface_release_device_reference (&mask_surface->base);
@@ -337,6 +361,7 @@ _cairo_gl_surface_glyph_shadow_mask_surface (void *surface,
     mask_surface->needs_to_cache = FALSE;
     mask_surface->force_no_cache = TRUE;
 
+    CAIRO_TRACE_END (__func__);
     return cairo_surface_reference (&mask_surface->base);
 }
 
@@ -663,6 +688,7 @@ _cairo_gl_surface_init (cairo_device_t *device,
                        cairo_content_t content,
                        int width, int height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     assert (width > 0 && height > 0);
 
     _cairo_surface_init (&surface->base,
@@ -688,6 +714,7 @@ _cairo_gl_surface_init (cairo_device_t *device,
     surface->content_cleared = FALSE;
 
     _cairo_gl_surface_embedded_operand_init (surface);
+    CAIRO_TRACE_END (__func__);
 }
 
 static cairo_surface_t *
@@ -698,12 +725,15 @@ _cairo_gl_surface_create_scratch_for_texture (cairo_gl_context_t   *ctx,
                                              int                   height,
                                              cairo_bool_t set_tex_param)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_surface_t *surface;
 
     assert (width <= ctx->max_framebuffer_size && height <= ctx->max_framebuffer_size);
     surface = calloc (1, sizeof (cairo_gl_surface_t));
-    if (unlikely (surface == NULL))
+    if (unlikely (surface == NULL)) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
+    }
 
     surface->tex = tex;
     _cairo_gl_surface_init (&ctx->base, surface, content, width, height);
@@ -720,6 +750,7 @@ _cairo_gl_surface_create_scratch_for_texture (cairo_gl_context_t   *ctx,
     ctx->dispatch.TexParameteri (ctx->tex_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
     }
 
+    CAIRO_TRACE_END (__func__);
     return &surface->base;
 }
 
@@ -730,6 +761,7 @@ _create_scratch_internal (cairo_gl_context_t *ctx,
                          int height,
                          cairo_bool_t for_caching)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_surface_t *surface;
     GLenum format;
     GLuint tex;
@@ -738,8 +770,10 @@ _create_scratch_internal (cairo_gl_context_t *ctx,
     surface = (cairo_gl_surface_t *)
        _cairo_gl_surface_create_scratch_for_texture (ctx, content,
                                                      tex, width, height, FALSE);
-    if (unlikely (surface->base.status))
+    if (unlikely (surface->base.status)) {
+        CAIRO_TRACE_END (__func__);
        return &surface->base;
+    }
 
     surface->owns_tex = TRUE;
 
@@ -785,8 +819,9 @@ _create_scratch_internal (cairo_gl_context_t *ctx,
 
     ctx->dispatch.TexImage2D (ctx->tex_target, 0, format,
                              width, height, 0,
-                 format, GL_UNSIGNED_BYTE, NULL);
+                             format, GL_UNSIGNED_BYTE, NULL);
 
+    CAIRO_TRACE_END (__func__);
     return &surface->base;
 }
 
@@ -812,13 +847,16 @@ static cairo_status_t
 _cairo_gl_surface_clear (cairo_gl_surface_t  *surface,
                          const cairo_color_t *color)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_context_t *ctx;
     cairo_status_t status;
     double r, g, b, a;
 
     status = _cairo_gl_context_acquire (surface->base.device, &ctx);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (ctx->current_target == surface)
        _cairo_gl_composite_flush (ctx);
@@ -861,23 +899,25 @@ _cairo_gl_surface_clear (cairo_gl_surface_t  *surface,
     }
 
     /* optimize for mobile gl driver with deferred rendering */
-    if (surface->clip_on_stencil_buffer ||
-       ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP)
+    // if (surface->clip_on_stencil_buffer ||
+    if(        ctx->gl_flavor == CAIRO_GL_FLAVOR_DESKTOP){
        ctx->dispatch.Clear (GL_COLOR_BUFFER_BIT);
-    else {
-               if (surface->clip_on_stencil_buffer) {
-                       _cairo_clip_destroy(surface->clip_on_stencil_buffer);
-                       surface->clip_on_stencil_buffer = NULL;
-               }
-               ctx->dispatch.Clear (GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+       //fprintf(stderr,"\n##########glClear Color### \n");
+    }else{
+       if(surface->clip_on_stencil_buffer){
+               _cairo_clip_destroy(surface->clip_on_stencil_buffer);
+               surface->clip_on_stencil_buffer = NULL;
+       }
+       ctx->dispatch.Clear (GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+       //fprintf(stderr,"\n##########glClear Color, Stencil, Depth### \n");
     }
-
     if (a == 0)
        surface->base.is_clear = TRUE;
 
     surface->content_changed = TRUE;
     surface->content_synced = FALSE;
     surface->content_cleared = TRUE;
+    CAIRO_TRACE_END (__func__);
     return _cairo_gl_context_release (ctx, status);
 }
 
@@ -887,21 +927,26 @@ _cairo_gl_surface_create_and_clear_scratch (cairo_gl_context_t *ctx,
                                            int width,
                                            int height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_surface_t *surface;
     cairo_int_status_t status;
 
     surface = (cairo_gl_surface_t *)
        _cairo_gl_surface_create_scratch (ctx, content, width, height);
-    if (unlikely (surface->base.status))
+    if (unlikely (surface->base.status)) {
+        CAIRO_TRACE_END (__func__);
        return &surface->base;
+    }
 
     /* Cairo surfaces start out initialized to transparent (black) */
     status = _cairo_gl_surface_clear (surface, CAIRO_COLOR_TRANSPARENT);
     if (unlikely (status)) {
        cairo_surface_destroy (&surface->base);
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (status);
     }
 
+    CAIRO_TRACE_END (__func__);
     return &surface->base;
 }
 
@@ -911,40 +956,54 @@ cairo_gl_surface_create (cairo_device_t           *abstract_device,
                         int                     width,
                         int                     height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_context_t *ctx;
     cairo_gl_surface_t *surface;
     cairo_status_t status;
 
-    if (! CAIRO_CONTENT_VALID (content))
+    if (! CAIRO_CONTENT_VALID (content)) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_CONTENT));
+    }
 
-    if (abstract_device == NULL)
+    if (abstract_device == NULL) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_image_surface_create_with_content (content, width, height);
+    }
 
-    if (abstract_device->status)
+    if (abstract_device->status) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (abstract_device->status);
+    }
 
-    if (abstract_device->backend->type != CAIRO_DEVICE_TYPE_GL)
+    if (abstract_device->backend->type != CAIRO_DEVICE_TYPE_GL) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH));
+    }
 
     status = _cairo_gl_context_acquire (abstract_device, &ctx);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (status);
+    }
 
     surface = (cairo_gl_surface_t *)
        _cairo_gl_surface_create_and_clear_scratch (ctx, content, width, height);
     if (unlikely (surface->base.status)) {
        status = _cairo_gl_context_release (ctx, surface->base.status);
        cairo_surface_destroy (&surface->base);
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (status);
     }
 
     status = _cairo_gl_context_release (ctx, status);
     if (unlikely (status)) {
        cairo_surface_destroy (&surface->base);
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (status);
     }
 
+    CAIRO_TRACE_END (__func__);
     return &surface->base;
 }
 slim_hidden_def (cairo_gl_surface_create);
@@ -983,31 +1042,42 @@ cairo_gl_surface_create_for_texture (cairo_device_t      *abstract_device,
                                     int                 width,
                                     int                 height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_context_t *ctx;
     cairo_gl_surface_t *surface;
     cairo_status_t status;
 
-    if (! CAIRO_CONTENT_VALID (content))
+    if (! CAIRO_CONTENT_VALID (content)) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_CONTENT));
+    }
 
-    if (abstract_device == NULL)
+    if (abstract_device == NULL) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NULL_POINTER));
+    }
 
-    if (abstract_device->status)
+    if (abstract_device->status) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (abstract_device->status);
+    }
 
-    if (abstract_device->backend->type != CAIRO_DEVICE_TYPE_GL)
+    if (abstract_device->backend->type != CAIRO_DEVICE_TYPE_GL) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_DEVICE_TYPE_MISMATCH));
+    }
 
     status = _cairo_gl_context_acquire (abstract_device, &ctx);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (status);
+    }
 
     surface = (cairo_gl_surface_t *)
        _cairo_gl_surface_create_scratch_for_texture (ctx, content,
                                                      tex, width, height, TRUE);
     status = _cairo_gl_context_release (ctx, status);
-
+    CAIRO_TRACE_END (__func__);
     return &surface->base;
 }
 slim_hidden_def (cairo_gl_surface_create_for_texture);
@@ -1067,19 +1137,24 @@ cairo_gl_surface_get_height (cairo_surface_t *abstract_surface)
 void
 cairo_gl_surface_swapbuffers (cairo_surface_t *abstract_surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_surface_t *surface = (cairo_gl_surface_t *) abstract_surface;
 
-    if (unlikely (abstract_surface->status))
+    if (unlikely (abstract_surface->status)) {
+        CAIRO_TRACE_END (__func__);
        return;
+    }
     if (unlikely (abstract_surface->finished)) {
        _cairo_surface_set_error (abstract_surface,
                                  _cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
+        CAIRO_TRACE_END (__func__);
         return;
     }
 
     if (! _cairo_surface_is_gl (abstract_surface)) {
        _cairo_surface_set_error (abstract_surface,
                                  CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
+        CAIRO_TRACE_END (__func__);
        return;
     }
 
@@ -1088,12 +1163,15 @@ cairo_gl_surface_swapbuffers (cairo_surface_t *abstract_surface)
         cairo_status_t status;
 
         status = _cairo_gl_context_acquire (surface->base.device, &ctx);
-        if (unlikely (status))
+        if (unlikely (status)) {
+            CAIRO_TRACE_END (__func__);
             return;
+       }
 
        /* And in any case we should flush any pending operations. */
        _cairo_gl_composite_flush (ctx);
 
+
        /* For swapping on EGL, at least, we need a valid context/target. */
        _cairo_gl_context_set_destination (ctx, surface, FALSE);
 
@@ -1110,6 +1188,7 @@ cairo_gl_surface_swapbuffers (cairo_surface_t *abstract_surface)
         if (status)
             status = _cairo_surface_set_error (abstract_surface, status);
     }
+    CAIRO_TRACE_END (__func__);
 }
 
 static cairo_bool_t
@@ -1128,25 +1207,32 @@ _cairo_gl_surface_create_similar (void           *abstract_surface,
                                  int             width,
                                  int             height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_surface_t *surface = abstract_surface;
     cairo_gl_context_t *ctx;
     cairo_status_t status;
 
-    if (! _cairo_gl_surface_size_valid (abstract_surface, width, height))
+    if (! _cairo_gl_surface_size_valid (abstract_surface, width, height)) {
+        CAIRO_TRACE_END (__func__);
         return _cairo_image_surface_create_with_content (content, width, height);
+    }
 
     status = _cairo_gl_context_acquire (surface->device, &ctx);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (status);
+    }
 
     surface = _cairo_gl_surface_create_and_clear_scratch (ctx, content, width, height);
 
     status = _cairo_gl_context_release (ctx, status);
     if (unlikely (status)) {
         cairo_surface_destroy (surface);
+       CAIRO_TRACE_END (__func__);
         return _cairo_surface_create_in_error (status);
     }
 
+    CAIRO_TRACE_END (__func__);
     return surface;
 }
 
@@ -1156,6 +1242,7 @@ _cairo_gl_surface_fill_alpha_channel (cairo_gl_surface_t *dst,
                                      int x, int y,
                                      int width, int height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_composite_t setup;
     cairo_status_t status;
 
@@ -1183,6 +1270,7 @@ _cairo_gl_surface_fill_alpha_channel (cairo_gl_surface_t *dst,
     _cairo_gl_composite_flush (ctx);
     ctx->dispatch.ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1194,6 +1282,7 @@ _cairo_gl_surface_draw_image (cairo_gl_surface_t *dst,
                              int dst_x, int dst_y,
                              cairo_bool_t force_flush)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     GLenum internal_format, format, type;
     cairo_bool_t has_alpha, needs_swap;
     cairo_image_surface_t *clone = NULL;
@@ -1203,8 +1292,10 @@ _cairo_gl_surface_draw_image (cairo_gl_surface_t *dst,
     cairo_int_status_t status = CAIRO_INT_STATUS_SUCCESS;
 
     status = _cairo_gl_context_acquire (dst->base.device, &ctx);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (_cairo_gl_get_flavor (&ctx->dispatch) == CAIRO_GL_FLAVOR_ES2 ||
        _cairo_gl_get_flavor (&ctx->dispatch) == CAIRO_GL_FLAVOR_ES3) {
@@ -1330,8 +1421,8 @@ _cairo_gl_surface_draw_image (cairo_gl_surface_t *dst,
        ctx->dispatch.TexParameteri (ctx->tex_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
        ctx->dispatch.TexParameteri (ctx->tex_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
        ctx->dispatch.TexSubImage2D (ctx->tex_target, 0,
-                        dst_x, dst_y, width, height,
-                        format, type, data_start);
+                                    dst_x, dst_y, width, height,
+                                    format, type, data_start);
 
        free (data_start_gles2);
 
@@ -1401,6 +1492,7 @@ FAIL:
        dst->content_synced = FALSE;
     }
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1413,13 +1505,16 @@ static int _cairo_gl_surface_flavor (cairo_gl_surface_t *surface)
 static cairo_status_t
 _cairo_gl_surface_finish (void *abstract_surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_surface_t *surface = abstract_surface;
     cairo_status_t status;
     cairo_gl_context_t *ctx;
 
     status = _cairo_gl_context_acquire (surface->base.device, &ctx);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
         return status;
+    }
 
     if ((ctx->operands[CAIRO_GL_TEX_SOURCE].type == CAIRO_GL_OPERAND_TEXTURE ||
         ctx->operands[CAIRO_GL_TEX_SOURCE].type == CAIRO_GL_OPERAND_GAUSSIAN) &&
@@ -1455,6 +1550,7 @@ _cairo_gl_surface_finish (void *abstract_surface)
     if (surface->clip_on_stencil_buffer)
         _cairo_clip_destroy (surface->clip_on_stencil_buffer);
 
+    CAIRO_TRACE_END (__func__);
     return _cairo_gl_context_release (ctx, status);
 }
 
@@ -1462,6 +1558,7 @@ static cairo_image_surface_t *
 _cairo_gl_surface_map_to_image (void      *abstract_surface,
                                const cairo_rectangle_int_t   *extents)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_surface_t *surface = abstract_surface;
     cairo_image_surface_t *image;
     cairo_gl_context_t *ctx;
@@ -1474,6 +1571,7 @@ _cairo_gl_surface_map_to_image (void      *abstract_surface,
 
     status = _cairo_gl_context_acquire (surface->base.device, &ctx);
     if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_image_surface_create_in_error (status);
     }
 
@@ -1495,6 +1593,7 @@ _cairo_gl_surface_map_to_image (void      *abstract_surface,
        cpp = 1;
     } else {
        ASSERT_NOT_REACHED;
+       CAIRO_TRACE_END (__func__);
        return NULL;
     }
 
@@ -1531,6 +1630,7 @@ _cairo_gl_surface_map_to_image (void      *abstract_surface,
                                                        -1);
     if (unlikely (image->base.status)) {
        status = _cairo_gl_context_release (ctx, status);
+       CAIRO_TRACE_END (__func__);
        return image;
     }
 
@@ -1540,6 +1640,7 @@ _cairo_gl_surface_map_to_image (void      *abstract_surface,
      * is clear, we can avoid downloading data. */
     if (surface->base.is_clear || surface->base.serial == 0) {
        status = _cairo_gl_context_release (ctx, status);
+       CAIRO_TRACE_END (__func__);
        return image;
     }
 
@@ -1566,14 +1667,15 @@ _cairo_gl_surface_map_to_image (void      *abstract_surface,
        y = surface->height - extents->y - extents->height;
 
     ctx->dispatch.ReadPixels (extents->x, y,
-                 extents->width, extents->height,
-                 format, type, image->data);
+                             extents->width, extents->height,
+                             format, type, image->data);
     if (mesa_invert)
        ctx->dispatch.PixelStorei (GL_PACK_INVERT_MESA, 0);
 
     status = _cairo_gl_context_release (ctx, status);
     if (unlikely (status)) {
        cairo_surface_destroy (&image->base);
+       CAIRO_TRACE_END (__func__);
        return _cairo_image_surface_create_in_error (status);
     }
 
@@ -1587,6 +1689,7 @@ _cairo_gl_surface_map_to_image (void      *abstract_surface,
            row = malloc (image->stride);
            if (unlikely (row == NULL)) {
                cairo_surface_destroy (&image->base);
+               CAIRO_TRACE_END (__func__);
                return _cairo_image_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
            }
        }
@@ -1605,6 +1708,7 @@ _cairo_gl_surface_map_to_image (void      *abstract_surface,
 
     image->base.is_clear = FALSE;
 
+    CAIRO_TRACE_END (__func__);
     return image;
 }
 
@@ -1654,6 +1758,7 @@ static cairo_int_status_t
 _cairo_gl_surface_unmap_image (void                  *abstract_surface,
                               cairo_image_surface_t *image)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
 
     status = _cairo_gl_surface_draw_image (abstract_surface, image,
@@ -1666,6 +1771,7 @@ _cairo_gl_surface_unmap_image (void                     *abstract_surface,
     cairo_surface_finish (&image->base);
     cairo_surface_destroy (&image->base);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1686,16 +1792,21 @@ _cairo_gl_surface_get_extents (void                  *abstract_surface,
 static cairo_status_t
 _cairo_gl_surface_flush (void *abstract_surface, unsigned flags)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_gl_surface_t *surface = abstract_surface;
     cairo_status_t status;
     cairo_gl_context_t *ctx;
 
-    if (flags)
+    if (flags) {
+        CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     status = _cairo_gl_context_acquire (surface->base.device, &ctx);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
         return status;
+    }
 
     if (((ctx->operands[CAIRO_GL_TEX_SOURCE].type == CAIRO_GL_OPERAND_TEXTURE ||
          ctx->operands[CAIRO_GL_TEX_SOURCE].type == CAIRO_GL_OPERAND_GAUSSIAN) &&
@@ -1708,9 +1819,10 @@ _cairo_gl_surface_flush (void *abstract_surface, unsigned flags)
 
     status = _cairo_gl_surface_resolve_multisampling (surface);
 
-    if (ctx->msaa_type != CAIRO_GL_NONE_MULTISAMPLE_TO_TEXTURE)
-        ctx->dispatch.Flush ();
+//    if (ctx->msaa_type != CAIRO_GL_NONE_MULTISAMPLE_TO_TEXTURE)
+//        ctx->dispatch.Flush ();
 
+    CAIRO_TRACE_END (__func__);
     return _cairo_gl_context_release (ctx, status);
 }
 
@@ -1760,19 +1872,23 @@ _cairo_gl_surface_paint (void                   *surface,
                         const cairo_pattern_t  *source,
                         const cairo_clip_t     *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *)surface;
     cairo_gl_context_t *ctx = (cairo_gl_context_t *)dst->base.device;
 
     status = cairo_device_acquire (dst->base.device);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = _cairo_surface_shadow_paint (surface, op, source, clip,
                                          &source->shadow);
     ctx->source_scratch_in_use = FALSE;
     if (unlikely (status)) {
        cairo_device_release (dst->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1784,23 +1900,29 @@ _cairo_gl_surface_paint (void                   *surface,
 
        ctx->source_scratch_in_use = FALSE;
        cairo_device_release (dst->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
-#if 0 // Currently glClear does not get flushed to GPU so do not use this fast path for the time being
+#if 1 // Currently glClear does not get flushed to GPU so do not use this fast path for the time being
     /* simplify the common case of clearing the surface */
     if (clip == NULL) {
+    /* workaround to solve background color issue at the initial page of CanvasPerf */
+    /*
         if (op == CAIRO_OPERATOR_CLEAR) {
             status = _cairo_gl_surface_clear (surface, CAIRO_COLOR_TRANSPARENT);
            cairo_device_release (dst->base.device);
+           CAIRO_TRACE_END (__func__);
            return status;
        }
-       else if (source->type == CAIRO_PATTERN_TYPE_SOLID &&
+       else */
+        if (source->type == CAIRO_PATTERN_TYPE_SOLID &&
                 (op == CAIRO_OPERATOR_SOURCE ||
                  (op == CAIRO_OPERATOR_OVER && _cairo_pattern_is_opaque_solid (source)))) {
             status = _cairo_gl_surface_clear (surface,
                                             &((cairo_solid_pattern_t *) source)->color);
            cairo_device_release (dst->base.device);
+           CAIRO_TRACE_END (__func__);
            return status;
         }
     }
@@ -1815,6 +1937,7 @@ _cairo_gl_surface_paint (void                     *surface,
 
     ctx->source_scratch_in_use = FALSE;
     cairo_device_release (dst->base.device);
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1825,19 +1948,23 @@ _cairo_gl_surface_mask (void                     *surface,
                        const cairo_pattern_t   *mask,
                        const cairo_clip_t      *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *) surface;
     cairo_gl_context_t *ctx = (cairo_gl_context_t *)dst->base.device;
 
     status = cairo_device_acquire (dst->base.device);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = _cairo_surface_shadow_mask (surface, op, source, mask, clip,
                                          &source->shadow);
     ctx->source_scratch_in_use = FALSE;
     if (unlikely (status)) {
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1849,6 +1976,7 @@ _cairo_gl_surface_mask (void                       *surface,
 
        ctx->source_scratch_in_use = FALSE;
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1860,6 +1988,7 @@ _cairo_gl_surface_mask (void                       *surface,
 
        ctx->source_scratch_in_use = FALSE;
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1872,6 +2001,7 @@ _cairo_gl_surface_mask (void                       *surface,
 
     ctx->source_scratch_in_use = FALSE;
     cairo_device_release (dst->base.device);
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1887,14 +2017,17 @@ _cairo_gl_surface_stroke (void                          *surface,
                           cairo_antialias_t             antialias,
                           const cairo_clip_t           *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *)surface;
     cairo_gl_context_t *ctx = (cairo_gl_context_t *)dst->base.device;
     cairo_shadow_type_t shadow_type = source->shadow.type;
 
     status = cairo_device_acquire (dst->base.device);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (shadow_type != CAIRO_SHADOW_INSET)
        status = _cairo_surface_shadow_stroke (surface, op, source, path,
@@ -1905,6 +2038,7 @@ _cairo_gl_surface_stroke (void                            *surface,
     ctx->source_scratch_in_use = FALSE;
     if (unlikely (status)) {
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1915,6 +2049,7 @@ _cairo_gl_surface_stroke (void                            *surface,
        source->shadow.draw_shadow_only) {
        ctx->source_scratch_in_use = FALSE;
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1928,6 +2063,7 @@ _cairo_gl_surface_stroke (void                            *surface,
     if (unlikely (status)) {
        ctx->source_scratch_in_use = FALSE;
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1941,6 +2077,7 @@ _cairo_gl_surface_stroke (void                            *surface,
 
     ctx->source_scratch_in_use = FALSE;
     cairo_device_release (dst->base.device);
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1954,14 +2091,17 @@ _cairo_gl_surface_fill (void                    *surface,
                         cairo_antialias_t       antialias,
                         const cairo_clip_t     *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *)surface;
     cairo_gl_context_t *ctx = (cairo_gl_context_t *)dst->base.device;
     cairo_shadow_type_t shadow_type = source->shadow.type;
 
     status = cairo_device_acquire (dst->base.device);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (shadow_type != CAIRO_SHADOW_INSET)
        status = _cairo_surface_shadow_fill (surface, op, source, path,
@@ -1971,6 +2111,7 @@ _cairo_gl_surface_fill (void                      *surface,
     ctx->source_scratch_in_use = FALSE;
     if (unlikely (status)) {
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1981,6 +2122,7 @@ _cairo_gl_surface_fill (void                      *surface,
        source->shadow.draw_shadow_only) {
        ctx->source_scratch_in_use = FALSE;
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -2004,6 +2146,7 @@ _cairo_gl_surface_fill (void                      *surface,
     if (unlikely (status)) {
        ctx->source_scratch_in_use = FALSE;
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -2017,6 +2160,7 @@ _cairo_gl_surface_fill (void                      *surface,
     ctx->source_scratch_in_use = FALSE;
     cairo_device_release (dst->base.device);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -2029,14 +2173,17 @@ _cairo_gl_surface_glyphs (void                  *surface,
                          cairo_scaled_font_t   *font,
                          const cairo_clip_t    *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
     cairo_gl_surface_t *dst = (cairo_gl_surface_t *)surface;
     cairo_gl_context_t *ctx = (cairo_gl_context_t *)dst->base.device;
     cairo_shadow_type_t shadow_type = source->shadow.type;
 
     status = cairo_device_acquire (dst->base.device);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (shadow_type != CAIRO_SHADOW_INSET)
        status = _cairo_surface_shadow_glyphs (surface, op, source,
@@ -2047,6 +2194,7 @@ _cairo_gl_surface_glyphs (void                    *surface,
     ctx->source_scratch_in_use = FALSE;
     if (unlikely (status)) {
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -2057,6 +2205,7 @@ _cairo_gl_surface_glyphs (void                    *surface,
        source->shadow.draw_shadow_only) {
        ctx->source_scratch_in_use = FALSE;
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -2070,6 +2219,7 @@ _cairo_gl_surface_glyphs (void                    *surface,
     if (unlikely (status)) {
        ctx->source_scratch_in_use = FALSE;
        cairo_device_release (dst->base.device);
+        CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -2083,6 +2233,7 @@ _cairo_gl_surface_glyphs (void                    *surface,
 
     ctx->source_scratch_in_use = FALSE;
     cairo_device_release (dst->base.device);
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index b4d7060..df17c06
@@ -98,8 +98,14 @@ _glx_acquire (void *abstract_ctx)
     if (!_context_acquisition_changed_glx_state (ctx))
        return;
 
-    _cairo_gl_context_reset (&ctx->base);
+    /* If current context is not cairo-gl context, some problem can be occurred at gl API
+       in _cairo_gl_context_reset() when it is called before eglMakeCurrent().
+       So, _cairo_gl_context_reset() should be moved after eglMakeCurrent(). (2015-9-15)*/
+
+    //_cairo_gl_context_reset (&ctx->base);
     glXMakeCurrent (ctx->display, current_drawable, ctx->context);
+    _cairo_gl_context_reset (&ctx->base);
+
     ctx->current_drawable = current_drawable;
 }
 
@@ -252,7 +258,7 @@ _cairo_glx_get_proc_address (void *data, const char *name)
            return func_map[i].func;
     }
 
-  return glXGetProcAddress (name);
+    return glXGetProcAddress (name);
 }
 
 cairo_device_t *
old mode 100644 (file)
new mode 100755 (executable)
index 84b47fe..d778b3b 100755 (executable)
@@ -44,6 +44,7 @@
 #include "cairo-gstate-private.h"
 #include "cairo-pattern-private.h"
 #include "cairo-traps-private.h"
+#include "cairo-ttrace.h"
 
 #if _XOPEN_SOURCE >= 600 || defined (_ISOC99_SOURCE)
 #define ISFINITE(x) isfinite (x)
@@ -105,6 +106,7 @@ cairo_status_t
 _cairo_gstate_init (cairo_gstate_t  *gstate,
                    cairo_surface_t *target)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     VG (VALGRIND_MAKE_MEM_UNDEFINED (gstate, sizeof (cairo_gstate_t)));
 
     gstate->next = NULL;
@@ -151,6 +153,7 @@ _cairo_gstate_init (cairo_gstate_t  *gstate,
     /* Now that the gstate is fully initialized and ready for the eventual
      * _cairo_gstate_fini(), we can check for errors (and not worry about
      * the resource deallocation). */
+    CAIRO_TRACE_END (__func__);
     return target->status;
 }
 
@@ -217,6 +220,7 @@ _cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other)
 void
 _cairo_gstate_fini (cairo_gstate_t *gstate)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     _cairo_stroke_style_fini (&gstate->stroke_style);
 
     cairo_font_face_destroy (gstate->font_face);
@@ -246,6 +250,7 @@ _cairo_gstate_fini (cairo_gstate_t *gstate)
 
     memset (&gstate->shadow, 0, sizeof (cairo_shadow_t));
 
+    CAIRO_TRACE_END (__func__);
     VG (VALGRIND_MAKE_MEM_NOACCESS (gstate, sizeof (cairo_gstate_t)));
 }
 
@@ -416,14 +421,18 @@ cairo_status_t
 _cairo_gstate_set_source (cairo_gstate_t  *gstate,
                          cairo_pattern_t *source)
 {
-    if (source->status)
+    CAIRO_TRACE_BEGIN (__func__);
+    if (source->status) {
+        CAIRO_TRACE_END (__func__);
        return source->status;
+    }
 
     source = cairo_pattern_reference (source);
     cairo_pattern_destroy (gstate->source);
     gstate->source = source;
     gstate->source_ctm_inverse = gstate->ctm_inverse;
 
+    CAIRO_TRACE_END (__func__);
     return CAIRO_STATUS_SUCCESS;
 }
 
@@ -1065,6 +1074,7 @@ _cairo_gstate_get_pattern_status (const cairo_pattern_t *pattern)
 cairo_status_t
 _cairo_gstate_paint (cairo_gstate_t *gstate)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_pattern_union_t source_pattern;
     const cairo_pattern_t *pattern;
     cairo_status_t status;
@@ -1072,14 +1082,20 @@ _cairo_gstate_paint (cairo_gstate_t *gstate)
     cairo_bool_t destroy_pattern = FALSE;
 
     status = _cairo_gstate_get_pattern_status (gstate->source);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
-    if (gstate->op == CAIRO_OPERATOR_DEST)
+    if (gstate->op == CAIRO_OPERATOR_DEST) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
-    if (_cairo_clip_is_all_clipped (gstate->clip))
+    if (_cairo_clip_is_all_clipped (gstate->clip)) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     if (gstate->source->filter == CAIRO_FILTER_GAUSSIAN)
        status = _cairo_pattern_create_gaussian_matrix (gstate->source, 1024);
@@ -1107,7 +1123,7 @@ _cairo_gstate_paint (cairo_gstate_t *gstate)
                                   gstate->clip);
     if (destroy_pattern)
        cairo_pattern_destroy ((cairo_pattern_t *)pattern);
-
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1115,6 +1131,7 @@ cairo_status_t
 _cairo_gstate_mask (cairo_gstate_t  *gstate,
                    cairo_pattern_t *mask)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_pattern_union_t source_pattern, mask_pattern;
     const cairo_pattern_t *source;
     cairo_operator_t op;
@@ -1122,12 +1139,16 @@ _cairo_gstate_mask (cairo_gstate_t  *gstate,
     cairo_bool_t destroy_pattern = FALSE;
 
     status = _cairo_gstate_get_pattern_status (mask);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = _cairo_gstate_get_pattern_status (gstate->source);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+     }
 
     if (gstate->source->filter == CAIRO_FILTER_GAUSSIAN)
        status = _cairo_pattern_create_gaussian_matrix (gstate->source, 1024);
@@ -1135,20 +1156,27 @@ _cairo_gstate_mask (cairo_gstate_t  *gstate,
     if (mask->filter == CAIRO_FILTER_GAUSSIAN)
        status = _cairo_pattern_create_gaussian_matrix (mask, 1024);
 
-    if (gstate->op == CAIRO_OPERATOR_DEST)
+    if (gstate->op == CAIRO_OPERATOR_DEST) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
-    if (_cairo_clip_is_all_clipped (gstate->clip))
+    if (_cairo_clip_is_all_clipped (gstate->clip)) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     assert (gstate->opacity == 1.0);
 
-    if (_cairo_pattern_is_opaque (mask, NULL))
+    if (_cairo_pattern_is_opaque (mask, NULL)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_gstate_paint (gstate);
+    }
 
     if (_cairo_pattern_is_clear (mask) &&
        _cairo_operator_bounded_by_mask (gstate->op))
     {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
     }
 
@@ -1209,33 +1237,43 @@ _cairo_gstate_mask (cairo_gstate_t  *gstate,
     if (destroy_pattern)
        cairo_pattern_destroy ((cairo_pattern_t *)source);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
 cairo_status_t
 _cairo_gstate_stroke (cairo_gstate_t *gstate, cairo_path_fixed_t *path)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_pattern_union_t source_pattern;
     cairo_stroke_style_t style;
     double dash[2];
     cairo_status_t status;
 
     status = _cairo_gstate_get_pattern_status (gstate->source);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (gstate->source->filter == CAIRO_FILTER_GAUSSIAN)
        status = _cairo_pattern_create_gaussian_matrix (gstate->source,
                                                        gstate->stroke_style.line_width);
 
-    if (gstate->op == CAIRO_OPERATOR_DEST)
+    if (gstate->op == CAIRO_OPERATOR_DEST) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
-    if (gstate->stroke_style.line_width <= 0.0)
+    if (gstate->stroke_style.line_width <= 0.0) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
-    if (_cairo_clip_is_all_clipped (gstate->clip))
+    if (_cairo_clip_is_all_clipped (gstate->clip)) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     assert (gstate->opacity == 1.0);
 
@@ -1254,7 +1292,7 @@ _cairo_gstate_stroke (cairo_gstate_t *gstate, cairo_path_fixed_t *path)
     if (_cairo_gstate_has_shadow (gstate))
        source_pattern.base.shadow = gstate->shadow;
 
-    return _cairo_surface_stroke (gstate->target,
+    status = _cairo_surface_stroke (gstate->target,
                                  gstate->op,
                                  &source_pattern.base,
                                  path,
@@ -1264,6 +1302,8 @@ _cairo_gstate_stroke (cairo_gstate_t *gstate, cairo_path_fixed_t *path)
                                  gstate->tolerance,
                                  gstate->antialias,
                                  gstate->clip);
+    CAIRO_TRACE_END (__func__);
+    return status;
 }
 
 cairo_status_t
@@ -1273,6 +1313,7 @@ _cairo_gstate_in_stroke (cairo_gstate_t       *gstate,
                         double              y,
                         cairo_bool_t       *inside_ret)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
     cairo_rectangle_int_t extents;
     cairo_box_t limit;
@@ -1280,6 +1321,7 @@ _cairo_gstate_in_stroke (cairo_gstate_t       *gstate,
 
     if (gstate->stroke_style.line_width <= 0.0) {
        *inside_ret = FALSE;
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
     }
 
@@ -1296,6 +1338,7 @@ _cairo_gstate_in_stroke (cairo_gstate_t       *gstate,
        y < extents.y || y > extents.y + extents.height)
     {
        *inside_ret = FALSE;
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
     }
 
@@ -1321,34 +1364,44 @@ _cairo_gstate_in_stroke (cairo_gstate_t     *gstate,
 BAIL:
     _cairo_traps_fini (&traps);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
 cairo_status_t
 _cairo_gstate_fill (cairo_gstate_t *gstate, cairo_path_fixed_t *path)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
     const cairo_pattern_t *pattern;
     cairo_bool_t destroy_pattern = FALSE;
 
     status = _cairo_gstate_get_pattern_status (gstate->source);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (gstate->source->filter == CAIRO_FILTER_GAUSSIAN)
        status = _cairo_pattern_create_gaussian_matrix (gstate->source, 1024);
 
-    if (gstate->op == CAIRO_OPERATOR_DEST)
+    if (gstate->op == CAIRO_OPERATOR_DEST) {
+        CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
-    if (_cairo_clip_is_all_clipped (gstate->clip))
+    if (_cairo_clip_is_all_clipped (gstate->clip)) {
+        CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     assert (gstate->opacity == 1.0);
 
     if (_cairo_path_fixed_fill_is_empty (path)) {
-       if (_cairo_operator_bounded_by_mask (gstate->op))
+       if (_cairo_operator_bounded_by_mask (gstate->op)) {
+            CAIRO_TRACE_END (__func__);
            return CAIRO_STATUS_SUCCESS;
+       }
 
        pattern = &_cairo_pattern_clear.base;
        status = _cairo_surface_paint (gstate->target,
@@ -1405,6 +1458,7 @@ _cairo_gstate_fill (cairo_gstate_t *gstate, cairo_path_fixed_t *path)
     if (destroy_pattern)
        cairo_pattern_destroy ((cairo_pattern_t *)pattern);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index a732f2a..af8526f 100755 (executable)
@@ -1051,15 +1051,15 @@ composite_one_glyph (void                               *_dst,
 
        if (glyph_surface->format != CAIRO_FORMAT_ARGB32 ||
                pixman_image_get_component_alpha (glyph_surface->pixman_image))
-               pixman_image_composite32 (_pixman_operator (op),
-                                                               ((cairo_image_source_t *)_src)->pixman_image,
-                                                               glyph_surface->pixman_image,
-                                                               to_pixman_image (_dst),
-                                                               x + src_x,  y + src_y,
-                                                               0, 0,
-                                                               x - dst_x, y - dst_y,
-                                                               glyph_surface->width,
-                                                               glyph_surface->height);
+    pixman_image_composite32 (_pixman_operator (op),
+                             ((cairo_image_source_t *)_src)->pixman_image,
+                             glyph_surface->pixman_image,
+                             to_pixman_image (_dst),
+                             x + src_x,  y + src_y,
+                             0, 0,
+                             x - dst_x, y - dst_y,
+                             glyph_surface->width,
+                             glyph_surface->height);
        else /* color glyph */
                pixman_image_composite32 (_pixman_operator (op),
                                                                glyph_surface->pixman_image,
@@ -1324,21 +1324,21 @@ composite_glyphs (void                          *_dst,
                               glyph_surface->base.device_transform.y0);
 
        if (glyph_surface->format != CAIRO_FORMAT_ARGB32 ||
-               pixman_image_get_component_alpha (glyph_surface->pixman_image))
-                   pixman_image_composite32 (op, src, glyph_surface->pixman_image, dst,
+pixman_image_get_component_alpha (glyph_surface->pixman_image))
+           pixman_image_composite32 (op, src, glyph_surface->pixman_image, dst,
                                       x + src_x,  y + src_y,
                                       0, 0,
-                                                                       x - dst_x, y - dst_y,
-                                                                       glyph_surface->width,
-                                                                       glyph_surface->height);
+                                      x - dst_x, y - dst_y,
+                                     glyph_surface->width,
+                                     glyph_surface->height);
        else /* Color glyph. */
-                       pixman_image_composite32 (op, glyph_surface->pixman_image, NULL, dst,
-                                                                       0, 0,
-                                                                       x + src_x,  y + src_y,
-                                                                       x - dst_x, y - dst_y,
-                                                                       glyph_surface->width,
-                                                                       glyph_surface->height);
-               }
+         pixman_image_composite32 (op, glyph_surface->pixman_image, NULL, dst,
+                                      0, 0,
+                                      x + src_x,  y + src_y,
+                                      x - dst_x, y - dst_y,
+                                     glyph_surface->width,
+                                     glyph_surface->height);
+       }
     }
 
 out_thaw:
index 1f0531e..9ec46b0 100755 (executable)
@@ -262,6 +262,12 @@ _cairo_image_gaussian_filter (cairo_surface_t *src,  const cairo_pattern_t *patt
                                  0, 0,
                                  width, height);
 
+       if (src_width == 0 || src_height == 0) {
+           cairo_surface_destroy (&clone_image->base);
+           clone_image = (cairo_image_surface_t *)cairo_surface_reference (src);
+           goto DONE;
+       }
+
        /* paint scratch_surfaces[0] to clone */
        /* set up transform matrix */
         cairo_matrix_init_scale (&matrix,
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index b68f4a9..ce8568d
@@ -55,6 +55,7 @@
 #include "cairo-surface-subsurface-private.h"
 #include "cairo-surface-shadow-private.h"
 #include "cairo-list-inline.h"
+#include "cairo-ttrace.h"
 
 /* Limit on the width / height of an image surface in pixels.  This is
  * mainly determined by coordinates of things sent to pixman at the
@@ -266,6 +267,7 @@ _cairo_image_surface_init (cairo_image_surface_t *surface,
                           pixman_image_t       *pixman_image,
                           pixman_format_code_t  pixman_format)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     surface->parent = NULL;
     surface->pixman_image = pixman_image;
 
@@ -286,17 +288,21 @@ _cairo_image_surface_init (cairo_image_surface_t *surface,
     surface->compositor = _cairo_image_spans_compositor_get ();
 
     _cairo_image_shadow_caches_init ();
+    CAIRO_TRACE_END (__func__);
 }
 
 cairo_surface_t *
 _cairo_image_surface_create_for_pixman_image (pixman_image_t           *pixman_image,
                                              pixman_format_code_t       pixman_format)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_image_surface_t *surface;
 
     surface = malloc (sizeof (cairo_image_surface_t));
-    if (unlikely (surface == NULL))
+    if (unlikely (surface == NULL)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
+    }
 
     _cairo_surface_init (&surface->base,
                         &_cairo_image_surface_backend,
@@ -305,6 +311,7 @@ _cairo_image_surface_create_for_pixman_image (pixman_image_t                *pixman_image,
 
     _cairo_image_surface_init (surface, pixman_image, pixman_format);
 
+    CAIRO_TRACE_END (__func__);
     return &surface->base;
 }
 
@@ -449,29 +456,35 @@ _cairo_image_surface_create_with_pixman_format (unsigned char             *data,
                                                int                      height,
                                                int                      stride)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_surface_t *surface;
     pixman_image_t *pixman_image;
 
     if (! _cairo_image_surface_is_size_valid (width, height))
     {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
     }
 
     pixman_image = pixman_image_create_bits (pixman_format, width, height,
                                             (uint32_t *) data, stride);
 
-    if (unlikely (pixman_image == NULL))
+    if (unlikely (pixman_image == NULL)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
+    }
 
     surface = _cairo_image_surface_create_for_pixman_image (pixman_image,
                                                            pixman_format);
     if (unlikely (surface->status)) {
        pixman_image_unref (pixman_image);
+       CAIRO_TRACE_END (__func__);
        return surface;
     }
 
     /* we can not make any assumptions about the initial state of user data */
     surface->is_clear = data == NULL;
+    CAIRO_TRACE_END (__func__);
     return surface;
 }
 
@@ -502,15 +515,21 @@ cairo_image_surface_create (cairo_format_t        format,
                            int                 width,
                            int                 height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     pixman_format_code_t pixman_format;
+    cairo_surface_t *image_surface = NULL;
 
-    if (! CAIRO_FORMAT_VALID (format))
+    if (! CAIRO_FORMAT_VALID (format)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
+    }
 
     pixman_format = _cairo_format_to_pixman_format_code (format);
 
-    return _cairo_image_surface_create_with_pixman_format (NULL, pixman_format,
+    image_surface = _cairo_image_surface_create_with_pixman_format (NULL, pixman_format,
                                                           width, height, -1);
+    CAIRO_TRACE_END (__func__);
+    return image_surface;
 }
 slim_hidden_def (cairo_image_surface_create);
 
@@ -624,14 +643,17 @@ cairo_image_surface_create_for_data (unsigned char     *data,
     pixman_format_code_t pixman_format;
     int minstride;
 
-    if (! CAIRO_FORMAT_VALID (format))
+    if (! CAIRO_FORMAT_VALID (format)) {
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
+    }
 
-    if ((stride & (CAIRO_STRIDE_ALIGNMENT-1)) != 0)
+    if ((stride & (CAIRO_STRIDE_ALIGNMENT-1)) != 0) {
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_STRIDE));
+    }
 
-    if (! _cairo_image_surface_is_size_valid (width, height))
+    if (! _cairo_image_surface_is_size_valid (width, height)) {
        return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
+    }
 
     minstride = cairo_format_stride_for_width (format, width);
     if (stride < 0) {
@@ -871,6 +893,7 @@ _cairo_image_surface_create_similar (void          *abstract_other,
 cairo_surface_t *
 _cairo_image_surface_snapshot (void *abstract_surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_image_surface_t *image = abstract_surface;
     cairo_image_surface_t *clone;
 
@@ -879,8 +902,10 @@ _cairo_image_surface_snapshot (void *abstract_surface)
        clone = (cairo_image_surface_t *)
            _cairo_image_surface_create_for_pixman_image (image->pixman_image,
                                                          image->pixman_format);
-       if (unlikely (clone->base.status))
+       if (unlikely (clone->base.status)) {
+           CAIRO_TRACE_END (__func__);
            return &clone->base;
+       }
 
        image->pixman_image = NULL;
 
@@ -889,6 +914,7 @@ _cairo_image_surface_snapshot (void *abstract_surface)
 
        clone->owns_data = image->owns_data;
        image->owns_data = FALSE;
+       CAIRO_TRACE_END (__func__);
        return &clone->base;
     }
 
@@ -898,8 +924,10 @@ _cairo_image_surface_snapshot (void *abstract_surface)
                                                        image->width,
                                                        image->height,
                                                        0);
-    if (unlikely (clone->base.status))
+    if (unlikely (clone->base.status)) {
+       CAIRO_TRACE_END (__func__);
        return &clone->base;
+    }
 
     if (clone->stride == image->stride) {
        memcpy (clone->data, image->data, clone->stride * clone->height);
@@ -912,6 +940,7 @@ _cairo_image_surface_snapshot (void *abstract_surface)
                                  image->width, image->height);
     }
     clone->base.is_clear = FALSE;
+    CAIRO_TRACE_END (__func__);
     return &clone->base;
 }
 
@@ -919,6 +948,7 @@ cairo_image_surface_t *
 _cairo_image_surface_map_to_image (void *abstract_other,
                                   const cairo_rectangle_int_t *extents)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_image_surface_t *other = abstract_other;
     cairo_surface_t *surface;
     uint8_t *data;
@@ -935,6 +965,7 @@ _cairo_image_surface_map_to_image (void *abstract_other,
                                                        other->stride);
 
     cairo_surface_set_device_offset (surface, -extents->x, -extents->y);
+    CAIRO_TRACE_END (__func__);
     return (cairo_image_surface_t *) surface;
 }
 
@@ -951,6 +982,7 @@ _cairo_image_surface_unmap_image (void *abstract_surface,
 cairo_status_t
 _cairo_image_surface_finish (void *abstract_surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_image_surface_t *surface = abstract_surface;
 
     if (surface->pixman_image) {
@@ -970,6 +1002,7 @@ _cairo_image_surface_finish (void *abstract_surface)
 
     _cairo_image_shadow_caches_destroy ();
 
+    CAIRO_TRACE_END (__func__);
     return CAIRO_STATUS_SUCCESS;
 }
 
@@ -1033,6 +1066,7 @@ _cairo_image_surface_paint (void                  *abstract_surface,
                            const cairo_pattern_t       *source,
                            const cairo_clip_t          *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_image_surface_t *surface = abstract_surface;
     cairo_int_status_t status;
 
@@ -1040,25 +1074,30 @@ _cairo_image_surface_paint (void                        *abstract_surface,
            __FUNCTION__, surface->base.unique_id));
 
     status = cairo_device_acquire (surface->base.device);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = _cairo_surface_shadow_paint (abstract_surface, op, source,
                                          clip, &source->shadow);
 
     if (unlikely (status)) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
     if (source->shadow.draw_shadow_only) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
     status = _cairo_compositor_paint (surface->compositor,
                                      &surface->base, op, source, clip);
     cairo_device_release (surface->base.device);
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1069,6 +1108,7 @@ _cairo_image_surface_mask (void                           *abstract_surface,
                           const cairo_pattern_t        *mask,
                           const cairo_clip_t           *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_image_surface_t *surface = abstract_surface;
     cairo_int_status_t status;
 
@@ -1076,25 +1116,30 @@ _cairo_image_surface_mask (void                         *abstract_surface,
            __FUNCTION__, surface->base.unique_id));
 
     status = cairo_device_acquire (surface->base.device);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = _cairo_surface_shadow_mask (abstract_surface, op, source,
                                         mask, clip, &source->shadow);
 
     if (unlikely (status)) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
     if (source->shadow.draw_shadow_only) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
     status = _cairo_compositor_mask (surface->compositor,
                                     &surface->base, op, source, mask, clip);
     cairo_device_release (surface->base.device);
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1110,6 +1155,7 @@ _cairo_image_surface_stroke (void                 *abstract_surface,
                             cairo_antialias_t           antialias,
                             const cairo_clip_t         *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
     cairo_image_surface_t *surface = abstract_surface;
     cairo_shadow_type_t shadow_type = source->shadow.type;
@@ -1118,8 +1164,10 @@ _cairo_image_surface_stroke (void                        *abstract_surface,
            __FUNCTION__, surface->base.unique_id));
 
     status = cairo_device_acquire (surface->base.device);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (shadow_type != CAIRO_SHADOW_INSET)
        status = _cairo_surface_shadow_stroke (abstract_surface, op, source,
@@ -1129,12 +1177,14 @@ _cairo_image_surface_stroke (void                       *abstract_surface,
 
     if (unlikely (status)) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
     if (shadow_type == CAIRO_SHADOW_DROP &&
        source->shadow.draw_shadow_only) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1146,6 +1196,7 @@ _cairo_image_surface_stroke (void                 *abstract_surface,
 
     if (unlikely (status)) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1156,6 +1207,7 @@ _cairo_image_surface_stroke (void                 *abstract_surface,
                                               &source->shadow);
 
     cairo_device_release (surface->base.device);
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1169,6 +1221,7 @@ _cairo_image_surface_fill (void                           *abstract_surface,
                           cairo_antialias_t             antialias,
                           const cairo_clip_t           *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
     cairo_image_surface_t *surface = abstract_surface;
     cairo_shadow_type_t shadow_type = source->shadow.type;
@@ -1177,8 +1230,10 @@ _cairo_image_surface_fill (void                          *abstract_surface,
            __FUNCTION__, surface->base.unique_id));
 
     status = cairo_device_acquire (surface->base.device);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (shadow_type != CAIRO_SHADOW_INSET)
        status = _cairo_surface_shadow_fill (abstract_surface, op, source,
@@ -1188,12 +1243,14 @@ _cairo_image_surface_fill (void                         *abstract_surface,
 
     if (unlikely (status)) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
     if (shadow_type == CAIRO_SHADOW_DROP &&
        source->shadow.draw_shadow_only) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1214,6 +1271,7 @@ _cairo_image_surface_fill (void                           *abstract_surface,
 
     if (unlikely (status)) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1224,6 +1282,7 @@ _cairo_image_surface_fill (void                           *abstract_surface,
                                             &source->shadow);
 
     cairo_device_release (surface->base.device);
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1236,6 +1295,7 @@ _cairo_image_surface_glyphs (void                 *abstract_surface,
                             cairo_scaled_font_t        *scaled_font,
                             const cairo_clip_t         *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
     cairo_image_surface_t *surface = abstract_surface;
     cairo_shadow_type_t shadow_type = source->shadow.type;
@@ -1244,8 +1304,10 @@ _cairo_image_surface_glyphs (void                        *abstract_surface,
            __FUNCTION__, surface->base.unique_id));
 
     status = cairo_device_acquire (surface->base.device);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (shadow_type != CAIRO_SHADOW_INSET)
        status = _cairo_surface_shadow_glyphs (abstract_surface, op, source,
@@ -1256,12 +1318,14 @@ _cairo_image_surface_glyphs (void                       *abstract_surface,
 
     if (unlikely (status)) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
     if (shadow_type == CAIRO_SHADOW_DROP &&
        source->shadow.draw_shadow_only) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1273,6 +1337,7 @@ _cairo_image_surface_glyphs (void                 *abstract_surface,
 
     if (unlikely (status)) {
        cairo_device_release (surface->base.device);
+       CAIRO_TRACE_END (__func__);
        return status;
     }
 
@@ -1284,6 +1349,7 @@ _cairo_image_surface_glyphs (void                 *abstract_surface,
                                               &source->shadow);
 
     cairo_device_release (surface->base.device);
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -1303,6 +1369,7 @@ _cairo_image_surface_shadow_surface (void *surface,
                                     int width, int height,
                                     int *width_out, int *height_out)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     int shadow_width, shadow_height;
     cairo_image_surface_t *shadow_surface = NULL;
 
@@ -1346,12 +1413,14 @@ _cairo_image_surface_shadow_surface (void *surface,
                                            shadow_height);
     if (unlikely (shadow_surface->base.status)) {
        cairo_surface_destroy (&shadow_surface->base);
+       CAIRO_TRACE_END (__func__);
        return NULL;
     }
 
     *width_out = shadow_width;
     *height_out = shadow_height;
 
+    CAIRO_TRACE_END (__func__);
     return &shadow_surface->base;
 }
 
@@ -1452,6 +1521,7 @@ _cairo_image_surface_create_from_image (cairo_image_surface_t *other,
                                        int x, int y,
                                        int width, int height, int stride)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_image_surface_t *surface = NULL;
     cairo_status_t status;
     pixman_image_t *image;
@@ -1491,6 +1561,7 @@ _cairo_image_surface_create_from_image (cairo_image_surface_t *other,
     surface->base.is_clear = FALSE;
     surface->owns_data = mem != NULL;
 
+    CAIRO_TRACE_END (__func__);
     return surface;
 
 cleanup_image:
@@ -1499,6 +1570,7 @@ cleanup_mem:
     free (mem);
 cleanup:
     cairo_surface_destroy (&surface->base);
+    CAIRO_TRACE_END (__func__);
     return (cairo_image_surface_t *) _cairo_surface_create_in_error (status);
 }
 
@@ -1624,6 +1696,7 @@ cairo_image_surface_t *
 _cairo_image_surface_clone_subimage (cairo_surface_t             *surface,
                                     const cairo_rectangle_int_t *extents)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_surface_t *image;
     cairo_surface_pattern_t pattern;
     cairo_status_t status;
@@ -1632,8 +1705,10 @@ _cairo_image_surface_clone_subimage (cairo_surface_t             *surface,
                                                _cairo_format_from_content (surface->content),
                                                extents->width,
                                                extents->height);
-    if (image->status)
+    if (image->status) {
+        CAIRO_TRACE_END (__func__);
        return to_image_surface (image);
+    }
 
     /* TODO: check me with non-identity device_transform. Should we
      * clone the scaling, too? */
@@ -1663,9 +1738,11 @@ _cairo_image_surface_clone_subimage (cairo_surface_t             *surface,
     _cairo_image_surface_set_parent (to_image_surface (image),
                                     cairo_surface_reference (surface));
 
+    CAIRO_TRACE_END (__func__);
     return to_image_surface (image);
 
 error:
     cairo_surface_destroy (image);
+    CAIRO_TRACE_END (__func__);
     return to_image_surface (_cairo_surface_create_in_error (status));
 }
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 2a9546c..1040cad
@@ -107,8 +107,8 @@ floored_muldivrem(int x, int a, int b)
 {
     struct quorem qr;
     long long xa = (long long)x*a;
-    qr.quo = xa/b;
-    qr.rem = xa%b;
+    qr.quo = (int32_t)(xa/b);
+    qr.rem = (int32_t)(xa%b);
     if ((xa>=0) != (b>=0) && qr.rem) {
        qr.quo -= 1;
        qr.rem += b;
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index a0bf1c1..cace8b1
@@ -1334,7 +1334,7 @@ _cairo_pdf_surface_add_source_surface (cairo_pdf_surface_t            *surface,
     cairo_pdf_source_surface_entry_t *surface_entry;
     cairo_status_t status;
     cairo_bool_t interpolate;
-    unsigned char *unique_id;
+    unsigned char *unique_id = NULL;
     unsigned long unique_id_length = 0;
     cairo_image_surface_t *image;
     void *image_extra;
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index e74a4a8..3215a52
@@ -41,6 +41,7 @@
 #include "cairo-error-private.h"
 #include "cairo-image-surface-private.h"
 #include "cairo-output-stream-private.h"
+#include "cairo-ttrace.h"
 
 #include <stdio.h>
 #include <errno.h>
@@ -171,6 +172,7 @@ write_png (cairo_surface_t  *surface,
           png_rw_ptr           write_func,
           void                 *closure)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     int i;
     cairo_int_status_t status;
     cairo_image_surface_t *image;
@@ -187,10 +189,14 @@ write_png (cairo_surface_t        *surface,
                                                  &image,
                                                  &image_extra);
 
-    if (status == CAIRO_INT_STATUS_UNSUPPORTED)
+    if (status == CAIRO_INT_STATUS_UNSUPPORTED) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
-    else if (unlikely (status))
+    }
+    else if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
         return status;
+    }
 
     /* PNG complains about "Image width or height is zero in IHDR" */
     if (image->width == 0 || image->height == 0) {
@@ -314,6 +320,7 @@ BAIL2:
 BAIL1:
     _cairo_surface_release_source_image (surface, image, image_extra);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -426,17 +433,23 @@ cairo_surface_write_to_png_stream (cairo_surface_t        *surface,
                                   cairo_write_func_t   write_func,
                                   void                 *closure)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     struct png_write_closure_t png_closure;
 
-    if (surface->status)
+    if (surface->status) {
+       CAIRO_TRACE_END (__func__);
        return surface->status;
+    }
 
-    if (surface->finished)
+    if (surface->finished) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_error (CAIRO_STATUS_SURFACE_FINISHED);
+    }
 
     png_closure.write_func = write_func;
     png_closure.closure = closure;
 
+    CAIRO_TRACE_END (__func__);
     return write_png (surface, stream_write_func, &png_closure);
 }
 slim_hidden_def (cairo_surface_write_to_png_stream);
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index a51e224..2566fc5
@@ -40,6 +40,7 @@
 
 #include "cairo-error-private.h"
 #include "cairo-region-private.h"
+#include "cairo-ttrace.h"
 
 /* XXX need to update pixman headers to be const as appropriate */
 #define CONST_CAST (pixman_region32_t *)
@@ -193,16 +194,20 @@ _cairo_region_fini (cairo_region_t *region)
 cairo_region_t *
 cairo_region_create (void)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_region_t *region;
 
     region = _cairo_malloc (sizeof (cairo_region_t));
-    if (region == NULL)
+    if (region == NULL) {
+       CAIRO_TRACE_END (__func__);
        return (cairo_region_t *) &_cairo_region_nil;
+    }
 
     region->status = CAIRO_STATUS_SUCCESS;
     CAIRO_REFERENCE_COUNT_INIT (&region->ref_count, 1);
 
     pixman_region32_init (&region->rgn);
+    CAIRO_TRACE_END (__func__);
 
     return region;
 }
@@ -417,16 +422,22 @@ slim_hidden_def (cairo_region_reference);
 void
 cairo_region_destroy (cairo_region_t *region)
 {
-    if (region == NULL || CAIRO_REFERENCE_COUNT_IS_INVALID (&region->ref_count))
+    CAIRO_TRACE_BEGIN (__func__);
+    if (region == NULL || CAIRO_REFERENCE_COUNT_IS_INVALID (&region->ref_count)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&region->ref_count));
 
-    if (! _cairo_reference_count_dec_and_test (&region->ref_count))
+    if (! _cairo_reference_count_dec_and_test (&region->ref_count)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     _cairo_region_fini (region);
     free (region);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_region_destroy);
 
@@ -700,11 +711,14 @@ cairo_status_t
 cairo_region_union_rectangle (cairo_region_t *dst,
                              const cairo_rectangle_int_t *rectangle)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status = CAIRO_STATUS_SUCCESS;
     pixman_region32_t region;
 
-    if (dst->status)
+    if (dst->status) {
+       CAIRO_TRACE_END (__func__);
        return dst->status;
+    }
 
     pixman_region32_init_rect (&region,
                               rectangle->x, rectangle->y,
@@ -714,6 +728,7 @@ cairo_region_union_rectangle (cairo_region_t *dst,
        status = _cairo_region_set_error (dst, CAIRO_STATUS_NO_MEMORY);
 
     pixman_region32_fini (&region);
+    CAIRO_TRACE_END (__func__);
 
     return status;
 }
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 68c1528..7854253
@@ -3556,6 +3556,9 @@ _cairo_script_surface_show_text_glyphs (void                          *abstract_surface,
 
 BAIL:
     inactive (surface);
+    if (base85_stream != NULL)
+       status = _cairo_output_stream_destroy (base85_stream);
+
     return status;
 }
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 5c6969c..05bc173 100755 (executable)
@@ -50,6 +50,7 @@
 #include "cairo-region-private.h"
 #include "cairo-surface-inline.h"
 #include "cairo-tee-surface-private.h"
+#include "cairo-ttrace.h"
 
 /**
  * SECTION:cairo-surface
@@ -517,23 +518,33 @@ cairo_surface_create_similar (cairo_surface_t  *other,
                              int               width,
                              int               height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_surface_t *surface;
 
-    if (unlikely (other->status))
+    if (unlikely (other->status)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (other->status);
-    if (unlikely (other->finished))
+    }
+    if (unlikely (other->finished)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (CAIRO_STATUS_SURFACE_FINISHED);
-    if (unlikely (width < 0 || height < 0))
+    }
+    if (unlikely (width < 0 || height < 0)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
+    }
 
-    if (unlikely (! CAIRO_CONTENT_VALID (content)))
+    if (unlikely (! CAIRO_CONTENT_VALID (content))) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_CONTENT);
+    }
 
     surface = _cairo_surface_create_similar_solid (other,
                                                   content, width, height,
                                                   CAIRO_COLOR_TRANSPARENT);
     assert (surface->is_clear);
 
+    CAIRO_TRACE_END (__func__);
     return surface;
 }
 
@@ -569,17 +580,26 @@ cairo_surface_create_similar_image (cairo_surface_t  *other,
                                    int         width,
                                    int         height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_surface_t *image;
 
-    if (unlikely (other->status))
+    if (unlikely (other->status)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (other->status);
-    if (unlikely (other->finished))
+    }
+    if (unlikely (other->finished)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (CAIRO_STATUS_SURFACE_FINISHED);
+    }
 
-    if (unlikely (width < 0 || height < 0))
+    if (unlikely (width < 0 || height < 0)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
-    if (unlikely (! CAIRO_FORMAT_VALID (format)))
+    }
+    if (unlikely (! CAIRO_FORMAT_VALID (format))) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_FORMAT);
+    }
 
     image = NULL;
     if (other->backend->create_similar_image)
@@ -590,6 +610,7 @@ cairo_surface_create_similar_image (cairo_surface_t  *other,
 
     assert (image->is_clear);
 
+    CAIRO_TRACE_END (__func__);
     return image;
 }
 slim_hidden_def (cairo_surface_create_similar_image);
@@ -628,6 +649,7 @@ cairo_image_surface_t *
 _cairo_surface_map_to_image (cairo_surface_t  *surface,
                             const cairo_rectangle_int_t *extents)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_image_surface_t *image = NULL;
 
     assert (extents != NULL);
@@ -639,6 +661,7 @@ _cairo_surface_map_to_image (cairo_surface_t  *surface,
     if (image == NULL)
        image = _cairo_image_surface_clone_subimage (surface, extents);
 
+    CAIRO_TRACE_END (__func__);
     return image;
 }
 
@@ -667,6 +690,7 @@ cairo_int_status_t
 _cairo_surface_unmap_image (cairo_surface_t       *surface,
                            cairo_image_surface_t *image)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_surface_pattern_t pattern;
     cairo_rectangle_int_t extents;
     cairo_clip_t *clip;
@@ -689,8 +713,10 @@ _cairo_surface_unmap_image (cairo_surface_t       *surface,
        ! _cairo_image_surface_is_clone (image))
     {
        status = surface->backend->unmap_image (surface, image);
-       if (status != CAIRO_INT_STATUS_UNSUPPORTED)
+       if (status != CAIRO_INT_STATUS_UNSUPPORTED) {
+           CAIRO_TRACE_END (__func__);
            return status;
+       }
     }
 
     _cairo_pattern_init_for_surface (&pattern, &image->base);
@@ -720,6 +746,7 @@ destroy:
     cairo_surface_finish (&image->base);
     cairo_surface_destroy (&image->base);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -755,19 +782,25 @@ cairo_surface_t *
 cairo_surface_map_to_image (cairo_surface_t  *surface,
                            const cairo_rectangle_int_t *extents)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_rectangle_int_t rect;
     cairo_image_surface_t *image;
     cairo_status_t status;
 
-    if (unlikely (surface->status))
+    if (unlikely (surface->status)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (surface->status);
-    if (unlikely (surface->finished))
+    }
+    if (unlikely (surface->finished)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (CAIRO_STATUS_SURFACE_FINISHED);
+    }
 
     if (extents == NULL) {
-       if (unlikely (! surface->backend->get_extents (surface, &rect)))
+       if (unlikely (! surface->backend->get_extents (surface, &rect))) {
+           CAIRO_TRACE_END (__func__);
            return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
-
+       }
        extents = &rect;
     } else {
        cairo_rectangle_int_t surface_extents;
@@ -775,8 +808,10 @@ cairo_surface_map_to_image (cairo_surface_t  *surface,
        /* If this surface is bounded, we can't map parts
         * that are outside of it. */
        if (likely (surface->backend->get_extents (surface, &surface_extents))) {
-           if (unlikely (! _cairo_rectangle_contains_rectangle (&surface_extents, extents)))
+           if (unlikely (! _cairo_rectangle_contains_rectangle (&surface_extents, extents))) {
+               CAIRO_TRACE_END (__func__);
                return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
+           }
        }
     }
 
@@ -785,6 +820,7 @@ cairo_surface_map_to_image (cairo_surface_t  *surface,
     status = image->base.status;
     if (unlikely (status)) {
        cairo_surface_destroy (&image->base);
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_create_in_error (status);
     }
 
@@ -793,6 +829,7 @@ cairo_surface_map_to_image (cairo_surface_t  *surface,
        image = _cairo_image_surface_clone_subimage (surface, extents);
     }
 
+    CAIRO_TRACE_END (__func__);
     return &image->base;
 }
 
@@ -815,6 +852,7 @@ void
 cairo_surface_unmap_image (cairo_surface_t *surface,
                           cairo_surface_t *image)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status = CAIRO_STATUS_SUCCESS;
 
     if (unlikely (surface->status)) {
@@ -843,12 +881,14 @@ cairo_surface_unmap_image (cairo_surface_t *surface,
     if (unlikely (status))
        _cairo_surface_set_error (surface, status);
 
+    CAIRO_TRACE_END (__func__);
     return;
 
 error:
     _cairo_surface_set_error (surface, status);
     cairo_surface_finish (image);
     cairo_surface_destroy (image);
+    CAIRO_TRACE_END (__func__);
 }
 
 cairo_surface_t *
@@ -858,14 +898,17 @@ _cairo_surface_create_similar_solid (cairo_surface_t       *other,
                                     int                  height,
                                     const cairo_color_t *color)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
     cairo_surface_t *surface;
     cairo_solid_pattern_t pattern;
 
     surface = _cairo_surface_create_similar_scratch (other, content,
                                                     width, height);
-    if (unlikely (surface->status))
+    if (unlikely (surface->status)) {
+       CAIRO_TRACE_END (__func__);
        return surface;
+    }
 
     _cairo_pattern_init_solid (&pattern, color);
     status = _cairo_surface_paint (surface,
@@ -877,6 +920,7 @@ _cairo_surface_create_similar_solid (cairo_surface_t         *other,
        surface = _cairo_surface_create_in_error (status);
     }
 
+    CAIRO_TRACE_END (__func__);
     return surface;
 }
 
@@ -923,14 +967,19 @@ slim_hidden_def (cairo_surface_reference);
 void
 cairo_surface_destroy (cairo_surface_t *surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     if (surface == NULL ||
-           CAIRO_REFERENCE_COUNT_IS_INVALID (&surface->ref_count))
+           CAIRO_REFERENCE_COUNT_IS_INVALID (&surface->ref_count)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count));
 
-    if (! _cairo_reference_count_dec_and_test (&surface->ref_count))
+    if (! _cairo_reference_count_dec_and_test (&surface->ref_count)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     assert (surface->snapshot_of == NULL);
 
@@ -939,8 +988,10 @@ cairo_surface_destroy (cairo_surface_t *surface)
        /* We may have been referenced by a snapshot prior to have
         * detaching it with the copy-on-write.
         */
-       if (CAIRO_REFERENCE_COUNT_GET_VALUE (&surface->ref_count))
+       if (CAIRO_REFERENCE_COUNT_GET_VALUE (&surface->ref_count)) {
+           CAIRO_TRACE_END (__func__);
            return;
+       }
 
        _cairo_surface_finish (surface);
     }
@@ -960,6 +1011,7 @@ cairo_surface_destroy (cairo_surface_t *surface)
     assert (! CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count));
 
     free (surface);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def(cairo_surface_destroy);
 
@@ -1037,14 +1089,21 @@ _cairo_surface_finish (cairo_surface_t *surface)
 void
 cairo_surface_finish (cairo_surface_t *surface)
 {
-    if (surface == NULL)
+    CAIRO_TRACE_BEGIN (__func__);
+    if (surface == NULL) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
-    if (CAIRO_REFERENCE_COUNT_IS_INVALID (&surface->ref_count))
+    if (CAIRO_REFERENCE_COUNT_IS_INVALID (&surface->ref_count)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
-    if (surface->finished)
+    if (surface->finished) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     /* We have to be careful when decoupling potential reference cycles */
     cairo_surface_reference (surface);
@@ -1054,6 +1113,7 @@ cairo_surface_finish (cairo_surface_t *surface)
     _cairo_surface_finish (surface);
 
     cairo_surface_destroy (surface);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_surface_finish);
 
@@ -1156,6 +1216,7 @@ cairo_surface_get_mime_data (cairo_surface_t              *surface,
                              const unsigned char       **data,
                              unsigned long             *length)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_user_data_slot_t *slots;
     int i, num_slots;
 
@@ -1163,8 +1224,10 @@ cairo_surface_get_mime_data (cairo_surface_t             *surface,
     *length = 0;
 
     /* Prevent reads of the array during teardown */
-    if (! CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count))
+    if (! CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     /* The number of mime-types attached to a surface is usually small,
      * typically zero. Therefore it is quicker to do a strcmp() against
@@ -1179,9 +1242,11 @@ cairo_surface_get_mime_data (cairo_surface_t             *surface,
 
            *data = mime_data->data;
            *length = mime_data->length;
+           CAIRO_TRACE_END (__func__);
            return;
        }
     }
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_surface_get_mime_data);
 
@@ -1282,28 +1347,41 @@ cairo_surface_set_mime_data (cairo_surface_t            *surface,
                             cairo_destroy_func_t        destroy,
                             void                       *closure)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
     cairo_mime_data_t *mime_data;
 
-    if (CAIRO_REFERENCE_COUNT_IS_INVALID (&surface->ref_count))
+    if (CAIRO_REFERENCE_COUNT_IS_INVALID (&surface->ref_count)) {
+       CAIRO_TRACE_END (__func__);
        return surface->status;
+    }
 
-    if (! CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count))
+    if (! CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_error (CAIRO_STATUS_SURFACE_FINISHED);
+    }
 
-    if (unlikely (surface->status))
+    if (unlikely (surface->status)) {
+       CAIRO_TRACE_END (__func__);
        return surface->status;
-    if (unlikely (surface->finished))
+    }
+    if (unlikely (surface->finished)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_set_error (surface, _cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
+    }
 
     status = _cairo_intern_string (&mime_type, -1);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_set_error (surface, status);
+    }
 
     if (data != NULL) {
        mime_data = malloc (sizeof (cairo_mime_data_t));
-       if (unlikely (mime_data == NULL))
+       if (unlikely (mime_data == NULL)) {
+           CAIRO_TRACE_END (__func__);
            return _cairo_surface_set_error (surface, _cairo_error (CAIRO_STATUS_NO_MEMORY));
+       }
 
        CAIRO_REFERENCE_COUNT_INIT (&mime_data->ref_count, 1);
 
@@ -1320,9 +1398,10 @@ cairo_surface_set_mime_data (cairo_surface_t             *surface,
                                              _cairo_mime_data_destroy);
     if (unlikely (status)) {
        free (mime_data);
-
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_set_error (surface, status);
     }
+    CAIRO_TRACE_END (__func__);
 
     return CAIRO_STATUS_SUCCESS;
 }
@@ -1373,24 +1452,32 @@ cairo_status_t
 _cairo_surface_copy_mime_data (cairo_surface_t *dst,
                               cairo_surface_t *src)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (dst->status)
+    if (dst->status) {
+       CAIRO_TRACE_END (__func__);
        return dst->status;
+    }
 
-    if (src->status)
+    if (src->status) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_set_error (dst, src->status);
+    }
 
     /* first copy the mime-data, discarding any already set on dst */
     status = _cairo_user_data_array_copy (&dst->mime_data, &src->mime_data);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_set_error (dst, status);
+    }
 
     /* now increment the reference counters for the copies */
     _cairo_user_data_array_foreach (&dst->mime_data,
                                    _cairo_mime_data_reference,
                                    NULL);
 
+    CAIRO_TRACE_END (__func__);
     return CAIRO_STATUS_SUCCESS;
 }
 
@@ -1499,17 +1586,23 @@ _cairo_surface_flush (cairo_surface_t *surface, unsigned flags)
 void
 cairo_surface_flush (cairo_surface_t *surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (surface->status)
+    if (surface->status) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
-    if (surface->finished)
+    if (surface->finished) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = _cairo_surface_flush (surface, 0);
     if (unlikely (status))
        _cairo_surface_set_error (surface, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_surface_flush);
 
@@ -1867,23 +1960,31 @@ _cairo_surface_acquire_source_image (cairo_surface_t         *surface,
                                     cairo_image_surface_t  **image_out,
                                     void                   **image_extra)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (surface->status))
+    if (unlikely (surface->status)) {
+       CAIRO_TRACE_END (__func__);
        return surface->status;
+    }
 
     assert (!surface->finished);
 
-    if (surface->backend->acquire_source_image == NULL)
+    if (surface->backend->acquire_source_image == NULL) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_INT_STATUS_UNSUPPORTED;
+    }
 
     status = surface->backend->acquire_source_image (surface,
                                                     image_out, image_extra);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_surface_set_error (surface, status);
+    }
 
     _cairo_debug_check_image_surface_is_defined (&(*image_out)->base);
 
+    CAIRO_TRACE_END (__func__);
     return CAIRO_STATUS_SUCCESS;
 }
 
@@ -1892,14 +1993,18 @@ _cairo_surface_default_acquire_source_image (void                    *_surface,
                                             cairo_image_surface_t  **image_out,
                                             void                   **image_extra)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_surface_t *surface = _surface;
     cairo_rectangle_int_t extents;
 
-    if (unlikely (! surface->backend->get_extents (surface, &extents)))
+    if (unlikely (! surface->backend->get_extents (surface, &extents))) {
+       CAIRO_TRACE_END (__func__);
        return _cairo_error (CAIRO_STATUS_INVALID_SIZE);
+    }
 
     *image_out = _cairo_surface_map_to_image (surface, &extents);
     *image_extra = NULL;
+    CAIRO_TRACE_END (__func__);
     return (*image_out)->base.status;
 }
 
@@ -1999,25 +2104,36 @@ _cairo_surface_paint (cairo_surface_t           *surface,
                      const cairo_pattern_t     *source,
                      const cairo_clip_t        *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
-    if (unlikely (surface->status))
+    if (unlikely (surface->status)) {
+        CAIRO_TRACE_END (__func__);
        return surface->status;
+    }
 
-    if (_cairo_clip_is_all_clipped (clip))
+    if (_cairo_clip_is_all_clipped (clip)) {
+        CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     status = _pattern_has_error (source);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
-    if (nothing_to_do (surface, op, source))
+    if (nothing_to_do (surface, op, source)) {
+        CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     status = _cairo_surface_begin_modification (surface);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = surface->backend->paint (surface, op, source, clip);
     if (status != CAIRO_INT_STATUS_NOTHING_TO_DO) {
@@ -2025,6 +2141,7 @@ _cairo_surface_paint (cairo_surface_t             *surface,
        surface->serial++;
     }
 
+    CAIRO_TRACE_END (__func__);
     return _cairo_surface_set_error (surface, status);
 }
 
@@ -2035,36 +2152,50 @@ _cairo_surface_mask (cairo_surface_t            *surface,
                     const cairo_pattern_t      *mask,
                     const cairo_clip_t         *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
-    if (unlikely (surface->status))
+    if (unlikely (surface->status)) {
+       CAIRO_TRACE_END (__func__);
        return surface->status;
+    }
 
-    if (_cairo_clip_is_all_clipped (clip))
+    if (_cairo_clip_is_all_clipped (clip)) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     /* If the mask is blank, this is just an expensive no-op */
     if (_cairo_pattern_is_clear (mask) &&
        _cairo_operator_bounded_by_mask (op))
     {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
     }
 
     status = _pattern_has_error (source);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = _pattern_has_error (mask);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
-    if (nothing_to_do (surface, op, source))
+    if (nothing_to_do (surface, op, source)) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     status = _cairo_surface_begin_modification (surface);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = surface->backend->mask (surface, op, source, mask, clip);
     if (status != CAIRO_INT_STATUS_NOTHING_TO_DO) {
@@ -2072,6 +2203,7 @@ _cairo_surface_mask (cairo_surface_t              *surface,
        surface->serial++;
     }
 
+    CAIRO_TRACE_END (__func__);
     return _cairo_surface_set_error (surface, status);
 }
 
@@ -2092,33 +2224,44 @@ _cairo_surface_fill_stroke (cairo_surface_t         *surface,
                            cairo_antialias_t        stroke_antialias,
                            const cairo_clip_t      *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
-    if (unlikely (surface->status))
+    if (unlikely (surface->status)) {
+        CAIRO_TRACE_END (__func__);
        return surface->status;
+    }
 
-    if (_cairo_clip_is_all_clipped (clip))
+    if (_cairo_clip_is_all_clipped (clip)) {
+        CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     if (surface->is_clear &&
        fill_op == CAIRO_OPERATOR_CLEAR &&
-       stroke_op == CAIRO_OPERATOR_CLEAR)
-    {
+       stroke_op == CAIRO_OPERATOR_CLEAR) {
+        CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
     }
 
     status = _pattern_has_error (fill_source);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = _pattern_has_error (stroke_source);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = _cairo_surface_begin_modification (surface);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (surface->backend->fill_stroke) {
        cairo_matrix_t dev_ctm = *stroke_ctm;
@@ -2157,6 +2300,7 @@ _cairo_surface_fill_stroke (cairo_surface_t           *surface,
        surface->serial++;
     }
 
+    CAIRO_TRACE_END (__func__);
     return _cairo_surface_set_error (surface, status);
 }
 
@@ -2172,25 +2316,36 @@ _cairo_surface_stroke (cairo_surface_t                  *surface,
                       cairo_antialias_t                 antialias,
                       const cairo_clip_t               *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
-    if (unlikely (surface->status))
+    if (unlikely (surface->status)) {
+       CAIRO_TRACE_END (__func__);
        return surface->status;
+    }
 
-    if (_cairo_clip_is_all_clipped (clip))
+    if (_cairo_clip_is_all_clipped (clip)) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     status = _pattern_has_error (source);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
-    if (nothing_to_do (surface, op, source))
+    if (nothing_to_do (surface, op, source)) {
+       CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     status = _cairo_surface_begin_modification (surface);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = surface->backend->stroke (surface, op, source,
                                       path, stroke_style,
@@ -2202,6 +2357,7 @@ _cairo_surface_stroke (cairo_surface_t                    *surface,
        surface->serial++;
     }
 
+    CAIRO_TRACE_END (__func__);
     return _cairo_surface_set_error (surface, status);
 }
 
@@ -2215,25 +2371,36 @@ _cairo_surface_fill (cairo_surface_t            *surface,
                     cairo_antialias_t           antialias,
                     const cairo_clip_t         *clip)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_int_status_t status;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
-    if (unlikely (surface->status))
+    if (unlikely (surface->status)) {
+        CAIRO_TRACE_END (__func__);
        return surface->status;
+    }
 
-    if (_cairo_clip_is_all_clipped (clip))
+    if (_cairo_clip_is_all_clipped (clip)) {
+        CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     status = _pattern_has_error (source);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
-    if (nothing_to_do (surface, op, source))
+    if (nothing_to_do (surface, op, source)) {
+        CAIRO_TRACE_END (__func__);
        return CAIRO_STATUS_SUCCESS;
+    }
 
     status = _cairo_surface_begin_modification (surface);
-    if (unlikely (status))
+    if (unlikely (status)) {
+        CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = surface->backend->fill (surface, op, source,
                                     path, fill_rule,
@@ -2244,6 +2411,7 @@ _cairo_surface_fill (cairo_surface_t              *surface,
        surface->serial++;
     }
 
+    CAIRO_TRACE_END (__func__);
     return _cairo_surface_set_error (surface, status);
 }
 
@@ -2264,20 +2432,27 @@ _cairo_surface_fill (cairo_surface_t            *surface,
 void
 cairo_surface_copy_page (cairo_surface_t *surface)
 {
-    if (unlikely (surface->status))
+    CAIRO_TRACE_BEGIN (__func__);
+    if (unlikely (surface->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     assert (surface->snapshot_of == NULL);
 
     if (unlikely (surface->finished)) {
        _cairo_surface_set_error (surface, CAIRO_STATUS_SURFACE_FINISHED);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     /* It's fine if some backends don't implement copy_page */
-    if (surface->backend->copy_page == NULL)
+    if (surface->backend->copy_page == NULL) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
+    CAIRO_TRACE_END (__func__);
     _cairo_surface_set_error (surface, surface->backend->copy_page (surface));
 }
 slim_hidden_def (cairo_surface_copy_page);
@@ -2297,25 +2472,33 @@ slim_hidden_def (cairo_surface_copy_page);
 void
 cairo_surface_show_page (cairo_surface_t *surface)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (surface->status))
+    if (unlikely (surface->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     if (unlikely (surface->finished)) {
        _cairo_surface_set_error (surface, CAIRO_STATUS_SURFACE_FINISHED);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     status = _cairo_surface_begin_modification (surface);
     if (unlikely (status)) {
        _cairo_surface_set_error (surface, status);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     /* It's fine if some backends don't implement show_page */
-    if (surface->backend->show_page == NULL)
+    if (surface->backend->show_page == NULL) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
+    CAIRO_TRACE_END (__func__);
 
     _cairo_surface_set_error (surface, surface->backend->show_page (surface));
 }
@@ -2469,8 +2652,9 @@ _cairo_surface_show_text_glyphs (cairo_surface_t      *surface,
                                                    &font_options);
     }
     status = cairo_scaled_font_status (dev_scaled_font);
-    if (unlikely (status))
+    if (unlikely (status)) {
        return _cairo_surface_set_error (surface, status);
+    }
 
     status = CAIRO_INT_STATUS_UNSUPPORTED;
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 89ef20f..17bea2c
@@ -480,8 +480,8 @@ floored_muldivrem(int x, int a, int b)
 {
     struct quorem qr;
     long long xa = (long long)x*a;
-    qr.quo = xa/b;
-    qr.rem = xa%b;
+    qr.quo = (int32_t)(xa/b);
+    qr.rem = (int32_t)(xa%b);
     if ((xa>=0) != (b>=0) && qr.rem) {
        qr.quo -= 1;
        qr.rem += b;
old mode 100644 (file)
new mode 100755 (executable)
index 4cec5ee..e7f72cd
@@ -478,8 +478,8 @@ floored_muldivrem(int x, int a, int b)
 {
     struct quorem qr;
     long long xa = (long long)x*a;
-    qr.quo = xa/b;
-    qr.rem = xa%b;
+    qr.quo = (int32_t)(xa/b);
+    qr.rem = (int32_t)(xa%b);
     if ((xa>=0) != (b>=0) && qr.rem) {
        qr.quo -= 1;
        qr.rem += b;
old mode 100644 (file)
new mode 100755 (executable)
index 5d561f2..9d6462f 100755 (executable)
@@ -59,6 +59,7 @@
 #include "cairo-spans-private.h"
 #include "cairo-traps-private.h"
 #include "cairo-tristrip-private.h"
+#include "cairo-ttrace.h"
 
 typedef cairo_int_status_t
 (*draw_func_t) (const cairo_traps_compositor_t *compositor,
@@ -216,11 +217,11 @@ combine_clip_as_traps (const cairo_traps_compositor_t *compositor,
                                          extents,
                                          antialias, &traps);
        else
-       status = compositor->composite_traps (mask, CAIRO_OPERATOR_IN, src,
-                                                 src_x, src_y,
-                                                 extents->x, extents->y,
-                                                 extents,
-                                                 antialias, &traps);
+    status = compositor->composite_traps (mask, CAIRO_OPERATOR_IN, src,
+                                         src_x, src_y,
+                                         extents->x, extents->y,
+                                         extents,
+                                         antialias, &traps);
 
     _cairo_traps_extents (&traps, &box);
     _cairo_box_round_to_rectangle (&box, &fixup);
@@ -505,7 +506,7 @@ create_composite_mask (const cairo_traps_compositor_t *compositor,
                        &extents->bounded, NULL);
     if (unlikely (status)){
                 if (cairo_surface_get_content (surface) == CAIRO_CONTENT_COLOR_ALPHA)
-                       goto error;
+       goto error;
                 else {
                        compositor->release (surface);
                        cairo_surface_destroy (surface);
@@ -584,20 +585,20 @@ clip_and_composite_with_mask (const cairo_traps_compositor_t *compositor,
 
        if (mask->content == CAIRO_CONTENT_ALPHA) {
                /* This is real mask */
-               if (src != NULL || dst->content != CAIRO_CONTENT_ALPHA) {
-                       compositor->composite (dst, op, src, mask,
-                                       extents->bounded.x + src_x,
-                                       extents->bounded.y + src_y,
-                                       0, 0,
-                                       extents->bounded.x, extents->bounded.y,
-                                       extents->bounded.width, extents->bounded.height);
-               } else {
-                       compositor->composite (dst, op, mask, NULL,
-                                                                       0, 0,
-                                                                       0, 0,
-                                                                       extents->bounded.x,      extents->bounded.y,
-                                                                       extents->bounded.width,  extents->bounded.height);
-               }
+    if (src != NULL || dst->content != CAIRO_CONTENT_ALPHA) {
+       compositor->composite (dst, op, src, mask,
+                              extents->bounded.x + src_x,
+                              extents->bounded.y + src_y,
+                              0, 0,
+                              extents->bounded.x,      extents->bounded.y,
+                              extents->bounded.width,  extents->bounded.height);
+    } else {
+       compositor->composite (dst, op, mask, NULL,
+                              0, 0,
+                              0, 0,
+                              extents->bounded.x,      extents->bounded.y,
+                              extents->bounded.width,  extents->bounded.height);
+    }
        } else {
                        compositor->composite (dst, op, mask, NULL,
                                                                        0, 0,
@@ -731,18 +732,18 @@ clip_and_composite_source (const cairo_traps_compositor_t *compositor,
                               extents->bounded.width,  extents->bounded.height);
     } else {
        if (mask->content == CAIRO_CONTENT_ALPHA)
-                       compositor->lerp (dst, src, mask,
-                                         extents->bounded.x + src_x, extents->bounded.y + src_y,
-                                         0, 0,
-                                         extents->bounded.x,     extents->bounded.y,
-                                         extents->bounded.width, extents->bounded.height);
+       compositor->lerp (dst, src, mask,
+                         extents->bounded.x + src_x, extents->bounded.y + src_y,
+                         0, 0,
+                         extents->bounded.x,     extents->bounded.y,
+                         extents->bounded.width, extents->bounded.height);
        else
                     compositor->lerp_color_glyph (dst, mask, white_mask,
                                                0, 0,
                                                extents->bounded.x + src_x, extents->bounded.y + src_y,
                                                extents->bounded.x, extents->bounded.y,
                                                extents->bounded.width, extents->bounded.height);
- }
   }
 
 skip:
     cairo_surface_destroy (mask);
@@ -2083,6 +2084,7 @@ static cairo_int_status_t
 _cairo_traps_compositor_paint (const cairo_compositor_t *_compositor,
                               cairo_composite_rectangles_t *extents)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_traps_compositor_t *compositor = (cairo_traps_compositor_t*)_compositor;
     cairo_boxes_t boxes;
     cairo_int_status_t status;
@@ -2090,13 +2092,16 @@ _cairo_traps_compositor_paint (const cairo_compositor_t *_compositor,
     TRACE ((stderr, "%s\n", __FUNCTION__));
 
     status = compositor->check_composite (extents);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
      _cairo_clip_steal_boxes (extents->clip, &boxes);
      status = clip_and_composite_boxes (compositor, extents, &boxes);
      _cairo_clip_unsteal_boxes (extents->clip, &boxes);
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -2104,14 +2109,17 @@ static cairo_int_status_t
 _cairo_traps_compositor_mask (const cairo_compositor_t *_compositor,
                              cairo_composite_rectangles_t *extents)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     const cairo_traps_compositor_t *compositor = (cairo_traps_compositor_t*)_compositor;
     cairo_int_status_t status;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
 
     status = compositor->check_composite (extents);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     if (extents->mask_pattern.base.type == CAIRO_PATTERN_TYPE_SOLID &&
        extents->clip->path == NULL) {
@@ -2130,8 +2138,10 @@ _cairo_traps_compositor_mask (const cairo_compositor_t *_compositor,
                                                    &extents->mask_sample_area,
                                                    &data.mask_x,
                                                    &data.mask_y);
-       if (unlikely (data.mask->status))
+       if (unlikely (data.mask->status)) {
+           CAIRO_TRACE_END (__func__);
            return data.mask->status;
+       }
 
        status = clip_and_composite (compositor, extents,
                                     composite_mask,
@@ -2141,6 +2151,7 @@ _cairo_traps_compositor_mask (const cairo_compositor_t *_compositor,
        cairo_surface_destroy (data.mask);
     }
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -2154,14 +2165,17 @@ _cairo_traps_compositor_stroke (const cairo_compositor_t *_compositor,
                                double                   tolerance,
                                cairo_antialias_t        antialias)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     const cairo_traps_compositor_t *compositor = (cairo_traps_compositor_t *)_compositor;
     cairo_int_status_t status;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
 
     status = compositor->check_composite (extents);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = CAIRO_INT_STATUS_UNSUPPORTED;
     if (_cairo_path_fixed_stroke_is_rectilinear (path)) {
@@ -2242,6 +2256,7 @@ _cairo_traps_compositor_stroke (const cairo_compositor_t *_compositor,
        _cairo_traps_fini (&info.traps);
     }
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -2253,14 +2268,17 @@ _cairo_traps_compositor_fill (const cairo_compositor_t *_compositor,
                              double                     tolerance,
                              cairo_antialias_t          antialias)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     const cairo_traps_compositor_t *compositor = (cairo_traps_compositor_t *)_compositor;
     cairo_int_status_t status;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
 
     status = compositor->check_composite (extents);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
     status = CAIRO_INT_STATUS_UNSUPPORTED;
     if (_cairo_path_fixed_fill_is_rectilinear (path)) {
@@ -2309,6 +2327,7 @@ _cairo_traps_compositor_fill (const cairo_compositor_t *_compositor,
        _cairo_polygon_fini (&polygon);
     }
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
@@ -2344,14 +2363,17 @@ _cairo_traps_compositor_glyphs (const cairo_compositor_t        *_compositor,
                                int                              num_glyphs,
                                cairo_bool_t                     overlap)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     const cairo_traps_compositor_t *compositor = (cairo_traps_compositor_t *)_compositor;
     cairo_int_status_t status;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
 
     status = compositor->check_composite (extents);
-    if (unlikely (status))
+    if (unlikely (status)) {
+       CAIRO_TRACE_END (__func__);
        return status;
+    }
 
 #if ! CAIRO_HAS_TG_SURFACE
     _cairo_scaled_font_freeze_cache (scaled_font);
@@ -2386,6 +2408,7 @@ _cairo_traps_compositor_glyphs (const cairo_compositor_t  *_compositor,
     _cairo_scaled_font_thaw_cache (scaled_font);
 #endif
 
+    CAIRO_TRACE_END (__func__);
     return status;
 }
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/src/cairo-ttrace.h b/src/cairo-ttrace.h
new file mode 100644 (file)
index 0000000..0733ba4
--- /dev/null
@@ -0,0 +1,47 @@
+/* Cairo - a vector graphics library with display and print output
+ *
+ * Copyright Â© 2009 Chris Wilson
+ * Copyright Â© 2014 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it either under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
+ * notice, a recipient may use your version of this file under either
+ * the MPL or the LGPL.
+ *
+ * You should have received a copy of the LGPL along with this library
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
+ * You should have received a copy of the MPL along with this library
+ * in the file COPYING-MPL-1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
+ * the specific language governing rights and limitations.
+ *
+ * The Original Code is the cairo graphics library.
+ *
+ */
+
+
+#ifdef CAIRO_HAS_TTRACE
+#include <ttrace.h>
+//#define CAIRO_TRACE_BEGIN(NAME) traceBegin(TTRACE_TAG_GRAPHICS, NAME)
+//#define CAIRO_TRACE_END() traceEnd(TTRACE_TAG_GRAPHICS)
+#define CAIRO_TRACE_BEGIN(NAME) traceAsyncBegin (TTRACE_TAG_GRAPHICS, 0, NAME);
+#define CAIRO_TRACE_END(NAME) traceAsyncEnd(TTRACE_TAG_GRAPHICS, 0, NAME);
+#else
+#define CAIRO_TRACE_BEGIN(NAME)
+#define CAIRO_TRACE_END(NAME)
+#define CAIRO_TRACE_ASYNC_BEGIN(NAME, KEY)
+#define CAIRO_TRACE_ASYNC_END(NAME, KEY)
+#endif
+
+
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index c6393a8..89d2905 100755 (executable)
@@ -3630,6 +3630,9 @@ _cairo_xcb_render_compositor_paint (const cairo_compositor_t     *compositor,
        return CAIRO_STATUS_SUCCESS;
     }
 
+    if (composite->clip == NULL)
+       return CAIRO_STATUS_NULL_POINTER;
+
      _cairo_clip_steal_boxes(composite->clip, &boxes);
      status = _clip_and_composite_boxes (surface, op, source, &boxes, composite);
      _cairo_clip_unsteal_boxes (composite->clip, &boxes);
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index fa7d3eb..58f5a6c
@@ -670,6 +670,7 @@ _cairo_xlib_shm_surface_flush (void *abstract_surface, unsigned flags)
     cairo_xlib_shm_surface_t *shm = abstract_surface;
     cairo_xlib_display_t *display;
     Display *dpy;
+    _XQEvent *qev;
     cairo_status_t status;
 
     if (shm->active == 0)
@@ -694,6 +695,10 @@ _cairo_xlib_shm_surface_flush (void *abstract_surface, unsigned flags)
     while (! seqno_passed (shm->active, LastKnownRequestProcessed (dpy))) {
        LockDisplay(dpy);
        _XReadEvents(dpy);
+    while (dpy->head){
+               qev = dpy->head;
+               _XDeq (dpy, NULL, qev);
+       }
        UnlockDisplay(dpy);
     }
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 3a6607b..37d8f97 100755 (executable)
@@ -49,6 +49,7 @@
 #include "cairo-surface-backend-private.h"
 
 #include <assert.h>
+#include "cairo-ttrace.h"
 
 /**
  * SECTION:cairo
@@ -224,15 +225,24 @@ _cairo_create_in_error (cairo_status_t status)
 cairo_t *
 cairo_create (cairo_surface_t *target)
 {
-    if (unlikely (target == NULL))
+    CAIRO_TRACE_BEGIN (__func__);
+    if (unlikely (target == NULL)) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_create_in_error (_cairo_error (CAIRO_STATUS_NULL_POINTER));
-    if (unlikely (target->status))
+    }
+    if (unlikely (target->status)) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_create_in_error (target->status);
+    }
 
-    if (target->backend->create_context == NULL)
+    if (target->backend->create_context == NULL) {
+        CAIRO_TRACE_END (__func__);
        return _cairo_create_in_error (_cairo_error (CAIRO_STATUS_WRITE_ERROR));
+    }
 
-    return target->backend->create_context (target);
+    cairo_t *cr = target->backend->create_context (target);
+    CAIRO_TRACE_END (__func__);
+    return cr;
 
 }
 slim_hidden_def (cairo_create);
@@ -295,15 +305,21 @@ _cairo_fini (cairo_t *cr)
 void
 cairo_destroy (cairo_t *cr)
 {
-    if (cr == NULL || CAIRO_REFERENCE_COUNT_IS_INVALID (&cr->ref_count))
+    CAIRO_TRACE_BEGIN (__func__);
+    if (cr == NULL || CAIRO_REFERENCE_COUNT_IS_INVALID (&cr->ref_count)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&cr->ref_count));
 
-    if (! _cairo_reference_count_dec_and_test (&cr->ref_count))
+    if (! _cairo_reference_count_dec_and_test (&cr->ref_count)) {
+        CAIRO_TRACE_END (__func__);
        return;
+    }
 
     cr->backend->destroy (cr);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_destroy);
 
@@ -400,14 +416,18 @@ cairo_get_reference_count (cairo_t *cr)
 void
 cairo_save (cairo_t *cr)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+        CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->save (cr);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def(cairo_save);
 
@@ -424,14 +444,18 @@ slim_hidden_def(cairo_save);
 void
 cairo_restore (cairo_t *cr)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+        CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->restore (cr);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def(cairo_restore);
 
@@ -671,14 +695,18 @@ cairo_set_opacity (cairo_t *cr, double opacity)
 void
 cairo_set_source_rgb (cairo_t *cr, double red, double green, double blue)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->set_source_rgba (cr, red, green, blue, 1.);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_set_source_rgb);
 
@@ -749,19 +777,24 @@ cairo_set_source_surface (cairo_t   *cr,
                          double           x,
                          double           y)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     if (unlikely (surface == NULL)) {
        _cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     status = cr->backend->set_source_surface (cr, surface, x, y);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_set_source_surface);
 
@@ -1187,14 +1220,18 @@ cairo_set_miter_limit (cairo_t *cr, double limit)
 void
 cairo_translate (cairo_t *cr, double tx, double ty)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->translate (cr, tx, ty);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_translate);
 
@@ -1214,14 +1251,18 @@ slim_hidden_def (cairo_translate);
 void
 cairo_scale (cairo_t *cr, double sx, double sy)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->scale (cr, sx, sy);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_scale);
 
@@ -1242,14 +1283,18 @@ slim_hidden_def (cairo_scale);
 void
 cairo_rotate (cairo_t *cr, double angle)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->rotate (cr, angle);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -1342,10 +1387,14 @@ cairo_identity_matrix (cairo_t *cr)
 void
 cairo_user_to_device (cairo_t *cr, double *x, double *y)
 {
-    if (unlikely (cr->status))
+    CAIRO_TRACE_BEGIN (__func__);
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     cr->backend->user_to_device (cr, x, y);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_user_to_device);
 
@@ -1365,10 +1414,14 @@ slim_hidden_def (cairo_user_to_device);
 void
 cairo_user_to_device_distance (cairo_t *cr, double *dx, double *dy)
 {
-    if (unlikely (cr->status))
+    CAIRO_TRACE_BEGIN (__func__);
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     cr->backend->user_to_device_distance (cr, dx, dy);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_user_to_device_distance);
 
@@ -1387,10 +1440,14 @@ slim_hidden_def (cairo_user_to_device_distance);
 void
 cairo_device_to_user (cairo_t *cr, double *x, double *y)
 {
-    if (unlikely (cr->status))
+    CAIRO_TRACE_BEGIN (__func__);
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     cr->backend->device_to_user (cr, x, y);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_device_to_user);
 
@@ -1622,10 +1679,13 @@ cairo_arc (cairo_t *cr,
           double radius,
           double angle1, double angle2)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     if (angle2 < angle1) {
        /* increase angle2 by multiples of full circle until it
@@ -1639,6 +1699,7 @@ cairo_arc (cairo_t *cr,
     status = cr->backend->arc (cr, xc, yc, radius, angle1, angle2, TRUE);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -1667,10 +1728,13 @@ cairo_arc_negative (cairo_t *cr,
                    double radius,
                    double angle1, double angle2)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     if (angle2 > angle1) {
        /* decrease angle2 by multiples of full circle until it
@@ -1684,6 +1748,7 @@ cairo_arc_negative (cairo_t *cr,
     status = cr->backend->arc (cr, xc, yc, radius, angle1, angle2, FALSE);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /* XXX: NYI
@@ -1858,14 +1923,18 @@ cairo_rectangle (cairo_t *cr,
                 double x, double y,
                 double width, double height)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->rectangle (cr, x, y, width, height);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 #if 0
@@ -1991,14 +2060,18 @@ cairo_path_extents (cairo_t *cr,
 void
 cairo_paint (cairo_t *cr)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->paint (cr);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_paint);
 
@@ -2018,14 +2091,18 @@ void
 cairo_paint_with_alpha (cairo_t *cr,
                        double   alpha)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->paint_with_alpha (cr, alpha);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -2044,24 +2121,30 @@ void
 cairo_mask (cairo_t         *cr,
            cairo_pattern_t *pattern)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     if (unlikely (pattern == NULL)) {
        _cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     if (unlikely (pattern->status)) {
        _cairo_set_error (cr, pattern->status);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     status = cr->backend->mask (cr, pattern);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def (cairo_mask);
 
@@ -2085,11 +2168,14 @@ cairo_mask_surface (cairo_t         *cr,
                    double           surface_x,
                    double           surface_y)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_pattern_t *pattern;
     cairo_matrix_t matrix;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     pattern = cairo_pattern_create_for_surface (surface);
 
@@ -2099,6 +2185,7 @@ cairo_mask_surface (cairo_t         *cr,
     cairo_mask (cr, pattern);
 
     cairo_pattern_destroy (pattern);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -2138,14 +2225,18 @@ cairo_mask_surface (cairo_t         *cr,
 void
 cairo_stroke (cairo_t *cr)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->stroke (cr);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def(cairo_stroke);
 
@@ -2167,14 +2258,18 @@ slim_hidden_def(cairo_stroke);
 void
 cairo_stroke_preserve (cairo_t *cr)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->stroke_preserve (cr);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def(cairo_stroke_preserve);
 
@@ -2193,14 +2288,18 @@ slim_hidden_def(cairo_stroke_preserve);
 void
 cairo_fill (cairo_t *cr)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->fill (cr);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -2219,14 +2318,18 @@ cairo_fill (cairo_t *cr)
 void
 cairo_fill_preserve (cairo_t *cr)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->fill_preserve (cr);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 slim_hidden_def(cairo_fill_preserve);
 
@@ -2386,6 +2489,7 @@ void
 cairo_stroke_extents (cairo_t *cr,
                       double *x1, double *y1, double *x2, double *y2)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
     if (unlikely (cr->status)) {
@@ -2398,12 +2502,14 @@ cairo_stroke_extents (cairo_t *cr,
        if (y2)
            *y2 = 0.0;
 
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     status = cr->backend->stroke_extents (cr, x1, y1, x2, y2);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -2437,6 +2543,7 @@ void
 cairo_fill_extents (cairo_t *cr,
                     double *x1, double *y1, double *x2, double *y2)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
     if (unlikely (cr->status)) {
@@ -2449,12 +2556,14 @@ cairo_fill_extents (cairo_t *cr,
        if (y2)
            *y2 = 0.0;
 
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     status = cr->backend->fill_extents (cr, x1, y1, x2, y2);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -2581,6 +2690,7 @@ cairo_clip_extents (cairo_t *cr,
                    double *x1, double *y1,
                    double *x2, double *y2)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
     if (x1)
@@ -2592,12 +2702,15 @@ cairo_clip_extents (cairo_t *cr,
     if (y2)
        *y2 = 0.0;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->clip_extents (cr, x1, y1, x2, y2);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -3192,6 +3305,7 @@ cairo_glyph_extents (cairo_t                *cr,
 void
 cairo_show_text (cairo_t *cr, const char *utf8)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_text_extents_t extents;
     cairo_status_t status;
     cairo_glyph_t *glyphs, *last_glyph;
@@ -3205,15 +3319,20 @@ cairo_show_text (cairo_t *cr, const char *utf8)
     cairo_scaled_font_t *scaled_font;
     cairo_glyph_text_info_t info, *i;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
-    if (utf8 == NULL)
+    if (utf8 == NULL) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     scaled_font = cairo_get_scaled_font (cr);
     if (unlikely (scaled_font->status)) {
        _cairo_set_error (cr, scaled_font->status);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
@@ -3243,8 +3362,10 @@ cairo_show_text (cairo_t *cr, const char *utf8)
     if (unlikely (status))
        goto BAIL;
 
-    if (num_glyphs == 0)
+    if (num_glyphs == 0) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     i = NULL;
     if (has_show_text_glyphs) {
@@ -3277,6 +3398,7 @@ cairo_show_text (cairo_t *cr, const char *utf8)
 
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -3294,27 +3416,35 @@ cairo_show_text (cairo_t *cr, const char *utf8)
 void
 cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
-    if (num_glyphs == 0)
+    if (num_glyphs == 0) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     if (num_glyphs < 0) {
        _cairo_set_error (cr, CAIRO_STATUS_NEGATIVE_COUNT);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     if (glyphs == NULL) {
        _cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     status = cr->backend->glyphs (cr, glyphs, num_glyphs, NULL);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -3361,10 +3491,13 @@ cairo_show_text_glyphs (cairo_t                    *cr,
                        int                         num_clusters,
                        cairo_text_cluster_flags_t  cluster_flags)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     /* A slew of sanity checks */
 
@@ -3377,6 +3510,7 @@ cairo_show_text_glyphs (cairo_t                      *cr,
        (utf8_len     && utf8     == NULL) ||
        (num_clusters && clusters == NULL)) {
        _cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
@@ -3387,11 +3521,14 @@ cairo_show_text_glyphs (cairo_t                    *cr,
     /* Apart from that, no negatives */
     if (num_glyphs < 0 || utf8_len < 0 || num_clusters < 0) {
        _cairo_set_error (cr, CAIRO_STATUS_NEGATIVE_COUNT);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
-    if (num_glyphs == 0 && utf8_len == 0)
+    if (num_glyphs == 0 && utf8_len == 0) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     if (utf8) {
        /* Make sure clusters cover the entire glyphs and utf8 arrays,
@@ -3424,6 +3561,7 @@ cairo_show_text_glyphs (cairo_t                      *cr,
     }
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -3455,6 +3593,7 @@ cairo_show_text_glyphs (cairo_t                      *cr,
 void
 cairo_text_path (cairo_t *cr, const char *utf8)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
     cairo_text_extents_t extents;
     cairo_glyph_t stack_glyphs[CAIRO_STACK_ARRAY_LENGTH (cairo_glyph_t)];
@@ -3463,11 +3602,15 @@ cairo_text_path (cairo_t *cr, const char *utf8)
     int num_glyphs;
     double x, y;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
-    if (utf8 == NULL)
+    if (utf8 == NULL) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
 
     glyphs = stack_glyphs;
@@ -3476,6 +3619,7 @@ cairo_text_path (cairo_t *cr, const char *utf8)
     scaled_font = cairo_get_scaled_font (cr);
     if (unlikely (scaled_font->status)) {
        _cairo_set_error (cr, scaled_font->status);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
@@ -3486,8 +3630,10 @@ cairo_text_path (cairo_t *cr, const char *utf8)
                                               &glyphs, &num_glyphs,
                                               NULL, NULL, NULL);
 
-    if (num_glyphs == 0)
+    if (num_glyphs == 0) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     status = cr->backend->glyph_path (cr, glyphs, num_glyphs);
 
@@ -3510,6 +3656,7 @@ cairo_text_path (cairo_t *cr, const char *utf8)
 
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
@@ -3527,27 +3674,35 @@ cairo_text_path (cairo_t *cr, const char *utf8)
 void
 cairo_glyph_path (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs)
 {
+    CAIRO_TRACE_BEGIN (__func__);
     cairo_status_t status;
 
-    if (unlikely (cr->status))
+    if (unlikely (cr->status)) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
-    if (num_glyphs == 0)
+    if (num_glyphs == 0) {
+       CAIRO_TRACE_END (__func__);
        return;
+    }
 
     if (unlikely (num_glyphs < 0)) {
        _cairo_set_error (cr, CAIRO_STATUS_NEGATIVE_COUNT);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     if (unlikely (glyphs == NULL)) {
        _cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
+       CAIRO_TRACE_END (__func__);
        return;
     }
 
     status = cr->backend->glyph_path (cr, glyphs, num_glyphs);
     if (unlikely (status))
        _cairo_set_error (cr, status);
+    CAIRO_TRACE_END (__func__);
 }
 
 /**
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index ee8cf87..ef78679
@@ -11,9 +11,11 @@ SUBDIRS += cairo-script
 endif
 
 if CAIRO_HAS_TRACE
+#SUBDIRS += cairo-trace
 if CAIRO_HAS_DLSYM
 if CAIRO_HAS_SCRIPT_SURFACE
 if CAIRO_HAS_TEE_SURFACE
+#SUBDIRS += cairo-fdr
 endif
 endif
 endif
@@ -23,6 +25,7 @@ if BUILD_SPHINX
 if CAIRO_HAS_DLSYM
 if CAIRO_HAS_SCRIPT_SURFACE
 if CAIRO_HAS_TEE_SURFACE
+#SUBDIRS += cairo-sphinx
 endif
 endif
 endif