| Index: Source/platform/graphics/paint/DisplayItemCacheSkipper.h
|
| diff --git a/Source/platform/graphics/paint/DisplayItemCacheSkipper.h b/Source/platform/graphics/paint/DisplayItemCacheSkipper.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b8d24fd1a7077eff32e32496f026a86b5fd1c76c
|
| --- /dev/null
|
| +++ b/Source/platform/graphics/paint/DisplayItemCacheSkipper.h
|
| @@ -0,0 +1,34 @@
|
| +// Copyright 2015 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 DisplayItemCacheSkipper_h
|
| +#define DisplayItemCacheSkipper_h
|
| +
|
| +#include "platform/RuntimeEnabledFeatures.h"
|
| +#include "platform/graphics/GraphicsContext.h"
|
| +#include "platform/graphics/paint/DisplayItemList.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class DisplayItemCacheSkipper {
|
| +public:
|
| + DisplayItemCacheSkipper(GraphicsContext& context)
|
| + : m_context(context)
|
| + {
|
| + if (RuntimeEnabledFeatures::slimmingPaintEnabled())
|
| + context.displayItemList()->beginSkippingCache();
|
| + }
|
| + ~DisplayItemCacheSkipper()
|
| + {
|
| + if (RuntimeEnabledFeatures::slimmingPaintEnabled())
|
| + m_context.displayItemList()->endSkippingCache();
|
| + }
|
| +
|
| +private:
|
| + GraphicsContext& m_context;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // DisplayItemCacheSkipper_h
|
|
|