From MozillaWiki
Jump to: navigation, search


Tracking Fennec blockers:

Full Query
ID Priority Summary Status Assigned to
736276 P1 Rename ScaledFontFreetype to ScaledFontCairo and use it to create an SkTypeface from a cairo_scaled_font_t RESOLVED Benoit Jacob [:bjacob] (mostly away)
848481 P1 [SkiaGL] Flickering with canvas RESOLVED Benoit Jacob [:bjacob] (mostly away)
848482 P1 [SkiaGL] SourceSurface doesn't currently work with SkiaGL RESOLVED James Willcox (:snorp) ( (he/him)
848490 P1 [SkiaGL] Handle canvas elements larger than the maximum GPU texture size RESOLVED George Wright (:gw280) (needinfo me!)
848491 P3 [Skia] Rebase again (Q1 2013) RESOLVED George Wright (:gw280) (needinfo me!)
854556 P1 [Skia] Only hold a ref to the SkCanvas in DrawTargetSkia RESOLVED James Willcox (:snorp) ( (he/him)
858292 P1 gfx defects in shumway demos when skia-gl enabled RESOLVED James Willcox (:snorp) ( (he/him)
862448 P1 Fast fencing path busted when preserveDrawingBuffer=true RESOLVED James Willcox (:snorp) ( (he/him)
864222 -- [B2G/SkiaGL] With skiaGL enabled, can't work due to not enough memory RESOLVED Peter Chang[:pchang]
869076 -- [SkiaGL] Mochitests crashing with out of memory errors constantly RESOLVED Benoit Jacob [:bjacob] (mostly away)
869178 -- [Skia] Use drawBitmapRect instead of creating a bitmap shader when drawing images in DrawTargetSkia RESOLVED George Wright (:gw280) (needinfo me!)
869199 -- [SkiaGL] Investigate terrible performance on FishIE with Skia RESOLVED
869331 -- [B2G/SkiaGL] Flickering with mozillaball RESOLVED Chiajung Hung [:chiajung]
869347 -- [B2G/SkiaGL] With gralloc-backend, canvas app crashed when resumed to foreground RESOLVED Peter Chang[:pchang]
869351 -- [B2G/SkiaGL] No icon when launch RESOLVED
869464 -- Figure out AA implications for SkiaGL RESOLVED
869612 -- [SkiaGL] Cut the Rope - text isn't rendered properly in the game RESOLVED Chiajung Hung [:chiajung]
869746 -- SkiaGL fails to render part of canvasmark RESOLVED
871750 -- [SkiaGL] Fix mochitest failures for canvas rendering RESOLVED George Wright (:gw280) (needinfo me!)
872509 -- [Skia] We aren't using SkMemory_mozalloc. We should be. RESOLVED George Wright (:gw280) (needinfo me!)
873188 -- [SkiaGL] Investigate performance impact of NPOT textures NEW
873249 -- Use-after-free crash with linear gradients with Skia/GL RESOLVED George Wright (:gw280) (needinfo me!)
874331 -- Skia/GL: Canvas 2D tests deadlock in Valgrind with "Syscall param futex(op) contains uninitialised byte(s)" RESOLVED
874682 -- [Skia] SkThread_pthreads isn't built RESOLVED
874768 -- Ensure that Canvas2D on Skia/GL runs without Valgrind memcheck errors RESOLVED
875216 -- Canvas.toDataURL broken with Skia/GL, Valgrind says it encodes uninitialized data RESOLVED
878822 -- SkiaGL crashes after calling pure virtual method during mochitest RESOLVED
880108 -- SkiaGL crashes as it tries to MakeCurrent a generic GLContext, which is pure virtual there RESOLVED Benoit Jacob [:bjacob] (mostly away)
880818 -- Null cairo font face can crash B2G RESOLVED Jonathan Kew [:jfkthame]
881169 -- [B2G/skiaGL] Fix SharedSurface_Gralloc::Create crash due to null allocator RESOLVED Peter Chang[:pchang]
884034 -- SourceSurfaceSkia's pointer to DrawTargetSkia goes dangling RESOLVED
884888 -- SkiaGL has problems drawing shadows RESOLVED James Willcox (:snorp) ( (he/him)
885623 -- Canvas radial gradient tests too precise RESOLVED James Willcox (:snorp) ( (he/him)
885627 -- SkiaGL fails a bunch of composition tests RESOLVED James Willcox (:snorp) ( (he/him)
885632 -- SkiaGL fails clip winding test RESOLVED James Willcox (:snorp) ( (he/him)
887214 -- Graphics branch: Mochitest crash on B2G VM slaves in EnsureErrorTarget() RESOLVED
887318 -- SkiaGL fails to readback pixels on Adreno RESOLVED James Willcox (:snorp) ( (he/him)
887901 -- Limit number of GL contexts with SkiaGL RESOLVED James Willcox (:snorp) ( (he/him)
887927 -- SourceSurfaceSkia needs to copy the bitmap when DT is destroyed RESOLVED James Willcox (:snorp) ( (he/him)
894405 -- SkiaGL crashes with async compositing RESOLVED James Willcox (:snorp) ( (he/him)
899408 -- [B2G]Fail to enable skiaGL canvas because white list checking RESOLVED Peter Chang[:pchang]
902103 -- [SkiaGL] Free Layer resource when CanvasContext got demoted RESOLVED Peter Chang[:pchang]
905214 -- Tracking bug for enabling Skia/GL canvas in B2G 1.2 RESOLVED Benoit Jacob [:bjacob] (mostly away)

43 Total; 1 Open (2.33%); 42 Resolved (97.67%); 0 Verified (0%);

Tracking B2G 1.2 blockers:

Full Query
ID Priority Summary Status Assigned to
886415 -- Add format Swap flag to libcopybit RESOLVED Diego Wilson [:diego]
899798 -- [B2G] With Skia/GL, canvases get re-composited with B and R channels swapped RESOLVED Peter Chang[:pchang]
900201 -- Implement GfxInfo on gonk RESOLVED Benoit Jacob [:bjacob] (mostly away)
905141 -- B2G emulator's OpenGL ES implementation needs to support BGRA textures RESOLVED Benoit Jacob [:bjacob] (mostly away)
905227 -- Turn on Skia/GL on B2G for large enough canvases RESOLVED Benoit Jacob [:bjacob] (mostly away)
907254 -- reftest.js doesnt need anymore to avoid using GfxInfo on B2G RESOLVED Benoit Jacob [:bjacob] (mostly away)
907256 -- Adjust the canvas reftest.list for SkiaGL/B2G failures RESOLVED Benoit Jacob [:bjacob] (mostly away)
907723 -- Add some fuzz for B2G to SVG reftest.list RESOLVED Benoit Jacob [:bjacob] (mostly away)

8 Total; 0 Open (0%); 8 Resolved (100%); 0 Verified (0%);



  • Do we need this meeting? Last time we met, we decided we needed at least one more. Is this it?


  • Early performance measurement results


  • GfxInfo/Gonk stuck, with some retest fixes, it also regressed WebGL on B2G
  • deploying emulator fix - nontrivial because of Git issues (mwu helped us with updating this)
  • strategy for the tests


  • B and R swap landed
  • looking at the canvas issues, FishIE, flushing, ...


  • (how do we set the cache size? we want to re-run the benchmark tests with the cache size set to a larger amount than



  • snorp
    • going to uplift changes to 25
    • will fix crashtests tomorrrow
    • patched crash from demotion
  • peter
    • deferred rendering


  • peter
    • 894847 failed to launch with skiaGL canvas - Fixed
    • 899408 Fail to enable skiaGL canvas because white list checking
    • profiling "cut the rope" on mac and b2g
  • snorp
    • Issue on PowerVR is figured out
      • with non-power-of-2 texture we're copying to a power-of-two texture and then doing a readback
      • the copy was busted. Adding a flush fixes it
    • with that fix, plus fuzzying we pass tests
    • fuzzing is controversial
    • snorp is working on a gl test app to prove or disprove gl hardware munging colors
  • george
    • trying to get API trace working
    • investigating errors exposed by advanced blending demotion
  • bjacob
    • looking at enabling on b2g
    • mochitests on try, pretty good. A couple unexpected pass and a couple off-by-ones
    • on official canvas2d test suite, there is a color channel swapping error bug 899798
  • snorp to finish gl color munging test and we'll discuss on #gfx tomorrow


  • Travel to Skia/Google offices in North Carolina - Aug 5-7
  • peter
    • Memory usage of skiaGL on Bug 864222
      • Looks like fixed at m-c new rebase skia, will check the detail
    • Found the root cause of GL-rendering fps slow on bug 894847 (also happened to 2D canvas)
      • Was caused by async canvas update on b2g
    • Check any other skiaGL issues on B2G
  • snorp
    • pref'd on by default for tegra on android
    • next up is PowerVR bug 896670
  • george
    • new version of skiaGL doesn't support advanced compositing with ES2
  • bjacob
    • working on GL multipleing

Order of things to do:

  1. Fall back for operations we don't support (george)
  2. fix for non power of 2 (snorp)
  3. pref on for b2g (bjacob)
  4. GL multiplexing (bjacob)
  5. advanced compositing


  • snorp
    • landed
    • working on test failures to turn it on
    • we're OOM'ing on tegras
      • setting cache to 8 textures of 8MB makes things pass
      • we should set a small cache size for reftests
    • there are still a couple of failures, should be fuzzable
  • peter
    • looking at fishIE thrashing
    • backed out patch from bug 875555
  • put the skip-if in for the last failure in R2
  • fuzz the failure in R4 and 3 of the tests in R2
  • investigate the failure in R3 and the first failure in R2
  • fix skia-npapi


  • Snorp filed bugs on all mochitest failures
    • matt has patch for shadow failures, thought not a complete
    • snorp has patch for clip winding failures
    • composite failures are due to Skia not implementing advanced blend modes
  • George
    • working on a new rebase
    • image rendering tests are also failing
    • will evaluate new rebase to fix advanced renders
      • if more than a days worth of work, will land current rebase
      • otherwise we'll land the current rebase
      • either way the plan is to land this week
  • Peter
    • FishIE got better on Graphics branch
    • trying out Skia debug canvas
  • Benoit
    • found shutdown leak with valgrind
    • backed out the patch from matt woodrow
  • land current skia rebase tomorrow
  • image encoding failure we'll mark as fails


  • Peter
    • looked at wrong color space bug
    • fishIE tank
      • can see fish
      • b2g got 12 fps and the main thread was blocking by DrawTargetSkia::Flush
  • snorp
    • gal found a bunch of stuff
      • found a memory issue with locking and unlocking before returning the pointer, snorp pushed a patch for that
      • fishbowl slowed by texture cache (thrashing) making the cache size larger makes it better
    • looked at test failures
      • failed to talk to vlad
      • might need to move mochitests to reftests
    • Will schedule time with vlad and bjacob to figure out what we want to do with tests
  • george
    • getting us into a landable state
    • investigating a failure on a gradient test with software skia on windows
  • bjacob
    • refactoring ownership model
    • see notes for model
    • fixed memory leaks and crashes
      • bug 884034 Matt Woodrow thinks we're wallpapering over one of the bugs, require a different patch
    • webkit and skia initialize ref counts to 1, which is an impedance mismatch with gecko
  • next steps
    • snorp, vlad and bjacob to talk about test failures
      • snorp will arrange
    • george will get the graphics branch green
    • peter will look at the wrapping issue in fishIE
    • peter will use nexus 4 to compare chrome and gecko performance


  • George
    • did another rebase, not worth it
    • talked to bjacob about gl context ownership
    • fixed GrContext ownership and refcounting, will land now that it doesn't break tests
  • bjacob
  • snorp
  • peter
    • fix gl stream crash when skiaGL enabled
    • fix wrong colorspace (RB Swapped) when skiaGL and HWComposer enabled
    • Check gl errors from FishIE
  • next steps
    • George land everything on trunk, pref's off
      • ETA 1-2 weeks
      • George will make getting everything fixed on WinXP his priority
      • will hold off landing until merge day (June 24)
    • Snorp will look at gradient failures
    • Bjacob will work on implementing new ownership model
    • Peter will focus on FishIE perf


  • active work:
    • bjacob: draw target leak, valgrind
    • gw280: another leak, updated rebased branch to work with m-c, next is fixing intermittent ref test crash in FontHost
    • snorp: source surface patch, waiting for review, passes try; nexus 4 still has an issue; next, what is causing mochitest failures, there is some failing composite bugs, but only causes issues with SkiaGL. cache thebes surface? we don't anymore.
    • peter: integrate surface texture, opengl, skiagl, b2g is very slow, can't run on unagi
    • chiajung: opengl es3 spec for this week, learn how to implement webgl extensions for it
  • revisit the rebasing decision
    • sec-critical bug (use after free) fixed with the new version
    • can't do valgrind fixed with the new version
    • delta for mochitests is minimal between current and the August one
    • will use the graphics branch, try run tonight on all the make patches
  • when will we be done?
    • just have to fix the failing tests
    • Noah's Arc project should help us test on the supported Fennec phones
  • should we continue this meeting?
    • very useful when people show up
    • we will continue it every week
    • will remind people the day before
    • if too many people can't make it, we can cancel the meeting


  • George to land his rebase on a branch
  • please make bugs block the meta bug
  • Taipei to look at OOM on mochitests (snorp to send email)


  • We want to pick a version of Skia to develop against until we release
    • That will either be the current version on m-c or the version that George has rebased
    • Results of try run to make decision
  • George hopes to have font host up for review tonight
  • Peter looking at memory usage

Random Notes

ownership model

Before refactoring:

     _ _ _ _  CanvasRenderingContext2D
    /                |
    |                |
    V                |               regular Gecko stuff
                     |                    (libxul)
GLContext            |
    ^                |
    .                |
    .                |
    .                |
    .                V
    .          DrawTargetSkia              Moz2D
    .                |
    .                |
      .              |
       .             V
        . . . .  GrContext                 Skia

 1. GrContext has a raw pointer to the GLContext, but they live so far
    away it is hard to ensure that their lifespans match.
 2. The GLContext is an implementation detail so it is unfortunate to have
    the CanvasRenderingContext2D explicitly manage it. Should be abstracted
    behind the DrawTarget.

The plan we were discussing 1-2 weeks ago:

 1. Move the ownership of the GLContext to the DrawTarget, so that both it and
    the Skia stuff that references it, are managed by the DrawTarget, which
    makes it easier to ensure that their lifespans match.
 2. Other benefit: the GLContext is no longer directly exposed to the
    CanvasRenderingContext2D, it's now abstracted by the DrawTarget.

                     |               regular Gecko stuff
                     |                    (libxul)
               DrawTargetSkia ----> GLContext
                     |            .>
                     |          .
                     |       .
                     V     .
                 GrContext                 Skia

How we can get to this ideal world without breaking Moz2D's stand-alone characteristics:

* add GenericRefPtr / GenericRefCounted classes to MFBT with virtual AddRef / Release
  (no templates, just a single virtual class).
* Hack a way that DrawTarget's generic 'UserData' can be GenericRefCounted.
* The result then looks exactly like above diagram, without adding any extra dependency
  to Moz2D.

What we ended up doing:

Instead of directly referencing the GLContext, the GrContext only references the
DrawTargetSkia referencing it. In this way, the only raw pointer we have is just
walking back a strong reference. As planned, DrawTargetSkia references the GLContext
by means of a virtual base class, so no dependency is added to Moz2D.

     GLContext       |
         ^           |               regular Gecko stuff
         |           |                    (libxul)
         \           |
           \         |
            \        |
             \       |                   Moz2D
              \      |
               \     V
                  ^  |
                  .  |
                  .  |
                  .  V
                GrContext                 Skia