| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/InlineFlowBoxPainter.h" | 6 #include "core/paint/InlineFlowBoxPainter.h" |
| 7 | 7 |
| 8 #include "core/paint/BoxPainter.h" | 8 #include "core/paint/BoxPainter.h" |
| 9 #include "core/paint/RenderDrawingRecorder.h" | 9 #include "core/paint/RenderDrawingRecorder.h" |
| 10 #include "core/rendering/InlineFlowBox.h" | 10 #include "core/rendering/InlineFlowBox.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 bool pushTransparencyLayer = false; | 270 bool pushTransparencyLayer = false; |
| 271 bool compositedMask = m_inlineFlowBox.renderer().hasLayer() && m_inlineFlowB
ox.boxModelObject()->layer()->hasCompositedMask(); | 271 bool compositedMask = m_inlineFlowBox.renderer().hasLayer() && m_inlineFlowB
ox.boxModelObject()->layer()->hasCompositedMask(); |
| 272 bool flattenCompositingLayers = m_inlineFlowBox.renderer().view()->frameView
() && m_inlineFlowBox.renderer().view()->frameView()->paintBehavior() & PaintBeh
aviorFlattenCompositingLayers; | 272 bool flattenCompositingLayers = m_inlineFlowBox.renderer().view()->frameView
() && m_inlineFlowBox.renderer().view()->frameView()->paintBehavior() & PaintBeh
aviorFlattenCompositingLayers; |
| 273 CompositeOperator compositeOp = CompositeSourceOver; | 273 CompositeOperator compositeOp = CompositeSourceOver; |
| 274 if (!compositedMask || flattenCompositingLayers) { | 274 if (!compositedMask || flattenCompositingLayers) { |
| 275 if ((maskBoxImage && m_inlineFlowBox.renderer().style()->maskLayers().ha
sImage()) || m_inlineFlowBox.renderer().style()->maskLayers().next()) | 275 if ((maskBoxImage && m_inlineFlowBox.renderer().style()->maskLayers().ha
sImage()) || m_inlineFlowBox.renderer().style()->maskLayers().next()) |
| 276 pushTransparencyLayer = true; | 276 pushTransparencyLayer = true; |
| 277 | 277 |
| 278 compositeOp = CompositeDestinationIn; | 278 compositeOp = CompositeDestinationIn; |
| 279 if (pushTransparencyLayer) { | 279 if (pushTransparencyLayer) { |
| 280 paintInfo.context->setCompositeOperation(CompositeDestinationIn); | 280 paintInfo.context->setCompositeOperation(SkXfermode::kDstIn_Mode); |
| 281 paintInfo.context->beginTransparencyLayer(1.0f); | 281 paintInfo.context->beginTransparencyLayer(1.0f); |
| 282 compositeOp = CompositeSourceOver; | 282 compositeOp = CompositeSourceOver; |
| 283 } | 283 } |
| 284 } | 284 } |
| 285 | 285 |
| 286 LayoutRect paintRect = LayoutRect(adjustedPaintOffset, frameRect.size()); | 286 LayoutRect paintRect = LayoutRect(adjustedPaintOffset, frameRect.size()); |
| 287 paintFillLayers(paintInfo, Color::transparent, m_inlineFlowBox.renderer().st
yle()->maskLayers(), paintRect, compositeOp); | 287 paintFillLayers(paintInfo, Color::transparent, m_inlineFlowBox.renderer().st
yle()->maskLayers(), paintRect, compositeOp); |
| 288 | 288 |
| 289 bool hasBoxImage = maskBoxImage && maskBoxImage->canRender(m_inlineFlowBox.r
enderer(), m_inlineFlowBox.renderer().style()->effectiveZoom()); | 289 bool hasBoxImage = maskBoxImage && maskBoxImage->canRender(m_inlineFlowBox.r
enderer(), m_inlineFlowBox.renderer().style()->effectiveZoom()); |
| 290 if (!hasBoxImage || !maskBoxImage->isLoaded()) { | 290 if (!hasBoxImage || !maskBoxImage->isLoaded()) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 rect.setHeight(logicalHeight); | 330 rect.setHeight(logicalHeight); |
| 331 } else { | 331 } else { |
| 332 rect.setX(logicalTop); | 332 rect.setX(logicalTop); |
| 333 rect.setWidth(logicalHeight); | 333 rect.setWidth(logicalHeight); |
| 334 } | 334 } |
| 335 } | 335 } |
| 336 return rect; | 336 return rect; |
| 337 } | 337 } |
| 338 | 338 |
| 339 } // namespace blink | 339 } // namespace blink |
| OLD | NEW |