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/ViewPainter.h" | 6 #include "core/paint/ViewPainter.h" |
7 | 7 |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
10 #include "core/layout/LayoutBox.h" | 10 #include "core/layout/LayoutBox.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 if (combinedBackgroundColor.alpha()) | 135 if (combinedBackgroundColor.alpha()) |
136 context.fillRect(documentRect, combinedBackgroundColor, (shouldDrawBackg
roundInSeparateBuffer || shouldClearCanvas) ? SkXfermode::kSrc_Mode : SkXfermode
::kSrcOver_Mode); | 136 context.fillRect(documentRect, combinedBackgroundColor, (shouldDrawBackg
roundInSeparateBuffer || shouldClearCanvas) ? SkXfermode::kSrc_Mode : SkXfermode
::kSrcOver_Mode); |
137 else if (shouldClearCanvas && !shouldDrawBackgroundInSeparateBuffer) | 137 else if (shouldClearCanvas && !shouldDrawBackgroundInSeparateBuffer) |
138 context.fillRect(documentRect, Color(), SkXfermode::kClear_Mode); | 138 context.fillRect(documentRect, Color(), SkXfermode::kClear_Mode); |
139 | 139 |
140 for (auto it = reversedPaintList.rbegin(); it != reversedPaintList.rend(); +
+it) { | 140 for (auto it = reversedPaintList.rbegin(); it != reversedPaintList.rend(); +
+it) { |
141 ASSERT((*it)->clip() == BorderFillBox); | 141 ASSERT((*it)->clip() == BorderFillBox); |
142 | 142 |
143 bool shouldPaintInViewportSpace = (*it)->attachment() == FixedBackground
Attachment; | 143 bool shouldPaintInViewportSpace = (*it)->attachment() == FixedBackground
Attachment; |
144 if (shouldPaintInViewportSpace) { | 144 if (shouldPaintInViewportSpace) { |
145 BoxPainter::paintFillLayerExtended(m_layoutView, paintInfo, Color(),
**it, LayoutRect(LayoutRect::infiniteIntRect()), BackgroundBleedNone); | 145 BoxPainter::paintFillLayer(m_layoutView, paintInfo, Color(), **it, L
ayoutRect(LayoutRect::infiniteIntRect()), BackgroundBleedNone); |
146 } else { | 146 } else { |
147 context.save(); | 147 context.save(); |
148 // TODO(trchen): We should be able to handle 3D-transformed root | 148 // TODO(trchen): We should be able to handle 3D-transformed root |
149 // background with slimming paint by using transform display items. | 149 // background with slimming paint by using transform display items. |
150 context.concatCTM(transform.toAffineTransform()); | 150 context.concatCTM(transform.toAffineTransform()); |
151 BoxPainter::paintFillLayerExtended(m_layoutView, paintInfo, Color(),
**it, LayoutRect(paintRect), BackgroundBleedNone); | 151 BoxPainter::paintFillLayer(m_layoutView, paintInfo, Color(), **it, L
ayoutRect(paintRect), BackgroundBleedNone); |
152 context.restore(); | 152 context.restore(); |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 if (shouldDrawBackgroundInSeparateBuffer) | 156 if (shouldDrawBackgroundInSeparateBuffer) |
157 context.endLayer(); | 157 context.endLayer(); |
158 } | 158 } |
159 | 159 |
160 } // namespace blink | 160 } // namespace blink |
OLD | NEW |