Index: ui/compositor/paint_context.h |
diff --git a/ui/compositor/paint_context.h b/ui/compositor/paint_context.h |
index b9c51dd386a3dca5caf7daa4d15ea1a541f18511..e4cbf7c0b6593088c7b6969ae65783d77968e714 100644 |
--- a/ui/compositor/paint_context.h |
+++ b/ui/compositor/paint_context.h |
@@ -65,6 +65,18 @@ class COMPOSITOR_EXPORT PaintContext { |
const gfx::Rect& InvalidationForTesting() const { return invalidation_; } |
+ float device_scale_factor() const { return device_scale_factor_; } |
+ |
+ gfx::Rect GetPixelBounds(const gfx::Rect& bounds) const; |
+ |
+ gfx::Vector2dF CanvasScale() const; |
+ |
+ void UpdateSizeAndDSF(const gfx::Size& pixel_size, const gfx::Size& size); |
+ |
+ const gfx::Size& pixel_size() const { return pixel_size_; } |
+ |
+ const gfx::Size& size() const { return size_; } |
+ |
private: |
// The Recorder classes need access to the internal canvas and friends, but we |
// don't want to expose them on this class so that people must go through the |
@@ -90,9 +102,6 @@ class COMPOSITOR_EXPORT PaintContext { |
// which this was copied from. We expect a copied-from PaintContext to outlive |
// copies made from it. |
cc::PaintRecorder* recorder_; |
- // The device scale of the frame being painted. Used to determine which bitmap |
- // resources to use in the frame. |
- float device_scale_factor_; |
// Invalidation in the space of the paint root (ie the space of the layer |
// backing the paint taking place). |
gfx::Rect invalidation_; |
@@ -100,6 +109,13 @@ class COMPOSITOR_EXPORT PaintContext { |
// |invalidation_|. |
gfx::Vector2d offset_; |
+ gfx::Size pixel_size_; |
+ gfx::Size size_; |
+ |
+ // The device scale of the frame being painted. Used to determine which bitmap |
+ // resources to use in the frame. |
+ float device_scale_factor_; |
+ |
#if DCHECK_IS_ON() |
// Used to verify that the |invalidation_| is only used to compare against |
// rects in the same space. |