| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 // SkBaseDevice overrides | 60 // SkBaseDevice overrides |
| 61 void setMatrixClip(const SkMatrix& transform, | 61 void setMatrixClip(const SkMatrix& transform, |
| 62 const SkRegion& region, | 62 const SkRegion& region, |
| 63 const SkClipStack&) override; | 63 const SkClipStack&) override; |
| 64 | 64 |
| 65 protected: | 65 protected: |
| 66 BitmapPlatformDevice(CGContextRef context, | 66 BitmapPlatformDevice(CGContextRef context, |
| 67 const SkBitmap& bitmap); | 67 const SkBitmap& bitmap); |
| 68 | 68 |
| 69 SkBaseDevice* onCreateDevice(const SkImageInfo& info, Usage usage) override; | 69 SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) override; |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 void ReleaseBitmapContext(); | 72 void ReleaseBitmapContext(); |
| 73 | 73 |
| 74 // Sets the transform and clip operations. This will not update the CGContext, | 74 // Sets the transform and clip operations. This will not update the CGContext, |
| 75 // but will mark the config as dirty. The next call of LoadConfig will | 75 // but will mark the config as dirty. The next call of LoadConfig will |
| 76 // pick up these changes. | 76 // pick up these changes. |
| 77 void SetMatrixClip(const SkMatrix& transform, const SkRegion& region); | 77 void SetMatrixClip(const SkMatrix& transform, const SkRegion& region); |
| 78 | 78 |
| 79 // Loads the current transform and clip into the context. Can be called even | 79 // Loads the current transform and clip into the context. Can be called even |
| (...skipping 14 matching lines...) Expand all Loading... |
| 94 SkMatrix transform_; | 94 SkMatrix transform_; |
| 95 | 95 |
| 96 // The current clipping | 96 // The current clipping |
| 97 SkRegion clip_region_; | 97 SkRegion clip_region_; |
| 98 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); | 98 DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace skia | 101 } // namespace skia |
| 102 | 102 |
| 103 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ | 103 #endif // SKIA_EXT_BITMAP_PLATFORM_DEVICE_MAC_H_ |
| OLD | NEW |