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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // allows copy constructors and operator= for devices to work properly. The | 54 // allows copy constructors and operator= for devices to work properly. The |
55 // bitmaps used by the base device class are already refcounted and copyable. | 55 // bitmaps used by the base device class are already refcounted and copyable. |
56 class BitmapPlatformDeviceData; | 56 class BitmapPlatformDeviceData; |
57 | 57 |
58 BitmapPlatformDevice(BitmapPlatformDeviceData* data, | 58 BitmapPlatformDevice(BitmapPlatformDeviceData* data, |
59 const SkBitmap& bitmap); | 59 const SkBitmap& bitmap); |
60 | 60 |
61 // Flushes the CoreGraphics context so that the pixel data can be accessed | 61 // Flushes the CoreGraphics context so that the pixel data can be accessed |
62 // directly by Skia. Overridden from SkDevice, this is called when Skia | 62 // directly by Skia. Overridden from SkDevice, this is called when Skia |
63 // starts accessing pixel data. | 63 // starts accessing pixel data. |
64 virtual void onAccessBitmap(SkBitmap*) OVERRIDE; | 64 virtual const SkBitmap& onAccessBitmap(SkBitmap*) OVERRIDE; |
65 | 65 |
66 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width, | 66 virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width, |
67 int height, bool isOpaque, | 67 int height, bool isOpaque, |
68 Usage usage) OVERRIDE; | 68 Usage usage) OVERRIDE; |
69 | 69 |
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 |