Chromium Code Reviews| Index: ui/views/view.h |
| diff --git a/ui/views/view.h b/ui/views/view.h |
| index d719730b70f9792edd55686791daa2772292c031..236df7be3c7a1777349cd642c8211656f91443c7 100644 |
| --- a/ui/views/view.h |
| +++ b/ui/views/view.h |
| @@ -61,6 +61,7 @@ class Layer; |
| class NativeTheme; |
| class PaintContext; |
| class ThemeProvider; |
| +class TransformRecorder; |
| } |
| namespace views { |
| @@ -1396,6 +1397,34 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
| // to the view's coordinate system. |
| bool ConvertRectFromAncestor(const View* ancestor, gfx::RectF* rect) const; |
| + // Painting ------------------------------------------------------------------ |
|
sky
2017/03/22 15:26:05
There's already a section with this name on line 1
Peter Kasting
2017/03/22 21:39:11
Oh hey! I looked for that and missed it. Thanks.
|
| + |
| + // Returns true if this view should be painted, i.e. is visible and nonempty. |
|
sky
2017/03/22 15:26:05
Can you make this comment more specific. It doesn'
Peter Kasting
2017/03/22 21:39:11
Done.
|
| + bool ShouldPaint() const; |
| + |
| + // Returns the offset that should be used when constructing the paint context |
| + // for this view. |
| + gfx::Vector2d GetPaintContextOffset() const; |
| + |
| + // Adjusts the transform of |recorder| in advance of painting. |
| + void SetupTransformRecorderForPainting(ui::TransformRecorder* recorder) const; |
| + |
| + // Recursively calls the painting method |func| on all non-layered children, |
| + // in Z order. |
| + void RecursivePaintHelper(void (View::*func)(const ui::PaintContext&), |
| + const ui::PaintContext& context); |
| + |
| + // Invokes Paint() and, if necessary, PaintDebugRects(). Should be called |
| + // only on the root of a widget/layer. PaintDebugRects() is invoked as a |
| + // separate pass, instead of being rolled into Paint(), so that siblings will |
| + // not obscure debug rects. |
| + void PaintRoot(const ui::PaintContext& parent_context); |
|
sky
2017/03/22 15:26:05
Generally a 'root' view refers to RootView. That i
Peter Kasting
2017/03/22 21:39:11
Done.
I had the same concerns as you but couldn't
|
| + |
| + // Draws a semitransparent rect to indicate the bounds of this view. |
| + // Recursively does the same for all children. Invoked only with |
| + // --draw-view-bounds-rects. |
| + void PaintDebugRects(const ui::PaintContext& parent_context); |
| + |
| // Accelerated painting ------------------------------------------------------ |
| // Creates the layer and related fields for this view. |