Ojan Vafai 6e6e9181de Remove PaintLayerPaintingOverflowContents.
It was added for compositing overflow:scroll, which we don't do.
This also means that only the RespectOverflowClip enum value is
used. And PaintingClipRectsIgnoringOverflowClip is unused.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/778753002
2014-12-03 19:09:56 -08:00

58 lines
1.3 KiB
C++

// 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 SKY_ENGINE_CORE_RENDERING_CLIPRECTSCACHE_H_
#define SKY_ENGINE_CORE_RENDERING_CLIPRECTSCACHE_H_
#include "sky/engine/core/rendering/ClipRects.h"
namespace blink {
enum ClipRectsCacheSlot {
// Relative to the ancestor treated as the root (e.g. transformed layer). Used for hit testing.
RootRelativeClipRects,
// Relative to the RenderView's layer. Used for compositing overlap testing.
AbsoluteClipRects,
// Relative to painting ancestor. Used for painting.
PaintingClipRects,
NumberOfClipRectsCacheSlots,
UncachedClipRects,
};
class ClipRectsCache {
WTF_MAKE_FAST_ALLOCATED;
public:
struct Entry {
Entry()
: root(0)
{
}
const RenderLayer* root;
RefPtr<ClipRects> clipRects;
};
Entry& get(ClipRectsCacheSlot slot)
{
ASSERT(slot < NumberOfClipRectsCacheSlots);
return m_entries[slot];
}
void clear(ClipRectsCacheSlot slot)
{
ASSERT(slot < NumberOfClipRectsCacheSlots);
m_entries[slot] = Entry();
}
private:
Entry m_entries[NumberOfClipRectsCacheSlots];
};
} // namespace blink
#endif // SKY_ENGINE_CORE_RENDERING_CLIPRECTSCACHE_H_