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/PartPainter.h" | 6 #include "core/paint/PartPainter.h" |
7 | 7 |
| 8 #include "core/layout/Layer.h" |
8 #include "core/paint/BoxPainter.h" | 9 #include "core/paint/BoxPainter.h" |
9 #include "core/paint/GraphicsContextAnnotator.h" | 10 #include "core/paint/GraphicsContextAnnotator.h" |
10 #include "core/paint/RenderDrawingRecorder.h" | 11 #include "core/paint/RenderDrawingRecorder.h" |
11 #include "core/paint/RoundedInnerRectClipper.h" | 12 #include "core/paint/RoundedInnerRectClipper.h" |
12 #include "core/paint/ScrollableAreaPainter.h" | 13 #include "core/paint/ScrollableAreaPainter.h" |
13 #include "core/paint/TransformRecorder.h" | 14 #include "core/paint/TransformRecorder.h" |
14 #include "core/rendering/PaintInfo.h" | 15 #include "core/rendering/PaintInfo.h" |
15 #include "core/rendering/RenderLayer.h" | |
16 #include "core/rendering/RenderPart.h" | 16 #include "core/rendering/RenderPart.h" |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 | 19 |
20 void PartPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs
et) | 20 void PartPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs
et) |
21 { | 21 { |
22 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, &m_renderPart); | 22 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, &m_renderPart); |
23 | 23 |
24 if (!m_renderPart.shouldPaint(paintInfo, paintOffset)) | 24 if (!m_renderPart.shouldPaint(paintInfo, paintOffset)) |
25 return; | 25 return; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 IntSize widgetPaintOffset = paintLocation - widgetLocation; | 86 IntSize widgetPaintOffset = paintLocation - widgetLocation; |
87 // When painting widgets into compositing layers, tx and ty are relative to
the enclosing compositing layer, | 87 // When painting widgets into compositing layers, tx and ty are relative to
the enclosing compositing layer, |
88 // not the root. In this case, shift the CTM and adjust the paintRect to be
root-relative to fix plug-in drawing. | 88 // not the root. In this case, shift the CTM and adjust the paintRect to be
root-relative to fix plug-in drawing. |
89 TransformRecorder transform(*paintInfo.context, m_renderPart.displayItemClie
nt(), | 89 TransformRecorder transform(*paintInfo.context, m_renderPart.displayItemClie
nt(), |
90 AffineTransform::translation(widgetPaintOffset.width(), widgetPaintOffse
t.height())); | 90 AffineTransform::translation(widgetPaintOffset.width(), widgetPaintOffse
t.height())); |
91 paintRect.move(-widgetPaintOffset); | 91 paintRect.move(-widgetPaintOffset); |
92 widget->paint(paintInfo.context, paintRect); | 92 widget->paint(paintInfo.context, paintRect); |
93 } | 93 } |
94 | 94 |
95 } // namespace blink | 95 } // namespace blink |
OLD | NEW |