Chromium Code Reviews| Index: ui/compositor/paint_context.h |
| diff --git a/ui/compositor/paint_context.h b/ui/compositor/paint_context.h |
| index bc17c50f46bd3b00cee3ce9e83229b04704d12a9..c1fef91a9605a7940288196380974ade53da11dc 100644 |
| --- a/ui/compositor/paint_context.h |
| +++ b/ui/compositor/paint_context.h |
| @@ -29,7 +29,8 @@ class COMPOSITOR_EXPORT PaintContext { |
| // |invalidation|. |
| PaintContext(cc::DisplayItemList* list, |
| float device_scale_factor, |
| - const gfx::Rect& invalidation); |
| + const gfx::Rect& invalidation, |
| + bool is_pixel_canvas); |
| // Clone a PaintContext with an additional |offset|. |
| PaintContext(const PaintContext& other, const gfx::Vector2d& offset); |
| @@ -46,6 +47,9 @@ class COMPOSITOR_EXPORT PaintContext { |
| // invalid. |
| bool CanCheckInvalid() const { return !invalidation_.IsEmpty(); } |
| + float device_scale_factor() const { return device_scale_factor_; } |
|
danakj
2017/07/25 17:58:56
Can you document these accessors?
malaykeshav
2017/07/25 22:57:58
Done
|
| + bool is_pixel_canvas() const { return is_pixel_canvas_; } |
| + |
| // When true, the |bounds| touches an invalidated area, so should be |
| // re-painted. When false, re-painting can be skipped. Bounds should be in |
| // the local space with offsets up to the painting root in the PaintContext. |
| @@ -94,6 +98,8 @@ class COMPOSITOR_EXPORT PaintContext { |
| // Offset from the PaintContext to the space of the paint root and the |
| // |invalidation_|. |
| gfx::Vector2d offset_; |
| + // If enabled, the paint commands are recorded at pixel size. |
| + bool is_pixel_canvas_; |
|
danakj
2017/07/25 17:58:56
const
malaykeshav
2017/07/25 22:57:58
Done
|
| #if DCHECK_IS_ON() |
| // Used to verify that the |invalidation_| is only used to compare against |