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

Side by Side Diff: sky/engine/core/rendering/compositing/RenderLayerCompositor.h

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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 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 19 matching lines...) Expand all
30 #include "core/rendering/compositing/CompositingReasonFinder.h" 30 #include "core/rendering/compositing/CompositingReasonFinder.h"
31 #include "platform/graphics/GraphicsLayerClient.h" 31 #include "platform/graphics/GraphicsLayerClient.h"
32 #include "wtf/HashMap.h" 32 #include "wtf/HashMap.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class DocumentLifecycle; 36 class DocumentLifecycle;
37 class GraphicsLayer; 37 class GraphicsLayer;
38 class GraphicsLayerFactory; 38 class GraphicsLayerFactory;
39 class Page; 39 class Page;
40 class ScrollingCoordinator;
41 40
42 enum CompositingUpdateType { 41 enum CompositingUpdateType {
43 CompositingUpdateNone, 42 CompositingUpdateNone,
44 CompositingUpdateAfterGeometryChange, 43 CompositingUpdateAfterGeometryChange,
45 CompositingUpdateAfterCompositingInputChange, 44 CompositingUpdateAfterCompositingInputChange,
46 CompositingUpdateRebuildTree, 45 CompositingUpdateRebuildTree,
47 }; 46 };
48 47
49 enum CompositingStateTransitionType { 48 enum CompositingStateTransitionType {
50 NoCompositingStateChange, 49 NoCompositingStateChange,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void updateRootLayerAttachment(); 129 void updateRootLayerAttachment();
131 void updateRootLayerPosition(); 130 void updateRootLayerPosition();
132 131
133 void setIsInWindow(bool); 132 void setIsInWindow(bool);
134 133
135 // Update the geometry of the layers used for clipping and scrolling in fram es. 134 // Update the geometry of the layers used for clipping and scrolling in fram es.
136 void frameViewDidChangeLocation(const IntPoint& contentsOffset); 135 void frameViewDidChangeLocation(const IntPoint& contentsOffset);
137 void frameViewDidChangeSize(); 136 void frameViewDidChangeSize();
138 void rootFixedBackgroundsChanged(); 137 void rootFixedBackgroundsChanged();
139 138
140 bool scrollingLayerDidChange(RenderLayer*);
141
142 String layerTreeAsText(LayerTreeFlags); 139 String layerTreeAsText(LayerTreeFlags);
143 140
144 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo ntalScrollbar.get(); }
145 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical Scrollbar.get(); }
146
147 void resetTrackedPaintInvalidationRects(); 141 void resetTrackedPaintInvalidationRects();
148 void setTracksPaintInvalidations(bool); 142 void setTracksPaintInvalidations(bool);
149 143
150 virtual String debugName(const GraphicsLayer*) override; 144 virtual String debugName(const GraphicsLayer*) override;
151 DocumentLifecycle& lifecycle() const; 145 DocumentLifecycle& lifecycle() const;
152 146
153 void updatePotentialCompositingReasonsFromStyle(RenderLayer*); 147 void updatePotentialCompositingReasonsFromStyle(RenderLayer*);
154 148
155 // Whether the layer could ever be composited. 149 // Whether the layer could ever be composited.
156 bool canBeComposited(const RenderLayer*) const; 150 bool canBeComposited(const RenderLayer*) const;
(...skipping 19 matching lines...) Expand all
176 170
177 void updateWithoutAcceleratedCompositing(CompositingUpdateType); 171 void updateWithoutAcceleratedCompositing(CompositingUpdateType);
178 void updateIfNeeded(); 172 void updateIfNeeded();
179 173
180 void ensureRootLayer(); 174 void ensureRootLayer();
181 void destroyRootLayer(); 175 void destroyRootLayer();
182 176
183 void attachRootLayer(RootLayerAttachment); 177 void attachRootLayer(RootLayerAttachment);
184 void detachRootLayer(); 178 void detachRootLayer();
185 179
186 void updateOverflowControlsLayers();
187
188 Page* page() const; 180 Page* page() const;
189 181
190 GraphicsLayerFactory* graphicsLayerFactory() const; 182 GraphicsLayerFactory* graphicsLayerFactory() const;
191 ScrollingCoordinator* scrollingCoordinator() const;
192 183
193 void enableCompositingModeIfNeeded(); 184 void enableCompositingModeIfNeeded();
194 185
195 bool requiresHorizontalScrollbarLayer() const;
196 bool requiresVerticalScrollbarLayer() const;
197
198 RenderView& m_renderView; 186 RenderView& m_renderView;
199 OwnPtr<GraphicsLayer> m_rootContentLayer; 187 OwnPtr<GraphicsLayer> m_rootContentLayer;
200 OwnPtr<GraphicsLayer> m_rootTransformLayer; 188 OwnPtr<GraphicsLayer> m_rootTransformLayer;
201 189
202 CompositingReasonFinder m_compositingReasonFinder; 190 CompositingReasonFinder m_compositingReasonFinder;
203 191
204 CompositingUpdateType m_pendingUpdateType; 192 CompositingUpdateType m_pendingUpdateType;
205 193
206 bool m_compositing; 194 bool m_compositing;
207 195
208 // The root layer doesn't composite if it's a non-scrollable frame. 196 // The root layer doesn't composite if it's a non-scrollable frame.
209 // So, after a layout we set this dirty bit to know that we need 197 // So, after a layout we set this dirty bit to know that we need
210 // to recompute whether the root layer should composite even if 198 // to recompute whether the root layer should composite even if
211 // none of its descendants composite. 199 // none of its descendants composite.
212 // FIXME: Get rid of all the callers of setCompositingModeEnabled 200 // FIXME: Get rid of all the callers of setCompositingModeEnabled
213 // except the one in updateIfNeeded, then rename this to 201 // except the one in updateIfNeeded, then rename this to
214 // m_compositingDirty. 202 // m_compositingDirty.
215 bool m_rootShouldAlwaysCompositeDirty; 203 bool m_rootShouldAlwaysCompositeDirty;
216 bool m_needsUpdateFixedBackground; 204 bool m_needsUpdateFixedBackground;
217 bool m_isTrackingPaintInvalidations; // Used for testing. 205 bool m_isTrackingPaintInvalidations; // Used for testing.
218 206
219 RootLayerAttachment m_rootLayerAttachment; 207 RootLayerAttachment m_rootLayerAttachment;
220 208
221 // Enclosing container layer, which clips for iframe content 209 // Enclosing container layer, which clips for iframe content
222 OwnPtr<GraphicsLayer> m_containerLayer; 210 OwnPtr<GraphicsLayer> m_containerLayer;
223 OwnPtr<GraphicsLayer> m_scrollLayer; 211 OwnPtr<GraphicsLayer> m_scrollLayer;
224 212
225 // Enclosing layer for overflow controls and the clipping layer 213 // Enclosing layer for overflow controls and the clipping layer
226 OwnPtr<GraphicsLayer> m_overflowControlsHostLayer; 214 OwnPtr<GraphicsLayer> m_overflowControlsHostLayer;
227
228 // Layers for overflow controls
229 OwnPtr<GraphicsLayer> m_layerForHorizontalScrollbar;
230 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar;
231 }; 215 };
232 216
233 } // namespace blink 217 } // namespace blink
234 218
235 #endif // RenderLayerCompositor_h 219 #endif // RenderLayerCompositor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698