Chromium Code Reviews| Index: skia/ext/skia_utils_mac.h |
| =================================================================== |
| --- skia/ext/skia_utils_mac.h (revision 85477) |
| +++ skia/ext/skia_utils_mac.h (working copy) |
| @@ -15,6 +15,7 @@ |
| struct SkPoint; |
| struct SkRect; |
| class SkBitmap; |
| +class SkCanvas; |
| class SkMatrix; |
| #ifdef __LP64__ |
| typedef CGSize NSSize; |
| @@ -86,6 +87,20 @@ |
| // Returns |[NSImage imageNamed:@"NSApplicationIcon"]| as SkBitmap. |
| SkBitmap AppplicationIconAtSize(int size); |
| +// Converts a SkCanvas temporarily to a CGContext |
| +class SkiaBitLocker { |
| +public: |
|
Nico
2011/05/16 15:13:00
indent 1
_cary
2011/05/16 15:58:02
Done.
|
| + explicit SkiaBitLocker(SkCanvas* canvas); |
| + ~SkiaBitLocker(); |
| + CGContextRef cgContext(); |
| + |
| +private: |
|
Nico
2011/05/16 15:13:00
indent 1
_cary
2011/05/16 15:58:02
Done.
|
| + void releaseIfNeeded(); |
| + SkCanvas* m_canvas; |
|
Nico
2011/05/16 15:13:00
we name members canvas_, not m_canvas. same in the
_cary
2011/05/16 15:58:02
Done.
|
| + CGContextRef m_cgContext; |
| +}; |
| + |
| + |
| } // namespace gfx |
| #endif // SKIA_EXT_SKIA_UTILS_MAC_H_ |