Index: ui/compositor/paint_context.cc |
diff --git a/ui/compositor/paint_context.cc b/ui/compositor/paint_context.cc |
index b2b4fac54b39a4c19adb6b398cd1d3674d3a5e58..48e2e9d8f684440a72cb910557a3c2f6c482ae19 100644 |
--- a/ui/compositor/paint_context.cc |
+++ b/ui/compositor/paint_context.cc |
@@ -10,10 +10,14 @@ namespace ui { |
PaintContext::PaintContext(cc::DisplayItemList* list, |
float device_scale_factor, |
- const gfx::Rect& invalidation) |
+ const gfx::Rect& invalidation, |
+ bool is_pixel_canvas) |
: list_(list), |
device_scale_factor_(device_scale_factor), |
- invalidation_(invalidation) { |
+ invalidation_(gfx::ScaleToRoundedRect( |
+ invalidation, |
+ is_pixel_canvas ? device_scale_factor_ : 1.f)), |
+ is_pixel_canvas_(is_pixel_canvas) { |
#if DCHECK_IS_ON() |
root_visited_ = nullptr; |
inside_paint_recorder_ = false; |
@@ -25,7 +29,8 @@ PaintContext::PaintContext(const PaintContext& other, |
: list_(other.list_), |
device_scale_factor_(other.device_scale_factor_), |
invalidation_(other.invalidation_), |
- offset_(other.offset_ + offset) { |
+ offset_(other.offset_ + offset), |
+ is_pixel_canvas_(other.is_pixel_canvas_) { |
#if DCHECK_IS_ON() |
root_visited_ = other.root_visited_; |
inside_paint_recorder_ = other.inside_paint_recorder_; |
@@ -37,7 +42,8 @@ PaintContext::PaintContext(const PaintContext& other, |
: list_(other.list_), |
device_scale_factor_(other.device_scale_factor_), |
invalidation_(), |
- offset_(other.offset_) { |
+ offset_(other.offset_), |
+ is_pixel_canvas_(other.is_pixel_canvas_) { |
#if DCHECK_IS_ON() |
root_visited_ = other.root_visited_; |
inside_paint_recorder_ = other.inside_paint_recorder_; |