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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) OVERRIDE; | 177 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip) OVERRIDE; |
178 virtual bool isTrackingRepaints() const OVERRIDE; | 178 virtual bool isTrackingRepaints() const OVERRIDE; |
179 | 179 |
180 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const; | 180 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const; |
181 | 181 |
182 #ifndef NDEBUG | 182 #ifndef NDEBUG |
183 virtual void verifyNotPainting() OVERRIDE; | 183 virtual void verifyNotPainting() OVERRIDE; |
184 #endif | 184 #endif |
185 | 185 |
186 LayoutRect contentsBox() const; | 186 LayoutRect contentsBox() const; |
187 IntRect backgroundBox() const; | |
188 | 187 |
189 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } | 188 GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizo
ntalScrollbar.get(); } |
190 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } | 189 GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVertical
Scrollbar.get(); } |
191 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.
get(); } | 190 GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.
get(); } |
192 | 191 |
193 void updateFilters(const RenderStyle*); | 192 void updateFilters(const RenderStyle*); |
194 bool canCompositeFilters() const { return m_canCompositeFilters; } | 193 bool canCompositeFilters() const { return m_canCompositeFilters; } |
195 | 194 |
196 void setBlendMode(blink::WebBlendMode); | 195 void setBlendMode(blink::WebBlendMode); |
197 | 196 |
(...skipping 18 matching lines...) Expand all Loading... |
216 bool updateBackgroundLayer(bool needsBackgroundLayer); | 215 bool updateBackgroundLayer(bool needsBackgroundLayer); |
217 bool updateMaskLayer(bool needsMaskLayer); | 216 bool updateMaskLayer(bool needsMaskLayer); |
218 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer); | 217 bool updateClippingMaskLayers(bool needsChildClippingMaskLayer); |
219 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->scroll
ableArea() && m_owningLayer->scrollableArea()->horizontalScrollbar(); } | 218 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer->scroll
ableArea() && m_owningLayer->scrollableArea()->horizontalScrollbar(); } |
220 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->scrollab
leArea() && m_owningLayer->scrollableArea()->verticalScrollbar(); } | 219 bool requiresVerticalScrollbarLayer() const { return m_owningLayer->scrollab
leArea() && m_owningLayer->scrollableArea()->verticalScrollbar(); } |
221 bool requiresScrollCornerLayer() const { return m_owningLayer->scrollableAre
a() && !m_owningLayer->scrollableArea()->scrollCornerAndResizerRect().isEmpty();
} | 220 bool requiresScrollCornerLayer() const { return m_owningLayer->scrollableAre
a() && !m_owningLayer->scrollableArea()->scrollCornerAndResizerRect().isEmpty();
} |
222 bool updateScrollingLayers(bool scrollingLayers); | 221 bool updateScrollingLayers(bool scrollingLayers); |
223 void updateScrollParent(RenderLayer*); | 222 void updateScrollParent(RenderLayer*); |
224 void updateClipParent(RenderLayer*); | 223 void updateClipParent(RenderLayer*); |
225 bool updateSquashingLayers(bool needsSquashingLayers); | 224 bool updateSquashingLayers(bool needsSquashingLayers); |
226 void updateDrawsContent(bool isSimpleContainer); | 225 void updateDrawsContent(); |
227 void updateChildrenTransform(); | 226 void updateChildrenTransform(); |
228 void registerScrollingLayers(); | 227 void registerScrollingLayers(); |
229 | 228 |
230 void adjustBoundsForSubPixelAccumulation(const RenderLayer* compositedAncest
or, IntRect& localCompositingBounds, IntRect& relativeCompositingBounds, IntPoin
t& delta); | 229 void adjustBoundsForSubPixelAccumulation(const RenderLayer* compositedAncest
or, IntRect& localCompositingBounds, IntRect& relativeCompositingBounds, IntPoin
t& delta); |
231 | 230 |
232 void setBackgroundLayerPaintsFixedRootBackground(bool); | 231 void setBackgroundLayerPaintsFixedRootBackground(bool); |
233 | 232 |
234 GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const; | 233 GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const; |
235 | 234 |
236 LayoutSize contentOffsetInCompostingLayer() const; | 235 LayoutSize contentOffsetInCompostingLayer() const; |
237 // Result is transform origin in pixels. | 236 // Result is transform origin in pixels. |
238 FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const; | 237 FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const; |
239 // Result is perspective origin in pixels. | 238 // Result is perspective origin in pixels. |
240 FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const; | 239 FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const; |
241 | 240 |
242 void updateSquashingLayerGeometry(const IntPoint& delta); | 241 void updateSquashingLayerGeometry(const IntPoint& delta); |
243 | 242 |
244 void updateOpacity(const RenderStyle*); | 243 void updateOpacity(const RenderStyle*); |
245 void updateTransform(const RenderStyle*); | 244 void updateTransform(const RenderStyle*); |
246 void updateLayerBlendMode(const RenderStyle*); | 245 void updateLayerBlendMode(const RenderStyle*); |
247 void updateIsRootForIsolatedGroup(); | 246 void updateIsRootForIsolatedGroup(); |
248 // Return the opacity value that this layer should use for compositing. | 247 // Return the opacity value that this layer should use for compositing. |
249 float compositingOpacity(float rendererOpacity) const; | 248 float compositingOpacity(float rendererOpacity) const; |
250 | 249 |
251 bool isMainFrameRenderViewLayer() const; | 250 bool isMainFrameRenderViewLayer() const; |
252 | 251 |
253 bool paintsBoxDecorations() const; | |
254 bool paintsChildren() const; | 252 bool paintsChildren() const; |
255 | 253 |
256 // Returns true if this compositing layer has no visible content. | |
257 bool isSimpleContainerCompositingLayer() const; | |
258 // Returns true if this layer has content that needs to be rendered by paint
ing into the backing store. | 254 // Returns true if this layer has content that needs to be rendered by paint
ing into the backing store. |
259 bool containsPaintedContent(bool isSimpleContainer) const; | 255 bool containsPaintedContent() const; |
260 // Returns true if the RenderLayer just contains an image that we can compos
ite directly. | 256 // Returns true if the RenderLayer just contains an image that we can compos
ite directly. |
261 bool isDirectlyCompositedImage() const; | 257 bool isDirectlyCompositedImage() const; |
262 void updateImageContents(); | 258 void updateImageContents(); |
263 | 259 |
264 Color rendererBackgroundColor() const; | 260 Color rendererBackgroundColor() const; |
265 void updateBackgroundColor(bool isSimpleContainer); | 261 void updateBackgroundColor(); |
266 void updateContentsRect(bool isSimpleContainer); | 262 void updateContentsRect(); |
267 | 263 |
268 void updateCompositingReasons(); | 264 void updateCompositingReasons(); |
269 | 265 |
270 bool hasVisibleNonCompositingDescendantLayers() const; | 266 bool hasVisibleNonCompositingDescendantLayers() const; |
271 | 267 |
272 bool shouldClipCompositedBounds() const; | 268 bool shouldClipCompositedBounds() const; |
273 | 269 |
274 void paintsIntoCompositedAncestorChanged(); | 270 void paintsIntoCompositedAncestorChanged(); |
275 | 271 |
276 void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& c
lip); | 272 void doPaintTask(GraphicsLayerPaintInfo&, GraphicsContext*, const IntRect& c
lip); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 bool m_isMainFrameRenderViewLayer; | 353 bool m_isMainFrameRenderViewLayer; |
358 bool m_requiresOwnBackingStoreForIntrinsicReasons; | 354 bool m_requiresOwnBackingStoreForIntrinsicReasons; |
359 bool m_requiresOwnBackingStoreForAncestorReasons; | 355 bool m_requiresOwnBackingStoreForAncestorReasons; |
360 bool m_canCompositeFilters; | 356 bool m_canCompositeFilters; |
361 bool m_backgroundLayerPaintsFixedRootBackground; | 357 bool m_backgroundLayerPaintsFixedRootBackground; |
362 }; | 358 }; |
363 | 359 |
364 } // namespace WebCore | 360 } // namespace WebCore |
365 | 361 |
366 #endif // CompositedLayerMapping_h | 362 #endif // CompositedLayerMapping_h |
OLD | NEW |