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

Side by Side Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 (*it)->updateHasUnclippedDescendant(); 315 (*it)->updateHasUnclippedDescendant();
316 316
317 const FrameView::ScrollableAreaSet* scrollableAreas = m_renderView->frameVie w()->scrollableAreas(); 317 const FrameView::ScrollableAreaSet* scrollableAreas = m_renderView->frameVie w()->scrollableAreas();
318 if (!scrollableAreas) 318 if (!scrollableAreas)
319 return; 319 return;
320 320
321 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->begin(); i t != scrollableAreas->end(); ++it) 321 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->begin(); i t != scrollableAreas->end(); ++it)
322 (*it)->updateNeedsCompositedScrolling(); 322 (*it)->updateNeedsCompositedScrolling();
323 } 323 }
324 324
325 static RenderVideo* findFullscreenVideoRenderer(Document* document) 325 static RenderVideo* findFullscreenVideoRenderer(Document& document)
326 { 326 {
327 Element* fullscreenElement = FullscreenElementStack::currentFullScreenElemen tFrom(document); 327 Element* fullscreenElement = FullscreenElementStack::currentFullScreenElemen tFrom(document);
328 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) { 328 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) {
329 document = toHTMLFrameOwnerElement(fullscreenElement)->contentDocument() ; 329 Document* contentDocument = toHTMLFrameOwnerElement(fullscreenElement)-> contentDocument();
330 if (!document) 330 if (!contentDocument)
331 return 0; 331 return 0;
332 fullscreenElement = FullscreenElementStack::currentFullScreenElementFrom (document); 332 fullscreenElement = FullscreenElementStack::currentFullScreenElementFrom (*contentDocument);
333 } 333 }
334 if (!fullscreenElement || !fullscreenElement->hasTagName(videoTag)) 334 if (!fullscreenElement || !fullscreenElement->hasTagName(videoTag))
335 return 0; 335 return 0;
336 RenderObject* renderer = fullscreenElement->renderer(); 336 RenderObject* renderer = fullscreenElement->renderer();
337 if (!renderer) 337 if (!renderer)
338 return 0; 338 return 0;
339 return toRenderVideo(renderer); 339 return toRenderVideo(renderer);
340 } 340 }
341 341
342 void RenderLayerCompositor::finishCompositingUpdateForFrameTree(Frame* frame) 342 void RenderLayerCompositor::finishCompositingUpdateForFrameTree(Frame* frame)
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 if (needHierarchyAndGeometryUpdate) { 466 if (needHierarchyAndGeometryUpdate) {
467 // Update the hierarchy of the compositing layers. 467 // Update the hierarchy of the compositing layers.
468 Vector<GraphicsLayer*> childList; 468 Vector<GraphicsLayer*> childList;
469 { 469 {
470 TRACE_EVENT0("blink_rendering", "RenderLayerCompositor::rebuildCompo sitingLayerTree"); 470 TRACE_EVENT0("blink_rendering", "RenderLayerCompositor::rebuildCompo sitingLayerTree");
471 rebuildCompositingLayerTree(updateRoot, childList, 0); 471 rebuildCompositingLayerTree(updateRoot, childList, 0);
472 } 472 }
473 473
474 // Host the document layer in the RenderView's root layer. 474 // Host the document layer in the RenderView's root layer.
475 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isMainFra me()) { 475 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isMainFra me()) {
476 RenderVideo* video = findFullscreenVideoRenderer(&m_renderView->docu ment()); 476 RenderVideo* video = findFullscreenVideoRenderer(m_renderView->docum ent());
477 if (video && video->hasCompositedLayerMapping()) { 477 if (video && video->hasCompositedLayerMapping()) {
478 childList.clear(); 478 childList.clear();
479 childList.append(video->compositedLayerMapping()->mainGraphicsLa yer()); 479 childList.append(video->compositedLayerMapping()->mainGraphicsLa yer());
480 } 480 }
481 } 481 }
482 482
483 if (childList.isEmpty()) 483 if (childList.isEmpty())
484 destroyRootLayer(); 484 destroyRootLayer();
485 else 485 else
486 m_rootContentLayer->setChildren(childList); 486 m_rootContentLayer->setChildren(childList);
(...skipping 2242 matching lines...) Expand 10 before | Expand all | Expand 10 after
2729 } else if (graphicsLayer == m_scrollLayer.get()) { 2729 } else if (graphicsLayer == m_scrollLayer.get()) {
2730 name = "Frame Scrolling Layer"; 2730 name = "Frame Scrolling Layer";
2731 } else { 2731 } else {
2732 ASSERT_NOT_REACHED(); 2732 ASSERT_NOT_REACHED();
2733 } 2733 }
2734 2734
2735 return name; 2735 return name;
2736 } 2736 }
2737 2737
2738 } // namespace WebCore 2738 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698