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

Side by Side Diff: Source/WebCore/rendering/RenderLayerCompositor.h

Issue 8399041: Merge 98060 - Hidden composited iframes cause infinite loop (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 RootLayerAttachment rootLayerAttachment() const { return m_rootLayerAttachme nt; } 145 RootLayerAttachment rootLayerAttachment() const { return m_rootLayerAttachme nt; }
146 void updateRootLayerAttachment(); 146 void updateRootLayerAttachment();
147 void updateRootLayerPosition(); 147 void updateRootLayerPosition();
148 148
149 void didMoveOnscreen(); 149 void didMoveOnscreen();
150 void willMoveOffscreen(); 150 void willMoveOffscreen();
151 151
152 void clearBackingForAllLayers(); 152 void clearBackingForAllLayers();
153 153
154 void layerBecameComposited(const RenderLayer*) { ++m_compositedLayerCount; }
155 void layerBecameNonComposited(const RenderLayer*)
156 {
157 ASSERT(m_compositedLayerCount > 0);
158 --m_compositedLayerCount;
159 }
160
154 void didStartAcceleratedAnimation(CSSPropertyID); 161 void didStartAcceleratedAnimation(CSSPropertyID);
155 162
156 #if ENABLE(VIDEO) 163 #if ENABLE(VIDEO)
157 // Use by RenderVideo to ask if it should try to use accelerated compositing . 164 // Use by RenderVideo to ask if it should try to use accelerated compositing .
158 bool canAccelerateVideoRendering(RenderVideo*) const; 165 bool canAccelerateVideoRendering(RenderVideo*) const;
159 #endif 166 #endif
160 167
161 // Walk the tree looking for layers with 3d transforms. Useful in case you n eed 168 // Walk the tree looking for layers with 3d transforms. Useful in case you n eed
162 // to know if there is non-affine content, e.g. for drawing into an image. 169 // to know if there is non-affine content, e.g. for drawing into an image.
163 bool has3DContent() const; 170 bool has3DContent() const;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 248
242 // Recurses down the tree, updating layer geometry only. 249 // Recurses down the tree, updating layer geometry only.
243 void updateLayerTreeGeometry(RenderLayer*); 250 void updateLayerTreeGeometry(RenderLayer*);
244 251
245 // Hook compositing layers together 252 // Hook compositing layers together
246 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer) ; 253 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer) ;
247 void removeCompositedChildren(RenderLayer*); 254 void removeCompositedChildren(RenderLayer*);
248 255
249 bool layerHas3DContent(const RenderLayer*) const; 256 bool layerHas3DContent(const RenderLayer*) const;
250 bool hasNonIdentity3DTransform(RenderObject*) const; 257 bool hasNonIdentity3DTransform(RenderObject*) const;
258
259 bool hasAnyAdditionalCompositedLayers(const RenderLayer* rootLayer) const;
251 260
252 void ensureRootLayer(); 261 void ensureRootLayer();
253 void destroyRootLayer(); 262 void destroyRootLayer();
254 263
255 void attachRootLayer(RootLayerAttachment); 264 void attachRootLayer(RootLayerAttachment);
256 void detachRootLayer(); 265 void detachRootLayer();
257 266
258 void rootLayerAttachmentChanged(); 267 void rootLayerAttachmentChanged();
259 268
260 void updateOverflowControlsLayers(); 269 void updateOverflowControlsLayers();
(...skipping 22 matching lines...) Expand all
283 #endif 292 #endif
284 293
285 private: 294 private:
286 RenderView* m_renderView; 295 RenderView* m_renderView;
287 OwnPtr<GraphicsLayer> m_rootContentLayer; 296 OwnPtr<GraphicsLayer> m_rootContentLayer;
288 Timer<RenderLayerCompositor> m_updateCompositingLayersTimer; 297 Timer<RenderLayerCompositor> m_updateCompositingLayersTimer;
289 298
290 bool m_hasAcceleratedCompositing; 299 bool m_hasAcceleratedCompositing;
291 ChromeClient::CompositingTriggerFlags m_compositingTriggers; 300 ChromeClient::CompositingTriggerFlags m_compositingTriggers;
292 301
302 int m_compositedLayerCount;
293 bool m_showDebugBorders; 303 bool m_showDebugBorders;
294 bool m_showRepaintCounter; 304 bool m_showRepaintCounter;
295 bool m_compositingConsultsOverlap; 305 bool m_compositingConsultsOverlap;
296 306
297 // When true, we have to wait until layout has happened before we can decide whether to enter compositing mode, 307 // When true, we have to wait until layout has happened before we can decide whether to enter compositing mode,
298 // because only then do we know the final size of plugins and iframes. 308 // because only then do we know the final size of plugins and iframes.
299 // FIXME: once set, this is never cleared. 309 // FIXME: once set, this is never cleared.
300 mutable bool m_compositingDependsOnGeometry; 310 mutable bool m_compositingDependsOnGeometry;
301 311
302 bool m_compositing; 312 bool m_compositing;
(...skipping 19 matching lines...) Expand all
322 #endif 332 #endif
323 #if PROFILE_LAYER_REBUILD 333 #if PROFILE_LAYER_REBUILD
324 int m_rootLayerUpdateCount; 334 int m_rootLayerUpdateCount;
325 #endif 335 #endif
326 }; 336 };
327 337
328 338
329 } // namespace WebCore 339 } // namespace WebCore
330 340
331 #endif // RenderLayerCompositor_h 341 #endif // RenderLayerCompositor_h
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderLayer.cpp ('k') | Source/WebCore/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698