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

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

Issue 1512803004: Use refs for GraphicsContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
Patch Set: Created 5 years 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
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 17 matching lines...) Expand all
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698