| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "WebLayerTreeViewImpl.h" | 6 #include "WebLayerTreeViewImpl.h" |
| 7 | 7 |
| 8 #include "CCFontAtlas.h" | |
| 9 #include "CCInputHandler.h" | |
| 10 #include "CCLayerTreeHost.h" | |
| 11 #include "LayerChromium.h" | |
| 12 #include "WebLayerImpl.h" | 8 #include "WebLayerImpl.h" |
| 13 #include "WebToCCInputHandlerAdapter.h" | 9 #include "WebToCCInputHandlerAdapter.h" |
| 10 #include "cc/font_atlas.h" |
| 11 #include "cc/input_handler.h" |
| 12 #include "cc/layer.h" |
| 13 #include "cc/layer_tree_host.h" |
| 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h" |
| 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h" |
| 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" |
| 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli
ent.h" |
| 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h
" |
| 20 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
| 14 #include "webcore_convert.h" | 21 #include "webcore_convert.h" |
| 15 #include <public/WebGraphicsContext3D.h> | |
| 16 #include <public/WebInputHandler.h> | |
| 17 #include <public/WebLayer.h> | |
| 18 #include <public/WebLayerTreeView.h> | |
| 19 #include <public/WebLayerTreeViewClient.h> | |
| 20 #include <public/WebRenderingStats.h> | |
| 21 #include <public/WebSize.h> | |
| 22 | 22 |
| 23 using namespace cc; | 23 using namespace cc; |
| 24 | 24 |
| 25 namespace WebKit { | 25 namespace WebKit { |
| 26 | 26 |
| 27 WebLayerTreeView* WebLayerTreeView::create(WebLayerTreeViewClient* client, const
WebLayer& root, const WebLayerTreeView::Settings& settings) | 27 WebLayerTreeView* WebLayerTreeView::create(WebLayerTreeViewClient* client, const
WebLayer& root, const WebLayerTreeView::Settings& settings) |
| 28 { | 28 { |
| 29 scoped_ptr<WebLayerTreeViewImpl> layerTreeViewImpl(new WebLayerTreeViewImpl(
client)); | 29 scoped_ptr<WebLayerTreeViewImpl> layerTreeViewImpl(new WebLayerTreeViewImpl(
client)); |
| 30 if (!layerTreeViewImpl->initialize(settings)) | 30 if (!layerTreeViewImpl->initialize(settings)) |
| 31 return 0; | 31 return 0; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 } | 226 } |
| 227 | 227 |
| 228 void WebLayerTreeViewImpl::didRecreateOutputSurface(bool success) | 228 void WebLayerTreeViewImpl::didRecreateOutputSurface(bool success) |
| 229 { | 229 { |
| 230 m_client->didRecreateOutputSurface(success); | 230 m_client->didRecreateOutputSurface(success); |
| 231 } | 231 } |
| 232 | 232 |
| 233 scoped_ptr<CCInputHandler> WebLayerTreeViewImpl::createInputHandler() | 233 scoped_ptr<CCInputHandler> WebLayerTreeViewImpl::createInputHandler() |
| 234 { | 234 { |
| 235 scoped_ptr<CCInputHandler> ret; | 235 scoped_ptr<CCInputHandler> ret; |
| 236 OwnPtr<WebInputHandler> handler = adoptPtr(m_client->createInputHandler()); | 236 scoped_ptr<WebInputHandler> handler(m_client->createInputHandler()); |
| 237 if (handler) | 237 if (handler) |
| 238 ret = WebToCCInputHandlerAdapter::create(handler.release()); | 238 ret = WebToCCInputHandlerAdapter::create(handler.Pass()); |
| 239 return ret.Pass(); | 239 return ret.Pass(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void WebLayerTreeViewImpl::willCommit() | 242 void WebLayerTreeViewImpl::willCommit() |
| 243 { | 243 { |
| 244 m_client->willCommit(); | 244 m_client->willCommit(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void WebLayerTreeViewImpl::didCommit() | 247 void WebLayerTreeViewImpl::didCommit() |
| 248 { | 248 { |
| 249 m_client->didCommit(); | 249 m_client->didCommit(); |
| 250 } | 250 } |
| 251 | 251 |
| 252 void WebLayerTreeViewImpl::didCommitAndDrawFrame() | 252 void WebLayerTreeViewImpl::didCommitAndDrawFrame() |
| 253 { | 253 { |
| 254 m_client->didCommitAndDrawFrame(); | 254 m_client->didCommitAndDrawFrame(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 void WebLayerTreeViewImpl::didCompleteSwapBuffers() | 257 void WebLayerTreeViewImpl::didCompleteSwapBuffers() |
| 258 { | 258 { |
| 259 m_client->didCompleteSwapBuffers(); | 259 m_client->didCompleteSwapBuffers(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 void WebLayerTreeViewImpl::scheduleComposite() | 262 void WebLayerTreeViewImpl::scheduleComposite() |
| 263 { | 263 { |
| 264 m_client->scheduleComposite(); | 264 m_client->scheduleComposite(); |
| 265 } | 265 } |
| 266 | 266 |
| 267 } // namespace WebKit | 267 } // namespace WebKit |
| OLD | NEW |