gfx/layers/moz.build
author jdashg <jdashg+github@gmail.com>
Tue, 07 Oct 2014 21:11:54 -0700
changeset 233106 66f8715610050f9fc67c0190e7e7e3c8cd154ca8
parent 230726 0edd9d046fd1f3de02a839122c188599a8e36328
child 233324 d56d0157891e97004f6a55b7000a5883917dae77
child 235056 6ddd4cc9a274c26db992b8ba5452156278bd15f6
permissions -rw-r--r--
Bug 1066280 - Fixes. - r=kamidphish,mattwoodrow From 4e9f52ab105333e8b1120342e9583b2d833a4465 Mon Sep 17 00:00:00 2001 --- dom/canvas/WebGLContext.cpp | 10 +++++-- gfx/gl/GLContext.cpp | 20 -------------- gfx/gl/GLContext.h | 3 -- gfx/gl/GLReadTexImageHelper.cpp | 5 +++- gfx/gl/GLScreenBuffer.cpp | 13 +++++++-- gfx/gl/GLUploadHelpers.cpp | 27 ++++++++++++++++++ gfx/gl/SharedSurfaceGralloc.cpp | 14 ++++------ gfx/gl/SharedSurfaceGralloc.h | 10 +++++-- gfx/gl/SurfaceTypes.cpp | 2 ++ gfx/gl/SurfaceTypes.h | 1 + gfx/layers/client/CanvasClient.cpp | 44 ++++++++++++++++++------------ gfx/layers/client/CanvasClient.h | 8 +++--- gfx/layers/client/ClientCanvasLayer.cpp | 6 ++++ gfx/layers/client/ClientCanvasLayer.h | 2 +- gfx/layers/client/TextureClient.cpp | 11 ++++---- gfx/layers/client/TextureClient.h | 6 ++-- gfx/layers/composite/TextureHost.cpp | 15 +++++----- gfx/layers/composite/TextureHost.h | 10 +++---- gfx/layers/d3d10/CanvasLayerD3D10.cpp | 9 ++++-- gfx/layers/d3d9/CanvasLayerD3D9.cpp | 8 ++++-- gfx/layers/ipc/LayersSurfaces.ipdlh | 4 +-- gfx/layers/moz.build | 4 ++- gfx/layers/opengl/GrallocTextureClient.cpp | 26 +++++++++++++++++- gfx/layers/opengl/GrallocTextureClient.h | 3 ++ 24 files changed, 171 insertions(+), 90 deletions(-)

# -*- Mode: python; c-basic-offset: 4; 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/.

EXPORTS += [
    'basic/BasicCanvasLayer.h',
    'basic/BasicImplData.h',
    'basic/BasicLayers.h',
    'basic/BasicLayersImpl.h',
    'basic/BasicPaintedLayer.h',
    'client/ClientCanvasLayer.h',
    'client/ClientContainerLayer.h',
    'client/ClientLayerManager.h',
    'client/ClientPaintedLayer.h',
    'client/ClientTiledPaintedLayer.h',
    'composite/CompositableHost.h',
    'composite/ImageHost.h',
    'CompositorTypes.h',
    'CopyableCanvasLayer.h',
    'D3D9SurfaceImage.h',
    'FrameMetrics.h',
    'GLImages.h',
    'GrallocImages.h',
    'ImageContainer.h',
    'ImageLayers.h',
    'ImageTypes.h',
    'ipc/CompositorChild.h',
    'ipc/CompositorParent.h',
    'ipc/ShadowLayersManager.h',
    'ipc/ThreadSafeRefcountingWithMainThreadDestruction.h',
    'Layers.h',
    'LayerScope.h',
    'LayersLogging.h',
    'LayerSorter.h',
    'LayersTypes.h',
    'LayerTreeInvalidation.h',
    'opengl/Composer2D.h',
    'opengl/OGLShaderProgram.h',
    'opengl/TexturePoolOGL.h',
    'protobuf/LayerScopePacket.pb.h',
    'ReadbackLayer.h',
    'TiledLayerBuffer.h',
]

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
    UNIFIED_SOURCES += [
        'D3D9SurfaceImage.cpp',
        'TextureDIB.cpp',
    ]
    EXPORTS.mozilla.layers += [
        'TextureDIB.h',
    ]
    if CONFIG['MOZ_ENABLE_D3D9_LAYER']:
        EXPORTS += [
            'd3d9/DeviceManagerD3D9.h',
            'd3d9/LayerManagerD3D9.h',
        ]
        EXPORTS.mozilla.layers += [
            'd3d9/CompositorD3D9.h',
            'd3d9/TextureD3D9.h',
        ]
        UNIFIED_SOURCES += [
            'd3d9/CanvasLayerD3D9.cpp',
            'd3d9/ColorLayerD3D9.cpp',
            'd3d9/ContainerLayerD3D9.cpp',
            'd3d9/ImageLayerD3D9.cpp',
            'd3d9/LayerManagerD3D9.cpp',
            'd3d9/PaintedLayerD3D9.cpp',
            'd3d9/TextureD3D9.cpp',
        ]
        SOURCES += [
            'd3d9/CompositorD3D9.cpp',
            'd3d9/DeviceManagerD3D9.cpp',
            'd3d9/Nv3DVUtils.cpp',
        ]
    if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
        EXPORTS += [
            'd3d10/LayerManagerD3D10.h',
            'd3d10/ReadbackManagerD3D10.h',
        ]
        EXPORTS.mozilla.layers += [
            'd3d11/CompositorD3D11.h',
            'd3d11/ReadbackManagerD3D11.h',
            'd3d11/TextureD3D11.h',
            'ipc/ShadowLayerUtilsD3D10.h',
        ]
        UNIFIED_SOURCES += [
            'd3d10/CanvasLayerD3D10.cpp',
            'd3d10/ColorLayerD3D10.cpp',
            'd3d10/ContainerLayerD3D10.cpp',
            'd3d10/ImageLayerD3D10.cpp',
            'd3d10/LayerManagerD3D10.cpp',
            'd3d10/PaintedLayerD3D10.cpp',
            'd3d10/ReadbackManagerD3D10.cpp',
            'd3d11/TextureD3D11.cpp',
            'ipc/ShadowLayerUtilsD3D10.cpp',
        ]
        SOURCES += [
            'd3d11/CompositorD3D11.cpp',
            'd3d11/ReadbackManagerD3D11.cpp',
        ]
        if CONFIG['MOZ_ENABLE_DIRECT2D1_1']:
            DEFINES['USE_D2D1_1'] = True

EXPORTS.gfxipc += [
    'ipc/ShadowLayerUtils.h',
]

EXPORTS.mozilla.layers += [
    'apz/public/GeckoContentController.h',
    # exporting things from apz/src is temporary until we extract a
    # proper interface for the code there
    'apz/src/APZCTreeManager.h',
    'apz/src/AsyncPanZoomController.h',
    'apz/src/Axis.h',
    'apz/src/GestureEventListener.h',
    'apz/src/TaskThrottler.h',
    'apz/testutil/APZTestData.h',
    'apz/util/ActiveElementManager.h',
    'apz/util/APZCCallbackHelper.h',
    'AtomicRefCountedWithFinalize.h',
    'AxisPhysicsModel.h',
    'AxisPhysicsMSDModel.h',
    'basic/BasicCompositor.h',
    'basic/MacIOSurfaceTextureHostBasic.h',
    'basic/TextureHostBasic.h',
    'client/CanvasClient.h',
    'client/CompositableClient.h',
    'client/ContentClient.h',
    'client/ImageClient.h',
    'client/TextureClient.h',
    'client/TextureClientPool.h',
    'client/TiledContentClient.h',
    'composite/AsyncCompositionManager.h',
    'composite/CanvasLayerComposite.h',
    'composite/ColorLayerComposite.h',
    'composite/ContainerLayerComposite.h',
    'composite/ContentHost.h',
    'composite/ImageHost.h',
    'composite/ImageLayerComposite.h',
    'composite/LayerManagerComposite.h',
    'composite/PaintedLayerComposite.h',
    'composite/TextureHost.h',
    'Compositor.h',
    'CompositorTypes.h',
    'D3D9SurfaceImage.h',
    'Effects.h',
    'ImageDataSerializer.h',
    'ipc/AsyncTransactionTracker.h',
    'ipc/CompositableForwarder.h',
    'ipc/CompositableTransactionParent.h',
    'ipc/CompositorChild.h',
    'ipc/CompositorParent.h',
    'ipc/FenceUtils.h',
    'ipc/ImageBridgeChild.h',
    'ipc/ImageBridgeParent.h',
    'ipc/ISurfaceAllocator.h',
    'ipc/LayerTransactionChild.h',
    'ipc/LayerTransactionParent.h',
    'ipc/ShadowLayers.h',
    'ipc/ShadowLayersManager.h',
    'ipc/SharedBufferManagerChild.h',
    'ipc/SharedBufferManagerParent.h',
    'ipc/SharedPlanarYCbCrImage.h',
    'ipc/SharedRGBImage.h',
    'LayerMetricsWrapper.h',
    'LayersTypes.h',
    'opengl/CompositingRenderTargetOGL.h',
    'opengl/CompositorOGL.h',
    'opengl/GrallocTextureClient.h',
    'opengl/GrallocTextureHost.h',
    'opengl/MacIOSurfaceTextureClientOGL.h',
    'opengl/MacIOSurfaceTextureHostOGL.h',
    'opengl/TextureClientOGL.h',
    'opengl/TextureHostOGL.h',
    'RenderTrace.h',
    'TransactionIdAllocator.h',
    'YCbCrImageDataSerializer.h',
]

if CONFIG['MOZ_X11']:
    EXPORTS.mozilla.layers += [
        'basic/TextureClientX11.h',
        'basic/X11TextureSourceBasic.h',
        'composite/X11TextureHost.h',
        'ipc/ShadowLayerUtilsX11.h',
        'opengl/X11TextureSourceOGL.h',
    ]
    SOURCES += [
        'basic/TextureClientX11.cpp',
        'basic/X11BasicCompositor.cpp',
        'basic/X11TextureSourceBasic.cpp',
        'composite/X11TextureHost.cpp',
        'ipc/ShadowLayerUtilsX11.cpp',
        'opengl/X11TextureSourceOGL.cpp',
    ]

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    EXPORTS.mozilla.layers += [
        'opengl/GLManager.h',
    ]
    EXPORTS += [
        'MacIOSurfaceImage.h',
    ]
    UNIFIED_SOURCES += [
        'opengl/GLManager.cpp',
    ]
    SOURCES += [
        'ipc/ShadowLayerUtilsMac.cpp',
        'MacIOSurfaceImage.cpp',
    ]

# NB: Gralloc is available on other platforms that use the android GL
# libraries, but only Gonk is able to use it reliably because Gecko
# has full system permissions there.
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
    EXPORTS.mozilla.layers += [
        'ipc/ShadowLayerUtilsGralloc.h',
    ]
    UNIFIED_SOURCES += [
        'GrallocImages.cpp',
        'opengl/EGLImageHelpers.cpp',
        'opengl/GrallocTextureClient.cpp',
        'opengl/GrallocTextureHost.cpp',
    ]
    LOCAL_INCLUDES += ['/widget/gonk']
    SOURCES += [
        'ipc/ShadowLayerUtilsGralloc.cpp',
    ]

    if CONFIG['ANDROID_VERSION'] >= '17':
        EXPORTS.mozilla.layers += [
            'ipc/FenceUtilsGonk.h',
        ]
        SOURCES += [
            'ipc/FenceUtilsGonk.cpp',
        ]

UNIFIED_SOURCES += [
    'apz/src/APZCTreeManager.cpp',
    'apz/src/AsyncPanZoomController.cpp',
    'apz/src/Axis.cpp',
    'apz/src/GestureEventListener.cpp',
    'apz/src/InputBlockState.cpp',
    'apz/src/OverscrollHandoffState.cpp',
    'apz/src/TaskThrottler.cpp',
    'apz/testutil/APZTestData.cpp',
    'apz/util/ActiveElementManager.cpp',
    'apz/util/APZCCallbackHelper.cpp',
    'AxisPhysicsModel.cpp',
    'AxisPhysicsMSDModel.cpp',
    'basic/BasicCanvasLayer.cpp',
    'basic/BasicColorLayer.cpp',
    'basic/BasicCompositor.cpp',
    'basic/BasicContainerLayer.cpp',
    'basic/BasicImages.cpp',
    'basic/BasicLayerManager.cpp',
    'basic/BasicLayersImpl.cpp',
    'basic/BasicPaintedLayer.cpp',
    'basic/TextureHostBasic.cpp',
    'BufferUnrotate.cpp',
    'client/CanvasClient.cpp',
    'client/ClientCanvasLayer.cpp',
    'client/ClientColorLayer.cpp',
    'client/ClientContainerLayer.cpp',
    'client/ClientImageLayer.cpp',
    'client/ClientLayerManager.cpp',
    'client/ClientPaintedLayer.cpp',
    'client/ClientTiledPaintedLayer.cpp',
    'client/CompositableClient.cpp',
    'client/ContentClient.cpp',
    'client/ImageClient.cpp',
    'client/TextureClient.cpp',
    'client/TextureClientPool.cpp',
    'client/TiledContentClient.cpp',
    'composite/AsyncCompositionManager.cpp',
    'composite/CanvasLayerComposite.cpp',
    'composite/ColorLayerComposite.cpp',
    'composite/CompositableHost.cpp',
    'composite/ContainerLayerComposite.cpp',
    'composite/ContentHost.cpp',
    'composite/FPSCounter.cpp',
    'composite/ImageHost.cpp',
    'composite/ImageLayerComposite.cpp',
    'composite/LayerManagerComposite.cpp',
    'composite/PaintedLayerComposite.cpp',
    'composite/TextRenderer.cpp',
    'composite/TextureHost.cpp',
    'composite/TiledContentHost.cpp',
    'Compositor.cpp',
    'CopyableCanvasLayer.cpp',
    'Effects.cpp',
    'ImageDataSerializer.cpp',
    'ImageLayers.cpp',
    'ipc/AsyncTransactionTracker.cpp',
    'ipc/CompositableTransactionParent.cpp',
    'ipc/CompositorBench.cpp',
    'ipc/CompositorChild.cpp',
    'ipc/CompositorParent.cpp',
    'ipc/ImageBridgeChild.cpp',
    'ipc/ImageBridgeParent.cpp',
    'ipc/ISurfaceAllocator.cpp',
    'ipc/LayerTransactionChild.cpp',
    'ipc/LayerTransactionParent.cpp',
    'ipc/ShadowLayerChild.cpp',
    'ipc/ShadowLayerParent.cpp',
    'ipc/ShadowLayers.cpp',
    'ipc/SharedBufferManagerChild.cpp',
    'ipc/SharedBufferManagerParent.cpp',
    'ipc/SharedPlanarYCbCrImage.cpp',
    'ipc/SharedRGBImage.cpp',
    'LayerScope.cpp',
    'LayersLogging.cpp',
    'LayerSorter.cpp',
    'opengl/CompositingRenderTargetOGL.cpp',
    'opengl/CompositorOGL.cpp',
    'opengl/OGLShaderProgram.cpp',
    'opengl/TextureClientOGL.cpp',
    'opengl/TextureHostOGL.cpp',
    'opengl/TexturePoolOGL.cpp',
    'protobuf/LayerScopePacket.pb.cc',
    'ReadbackProcessor.cpp',
    'RenderTrace.cpp',
    'RotatedBuffer.cpp',
    'YCbCrImageDataSerializer.cpp',
]

SOURCES += [
    'basic/BasicImageLayer.cpp',
    'ImageContainer.cpp',
    'Layers.cpp',
    'LayerTreeInvalidation.cpp',
]

# Disable RTTI in google protocol buffer
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True

# Workaround compiler bug (Bug 795594)
if CONFIG['_MSC_VER'] and CONFIG['CPU_ARCH'] == 'x86_64':
    for src in [
        'Layers.cpp',
        'LayerTreeInvalidation.cpp',
    ]:
        SOURCES[src].no_pgo = True

if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    SOURCES += [
        'basic/MacIOSurfaceTextureHostBasic.cpp',
        'opengl/MacIOSurfaceTextureClientOGL.cpp',
        'opengl/MacIOSurfaceTextureHostOGL.cpp',
    ]

IPDL_SOURCES = [
    'ipc/LayersMessages.ipdlh',
    'ipc/LayersSurfaces.ipdlh',
    'ipc/PCompositable.ipdl',
    'ipc/PCompositor.ipdl',
    'ipc/PImageBridge.ipdl',
    'ipc/PLayer.ipdl',
    'ipc/PLayerTransaction.ipdl',
    'ipc/PSharedBufferManager.ipdl',
    'ipc/PTexture.ipdl',
]

FAIL_ON_WARNINGS = True

MSVC_ENABLE_PGO = True

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

FINAL_LIBRARY = 'xul'

if CONFIG['MOZ_DEBUG']:
    DEFINES['D3D_DEBUG_INFO'] = True

if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
    DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True

GENERATED_FILES = [
    'PremultiplyTables.h',
]

CXXFLAGS += [
    '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
        'frameworks/base/include/media/stagefright',
        'frameworks/base/include/media/stagefright/openmax',
        'frameworks/av/include/media/stagefright',
        'frameworks/native/include/media/openmax',
    ]
]

MOCHITEST_MANIFESTS += ['apz/test/mochitest.ini']

CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['TK_CFLAGS']