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

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

Issue 2629193002: Remove skia::PlatformDevice (Closed)
Patch Set: also remove SK_SUPPORT_LEGACY_GETTOPDEVICE Created 3 years, 11 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
« no previous file with comments | « skia/ext/platform_canvas_unittest.cc ('k') | skia/ext/platform_device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SKIA_EXT_PLATFORM_DEVICE_H_
6 #define SKIA_EXT_PLATFORM_DEVICE_H_
7
8 #include "build/build_config.h"
9
10 #include "skia/ext/native_drawing_context.h"
11 #include "third_party/skia/include/core/SkBitmapDevice.h"
12 #include "third_party/skia/include/core/SkTypes.h"
13
14 class SkMatrix;
15
16 namespace skia {
17
18 class PlatformDevice;
19
20 // The following routines provide accessor points for the functionality
21 // exported by the various PlatformDevice ports.
22 // All calls to PlatformDevice::* should be routed through these
23 // helper functions.
24
25 // DEPRECATED
26 // Bind a PlatformDevice instance, |platform_device|, to |device|.
27 SK_API void SetPlatformDevice(SkBaseDevice* device, PlatformDevice* platform_dev ice);
28
29 // DEPRECATED
30 // Retrieve the previous argument to SetPlatformDevice().
31 SK_API PlatformDevice* GetPlatformDevice(SkBaseDevice* device);
32
33 // A SkBitmapDevice is basically a wrapper around SkBitmap that provides a
34 // surface for SkCanvas to draw into. PlatformDevice provides a surface
35 // Windows can also write to. It also provides functionality to play well
36 // with GDI drawing functions. This class is abstract and must be subclassed.
37 // It provides the basic interface to implement it either with or without
38 // a bitmap backend.
39 //
40 // PlatformDevice provides an interface which sub-classes of SkBaseDevice can
41 // also provide to allow for drawing by the native platform into the device.
42 // TODO(robertphillips): Once the bitmap-specific entry points are removed
43 // from SkBaseDevice it might make sense for PlatformDevice to be derived
44 // from it.
45 class SK_API PlatformDevice {
46 public:
47 virtual ~PlatformDevice();
48
49 // Only implemented in bitmap_platform_device_win.
50 #if defined(WIN32)
51 // The DC that corresponds to the bitmap, used for GDI operations drawing
52 // into the bitmap. This is possibly heavyweight, so it should be existant
53 // only during one pass of rendering.
54 virtual NativeDrawingContext BeginPlatformPaint(const SkMatrix& transform,
55 const SkIRect& clip_bounds) = 0;
56 #endif
57 };
58
59 } // namespace skia
60
61 #endif // SKIA_EXT_PLATFORM_DEVICE_H_
OLDNEW
« no previous file with comments | « skia/ext/platform_canvas_unittest.cc ('k') | skia/ext/platform_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698