author Ted Mielczarek <>
Fri, 06 Jan 2017 05:57:10 -0500
changeset 328603 dedf4f49b3756b09986e78dc5519a291b81f133f
parent 288578 77d65c5c24227ef7524552b8559f289b19fdca65
child 367404 e21a77cab74059d05ab1b4aa2c2c306cdc83d752
permissions -rw-r--r--
bug 1329320 - replace makecab with rust-makecab in symbolstore. r=gps It turns out that running makecab to compress PDB files takes a significant amount of time in the buildsymbols step. I wrote an implementation of makecab in Rust that implements only the subset of features we use and it's significantly faster: This patch adds a makecab check to moz.configure, adds a release build of the makecab binary to the Windows tooltool manifests, points the build at it from, and changes to use MAKECAB from substs instead of calling `makecab.exe` directly. MozReview-Commit-ID: 76FHLIZFCXS

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:set ts=4 sw=4 sts=4 et: */
/* 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 */


#include <stdint.h>
#include <mozilla/UniquePtr.h>
#include "gfxMatrix.h"

namespace mozilla {

namespace gl { class GLContext; }

namespace layers {

namespace layerscope { class Packet; }

struct EffectChain;
class LayerComposite;
class TextureHost;

class LayerScope {
    static void DrawBegin();
    static void SetRenderOffset(float aX, float aY);
    static void SetLayerTransform(const gfx::Matrix4x4& aMatrix);
    static void SetDrawRects(size_t aRects,
                             const gfx::Rect* aLayerRects,
                             const gfx::Rect* aTextureRects);
    static void DrawEnd(gl::GLContext* aGLContext,
                        const EffectChain& aEffectChain,
                        int aWidth,
                        int aHeight);

    static void SendLayer(LayerComposite* aLayer,
                          int aWidth,
                          int aHeight);
    static void SendLayerDump(UniquePtr<layerscope::Packet> aPacket);
    static bool CheckSendable();
    static void CleanLayer();
    static void SetHWComposed();

    static void SetPixelScale(double devPixelsPerCSSPixel);
    static void ContentChanged(TextureHost *host);
    static void Init();

// Perform BeginFrame and EndFrame automatically
class LayerScopeAutoFrame {
    explicit LayerScopeAutoFrame(int64_t aFrameStamp);

    static void BeginFrame(int64_t aFrameStamp);
    static void EndFrame();

} // namespace layers
} // namespace mozilla

#endif /* GFX_LAYERSCOPE_H */