| Index: Source/core/paint/TransparencyDisplayItem.cpp
|
| diff --git a/Source/core/paint/TransparencyDisplayItem.cpp b/Source/core/paint/TransparencyDisplayItem.cpp
|
| index 77605749f74b035fee3a09e5c0dd1def7c8bb693..01cb5570b637db2cf7a72b3e8f3b7be96fcbd753 100644
|
| --- a/Source/core/paint/TransparencyDisplayItem.cpp
|
| +++ b/Source/core/paint/TransparencyDisplayItem.cpp
|
| @@ -5,6 +5,9 @@
|
| #include "config.h"
|
| #include "core/paint/TransparencyDisplayItem.h"
|
|
|
| +#include "core/rendering/RenderObject.h"
|
| +#include "core/rendering/RenderView.h"
|
| +#include "platform/RuntimeEnabledFeatures.h"
|
| #include "platform/graphics/GraphicsContext.h"
|
|
|
| namespace blink {
|
| @@ -51,4 +54,25 @@ WTF::String EndTransparencyDisplayItem::asDebugString() const
|
| }
|
| #endif
|
|
|
| +TransparencyRecorder::TransparencyRecorder(GraphicsContext* graphicsContext, const RenderObject* renderer, DisplayItem::Type type, const LayoutRect& clipRect, const WebBlendMode& blendMode, const float opacity)
|
| + : m_renderer(renderer)
|
| + , m_type(type)
|
| + , m_graphicsContext(graphicsContext)
|
| +{
|
| + OwnPtr<BeginTransparencyDisplayItem> beginTransparencyDisplayItem = adoptPtr(new BeginTransparencyDisplayItem(renderer, type, clipRect, blendMode, opacity));
|
| + if (RuntimeEnabledFeatures::slimmingPaintEnabled())
|
| + renderer->view()->viewDisplayList().add(beginTransparencyDisplayItem.release());
|
| + else
|
| + beginTransparencyDisplayItem->replay(graphicsContext);
|
| +}
|
| +
|
| +TransparencyRecorder::~TransparencyRecorder()
|
| +{
|
| + OwnPtr<EndTransparencyDisplayItem> endTransparencyDisplayItem = adoptPtr(new EndTransparencyDisplayItem(m_renderer, m_type));
|
| + if (RuntimeEnabledFeatures::slimmingPaintEnabled())
|
| + m_renderer->view()->viewDisplayList().add(endTransparencyDisplayItem.release());
|
| + else
|
| + endTransparencyDisplayItem->replay(m_graphicsContext);
|
| +}
|
| +
|
| } // namespace blink
|
|
|