| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #include "FloatPoint.h" | 31 #include "FloatPoint.h" |
| 32 #include "FloatPoint3D.h" | 32 #include "FloatPoint3D.h" |
| 33 #include "GraphicsLayer.h" | 33 #include "GraphicsLayer.h" |
| 34 #include "GraphicsLayerClient.h" | 34 #include "GraphicsLayerClient.h" |
| 35 #include "RenderLayer.h" | 35 #include "RenderLayer.h" |
| 36 #include "TransformationMatrix.h" | 36 #include "TransformationMatrix.h" |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 class KeyframeList; |
| 40 class RenderLayerCompositor; | 41 class RenderLayerCompositor; |
| 41 | 42 |
| 42 // RenderLayerBacking controls the compositing behavior for a single RenderLayer
. | 43 // RenderLayerBacking controls the compositing behavior for a single RenderLayer
. |
| 43 // It holds the various GraphicsLayers, and makes decisions about intra-layer re
ndering | 44 // It holds the various GraphicsLayers, and makes decisions about intra-layer re
ndering |
| 44 // optimizations. | 45 // optimizations. |
| 45 // | 46 // |
| 46 // There is one RenderLayerBacking for each RenderLayer that is composited. | 47 // There is one RenderLayerBacking for each RenderLayer that is composited. |
| 47 | 48 |
| 48 class RenderLayerBacking : public GraphicsLayerClient { | 49 class RenderLayerBacking : public GraphicsLayerClient { |
| 49 public: | 50 public: |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime); | 110 virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime); |
| 110 | 111 |
| 111 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip); | 112 virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsL
ayerPaintingPhase, const IntRect& clip); |
| 112 | 113 |
| 113 virtual IntRect contentsBox(const GraphicsLayer*); | 114 virtual IntRect contentsBox(const GraphicsLayer*); |
| 114 | 115 |
| 115 private: | 116 private: |
| 116 void createGraphicsLayer(); | 117 void createGraphicsLayer(); |
| 117 void destroyGraphicsLayer(); | 118 void destroyGraphicsLayer(); |
| 118 | 119 |
| 119 RenderBox* renderer() const { return m_owningLayer->renderer(); } | 120 RenderBoxModelObject* renderer() const { return m_owningLayer->renderer(); } |
| 120 RenderLayerCompositor* compositor() const { return m_owningLayer->compositor
(); } | 121 RenderLayerCompositor* compositor() const { return m_owningLayer->compositor
(); } |
| 121 | 122 |
| 122 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); | 123 bool updateClippingLayers(bool needsAncestorClip, bool needsDescendantClip); |
| 123 bool updateContentsLayer(bool needsContentsLayer); | 124 bool updateContentsLayer(bool needsContentsLayer); |
| 124 | 125 |
| 125 IntSize contentOffsetInCompostingLayer(); | 126 IntSize contentOffsetInCompostingLayer(); |
| 126 // Result is transform origin in pixels. | 127 // Result is transform origin in pixels. |
| 127 FloatPoint computeTransformOrigin(const IntRect& borderBox) const; | 128 FloatPoint computeTransformOrigin(const IntRect& borderBox) const; |
| 128 | 129 |
| 129 void updateLayerOpacity(); | 130 void updateLayerOpacity(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 bool m_simpleCompositingLayerStatusDirty : 1; // set if the test for simple
layers needs to be redone | 164 bool m_simpleCompositingLayerStatusDirty : 1; // set if the test for simple
layers needs to be redone |
| 164 | 165 |
| 165 bool m_compositingContentOffsetDirty: 1; | 166 bool m_compositingContentOffsetDirty: 1; |
| 166 }; | 167 }; |
| 167 | 168 |
| 168 } // namespace WebCore | 169 } // namespace WebCore |
| 169 | 170 |
| 170 #endif // USE(ACCELERATED_COMPOSITING) | 171 #endif // USE(ACCELERATED_COMPOSITING) |
| 171 | 172 |
| 172 #endif // RenderLayerBacking_h | 173 #endif // RenderLayerBacking_h |
| OLD | NEW |