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

Unified Diff: ui/compositor/canvas_painter.cc

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Update tests Created 3 years, 5 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/compositor/canvas_painter.cc
diff --git a/ui/compositor/canvas_painter.cc b/ui/compositor/canvas_painter.cc
index a12e85ab06efe118dfddcef8d0cac1ca04b90f4a..fc6c1248c7601826df98281a2b63cc39c52ebad7 100644
--- a/ui/compositor/canvas_painter.cc
+++ b/ui/compositor/canvas_painter.cc
@@ -5,6 +5,7 @@
#include "ui/compositor/canvas_painter.h"
#include "cc/paint/display_item_list.h"
+#include "ui/compositor/compositor_switches.h"
namespace ui {
@@ -17,7 +18,11 @@ CanvasPainter::CanvasPainter(SkBitmap* output,
raster_scale_(raster_scale),
clear_color_(clear_color),
list_(new cc::DisplayItemList),
- context_(list_.get(), raster_scale, gfx::Rect(paint_size_)) {}
+ context_(list_.get(),
+ raster_scale,
+ gfx::ScaleToRoundedRect(
+ gfx::Rect(paint_size_),
+ IsPixelCanvasRecordingEnabled() ? raster_scale : 1.f)) {}
danakj 2017/07/21 17:29:39 Rather than reading the command line and trying to
malaykeshav 2017/07/21 23:30:17 Done
CanvasPainter::~CanvasPainter() {
gfx::Size pixel_size = gfx::ScaleToCeiledSize(paint_size_, raster_scale_);
« no previous file with comments | « ui/compositor/BUILD.gn ('k') | ui/compositor/compositor.cc » ('j') | ui/compositor/compositor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698