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

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 10199014: Merge 114800 - [chromium] Plumb a compositor surface ready notification through to the threaded com… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 , m_autofillPopup(0) 354 , m_autofillPopup(0)
355 , m_isTransparent(false) 355 , m_isTransparent(false)
356 , m_tabsToLinks(false) 356 , m_tabsToLinks(false)
357 , m_dragScrollTimer(adoptPtr(new DragScrollTimer)) 357 , m_dragScrollTimer(adoptPtr(new DragScrollTimer))
358 , m_isCancelingFullScreen(false) 358 , m_isCancelingFullScreen(false)
359 #if USE(ACCELERATED_COMPOSITING) 359 #if USE(ACCELERATED_COMPOSITING)
360 , m_rootGraphicsLayer(0) 360 , m_rootGraphicsLayer(0)
361 , m_isAcceleratedCompositingActive(false) 361 , m_isAcceleratedCompositingActive(false)
362 , m_compositorCreationFailed(false) 362 , m_compositorCreationFailed(false)
363 , m_recreatingGraphicsContext(false) 363 , m_recreatingGraphicsContext(false)
364 , m_compositorSurfaceReady(false)
364 #endif 365 #endif
365 #if ENABLE(INPUT_SPEECH) 366 #if ENABLE(INPUT_SPEECH)
366 , m_speechInputClient(SpeechInputClientImpl::create(client)) 367 , m_speechInputClient(SpeechInputClientImpl::create(client))
367 #endif 368 #endif
368 , m_deviceOrientationClientProxy(adoptPtr(new DeviceOrientationClientProxy(c lient ? client->deviceOrientationClient() : 0))) 369 , m_deviceOrientationClientProxy(adoptPtr(new DeviceOrientationClientProxy(c lient ? client->deviceOrientationClient() : 0)))
369 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0))) 370 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0)))
370 #if ENABLE(MEDIA_STREAM) 371 #if ENABLE(MEDIA_STREAM)
371 , m_userMediaClientImpl(this) 372 , m_userMediaClientImpl(this)
372 #endif 373 #endif
373 , m_flingModifier(0) 374 , m_flingModifier(0)
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 void WebViewImpl::instrumentBeginFrame() 1346 void WebViewImpl::instrumentBeginFrame()
1346 { 1347 {
1347 InspectorInstrumentation::didBeginFrame(m_page.get()); 1348 InspectorInstrumentation::didBeginFrame(m_page.get());
1348 } 1349 }
1349 1350
1350 void WebViewImpl::instrumentCancelFrame() 1351 void WebViewImpl::instrumentCancelFrame()
1351 { 1352 {
1352 InspectorInstrumentation::didCancelFrame(m_page.get()); 1353 InspectorInstrumentation::didCancelFrame(m_page.get());
1353 } 1354 }
1354 1355
1356 void WebViewImpl::setCompositorSurfaceReady()
1357 {
1358 m_compositorSurfaceReady = true;
1359 if (!m_layerTreeView.isNull())
1360 m_layerTreeView.setSurfaceReady();
1361 }
1362
1355 void WebViewImpl::animate(double) 1363 void WebViewImpl::animate(double)
1356 { 1364 {
1357 #if ENABLE(REQUEST_ANIMATION_FRAME) 1365 #if ENABLE(REQUEST_ANIMATION_FRAME)
1358 double monotonicFrameBeginTime = monotonicallyIncreasingTime(); 1366 double monotonicFrameBeginTime = monotonicallyIncreasingTime();
1359 1367
1360 #if USE(ACCELERATED_COMPOSITING) 1368 #if USE(ACCELERATED_COMPOSITING)
1361 // In composited mode, we always go through the compositor so it can apply 1369 // In composited mode, we always go through the compositor so it can apply
1362 // appropriate flow-control mechanisms. 1370 // appropriate flow-control mechanisms.
1363 if (isAcceleratedCompositingActive()) 1371 if (isAcceleratedCompositingActive())
1364 m_layerTreeView.updateAnimations(monotonicFrameBeginTime); 1372 m_layerTreeView.updateAnimations(monotonicFrameBeginTime);
(...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 layerTreeViewSettings.perTilePainting = page()->settings()->perTileDrawi ngEnabled(); 3308 layerTreeViewSettings.perTilePainting = page()->settings()->perTileDrawi ngEnabled();
3301 layerTreeViewSettings.partialSwapEnabled = page()->settings()->partialSw apEnabled(); 3309 layerTreeViewSettings.partialSwapEnabled = page()->settings()->partialSw apEnabled();
3302 layerTreeViewSettings.threadedAnimationEnabled = page()->settings()->thr eadedAnimationEnabled(); 3310 layerTreeViewSettings.threadedAnimationEnabled = page()->settings()->thr eadedAnimationEnabled();
3303 3311
3304 m_nonCompositedContentHost = NonCompositedContentHost::create(WebViewImp lContentPainter::create(this)); 3312 m_nonCompositedContentHost = NonCompositedContentHost::create(WebViewImp lContentPainter::create(this));
3305 m_nonCompositedContentHost->setShowDebugBorders(page()->settings()->show DebugBorders()); 3313 m_nonCompositedContentHost->setShowDebugBorders(page()->settings()->show DebugBorders());
3306 3314
3307 m_layerTreeView.initialize(this, m_rootLayer, layerTreeViewSettings); 3315 m_layerTreeView.initialize(this, m_rootLayer, layerTreeViewSettings);
3308 if (!m_layerTreeView.isNull()) { 3316 if (!m_layerTreeView.isNull()) {
3309 m_layerTreeView.setPageScaleFactorAndLimits(pageScaleFactor(), m_min imumPageScaleFactor, m_maximumPageScaleFactor); 3317 m_layerTreeView.setPageScaleFactorAndLimits(pageScaleFactor(), m_min imumPageScaleFactor, m_maximumPageScaleFactor);
3318 if (m_compositorSurfaceReady)
3319 m_layerTreeView.setSurfaceReady();
3310 updateLayerTreeViewport(); 3320 updateLayerTreeViewport();
3311 m_client->didActivateCompositor(m_layerTreeView.compositorIdentifier ()); 3321 m_client->didActivateCompositor(m_layerTreeView.compositorIdentifier ());
3312 m_isAcceleratedCompositingActive = true; 3322 m_isAcceleratedCompositingActive = true;
3313 m_compositorCreationFailed = false; 3323 m_compositorCreationFailed = false;
3314 if (m_pageOverlays) 3324 if (m_pageOverlays)
3315 m_pageOverlays->update(); 3325 m_pageOverlays->update();
3316 } else { 3326 } else {
3317 m_nonCompositedContentHost.clear(); 3327 m_nonCompositedContentHost.clear();
3318 m_isAcceleratedCompositingActive = false; 3328 m_isAcceleratedCompositingActive = false;
3319 m_client->didDeactivateCompositor(); 3329 m_client->didDeactivateCompositor();
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
3541 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event); 3551 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event);
3542 3552
3543 if (page()) 3553 if (page())
3544 page()->pointerLockController()->dispatchLockedMouseEvent( 3554 page()->pointerLockController()->dispatchLockedMouseEvent(
3545 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent), 3555 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent),
3546 eventType); 3556 eventType);
3547 } 3557 }
3548 #endif 3558 #endif
3549 3559
3550 } // namespace WebKit 3560 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.h ('k') | Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698