summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/rendering/compositing/CompositingInputsUpdater.h
blob: 49086287061df9766cfb62bf7f6db09629d8690d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CompositingInputsUpdater_h
#define CompositingInputsUpdater_h

#include "core/rendering/RenderGeometryMap.h"

namespace WebCore {

class RenderLayer;

class CompositingInputsUpdater {
private:
    struct AncestorInfo {
        AncestorInfo()
            : enclosingCompositedLayer(0)
            , ancestorScrollingLayer(0)
        {
        }

        RenderLayer* enclosingCompositedLayer;
        RenderLayer* ancestorScrollingLayer;
    };

public:
    explicit CompositingInputsUpdater(RenderLayer* rootRenderLayer);
    ~CompositingInputsUpdater();

    enum UpdateType {
        DoNotForceUpdate,
        ForceUpdate,
    };

    void update(RenderLayer*, UpdateType = DoNotForceUpdate, AncestorInfo = AncestorInfo());

#if ASSERT_ENABLED
    static void assertNeedsCompositingInputsUpdateBitsCleared(RenderLayer*);
#endif

private:
    RenderGeometryMap m_geometryMap;
    RenderLayer* m_rootRenderLayer;
};

} // namespace WebCore

#endif // CompositingInputsUpdater_h