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

Side by Side Diff: sky/engine/core/rendering/RenderLayer.cpp

Issue 721473002: Removed ScrollingCoordinator and a bunch of composited scrolling' (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cr comments Created 6 years, 1 month 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "config.h" 44 #include "config.h"
45 #include "core/rendering/RenderLayer.h" 45 #include "core/rendering/RenderLayer.h"
46 46
47 #include "core/CSSPropertyNames.h" 47 #include "core/CSSPropertyNames.h"
48 #include "core/dom/Document.h" 48 #include "core/dom/Document.h"
49 #include "core/dom/shadow/ShadowRoot.h" 49 #include "core/dom/shadow/ShadowRoot.h"
50 #include "core/frame/FrameView.h" 50 #include "core/frame/FrameView.h"
51 #include "core/frame/LocalFrame.h" 51 #include "core/frame/LocalFrame.h"
52 #include "core/frame/Settings.h" 52 #include "core/frame/Settings.h"
53 #include "core/page/Page.h" 53 #include "core/page/Page.h"
54 #include "core/page/scrolling/ScrollingCoordinator.h"
55 #include "core/rendering/FilterEffectRenderer.h" 54 #include "core/rendering/FilterEffectRenderer.h"
56 #include "core/rendering/HitTestRequest.h" 55 #include "core/rendering/HitTestRequest.h"
57 #include "core/rendering/HitTestResult.h" 56 #include "core/rendering/HitTestResult.h"
58 #include "core/rendering/HitTestingTransformState.h" 57 #include "core/rendering/HitTestingTransformState.h"
59 #include "core/rendering/RenderGeometryMap.h" 58 #include "core/rendering/RenderGeometryMap.h"
60 #include "core/rendering/RenderInline.h" 59 #include "core/rendering/RenderInline.h"
61 #include "core/rendering/RenderTreeAsText.h" 60 #include "core/rendering/RenderTreeAsText.h"
62 #include "core/rendering/RenderView.h" 61 #include "core/rendering/RenderView.h"
63 #include "core/rendering/compositing/CompositedLayerMapping.h" 62 #include "core/rendering/compositing/CompositedLayerMapping.h"
64 #include "core/rendering/compositing/RenderLayerCompositor.h" 63 #include "core/rendering/compositing/RenderLayerCompositor.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 { 119 {
121 updateStackingNode(); 120 updateStackingNode();
122 121
123 m_isSelfPaintingLayer = shouldBeSelfPaintingLayer(); 122 m_isSelfPaintingLayer = shouldBeSelfPaintingLayer();
124 123
125 updateScrollableArea(); 124 updateScrollableArea();
126 } 125 }
127 126
128 RenderLayer::~RenderLayer() 127 RenderLayer::~RenderLayer()
129 { 128 {
130 if (renderer()->frame() && renderer()->frame()->page()) {
131 if (ScrollingCoordinator* scrollingCoordinator = renderer()->frame()->pa ge()->scrollingCoordinator())
132 scrollingCoordinator->willDestroyRenderLayer(this);
133 }
134
135 removeFilterInfoIfNeeded(); 129 removeFilterInfoIfNeeded();
136 130
137 if (groupedMapping()) { 131 if (groupedMapping()) {
138 DisableCompositingQueryAsserts disabler; 132 DisableCompositingQueryAsserts disabler;
139 groupedMapping()->removeRenderLayerFromSquashingGraphicsLayer(this); 133 groupedMapping()->removeRenderLayerFromSquashingGraphicsLayer(this);
140 setGroupedMapping(0); 134 setGroupedMapping(0);
141 } 135 }
142 136
143 // Child layers will be deleted by their corresponding render objects, so 137 // Child layers will be deleted by their corresponding render objects, so
144 // we don't need to delete them ourselves. 138 // we don't need to delete them ourselves.
(...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2327 switch (compositingState()) { 2321 switch (compositingState()) {
2328 case NotComposited: 2322 case NotComposited:
2329 return 0; 2323 return 0;
2330 case PaintsIntoGroupedBacking: 2324 case PaintsIntoGroupedBacking:
2331 return groupedMapping()->squashingLayer(); 2325 return groupedMapping()->squashingLayer();
2332 default: 2326 default:
2333 return compositedLayerMapping()->mainGraphicsLayer(); 2327 return compositedLayerMapping()->mainGraphicsLayer();
2334 } 2328 }
2335 } 2329 }
2336 2330
2337 GraphicsLayer* RenderLayer::graphicsLayerBackingForScrolling() const
2338 {
2339 switch (compositingState()) {
2340 case NotComposited:
2341 return 0;
2342 case PaintsIntoGroupedBacking:
2343 return groupedMapping()->squashingLayer();
2344 default:
2345 return compositedLayerMapping()->scrollingContentsLayer() ? compositedLa yerMapping()->scrollingContentsLayer() : compositedLayerMapping()->mainGraphicsL ayer();
2346 }
2347 }
2348
2349 CompositedLayerMapping* RenderLayer::ensureCompositedLayerMapping() 2331 CompositedLayerMapping* RenderLayer::ensureCompositedLayerMapping()
2350 { 2332 {
2351 if (!m_compositedLayerMapping) { 2333 if (!m_compositedLayerMapping) {
2352 m_compositedLayerMapping = adoptPtr(new CompositedLayerMapping(*this)); 2334 m_compositedLayerMapping = adoptPtr(new CompositedLayerMapping(*this));
2353 m_compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdat eSubtree); 2335 m_compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdat eSubtree);
2354 2336
2355 updateOrRemoveFilterEffectRenderer(); 2337 updateOrRemoveFilterEffectRenderer();
2356 } 2338 }
2357 return m_compositedLayerMapping.get(); 2339 return m_compositedLayerMapping.get();
2358 } 2340 }
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2702 } 2684 }
2703 } 2685 }
2704 2686
2705 void showLayerTree(const blink::RenderObject* renderer) 2687 void showLayerTree(const blink::RenderObject* renderer)
2706 { 2688 {
2707 if (!renderer) 2689 if (!renderer)
2708 return; 2690 return;
2709 showLayerTree(renderer->enclosingLayer()); 2691 showLayerTree(renderer->enclosingLayer());
2710 } 2692 }
2711 #endif 2693 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.h ('k') | sky/engine/core/rendering/RenderLayerScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698