| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_MAC_H_ | 5 #ifndef SKIA_EXT_PLATFORM_DEVICE_MAC_H_ |
| 6 #define SKIA_EXT_PLATFORM_DEVICE_MAC_H_ | 6 #define SKIA_EXT_PLATFORM_DEVICE_MAC_H_ |
| 7 | 7 |
| 8 #import <ApplicationServices/ApplicationServices.h> | 8 #import <ApplicationServices/ApplicationServices.h> |
| 9 #include "SkDevice.h" | 9 #include "SkDevice.h" |
| 10 | 10 |
| 11 class SkMatrix; | 11 class SkMatrix; |
| 12 class SkPath; | 12 class SkPath; |
| 13 class SkRegion; | 13 class SkRegion; |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace skia { |
| 16 | 16 |
| 17 // A device is basically a wrapper around SkBitmap that provides a surface for | 17 // A device is basically a wrapper around SkBitmap that provides a surface for |
| 18 // SkCanvas to draw into. Our device provides a surface CoreGraphics can also | 18 // SkCanvas to draw into. Our device provides a surface CoreGraphics can also |
| 19 // write to. It also provides functionality to play well with CG drawing | 19 // write to. It also provides functionality to play well with CG drawing |
| 20 // functions. | 20 // functions. |
| 21 // This class is abstract and must be subclassed. It provides the basic | 21 // This class is abstract and must be subclassed. It provides the basic |
| 22 // interface to implement it either with or without a bitmap backend. | 22 // interface to implement it either with or without a bitmap backend. |
| 23 class PlatformDeviceMac : public SkDevice { | 23 class PlatformDeviceMac : public SkDevice { |
| 24 public: | 24 public: |
| 25 // The CGContext that corresponds to the bitmap, used for CoreGraphics | 25 // The CGContext that corresponds to the bitmap, used for CoreGraphics |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 // Loops through each of the pixels in the specified range, invoking | 74 // Loops through each of the pixels in the specified range, invoking |
| 75 // adjustor for the alpha value of each pixel. | 75 // adjustor for the alpha value of each pixel. |
| 76 virtual void processPixels(int x, | 76 virtual void processPixels(int x, |
| 77 int y, | 77 int y, |
| 78 int width, | 78 int width, |
| 79 int height, | 79 int height, |
| 80 adjustAlpha adjustor) = 0; | 80 adjustAlpha adjustor) = 0; |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace gfx | 83 } // namespace skia |
| 84 | 84 |
| 85 #endif // SKIA_EXT_PLATFORM_DEVICE_MAC_H_ | 85 #endif // SKIA_EXT_PLATFORM_DEVICE_MAC_H_ |
| 86 | 86 |
| OLD | NEW |