X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fplatform%2Fgraphics%2Ffilters%2FSourceGraphic.cpp;h=b5bf6c37922adf604125622b4abb8dcef0f28dbc;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=f9c1195e5bced226bc08432a8ab36c0c2b6d28e8;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/platform/graphics/filters/SourceGraphic.cpp b/src/third_party/WebKit/Source/platform/graphics/filters/SourceGraphic.cpp index f9c1195..b5bf6c3 100644 --- a/src/third_party/WebKit/Source/platform/graphics/filters/SourceGraphic.cpp +++ b/src/third_party/WebKit/Source/platform/graphics/filters/SourceGraphic.cpp @@ -24,10 +24,11 @@ #include "platform/graphics/GraphicsContext.h" #include "platform/text/TextStream.h" +#include "third_party/skia/include/effects/SkPictureImageFilter.h" #include "wtf/StdLibExtras.h" #include "wtf/text/WTFString.h" -namespace WebCore { +namespace blink { PassRefPtr SourceGraphic::create(Filter* filter) { @@ -62,6 +63,19 @@ void SourceGraphic::applySoftware() } } +void SourceGraphic::setDisplayList(PassRefPtr displayList) +{ + m_displayList = displayList; +} + +PassRefPtr SourceGraphic::createImageFilter(SkiaImageFilterBuilder*) +{ + if (!m_displayList) + return nullptr; + + return adoptRef(SkPictureImageFilter::Create(m_displayList->picture(), m_displayList->bounds())); +} + TextStream& SourceGraphic::externalRepresentation(TextStream& ts, int indent) const { writeIndent(ts, indent); @@ -69,4 +83,4 @@ TextStream& SourceGraphic::externalRepresentation(TextStream& ts, int indent) co return ts; } -} // namespace WebCore +} // namespace blink