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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 m_graphicsLayer->setOpacity(compositingOpacity(style->opacity())); | 125 m_graphicsLayer->setOpacity(compositingOpacity(style->opacity())); |
126 } | 126 } |
127 | 127 |
128 void RenderLayerBacking::updateLayerTransform(const RenderStyle* style) | 128 void RenderLayerBacking::updateLayerTransform(const RenderStyle* style) |
129 { | 129 { |
130 // FIXME: This could use m_owningLayer->transform(), but that currently has
transform-origin | 130 // FIXME: This could use m_owningLayer->transform(), but that currently has
transform-origin |
131 // baked into it, and we don't want that. | 131 // baked into it, and we don't want that. |
132 TransformationMatrix t; | 132 TransformationMatrix t; |
133 if (m_owningLayer->hasTransform()) { | 133 if (m_owningLayer->hasTransform()) { |
134 style->applyTransform(t, toRenderBox(renderer())->borderBoxRect().size()
, RenderStyle::ExcludeTransformOrigin); | 134 style->applyTransform(t, toRenderBox(renderer())->borderBoxRect().size()
, RenderStyle::ExcludeTransformOrigin); |
135 makeMatrixRenderable(t, compositor()->hasAcceleratedCompositing()); | 135 makeMatrixRenderable(t, compositor()->canRender3DTransforms()); |
136 } | 136 } |
137 | 137 |
138 m_graphicsLayer->setTransform(t); | 138 m_graphicsLayer->setTransform(t); |
139 } | 139 } |
140 | 140 |
141 static bool hasNonZeroTransformOrigin(const RenderObject* renderer) | 141 static bool hasNonZeroTransformOrigin(const RenderObject* renderer) |
142 { | 142 { |
143 RenderStyle* style = renderer->style(); | 143 RenderStyle* style = renderer->style(); |
144 return (style->transformOriginX().type() == Fixed && style->transformOriginX
().value()) | 144 return (style->transformOriginX().type() == Fixed && style->transformOriginX
().value()) |
145 || (style->transformOriginY().type() == Fixed && style->transformOriginY
().value()); | 145 || (style->transformOriginY().type() == Fixed && style->transformOriginY
().value()); |
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 | 1299 |
1300 if (m_graphicsLayer->drawsContent()) | 1300 if (m_graphicsLayer->drawsContent()) |
1301 return m_graphicsLayer->usingTiledLayer() ? TiledCompositingLayer : Norm
alCompositingLayer; | 1301 return m_graphicsLayer->usingTiledLayer() ? TiledCompositingLayer : Norm
alCompositingLayer; |
1302 | 1302 |
1303 return ContainerCompositingLayer; | 1303 return ContainerCompositingLayer; |
1304 } | 1304 } |
1305 | 1305 |
1306 } // namespace WebCore | 1306 } // namespace WebCore |
1307 | 1307 |
1308 #endif // USE(ACCELERATED_COMPOSITING) | 1308 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |