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 |
(...skipping 26 matching lines...) Expand all Loading... |
37 ~LocalCurrentGraphicsContext(); | 37 ~LocalCurrentGraphicsContext(); |
38 CGContextRef cgContext(); | 38 CGContextRef cgContext(); |
39 private: | 39 private: |
40 | 40 |
41 GraphicsContext* m_savedGraphicsContext; | 41 GraphicsContext* m_savedGraphicsContext; |
42 NSGraphicsContext* m_savedNSGraphicsContext; | 42 NSGraphicsContext* m_savedNSGraphicsContext; |
43 bool m_didSetGraphicsContext; | 43 bool m_didSetGraphicsContext; |
44 gfx::SkiaBitLocker m_skiaBitLocker; | 44 gfx::SkiaBitLocker m_skiaBitLocker; |
45 }; | 45 }; |
46 | 46 |
47 class PLATFORM_EXPORT ContextContainer { | |
48 WTF_MAKE_NONCOPYABLE(ContextContainer); | |
49 public: | |
50 ContextContainer(GraphicsContext*, IntRect clipRect); | |
51 | |
52 // This synchronizes the CGContext to reflect the current SkCanvas state. | |
53 // The implementation may not return the same CGContext each time. | |
54 CGContextRef context() { return m_skiaBitLocker.cgContext(); } | |
55 | |
56 private: | |
57 gfx::SkiaBitLocker m_skiaBitLocker; | |
58 }; | |
59 | |
60 } | 47 } |
OLD | NEW |