author Andrew Osmond <>
Tue, 29 May 2018 08:36:12 -0400
changeset 477002 c67a6f1315b49a4faeec778709ab0d3a956a57dd
parent 181244 a4769f7058da469537cc627e21f6528d26de5e25
permissions -rw-r--r--
Bug 1462355 - Part 5. Avoid converting from DrawableFrameRef to RawAccessFrameRef. r=tnikkel DrawableSurface only exposes DrawableFrameRef to its users. This is sufficient for the drawing related code in general, but FrameAnimator really needs RawAccessFrameRef to the underlying pixel data (which may be paletted). While one can get a RawAccessFrameRef from a DrawableFrameRef, it requires yet another lock of the imgFrame's mutex. We can avoid this extra lock if we just allow the callers to get the right data type in the first place.

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at

from __future__ import unicode_literals

import string

manifest_template = """# THIS FILE IS AUTOGENERATED BY ${caller} - DO NOT EDIT
support-files =


reftest_template = """# THIS FILE IS AUTOGENERATED BY ${caller} - DO NOT EDIT


def substManifest(caller, test_files, support_files):
    test_files = [f.lstrip('/') for f in test_files]
    support_files = [f.lstrip('/') for f in support_files]

    return string.Template(manifest_template).substitute({
        'caller': caller,
        'supportfiles': '\n'.join('  %s' % f for f in sorted(support_files)),
        'tests': '\n'.join('[%s]' % f for f in sorted(test_files))

def substReftestList(caller, tests):
    def reftests(tests):
        return "\n".join(" ".join(line) for line in tests)

    return string.Template(reftest_template).substitute({
        "caller": caller,
        "reftests": reftests(tests),