Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(634)

Side by Side Diff: webkit/compositor_bindings/WebLayerTreeViewImpl.cpp

Issue 10917153: Update cc snapshot to r127918 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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" 8 #include "CCFontAtlas.h"
9 #include "CCInputHandler.h"
9 #include "CCLayerTreeHost.h" 10 #include "CCLayerTreeHost.h"
10 #include "LayerChromium.h" 11 #include "LayerChromium.h"
11 #include "WebLayerImpl.h" 12 #include "WebLayerImpl.h"
13 #include "WebToCCInputHandlerAdapter.h"
12 #include <public/WebGraphicsContext3D.h> 14 #include <public/WebGraphicsContext3D.h>
15 #include <public/WebInputHandler.h>
13 #include <public/WebLayer.h> 16 #include <public/WebLayer.h>
14 #include <public/WebLayerTreeView.h> 17 #include <public/WebLayerTreeView.h>
15 #include <public/WebLayerTreeViewClient.h> 18 #include <public/WebLayerTreeViewClient.h>
16 #include <public/WebRenderingStats.h> 19 #include <public/WebRenderingStats.h>
17 #include <public/WebSize.h> 20 #include <public/WebSize.h>
18 21
19 using namespace WebCore; 22 using namespace WebCore;
20 23
21 namespace WebKit { 24 namespace WebKit {
22 25
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void WebLayerTreeViewImpl::setRootLayer(const WebLayer& root) 66 void WebLayerTreeViewImpl::setRootLayer(const WebLayer& root)
64 { 67 {
65 m_layerTreeHost->setRootLayer(static_cast<const WebLayerImpl*>(&root)->layer ()); 68 m_layerTreeHost->setRootLayer(static_cast<const WebLayerImpl*>(&root)->layer ());
66 } 69 }
67 70
68 void WebLayerTreeViewImpl::clearRootLayer() 71 void WebLayerTreeViewImpl::clearRootLayer()
69 { 72 {
70 m_layerTreeHost->setRootLayer(PassRefPtr<LayerChromium>()); 73 m_layerTreeHost->setRootLayer(PassRefPtr<LayerChromium>());
71 } 74 }
72 75
73 int WebLayerTreeViewImpl::compositorIdentifier()
74 {
75 return m_layerTreeHost->compositorIdentifier();
76 }
77
78 void WebLayerTreeViewImpl::setViewportSize(const WebSize& layoutViewportSize, co nst WebSize& deviceViewportSize) 76 void WebLayerTreeViewImpl::setViewportSize(const WebSize& layoutViewportSize, co nst WebSize& deviceViewportSize)
79 { 77 {
80 if (!deviceViewportSize.isEmpty()) 78 if (!deviceViewportSize.isEmpty())
81 m_layerTreeHost->setViewportSize(layoutViewportSize, deviceViewportSize) ; 79 m_layerTreeHost->setViewportSize(layoutViewportSize, deviceViewportSize) ;
82 else 80 else
83 m_layerTreeHost->setViewportSize(layoutViewportSize, layoutViewportSize) ; 81 m_layerTreeHost->setViewportSize(layoutViewportSize, layoutViewportSize) ;
84 } 82 }
85 83
86 WebSize WebLayerTreeViewImpl::layoutViewportSize() const 84 WebSize WebLayerTreeViewImpl::layoutViewportSize() const
87 { 85 {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 PassOwnPtr<WebCompositorOutputSurface> WebLayerTreeViewImpl::createOutputSurface () 218 PassOwnPtr<WebCompositorOutputSurface> WebLayerTreeViewImpl::createOutputSurface ()
221 { 219 {
222 return adoptPtr(m_client->createOutputSurface()); 220 return adoptPtr(m_client->createOutputSurface());
223 } 221 }
224 222
225 void WebLayerTreeViewImpl::didRecreateOutputSurface(bool success) 223 void WebLayerTreeViewImpl::didRecreateOutputSurface(bool success)
226 { 224 {
227 m_client->didRecreateOutputSurface(success); 225 m_client->didRecreateOutputSurface(success);
228 } 226 }
229 227
228 PassOwnPtr<CCInputHandler> WebLayerTreeViewImpl::createInputHandler()
229 {
230 OwnPtr<WebInputHandler> handler = adoptPtr(m_client->createInputHandler());
231 if (handler)
232 return WebToCCInputHandlerAdapter::create(handler.release());
233 return nullptr;
234 }
235
230 void WebLayerTreeViewImpl::willCommit() 236 void WebLayerTreeViewImpl::willCommit()
231 { 237 {
232 m_client->willCommit(); 238 m_client->willCommit();
233 } 239 }
234 240
235 void WebLayerTreeViewImpl::didCommit() 241 void WebLayerTreeViewImpl::didCommit()
236 { 242 {
237 m_client->didCommit(); 243 m_client->didCommit();
238 } 244 }
239 245
240 void WebLayerTreeViewImpl::didCommitAndDrawFrame() 246 void WebLayerTreeViewImpl::didCommitAndDrawFrame()
241 { 247 {
242 m_client->didCommitAndDrawFrame(); 248 m_client->didCommitAndDrawFrame();
243 } 249 }
244 250
245 void WebLayerTreeViewImpl::didCompleteSwapBuffers() 251 void WebLayerTreeViewImpl::didCompleteSwapBuffers()
246 { 252 {
247 m_client->didCompleteSwapBuffers(); 253 m_client->didCompleteSwapBuffers();
248 } 254 }
249 255
250 void WebLayerTreeViewImpl::scheduleComposite() 256 void WebLayerTreeViewImpl::scheduleComposite()
251 { 257 {
252 m_client->scheduleComposite(); 258 m_client->scheduleComposite();
253 } 259 }
254 260
255 } // namespace WebKit 261 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/WebLayerTreeViewImpl.h ('k') | webkit/compositor_bindings/WebLayerTreeViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698