| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // FIXME: By using the same RenderSurface for both the content and its refle
ction, | 145 // FIXME: By using the same RenderSurface for both the content and its refle
ction, |
| 146 // it's currently not possible to apply a separate mask to the reflection la
yer | 146 // it's currently not possible to apply a separate mask to the reflection la
yer |
| 147 // or correctly handle opacity in reflections (opacity must be applied after
drawing | 147 // or correctly handle opacity in reflections (opacity must be applied after
drawing |
| 148 // both the layer and its reflection). The solution is to introduce yet anot
her RenderSurface | 148 // both the layer and its reflection). The solution is to introduce yet anot
her RenderSurface |
| 149 // to draw the layer and its reflection in. For now we only apply a separate
reflection | 149 // to draw the layer and its reflection in. For now we only apply a separate
reflection |
| 150 // mask if the contents don't have a mask of their own. | 150 // mask if the contents don't have a mask of their own. |
| 151 CCLayerImpl* replicaMaskLayer = m_maskLayer; | 151 CCLayerImpl* replicaMaskLayer = m_maskLayer; |
| 152 if (!m_maskLayer && m_owningLayer->replicaLayer()) | 152 if (!m_maskLayer && m_owningLayer->replicaLayer()) |
| 153 replicaMaskLayer = m_owningLayer->replicaLayer()->maskLayer(); | 153 replicaMaskLayer = m_owningLayer->replicaLayer()->maskLayer(); |
| 154 | 154 |
| 155 layerRenderer()->setScissorToRect(m_scissorRect); | 155 if (m_owningLayer->parent() && m_owningLayer->parent()->usesLayerScissor()) |
| 156 layerRenderer()->setScissorToRect(m_scissorRect); |
| 157 else |
| 158 GLC(layerRenderer()->context(), layerRenderer()->context()->disable(Grap
hicsContext3D::SCISSOR_TEST)); |
| 159 |
| 156 | 160 |
| 157 // Reflection draws before the layer. | 161 // Reflection draws before the layer. |
| 158 if (m_owningLayer->replicaLayer()) | 162 if (m_owningLayer->replicaLayer()) |
| 159 drawSurface(replicaMaskLayer, m_replicaDrawTransform); | 163 drawSurface(replicaMaskLayer, m_replicaDrawTransform); |
| 160 | 164 |
| 161 drawSurface(m_maskLayer, m_drawTransform); | 165 drawSurface(m_maskLayer, m_drawTransform); |
| 162 } | 166 } |
| 163 | 167 |
| 164 String RenderSurfaceChromium::name() const | 168 String RenderSurfaceChromium::name() const |
| 165 { | 169 { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 176 { | 180 { |
| 177 writeIndent(ts, indent); | 181 writeIndent(ts, indent); |
| 178 ts << name() << "\n"; | 182 ts << name() << "\n"; |
| 179 | 183 |
| 180 writeIndent(ts, indent+1); | 184 writeIndent(ts, indent+1); |
| 181 ts << "contentRect: (" << m_contentRect.x() << ", " << m_contentRect.y() <<
", " << m_contentRect.width() << ", " << m_contentRect.height() << "\n"; | 185 ts << "contentRect: (" << m_contentRect.x() << ", " << m_contentRect.y() <<
", " << m_contentRect.width() << ", " << m_contentRect.height() << "\n"; |
| 182 } | 186 } |
| 183 | 187 |
| 184 } | 188 } |
| 185 #endif // USE(ACCELERATED_COMPOSITING) | 189 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |