Index: ui/views/view.h |
diff --git a/ui/views/view.h b/ui/views/view.h |
index 7a8a7b327ebb5627de5a291fa7d0c06d35e3162e..7ac097f5102728ff4191743fabdead12176ff1fa 100644 |
--- a/ui/views/view.h |
+++ b/ui/views/view.h |
@@ -29,6 +29,7 @@ |
#include "ui/compositor/layer_delegate.h" |
#include "ui/compositor/layer_owner.h" |
#include "ui/compositor/paint_cache.h" |
+#include "ui/compositor/paint_context.h" |
#include "ui/events/event.h" |
#include "ui/events/event_target.h" |
#include "ui/gfx/geometry/insets.h" |
@@ -1271,6 +1272,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 ui::PaintContext::ScaleType GetContextScaleType() const; |
+ |
// Debugging ----------------------------------------------------------------- |
#if !defined(NDEBUG) |
@@ -1319,12 +1326,14 @@ 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 gfx::Vector2d& offset_from_parent) const; |
// Recursively calls the painting method |func| on all non-layered children, |
// in Z order. |