| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
| 15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
| 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
| 18 */ | 18 */ |
| 19 | 19 |
| 20 #include "platform/PlatformExport.h" | 20 #include "platform/PlatformExport.h" |
| 21 #include "skia/ext/skia_utils_mac.h" | 21 #include "skia/ext/skia_utils_mac.h" |
| 22 #include "wtf/Noncopyable.h" | 22 #include "wtf/Noncopyable.h" |
| 23 | 23 |
| 24 OBJC_CLASS NSGraphicsContext; | 24 OBJC_CLASS NSGraphicsContext; |
| 25 | 25 |
| 26 namespace WebCore { | 26 namespace blink { |
| 27 | 27 |
| 28 class GraphicsContext; | 28 class GraphicsContext; |
| 29 | 29 |
| 30 // This class automatically saves and restores the current NSGraphicsContext for | 30 // This class automatically saves and restores the current NSGraphicsContext for |
| 31 // functions which call out into AppKit and rely on the currentContext being set | 31 // functions which call out into AppKit and rely on the currentContext being set |
| 32 class PLATFORM_EXPORT LocalCurrentGraphicsContext { | 32 class PLATFORM_EXPORT LocalCurrentGraphicsContext { |
| 33 WTF_MAKE_NONCOPYABLE(LocalCurrentGraphicsContext); | 33 WTF_MAKE_NONCOPYABLE(LocalCurrentGraphicsContext); |
| 34 public: | 34 public: |
| 35 LocalCurrentGraphicsContext(GraphicsContext* graphicsContext); | 35 LocalCurrentGraphicsContext(GraphicsContext* graphicsContext); |
| 36 ~LocalCurrentGraphicsContext(); | 36 ~LocalCurrentGraphicsContext(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 49 | 49 |
| 50 // This synchronizes the CGContext to reflect the current SkCanvas state. | 50 // This synchronizes the CGContext to reflect the current SkCanvas state. |
| 51 // The implementation may not return the same CGContext each time. | 51 // The implementation may not return the same CGContext each time. |
| 52 CGContextRef context() { return m_skiaBitLocker.cgContext(); } | 52 CGContextRef context() { return m_skiaBitLocker.cgContext(); } |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 gfx::SkiaBitLocker m_skiaBitLocker; | 55 gfx::SkiaBitLocker m_skiaBitLocker; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } | 58 } |
| OLD | NEW |