Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: ui/views/view.h

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: nits Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index dddf1590e616fb08b5bb9c3f3d6a0f841af302f2..73fd7f86343aa4190c22c004e7976d8c58680606 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -1046,6 +1046,10 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
void RemoveObserver(ViewObserver* observer);
bool HasObserver(const ViewObserver* observer) const;
+ // Returns the type of scaling to be done for this View. Values should be from
+ // ui::PaintContext::ScaleType.
+ virtual int GetContextScaleType() const;
oshima 2017/06/17 16:05:53 can you make this protected?
+
protected:
// Used to track a drag. RootView passes this into
// ProcessMousePressed/Dragged.
@@ -1316,12 +1320,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.

Powered by Google App Engine
This is Rietveld 408576698