image/test/gtest/moz.build
author Andrew Osmond <aosmond@mozilla.com>
Fri, 02 Nov 2018 15:28:17 -0400
changeset 500768 5fb87d2312ea4881026ecaac6488fbdc2e4a7725
parent 500315 25aa97e7d1062b21a84f3acb950859de09f40533
child 501284 1262664295ff6c471a0515b64a57b56d3c57b6ee
permissions -rw-r--r--
Bug 1504237 - Ensure partial animated frames always use BGRA instead of BGRX. r=tnikkel For decoders which produce unpaletted partial frames (APNG, WebP), the surface format should always be BGRA. These frames while partial, are the same size as the output size of the animated image. When FrameAnimator performs the blend with the compositing frame, it expects all pixels we don't care about to be set to fully transparent. If it is BGRX, they will be set to solid white instead. Differential Revision: https://phabricator.services.mozilla.com/D10753

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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 http://mozilla.org/MPL/2.0/.

Library('imagetest')

UNIFIED_SOURCES = [
    'Common.cpp',
    'TestADAM7InterpolatingFilter.cpp',
    'TestAnimationFrameBuffer.cpp',
    'TestBlendAnimationFilter.cpp',
    'TestContainers.cpp',
    'TestCopyOnWrite.cpp',
    'TestDecoders.cpp',
    'TestDecodeToSurface.cpp',
    'TestDeinterlacingFilter.cpp',
    'TestFrameAnimator.cpp',
    'TestLoader.cpp',
    'TestMetadata.cpp',
    'TestRemoveFrameRectFilter.cpp',
    'TestSourceBuffer.cpp',
    'TestStreamingLexer.cpp',
    'TestSurfaceCache.cpp',
    'TestSurfaceSink.cpp',
]

if CONFIG['MOZ_ENABLE_SKIA']:
    UNIFIED_SOURCES += [
        'TestDownscalingFilter.cpp',
        'TestSurfacePipeIntegration.cpp',
    ]

SOURCES += [
    # Can't be unified because it manipulates the preprocessor environment.
    'TestDownscalingFilterNoSkia.cpp',
]

TEST_HARNESS_FILES.gtest += [
    'animated-with-extra-image-sub-blocks.gif',
    'blend.gif',
    'blend.png',
    'blend.webp',
    'corrupt-with-bad-bmp-height.ico',
    'corrupt-with-bad-bmp-width.ico',
    'corrupt-with-bad-ico-bpp.ico',
    'corrupt.jpg',
    'downscaled.bmp',
    'downscaled.gif',
    'downscaled.ico',
    'downscaled.icon',
    'downscaled.jpg',
    'downscaled.png',
    'downscaled.webp',
    'first-frame-green.gif',
    'first-frame-green.png',
    'first-frame-green.webp',
    'first-frame-padding.gif',
    'green-1x1-truncated.gif',
    'green-large-bmp.ico',
    'green-large-png.ico',
    'green-multiple-sizes.ico',
    'green.bmp',
    'green.gif',
    'green.icc_srgb.webp',
    'green.ico',
    'green.icon',
    'green.jpg',
    'green.png',
    'green.webp',
    'invalid-truncated-metadata.bmp',
    'no-frame-delay.gif',
    'rle4.bmp',
    'rle8.bmp',
    'transparent-ico-with-and-mask.ico',
    'transparent-if-within-ico.bmp',
    'transparent.gif',
    'transparent.png',
]

include('/ipc/chromium/chromium-config.mozbuild')

LOCAL_INCLUDES += [
    '/dom/base',
    '/gfx/2d',
    '/image',
]

LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']

FINAL_LIBRARY = 'xul-gtest'

if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
    CXXFLAGS += ['-Wno-error=shadow']