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 #ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ | 5 #ifndef SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ |
6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ | 6 #define SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "skia/ext/platform_device.h" | 10 #include "skia/ext/platform_device.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // Creates a context for |data| and calls Create. | 40 // Creates a context for |data| and calls Create. |
41 // If |data| is NULL, then the bitmap backing store is not initialized. | 41 // If |data| is NULL, then the bitmap backing store is not initialized. |
42 static BitmapPlatformDevice* CreateWithData(uint8_t* data, | 42 static BitmapPlatformDevice* CreateWithData(uint8_t* data, |
43 int width, int height, | 43 int width, int height, |
44 bool is_opaque); | 44 bool is_opaque); |
45 | 45 |
46 ~BitmapPlatformDevice() override; | 46 ~BitmapPlatformDevice() override; |
47 | 47 |
48 // PlatformDevice overrides | 48 // PlatformDevice overrides |
49 CGContextRef GetBitmapContext() override; | 49 CGContextRef GetBitmapContext() override; |
50 void DrawToNativeContext(CGContextRef context, | |
51 int x, | |
52 int y, | |
53 const CGRect* src_rect) override; | |
54 | 50 |
55 // SkBaseDevice overrides | 51 // SkBaseDevice overrides |
56 void setMatrixClip(const SkMatrix& transform, | 52 void setMatrixClip(const SkMatrix& transform, |
57 const SkRegion& region, | 53 const SkRegion& region, |
58 const SkClipStack&) override; | 54 const SkClipStack&) override; |
59 | 55 |
60 protected: | 56 protected: |
61 BitmapPlatformDevice(CGContextRef context, | 57 BitmapPlatformDevice(CGContextRef context, |
62 const SkBitmap& bitmap); | 58 const SkBitmap& bitmap); |
63 | 59 |
(...skipping 25 matching lines...) Expand all Loading... |
89 SkMatrix transform_; | 85 SkMatrix transform_; |
90 | 86 |
91 // The current clipping | 87 // The current clipping |
92 SkRegion clip_region_; | 88 SkRegion clip_region_; |
93 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); | 89 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); |
94 }; | 90 }; |
95 | 91 |
96 } // namespace skia | 92 } // namespace skia |
97 | 93 |
98 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ | 94 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ |
OLD | NEW |