diff options
Diffstat (limited to 'Source/WebKit/chromium/src/WebContentLayerImpl.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebContentLayerImpl.cpp | 47 |
1 files changed, 9 insertions, 38 deletions
diff --git a/Source/WebKit/chromium/src/WebContentLayerImpl.cpp b/Source/WebKit/chromium/src/WebContentLayerImpl.cpp index fa21e8974..69da1ea3f 100644 --- a/Source/WebKit/chromium/src/WebContentLayerImpl.cpp +++ b/Source/WebKit/chromium/src/WebContentLayerImpl.cpp @@ -26,66 +26,37 @@ #include "config.h" #include "WebContentLayerImpl.h" -#include "SkMatrix44.h" #include <public/WebContentLayerClient.h> -#include <public/WebFloatPoint.h> #include <public/WebFloatRect.h> #include <public/WebRect.h> -#include <public/WebSize.h> using namespace WebCore; namespace WebKit { -WebContentLayer* WebContentLayer::create(WebContentLayerClient* client) +PassRefPtr<WebContentLayerImpl> WebContentLayerImpl::create(WebContentLayerClient* contentClient) { - return new WebContentLayerImpl(client); + return adoptRef(new WebContentLayerImpl(contentClient)); } -WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* client) - : m_webLayerImpl(adoptPtr(new WebLayerImpl(ContentLayerChromium::create(this)))) - , m_client(client) +WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* contentClient) + : ContentLayerChromium(this) + , m_contentClient(contentClient) { - m_webLayerImpl->layer()->setIsDrawable(true); + setIsDrawable(true); } WebContentLayerImpl::~WebContentLayerImpl() { - static_cast<ContentLayerChromium*>(m_webLayerImpl->layer())->clearDelegate(); + clearDelegate(); } -WebLayer* WebContentLayerImpl::layer() -{ - return m_webLayerImpl.get(); -} - -void WebContentLayerImpl::setDoubleSided(bool doubleSided) -{ - m_webLayerImpl->layer()->setDoubleSided(doubleSided); -} - -void WebContentLayerImpl::setContentsScale(float scale) -{ - m_webLayerImpl->layer()->setContentsScale(scale); -} - -void WebContentLayerImpl::setUseLCDText(bool enable) -{ - m_webLayerImpl->layer()->setUseLCDText(enable); -} - -void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) -{ - m_webLayerImpl->layer()->setDrawCheckerboardForMissingTiles(enable); -} - - void WebContentLayerImpl::paintContents(SkCanvas* canvas, const IntRect& clip, FloatRect& opaque) { - if (!m_client) + if (!m_contentClient) return; WebFloatRect webOpaque; - m_client->paintContents(canvas, WebRect(clip), webOpaque); + m_contentClient->paintContents(canvas, WebRect(clip), webOpaque); opaque = webOpaque; } |