gecko-dev/gfx/layers/wr/ScrollingLayersHelper.h
Kartikaya Gupta 65a82350c5 Bug 1372912 - Extract a PushLayerClip helper method. r=jrmuizel
No functional changes. We'll want to reuse this code in a future patch.

MozReview-Commit-ID: LEuP38yXBHI

--HG--
extra : rebase_source : 11faa0123e987c255dd7495e4b704346ab2b714d
2017-06-15 17:02:12 -04:00

45 lines
1.1 KiB
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* 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/. */
#ifndef GFX_SCROLLINGLAYERSHELPER_H
#define GFX_SCROLLINGLAYERSHELPER_H
#include "mozilla/Attributes.h"
namespace mozilla {
namespace wr {
class DisplayListBuilder;
}
namespace layers {
struct LayerClip;
class StackingContextHelper;
class WebRenderLayer;
class MOZ_RAII ScrollingLayersHelper
{
public:
ScrollingLayersHelper(WebRenderLayer* aLayer,
wr::DisplayListBuilder& aBuilder,
const StackingContextHelper& aSc);
~ScrollingLayersHelper();
private:
void PushLayerLocalClip(const StackingContextHelper& aStackingContext);
void PushLayerClip(const LayerClip& aClip,
const StackingContextHelper& aSc);
WebRenderLayer* mLayer;
wr::DisplayListBuilder* mBuilder;
bool mPushedLayerLocalClip;
};
} // namespace layers
} // namespace mozilla
#endif