OLD | NEW |
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 "ui/gfx/canvas_paint_mac.h" | 5 #include "ui/gfx/canvas_paint_mac.h" |
6 #include "ui/gfx/size.h" | 6 #include "ui/gfx/geometry/size.h" |
7 | 7 |
8 namespace gfx { | 8 namespace gfx { |
9 | 9 |
10 CanvasSkiaPaint::CanvasSkiaPaint(NSRect dirtyRect) | 10 CanvasSkiaPaint::CanvasSkiaPaint(NSRect dirtyRect) |
11 : context_(NULL), | 11 : context_(NULL), |
12 rectangle_(dirtyRect), | 12 rectangle_(dirtyRect), |
13 composite_alpha_(false) { | 13 composite_alpha_(false) { |
14 Init(true); | 14 Init(true); |
15 } | 15 } |
16 | 16 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // surface. | 67 // surface. |
68 canvas->translate(-SkDoubleToScalar(NSMinX(rectangle_)), | 68 canvas->translate(-SkDoubleToScalar(NSMinX(rectangle_)), |
69 -SkDoubleToScalar(NSMinY(rectangle_))); | 69 -SkDoubleToScalar(NSMinY(rectangle_))); |
70 | 70 |
71 context_ = skia::GetBitmapContext(skia::GetTopDevice(*canvas)); | 71 context_ = skia::GetBitmapContext(skia::GetTopDevice(*canvas)); |
72 } | 72 } |
73 | 73 |
74 } // namespace skia | 74 } // namespace skia |
75 | 75 |
76 | 76 |
OLD | NEW |