Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: Source/platform/mac/LocalCurrentGraphicsContext.h

Issue 528413002: Revert 181330 "Revert 180822 "Specify clip rects when drawing Ma..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2145/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 15 matching lines...) Expand all
26 26
27 namespace blink { 27 namespace blink {
28 28
29 class GraphicsContext; 29 class GraphicsContext;
30 30
31 // This class automatically saves and restores the current NSGraphicsContext for 31 // This class automatically saves and restores the current NSGraphicsContext for
32 // functions which call out into AppKit and rely on the currentContext being set 32 // functions which call out into AppKit and rely on the currentContext being set
33 class PLATFORM_EXPORT LocalCurrentGraphicsContext { 33 class PLATFORM_EXPORT LocalCurrentGraphicsContext {
34 WTF_MAKE_NONCOPYABLE(LocalCurrentGraphicsContext); 34 WTF_MAKE_NONCOPYABLE(LocalCurrentGraphicsContext);
35 public: 35 public:
36 LocalCurrentGraphicsContext(GraphicsContext* graphicsContext); 36 LocalCurrentGraphicsContext(GraphicsContext*, IntRect clipRect);
37 ~LocalCurrentGraphicsContext(); 37 ~LocalCurrentGraphicsContext();
38 CGContextRef cgContext(); 38 CGContextRef cgContext();
39 private: 39 private:
40
40 GraphicsContext* m_savedGraphicsContext; 41 GraphicsContext* m_savedGraphicsContext;
41 NSGraphicsContext* m_savedNSGraphicsContext; 42 NSGraphicsContext* m_savedNSGraphicsContext;
42 bool m_didSetGraphicsContext; 43 bool m_didSetGraphicsContext;
43 gfx::SkiaBitLocker m_skiaBitLocker; 44 gfx::SkiaBitLocker m_skiaBitLocker;
44 }; 45 };
45 46
46 class PLATFORM_EXPORT ContextContainer { 47 class PLATFORM_EXPORT ContextContainer {
47 WTF_MAKE_NONCOPYABLE(ContextContainer); 48 WTF_MAKE_NONCOPYABLE(ContextContainer);
48 public: 49 public:
49 ContextContainer(GraphicsContext*); 50 ContextContainer(GraphicsContext*);
50 51
51 // This synchronizes the CGContext to reflect the current SkCanvas state. 52 // This synchronizes the CGContext to reflect the current SkCanvas state.
52 // The implementation may not return the same CGContext each time. 53 // The implementation may not return the same CGContext each time.
53 CGContextRef context() { return m_skiaBitLocker.cgContext(); } 54 CGContextRef context() { return m_skiaBitLocker.cgContext(); }
54 55
55 private: 56 private:
56 gfx::SkiaBitLocker m_skiaBitLocker; 57 gfx::SkiaBitLocker m_skiaBitLocker;
57 }; 58 };
58 59
59 } 60 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumMac.mm ('k') | Source/platform/mac/LocalCurrentGraphicsContext.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698