Chromium Code Reviews| 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 "core/paint/PaintLayerPainter.h" | 5 #include "core/paint/PaintLayerPainter.h" |
| 6 | 6 |
| 7 #include "core/frame/LocalFrame.h" | 7 #include "core/frame/LocalFrame.h" |
| 8 #include "core/layout/LayoutView.h" | 8 #include "core/layout/LayoutView.h" |
| 9 #include "core/paint/ClipPathClipper.h" | 9 #include "core/paint/ClipPathClipper.h" |
| 10 #include "core/paint/FilterPainter.h" | 10 #include "core/paint/FilterPainter.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 m_paintLayer.layoutObject().view()->frame()->shouldThrottleRendering()) | 313 m_paintLayer.layoutObject().view()->frame()->shouldThrottleRendering()) |
| 314 return result; | 314 return result; |
| 315 | 315 |
| 316 // Ensure our lists are up to date. | 316 // Ensure our lists are up to date. |
| 317 m_paintLayer.stackingNode()->updateLayerListsIfNeeded(); | 317 m_paintLayer.stackingNode()->updateLayerListsIfNeeded(); |
| 318 | 318 |
| 319 LayoutSize subpixelAccumulation = | 319 LayoutSize subpixelAccumulation = |
| 320 m_paintLayer.compositingState() == PaintsIntoOwnBacking | 320 m_paintLayer.compositingState() == PaintsIntoOwnBacking |
| 321 ? m_paintLayer.subpixelAccumulation() | 321 ? m_paintLayer.subpixelAccumulation() |
| 322 : paintingInfoArg.subPixelAccumulation; | 322 : paintingInfoArg.subPixelAccumulation; |
| 323 // The composited scrolling contents layer position rounds the subpixel | |
| 324 // accumulation. | |
| 325 if (isPaintingScrollingContent) | |
|
chrishtr
2017/04/07 21:03:12
I think you can move the logic determining subpixe
flackr
2017/04/21 03:43:44
Done. The conditional on 320 was strange since it
| |
| 326 subpixelAccumulation = LayoutSize(roundedIntSize(subpixelAccumulation)); | |
| 323 ShouldRespectOverflowClipType respectOverflowClip = | 327 ShouldRespectOverflowClipType respectOverflowClip = |
| 324 shouldRespectOverflowClip(paintFlags, m_paintLayer.layoutObject()); | 328 shouldRespectOverflowClip(paintFlags, m_paintLayer.layoutObject()); |
| 325 | 329 |
| 326 Optional<SubsequenceRecorder> subsequenceRecorder; | 330 Optional<SubsequenceRecorder> subsequenceRecorder; |
| 327 bool shouldClearEmptyPaintPhaseFlags = false; | 331 bool shouldClearEmptyPaintPhaseFlags = false; |
| 328 if (shouldCreateSubsequence(m_paintLayer, context, paintingInfoArg, | 332 if (shouldCreateSubsequence(m_paintLayer, context, paintingInfoArg, |
| 329 paintFlags)) { | 333 paintFlags)) { |
| 330 if (!shouldRepaintSubsequence(m_paintLayer, paintingInfoArg, | 334 if (!shouldRepaintSubsequence(m_paintLayer, paintingInfoArg, |
| 331 respectOverflowClip, subpixelAccumulation, | 335 respectOverflowClip, subpixelAccumulation, |
| 332 shouldClearEmptyPaintPhaseFlags) && | 336 shouldClearEmptyPaintPhaseFlags) && |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1198 context, layoutObject, PaintPhaseClippingMask)) | 1202 context, layoutObject, PaintPhaseClippingMask)) |
| 1199 return; | 1203 return; |
| 1200 | 1204 |
| 1201 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect()); | 1205 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect()); |
| 1202 LayoutObjectDrawingRecorder drawingRecorder( | 1206 LayoutObjectDrawingRecorder drawingRecorder( |
| 1203 context, layoutObject, PaintPhaseClippingMask, snappedClipRect); | 1207 context, layoutObject, PaintPhaseClippingMask, snappedClipRect); |
| 1204 context.fillRect(snappedClipRect, Color::black); | 1208 context.fillRect(snappedClipRect, Color::black); |
| 1205 } | 1209 } |
| 1206 | 1210 |
| 1207 } // namespace blink | 1211 } // namespace blink |
| OLD | NEW |