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

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

Issue 2607603004: Remove PlatformCanvas::GetBitmapContext() (Closed)
Patch Set: Mac build fix 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.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
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)
11 #include <windows.h>
12 #include <vector>
13 #endif
14
15 #include "skia/ext/native_drawing_context.h" 10 #include "skia/ext/native_drawing_context.h"
16 #include "third_party/skia/include/core/SkBitmapDevice.h" 11 #include "third_party/skia/include/core/SkBitmapDevice.h"
17 #include "third_party/skia/include/core/SkTypes.h" 12 #include "third_party/skia/include/core/SkTypes.h"
18 13
19 class SkMatrix; 14 class SkMatrix;
20 15
21 namespace skia { 16 namespace skia {
22 17
23 class PlatformDevice; 18 class PlatformDevice;
24 class ScopedPlatformPaint; 19 class ScopedPlatformPaint;
(...skipping 18 matching lines...) Expand all
43 // It provides the basic interface to implement it either with or without 38 // It provides the basic interface to implement it either with or without
44 // a bitmap backend. 39 // a bitmap backend.
45 // 40 //
46 // PlatformDevice provides an interface which sub-classes of SkBaseDevice can 41 // PlatformDevice provides an interface which sub-classes of SkBaseDevice can
47 // also provide to allow for drawing by the native platform into the device. 42 // also provide to allow for drawing by the native platform into the device.
48 // TODO(robertphillips): Once the bitmap-specific entry points are removed 43 // TODO(robertphillips): Once the bitmap-specific entry points are removed
49 // from SkBaseDevice it might make sense for PlatformDevice to be derived 44 // from SkBaseDevice it might make sense for PlatformDevice to be derived
50 // from it. 45 // from it.
51 class SK_API PlatformDevice { 46 class SK_API PlatformDevice {
52 public: 47 public:
53 virtual ~PlatformDevice() {} 48 virtual ~PlatformDevice();
54
55 #if defined(OS_MACOSX)
56 // The CGContext that corresponds to the bitmap, used for CoreGraphics
57 // operations drawing into the bitmap. This is possibly heavyweight, so it
58 // should exist only during one pass of rendering.
59 virtual CGContextRef GetBitmapContext(const SkMatrix& transform,
60 const SkIRect& clip_bounds) = 0;
61 #endif
62 49
63 private: 50 private:
64 // The DC that corresponds to the bitmap, used for GDI operations drawing 51 // The DC that corresponds to the bitmap, used for GDI operations drawing
65 // into the bitmap. This is possibly heavyweight, so it should be existant 52 // into the bitmap. This is possibly heavyweight, so it should be existant
66 // only during one pass of rendering. 53 // only during one pass of rendering.
67 virtual NativeDrawingContext BeginPlatformPaint(const SkMatrix& transform, 54 virtual NativeDrawingContext BeginPlatformPaint(const SkMatrix& transform,
68 const SkIRect& clip_bounds); 55 const SkIRect& clip_bounds) = 0;
69 56
70 friend class ScopedPlatformPaint; 57 friend class ScopedPlatformPaint;
71 }; 58 };
72 59
73 } // namespace skia 60 } // namespace skia
74 61
75 #endif // SKIA_EXT_PLATFORM_DEVICE_H_ 62 #endif // SKIA_EXT_PLATFORM_DEVICE_H_
OLDNEW
« no previous file with comments | « skia/ext/platform_canvas.cc ('k') | skia/ext/platform_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698