summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebContentLayerImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/src/WebContentLayerImpl.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebContentLayerImpl.cpp47
1 files changed, 38 insertions, 9 deletions
diff --git a/Source/WebKit/chromium/src/WebContentLayerImpl.cpp b/Source/WebKit/chromium/src/WebContentLayerImpl.cpp
index 69da1ea3f..fa21e8974 100644
--- a/Source/WebKit/chromium/src/WebContentLayerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebContentLayerImpl.cpp
@@ -26,37 +26,66 @@
#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 {
-PassRefPtr<WebContentLayerImpl> WebContentLayerImpl::create(WebContentLayerClient* contentClient)
+WebContentLayer* WebContentLayer::create(WebContentLayerClient* client)
{
- return adoptRef(new WebContentLayerImpl(contentClient));
+ return new WebContentLayerImpl(client);
}
-WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* contentClient)
- : ContentLayerChromium(this)
- , m_contentClient(contentClient)
+WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* client)
+ : m_webLayerImpl(adoptPtr(new WebLayerImpl(ContentLayerChromium::create(this))))
+ , m_client(client)
{
- setIsDrawable(true);
+ m_webLayerImpl->layer()->setIsDrawable(true);
}
WebContentLayerImpl::~WebContentLayerImpl()
{
- clearDelegate();
+ static_cast<ContentLayerChromium*>(m_webLayerImpl->layer())->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_contentClient)
+ if (!m_client)
return;
WebFloatRect webOpaque;
- m_contentClient->paintContents(canvas, WebRect(clip), webOpaque);
+ m_client->paintContents(canvas, WebRect(clip), webOpaque);
opaque = webOpaque;
}