| Index: webkit/compositor_bindings/WebLayerTreeViewImpl.cpp
|
| diff --git a/webkit/compositor_bindings/WebLayerTreeViewImpl.cpp b/webkit/compositor_bindings/WebLayerTreeViewImpl.cpp
|
| index d4f455d1ec411f450356bf40581915a66dcec134..237d9f375325b9c0382910b6afac3cbf54e5a21e 100644
|
| --- a/webkit/compositor_bindings/WebLayerTreeViewImpl.cpp
|
| +++ b/webkit/compositor_bindings/WebLayerTreeViewImpl.cpp
|
| @@ -11,6 +11,7 @@
|
| #include "LayerChromium.h"
|
| #include "WebLayerImpl.h"
|
| #include "WebToCCInputHandlerAdapter.h"
|
| +#include "webcore_convert.h"
|
| #include <public/WebGraphicsContext3D.h>
|
| #include <public/WebInputHandler.h>
|
| #include <public/WebLayer.h>
|
| @@ -50,8 +51,8 @@ bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSetti
|
| settings.showPaintRects = webSettings.showPaintRects;
|
| settings.renderVSyncEnabled = webSettings.renderVSyncEnabled;
|
| settings.refreshRate = webSettings.refreshRate;
|
| - settings.defaultTileSize = webSettings.defaultTileSize;
|
| - settings.maxUntiledLayerSize = webSettings.maxUntiledLayerSize;
|
| + settings.defaultTileSize = convert(webSettings.defaultTileSize);
|
| + settings.maxUntiledLayerSize = convert(webSettings.maxUntiledLayerSize);
|
| m_layerTreeHost = CCLayerTreeHost::create(this, settings);
|
| if (!m_layerTreeHost)
|
| return false;
|
| @@ -76,19 +77,19 @@ void WebLayerTreeViewImpl::clearRootLayer()
|
| void WebLayerTreeViewImpl::setViewportSize(const WebSize& layoutViewportSize, const WebSize& deviceViewportSize)
|
| {
|
| if (!deviceViewportSize.isEmpty())
|
| - m_layerTreeHost->setViewportSize(layoutViewportSize, deviceViewportSize);
|
| + m_layerTreeHost->setViewportSize(convert(layoutViewportSize), convert(deviceViewportSize));
|
| else
|
| - m_layerTreeHost->setViewportSize(layoutViewportSize, layoutViewportSize);
|
| + m_layerTreeHost->setViewportSize(convert(layoutViewportSize), convert(layoutViewportSize));
|
| }
|
|
|
| WebSize WebLayerTreeViewImpl::layoutViewportSize() const
|
| {
|
| - return WebSize(m_layerTreeHost->layoutViewportSize());
|
| + return convert(m_layerTreeHost->layoutViewportSize());
|
| }
|
|
|
| WebSize WebLayerTreeViewImpl::deviceViewportSize() const
|
| {
|
| - return WebSize(m_layerTreeHost->deviceViewportSize());
|
| + return convert(m_layerTreeHost->deviceViewportSize());
|
| }
|
|
|
| void WebLayerTreeViewImpl::setDeviceScaleFactor(const float deviceScaleFactor)
|
| @@ -156,7 +157,7 @@ void WebLayerTreeViewImpl::updateAnimations(double frameBeginTime)
|
|
|
| bool WebLayerTreeViewImpl::compositeAndReadback(void *pixels, const WebRect& rect)
|
| {
|
| - return m_layerTreeHost->compositeAndReadback(pixels, rect);
|
| + return m_layerTreeHost->compositeAndReadback(pixels, convert(rect));
|
| }
|
|
|
| void WebLayerTreeViewImpl::finishAllRendering()
|
| @@ -180,7 +181,7 @@ void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectT
|
| {
|
| IntRect asciiToRectTable[128];
|
| for (int i = 0; i < 128; ++i)
|
| - asciiToRectTable[i] = asciiToWebRectTable[i];
|
| + asciiToRectTable[i] = convert(asciiToWebRectTable[i]);
|
| OwnPtr<CCFontAtlas> fontAtlas = CCFontAtlas::create(bitmap, asciiToRectTable, fontHeight);
|
| m_layerTreeHost->setFontAtlas(fontAtlas.release());
|
| }
|
| @@ -212,7 +213,7 @@ void WebLayerTreeViewImpl::layout()
|
|
|
| void WebLayerTreeViewImpl::applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale)
|
| {
|
| - m_client->applyScrollAndScale(scrollDelta, pageScale);
|
| + m_client->applyScrollAndScale(convert(scrollDelta), pageScale);
|
| }
|
|
|
| PassOwnPtr<WebCompositorOutputSurface> WebLayerTreeViewImpl::createOutputSurface()
|
|
|