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

Unified Diff: ui/gfx/canvas.cc

Issue 2849953004: SV Test
Patch Set: Created 3 years, 8 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
« no previous file with comments | « ui/gfx/canvas.h ('k') | ui/views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas.cc
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc
index 31ef57fbd294b02568e9fa28a36075637447d3ca..c86b3ec33d7db1fa2f6c2811c01a568a8921d807 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -27,12 +27,16 @@
#include "ui/gfx/skia_util.h"
#include "ui/gfx/transform.h"
+#include "base/debug/stack_trace.h"
+
namespace gfx {
Canvas::Canvas(const Size& size, float image_scale, bool is_opaque)
: image_scale_(image_scale) {
Size pixel_size = ScaleToCeiledSize(size, image_scale);
canvas_ = CreateOwnedCanvas(pixel_size, is_opaque);
+ LOG(ERROR) << "image scale:" << image_scale;
+
#if !defined(USE_CAIRO)
// skia::PlatformCanvas instances are initialized to 0 by Cairo, but
@@ -202,8 +206,8 @@ void Canvas::Translate(const Vector2d& offset) {
canvas_->translate(SkIntToScalar(offset.x()), SkIntToScalar(offset.y()));
}
-void Canvas::Scale(int x_scale, int y_scale) {
- canvas_->scale(SkIntToScalar(x_scale), SkIntToScalar(y_scale));
+void Canvas::Scale(float x_scale, float y_scale) {
+ canvas_->scale(SkFloatToScalar(x_scale), SkFloatToScalar(y_scale));
}
void Canvas::DrawColor(SkColor color) {
« no previous file with comments | « ui/gfx/canvas.h ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698