OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 bool is_opaque); | 34 bool is_opaque); |
35 | 35 |
36 // Creates a context for |data| and calls Create. | 36 // Creates a context for |data| and calls Create. |
37 static BitmapPlatformDevice* CreateWithData(uint8_t* data, | 37 static BitmapPlatformDevice* CreateWithData(uint8_t* data, |
38 int width, int height, | 38 int width, int height, |
39 bool is_opaque); | 39 bool is_opaque); |
40 | 40 |
41 virtual ~BitmapPlatformDevice(); | 41 virtual ~BitmapPlatformDevice(); |
42 | 42 |
43 // PlatformDevice overrides | 43 // PlatformDevice overrides |
44 virtual CGContextRef GetBitmapContext(); | 44 virtual CGContextRef GetBitmapContext() OVERRIDE; |
45 virtual void DrawToNativeContext(CGContextRef context, int x, int y, | 45 virtual void DrawToNativeContext(CGContextRef context, int x, int y, |
46 const CGRect* src_rect) OVERRIDE; | 46 const CGRect* src_rect) OVERRIDE; |
47 | 47 |
48 // SkDevice overrides | 48 // SkDevice overrides |
49 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, | 49 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, |
50 const SkClipStack&) OVERRIDE; | 50 const SkClipStack&) OVERRIDE; |
51 | 51 |
52 protected: | 52 protected: |
53 // Reference counted data that can be shared between multiple devices. This | 53 // Reference counted data that can be shared between multiple devices. This |
54 // allows copy constructors and operator= for devices to work properly. The | 54 // allows copy constructors and operator= for devices to work properly. The |
(...skipping 15 matching lines...) Expand all Loading... |
70 // Data associated with this device, guaranteed non-null. We hold a reference | 70 // Data associated with this device, guaranteed non-null. We hold a reference |
71 // to this object. | 71 // to this object. |
72 BitmapPlatformDeviceData* data_; | 72 BitmapPlatformDeviceData* data_; |
73 | 73 |
74 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); | 74 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); |
75 }; | 75 }; |
76 | 76 |
77 } // namespace skia | 77 } // namespace skia |
78 | 78 |
79 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ | 79 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ |
OLD | NEW |