| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 class GraphicsContext; | 31 class GraphicsContext; |
| 32 | 32 |
| 33 // This class automatically saves and restores the current NSGraphicsContext for | 33 // This class automatically saves and restores the current NSGraphicsContext for |
| 34 // functions which call out into AppKit and rely on the currentContext being set | 34 // functions which call out into AppKit and rely on the currentContext being set |
| 35 class PLATFORM_EXPORT LocalCurrentGraphicsContext { | 35 class PLATFORM_EXPORT LocalCurrentGraphicsContext { |
| 36 WTF_MAKE_NONCOPYABLE(LocalCurrentGraphicsContext); | 36 WTF_MAKE_NONCOPYABLE(LocalCurrentGraphicsContext); |
| 37 public: | 37 public: |
| 38 LocalCurrentGraphicsContext(GraphicsContext*, const IntRect& dirtyRect); | 38 LocalCurrentGraphicsContext(GraphicsContext&, const IntRect& dirtyRect); |
| 39 // Allows specifying an interest rect to which we clip if slimming paint is
enabled and performance would benefit. | 39 // Allows specifying an interest rect to which we clip if slimming paint is
enabled and performance would benefit. |
| 40 LocalCurrentGraphicsContext(GraphicsContext*, const IntRect* interestRect, c
onst IntRect& dirtyRect); | 40 LocalCurrentGraphicsContext(GraphicsContext&, const IntRect* interestRect, c
onst IntRect& dirtyRect); |
| 41 LocalCurrentGraphicsContext(SkCanvas*, float deviceScaleFactor, const IntRec
t* interestRect, const IntRect& dirtyRect); | 41 LocalCurrentGraphicsContext(SkCanvas*, float deviceScaleFactor, const IntRec
t* interestRect, const IntRect& dirtyRect); |
| 42 ~LocalCurrentGraphicsContext(); | 42 ~LocalCurrentGraphicsContext(); |
| 43 CGContextRef cgContext(); | 43 CGContextRef cgContext(); |
| 44 private: | 44 private: |
| 45 | 45 |
| 46 SkCanvas* m_savedCanvas; | 46 SkCanvas* m_savedCanvas; |
| 47 NSGraphicsContext* m_savedNSGraphicsContext; | 47 NSGraphicsContext* m_savedNSGraphicsContext; |
| 48 bool m_didSetGraphicsContext; | 48 bool m_didSetGraphicsContext; |
| 49 IntRect m_inflatedDirtyRect; | 49 IntRect m_inflatedDirtyRect; |
| 50 gfx::SkiaBitLocker m_skiaBitLocker; | 50 gfx::SkiaBitLocker m_skiaBitLocker; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } | 53 } |
| OLD | NEW |