OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/compositor/canvas_painter.h" | 5 #include "ui/compositor/canvas_painter.h" |
6 | 6 |
7 #include "cc/playback/display_item_list.h" | 7 #include "cc/paint/display_item_list.h" |
8 | 8 |
9 namespace ui { | 9 namespace ui { |
10 | 10 |
11 CanvasPainter::CanvasPainter(SkBitmap* output, | 11 CanvasPainter::CanvasPainter(SkBitmap* output, |
12 const gfx::Size& paint_size, | 12 const gfx::Size& paint_size, |
13 float raster_scale, | 13 float raster_scale, |
14 SkColor clear_color) | 14 SkColor clear_color) |
15 : output_(output), | 15 : output_(output), |
16 paint_size_(paint_size), | 16 paint_size_(paint_size), |
17 raster_scale_(raster_scale), | 17 raster_scale_(raster_scale), |
(...skipping 11 matching lines...) Expand all Loading... |
29 SkCanvas canvas(*output_); | 29 SkCanvas canvas(*output_); |
30 canvas.clear(clear_color_); | 30 canvas.clear(clear_color_); |
31 | 31 |
32 canvas.scale(raster_scale_, raster_scale_); | 32 canvas.scale(raster_scale_, raster_scale_); |
33 | 33 |
34 list_->Finalize(); | 34 list_->Finalize(); |
35 list_->Raster(&canvas, nullptr); | 35 list_->Raster(&canvas, nullptr); |
36 } | 36 } |
37 | 37 |
38 } // namespace ui | 38 } // namespace ui |
OLD | NEW |