Chromium Code Reviews| Index: ui/views/view.h |
| diff --git a/ui/views/view.h b/ui/views/view.h |
| index dddf1590e616fb08b5bb9c3f3d6a0f841af302f2..3786b028a1690a00a41a9025257902dd25762d9f 100644 |
| --- a/ui/views/view.h |
| +++ b/ui/views/view.h |
| @@ -1268,6 +1268,12 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
| // hierarchy). |
| virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) {} |
| + // Pixel Canvas -------------------------------------------------------------- |
| + |
| + // Returns the type of scaling to be done for this View. Values should be from |
| + // ui::PaintContext::ScaleType. |
| + virtual int GetContextScaleType() const; |
|
sky
2017/06/23 23:40:23
Why is this virtual? Why would it need to be overr
malaykeshav
2017/06/24 00:30:03
The ScaleType can vary depending on whether we are
|
| + |
| // Debugging ----------------------------------------------------------------- |
| #if !defined(NDEBUG) |
| @@ -1316,12 +1322,13 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
| // during painting. |
| bool ShouldPaint() const; |
| - // Returns the offset that should be used when constructing the paint context |
| + // Returns the bounds that should be used when constructing the paint context |
| // for this view. |
| - gfx::Vector2d GetPaintContextOffset() const; |
| + gfx::Rect GetPaintContextBounds() const; |
| // Adjusts the transform of |recorder| in advance of painting. |
| - void SetupTransformRecorderForPainting(ui::TransformRecorder* recorder) const; |
| + void SetupTransformRecorderForPainting(ui::TransformRecorder* recorder, |
| + const ui::PaintContext& context) const; |
| // Recursively calls the painting method |func| on all non-layered children, |
| // in Z order. |