OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) OVERRIDE; | 184 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) OVERRIDE; |
185 virtual bool isTrackingRepaints() const OVERRIDE; | 185 virtual bool isTrackingRepaints() const OVERRIDE; |
186 | 186 |
187 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const; | 187 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const; |
188 | 188 |
189 #ifndef NDEBUG | 189 #ifndef NDEBUG |
190 virtual void verifyNotPainting() OVERRIDE; | 190 virtual void verifyNotPainting() OVERRIDE; |
191 #endif | 191 #endif |
192 | 192 |
193 LayoutRect contentsBox() const; | 193 LayoutRect contentsBox() const; |
194 IntRect backgroundBox() const; | |
195 | 194 |
196 // For informative purposes only. | 195 // For informative purposes only. |
197 CompositingLayerType compositingLayerType() const; | 196 CompositingLayerType compositingLayerType() const; |
198 | 197 |
199 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } | 198 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } |
200 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } | 199 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } |
201 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.
get(); } | 200 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.
get(); } |
202 | 201 |
203 void updateFilters(const RenderStyle*); | 202 void updateFilters(const RenderStyle*); |
204 bool canCompositeFilters() const { return m_canCompositeFilters; } | 203 bool canCompositeFilters() const { return m_canCompositeFilters; } |
(...skipping 21 matching lines...) Expand all Loading... |
226 bool updateBackgroundLayer(bool needsBackgroundLayer); | 225 bool updateBackgroundLayer(bool needsBackgroundLayer); |
227 bool updateMaskLayer(bool needsMaskLayer); | 226 bool updateMaskLayer(bool needsMaskLayer); |
228 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer); | 227 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer); |
229 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->scroll
ableArea() && m_owningLayer->scrollableArea()->horizontalScrollbar(); } | 228 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->scroll
ableArea() && m_owningLayer->scrollableArea()->horizontalScrollbar(); } |
230 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->scrollab
leArea() && m_owningLayer->scrollableArea()->verticalScrollbar(); } | 229 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->scrollab
leArea() && m_owningLayer->scrollableArea()->verticalScrollbar(); } |
231 bool requiresScrollCornerLayer() const { return m_owningLayer->scrollableAre
a() && !m_owningLayer->scrollableArea()->scrollCornerAndResizerRect().isEmpty();
} | 230 bool requiresScrollCornerLayer() const { return m_owningLayer->scrollableAre
a() && !m_owningLayer->scrollableArea()->scrollCornerAndResizerRect().isEmpty();
} |
232 bool updateScrollingLayers(bool scrollingLayers); | 231 bool updateScrollingLayers(bool scrollingLayers); |
233 void updateScrollParent(RenderLayer*); | 232 void updateScrollParent(RenderLayer*); |
234 void updateClipParent(RenderLayer*); | 233 void updateClipParent(RenderLayer*); |
235 bool updateSquashingLayers(bool needsSquashingLayers); | 234 bool updateSquashingLayers(bool needsSquashingLayers); |
236 void updateDrawsContent(bool isSimpleContainer); | 235 void updateDrawsContent(); |
237 void updateChildrenTransform(); | 236 void updateChildrenTransform(); |
238 void registerScrollingLayers(); | 237 void registerScrollingLayers(); |
239 | 238 |
240 void adjustBoundsForSubPixelAccumulation(const RenderLayer* compositedAncest
or, IntRect& localCompositingBounds, IntRect& relativeCompositingBounds, IntPoin
t& delta); | 239 void adjustBoundsForSubPixelAccumulation(const RenderLayer* compositedAncest
or, IntRect& localCompositingBounds, IntRect& relativeCompositingBounds, IntPoin
t& delta); |
241 | 240 |
242 void setBackgroundLayerPaintsFixedRootBackground(bool); | 241 void setBackgroundLayerPaintsFixedRootBackground(bool); |
243 | 242 |
244 GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const; | 243 GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const; |
245 | 244 |
246 LayoutSize contentOffsetInCompostingLayer() const; | 245 LayoutSize contentOffsetInCompostingLayer() const; |
247 // Result is transform origin in pixels. | 246 // Result is transform origin in pixels. |
248 FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const; | 247 FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const; |
249 // Result is perspective origin in pixels. | 248 // Result is perspective origin in pixels. |
250 FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const; | 249 FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const; |
251 | 250 |
252 void updateSquashingLayerGeometry(const IntPoint& delta); | 251 void updateSquashingLayerGeometry(const IntPoint& delta); |
253 | 252 |
254 void updateOpacity(const RenderStyle*); | 253 void updateOpacity(const RenderStyle*); |
255 void updateTransform(const RenderStyle*); | 254 void updateTransform(const RenderStyle*); |
256 void updateLayerBlendMode(const RenderStyle*); | 255 void updateLayerBlendMode(const RenderStyle*); |
257 void updateIsRootForIsolatedGroup(); | 256 void updateIsRootForIsolatedGroup(); |
258 // Return the opacity value that this layer should use for compositing. | 257 // Return the opacity value that this layer should use for compositing. |
259 float compositingOpacity(float rendererOpacity) const; | 258 float compositingOpacity(float rendererOpacity) const; |
260 | 259 |
261 bool isMainFrameRenderViewLayer() const; | 260 bool isMainFrameRenderViewLayer() const; |
262 | 261 |
263 bool paintsBoxDecorations() const; | |
264 bool paintsChildren() const; | 262 bool paintsChildren() const; |
265 | 263 |
266 // Returns true if this compositing layer has no visible content. | |
267 bool isSimpleContainerCompositingLayer() const; | |
268 // Returns true if this layer has content that needs to be rendered by paint
ing into the backing store. | 264 // Returns true if this layer has content that needs to be rendered by paint
ing into the backing store. |
269 bool containsPaintedContent(bool isSimpleContainer) const; | 265 bool containsPaintedContent() const; |
| 266 bool hasVisibleContentOrNonCompositingDescendantLayers() const; |
270 // Returns true if the RenderLayer just contains an image that we can compos
ite directly. | 267 // Returns true if the RenderLayer just contains an image that we can compos
ite directly. |
271 bool isDirectlyCompositedImage() const; | 268 bool isDirectlyCompositedImage() const; |
272 void updateImageContents(); | 269 void updateImageContents(); |
273 | 270 |
274 Color rendererBackgroundColor() const; | 271 Color rendererBackgroundColor() const; |
275 void updateBackgroundColor(bool isSimpleContainer); | 272 void updateBackgroundColor(); |
276 void updateContentsRect(bool isSimpleContainer); | 273 void updateContentsRect(); |
277 | 274 |
278 void updateCompositingReasons(); | 275 void updateCompositingReasons(); |
279 | 276 |
280 bool hasVisibleNonCompositingDescendantLayers() const; | 277 bool hasVisibleNonCompositingDescendantLayers() const; |
281 | 278 |
282 bool shouldClipCompositedBounds() const; | 279 bool shouldClipCompositedBounds() const; |
283 | 280 |
284 void paintsIntoCompositedAncestorChanged(); | 281 void paintsIntoCompositedAncestorChanged(); |
285 | 282 |
286 void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& c
lip); | 283 void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& c
lip); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 bool m_isMainFrameRenderViewLayer; | 364 bool m_isMainFrameRenderViewLayer; |
368 bool m_requiresOwnBackingStoreForIntrinsicReasons; | 365 bool m_requiresOwnBackingStoreForIntrinsicReasons; |
369 bool m_requiresOwnBackingStoreForAncestorReasons; | 366 bool m_requiresOwnBackingStoreForAncestorReasons; |
370 bool m_canCompositeFilters; | 367 bool m_canCompositeFilters; |
371 bool m_backgroundLayerPaintsFixedRootBackground; | 368 bool m_backgroundLayerPaintsFixedRootBackground; |
372 }; | 369 }; |
373 | 370 |
374 } // namespace WebCore | 371 } // namespace WebCore |
375 | 372 |
376 #endif // CompositedLayerMapping_h | 373 #endif // CompositedLayerMapping_h |
OLD | NEW |