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

Side by Side Diff: ui/gfx/canvas_paint_gtk.cc

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new usage of scale in FastShowPickler Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/canvas.cc ('k') | ui/gfx/canvas_paint_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "ui/gfx/canvas.h" 7 #include "ui/gfx/canvas.h"
8 #include "ui/gfx/canvas_skia_paint.h" 8 #include "ui/gfx/canvas_skia_paint.h"
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 cairo_fill(cr); 46 cairo_fill(cr);
47 cairo_destroy(cr); 47 cairo_destroy(cr);
48 } 48 }
49 49
50 gdk_region_destroy(region_); 50 gdk_region_destroy(region_);
51 } 51 }
52 52
53 void CanvasSkiaPaint::Init(bool opaque) { 53 void CanvasSkiaPaint::Init(bool opaque) {
54 GdkRectangle bounds = rectangle(); 54 GdkRectangle bounds = rectangle();
55 RecreateBackingCanvas(gfx::Size(bounds.width, bounds.height), 55 RecreateBackingCanvas(gfx::Size(bounds.width, bounds.height),
56 ui::SCALE_FACTOR_100P, opaque); 56 1.0f, opaque);
57 57
58 skia::PlatformCanvas* canvas = platform_canvas(); 58 skia::PlatformCanvas* canvas = platform_canvas();
59 59
60 // Need to translate so that the dirty region appears at the origin of the 60 // Need to translate so that the dirty region appears at the origin of the
61 // surface. 61 // surface.
62 canvas->translate(-SkIntToScalar(bounds.x), -SkIntToScalar(bounds.y)); 62 canvas->translate(-SkIntToScalar(bounds.x), -SkIntToScalar(bounds.y));
63 63
64 context_ = skia::BeginPlatformPaint(canvas); 64 context_ = skia::BeginPlatformPaint(canvas);
65 } 65 }
66 66
67 } // namespace gfx 67 } // namespace gfx
68 68
69 69
OLDNEW
« no previous file with comments | « ui/gfx/canvas.cc ('k') | ui/gfx/canvas_paint_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698