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

Side by Side Diff: skia/ext/platform_device.h

Issue 1467403002: Move Windows DC-initialization to skia_utils_win.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-metafile-from-device
Patch Set: Rebase again Created 5 years 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
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | skia/ext/platform_device_win.cc » ('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 #ifndef SKIA_EXT_PLATFORM_DEVICE_H_ 5 #ifndef SKIA_EXT_PLATFORM_DEVICE_H_
6 #define SKIA_EXT_PLATFORM_DEVICE_H_ 6 #define SKIA_EXT_PLATFORM_DEVICE_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 20 matching lines...) Expand all
31 31
32 // Bind a PlatformDevice instance, |platform_device| to |device|. Subsequent 32 // Bind a PlatformDevice instance, |platform_device| to |device|. Subsequent
33 // calls to the functions exported below will forward the request to the 33 // calls to the functions exported below will forward the request to the
34 // corresponding method on the bound PlatformDevice instance. If no 34 // corresponding method on the bound PlatformDevice instance. If no
35 // PlatformDevice has been bound to the SkBaseDevice passed, then the 35 // PlatformDevice has been bound to the SkBaseDevice passed, then the
36 // routines are NOPS. 36 // routines are NOPS.
37 SK_API void SetPlatformDevice(SkBaseDevice* device, 37 SK_API void SetPlatformDevice(SkBaseDevice* device,
38 PlatformDevice* platform_device); 38 PlatformDevice* platform_device);
39 SK_API PlatformDevice* GetPlatformDevice(SkBaseDevice* device); 39 SK_API PlatformDevice* GetPlatformDevice(SkBaseDevice* device);
40 40
41
42 #if defined(OS_WIN)
43 // Initializes the default settings and colors in a device context.
44 SK_API void InitializeDC(HDC context);
45 #endif
46
47 // A SkBitmapDevice is basically a wrapper around SkBitmap that provides a 41 // A SkBitmapDevice is basically a wrapper around SkBitmap that provides a
48 // surface for SkCanvas to draw into. PlatformDevice provides a surface 42 // surface for SkCanvas to draw into. PlatformDevice provides a surface
49 // Windows can also write to. It also provides functionality to play well 43 // Windows can also write to. It also provides functionality to play well
50 // with GDI drawing functions. This class is abstract and must be subclassed. 44 // with GDI drawing functions. This class is abstract and must be subclassed.
51 // It provides the basic interface to implement it either with or without 45 // It provides the basic interface to implement it either with or without
52 // a bitmap backend. 46 // a bitmap backend.
53 // 47 //
54 // PlatformDevice provides an interface which sub-classes of SkBaseDevice can 48 // PlatformDevice provides an interface which sub-classes of SkBaseDevice can
55 // also provide to allow for drawing by the native platform into the device. 49 // also provide to allow for drawing by the native platform into the device.
56 // TODO(robertphillips): Once the bitmap-specific entry points are removed 50 // TODO(robertphillips): Once the bitmap-specific entry points are removed
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 static void LoadTransformToDC(HDC dc, const SkMatrix& matrix); 103 static void LoadTransformToDC(HDC dc, const SkMatrix& matrix);
110 104
111 // Transforms SkPath's paths into a series of cubic path. 105 // Transforms SkPath's paths into a series of cubic path.
112 static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath); 106 static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath);
113 #endif 107 #endif
114 }; 108 };
115 109
116 } // namespace skia 110 } // namespace skia
117 111
118 #endif // SKIA_EXT_PLATFORM_DEVICE_H_ 112 #endif // SKIA_EXT_PLATFORM_DEVICE_H_
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_win.cc ('k') | skia/ext/platform_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698