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 "skia/ext/platform_device.h" | 5 #include "skia/ext/platform_device.h" |
6 | 6 |
7 #include "skia/ext/skia_utils_win.h" | 7 #include "skia/ext/skia_utils_win.h" |
8 #include "third_party/skia/include/core/SkMatrix.h" | 8 #include "third_party/skia/include/core/SkMatrix.h" |
9 #include "third_party/skia/include/core/SkPath.h" | 9 #include "third_party/skia/include/core/SkPath.h" |
10 #include "third_party/skia/include/core/SkRegion.h" | 10 #include "third_party/skia/include/core/SkRegion.h" |
11 #include "third_party/skia/include/core/SkUtils.h" | |
12 | 11 |
13 namespace skia { | 12 namespace skia { |
14 | 13 |
15 void InitializeDC(HDC context) { | 14 void InitializeDC(HDC context) { |
16 // Enables world transformation. | 15 // Enables world transformation. |
17 // If the GM_ADVANCED graphics mode is set, GDI always draws arcs in the | 16 // If the GM_ADVANCED graphics mode is set, GDI always draws arcs in the |
18 // counterclockwise direction in logical space. This is equivalent to the | 17 // counterclockwise direction in logical space. This is equivalent to the |
19 // statement that, in the GM_ADVANCED graphics mode, both arc control points | 18 // statement that, in the GM_ADVANCED graphics mode, both arc control points |
20 // and arcs themselves fully respect the device context's world-to-device | 19 // and arcs themselves fully respect the device context's world-to-device |
21 // transformation. | 20 // transformation. |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 LoadPathToDC(context, path); | 223 LoadPathToDC(context, path); |
225 hrgn = PathToRegion(context); | 224 hrgn = PathToRegion(context); |
226 } | 225 } |
227 int result = SelectClipRgn(context, hrgn); | 226 int result = SelectClipRgn(context, hrgn); |
228 SkASSERT(result != ERROR); | 227 SkASSERT(result != ERROR); |
229 result = DeleteObject(hrgn); | 228 result = DeleteObject(hrgn); |
230 SkASSERT(result != 0); | 229 SkASSERT(result != 0); |
231 } | 230 } |
232 | 231 |
233 } // namespace skia | 232 } // namespace skia |
OLD | NEW |