OLD | NEW |
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // The absolute bounding rect of all the squashed layers. | 232 // The absolute bounding rect of all the squashed layers. |
233 IntRect boundingRect; | 233 IntRect boundingRect; |
234 | 234 |
235 // This is simply the sum of the areas of the squashed rects. This can b
e very skewed if the rects overlap, | 235 // This is simply the sum of the areas of the squashed rects. This can b
e very skewed if the rects overlap, |
236 // but should be close enough to drive a heuristic. | 236 // but should be close enough to drive a heuristic. |
237 uint64_t totalAreaOfSquashedRects; | 237 uint64_t totalAreaOfSquashedRects; |
238 }; | 238 }; |
239 | 239 |
240 bool hasUnresolvedDirtyBits(); | 240 bool hasUnresolvedDirtyBits(); |
241 | 241 |
| 242 enum NeedsSquashingBehavior { |
| 243 ShouldPaintIntoOwnLayer = 0, |
| 244 ShouldSquash = 1, |
| 245 ShouldPaintIntoSameLayer = 2 |
| 246 }; |
| 247 |
242 bool squashingWouldExceedSparsityTolerance(const RenderLayer* candidate, con
st SquashingState&); | 248 bool squashingWouldExceedSparsityTolerance(const RenderLayer* candidate, con
st SquashingState&); |
243 bool canSquashIntoCurrentSquashingOwner(const RenderLayer* candidate, const
SquashingState&); | 249 NeedsSquashingBehavior computeSquashingBehaviorWhenSquashingRequired(const R
enderLayer* candidate, const SquashingState&); |
244 | 250 |
245 CompositingStateTransitionType computeCompositedLayerUpdate(RenderLayer*); | 251 CompositingStateTransitionType computeCompositedLayerUpdate(RenderLayer*); |
246 // Make updates to the layer based on viewport-constrained properties such a
s position:fixed. This can in turn affect | 252 // Make updates to the layer based on viewport-constrained properties such a
s position:fixed. This can in turn affect |
247 // compositing. | 253 // compositing. |
248 bool updateLayerIfViewportConstrained(RenderLayer*); | 254 bool updateLayerIfViewportConstrained(RenderLayer*); |
249 | 255 |
250 // GraphicsLayerClient implementation | 256 // GraphicsLayerClient implementation |
251 virtual void notifyAnimationStarted(const GraphicsLayer*, double) OVERRIDE {
} | 257 virtual void notifyAnimationStarted(const GraphicsLayer*, double) OVERRIDE {
} |
252 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect&) OVERRIDE; | 258 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect&) OVERRIDE; |
253 | 259 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; | 362 OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar; |
357 OwnPtr<GraphicsLayer> m_layerForScrollCorner; | 363 OwnPtr<GraphicsLayer> m_layerForScrollCorner; |
358 #if USE(RUBBER_BANDING) | 364 #if USE(RUBBER_BANDING) |
359 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; | 365 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; |
360 #endif | 366 #endif |
361 }; | 367 }; |
362 | 368 |
363 } // namespace WebCore | 369 } // namespace WebCore |
364 | 370 |
365 #endif // RenderLayerCompositor_h | 371 #endif // RenderLayerCompositor_h |
OLD | NEW |