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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsContextStateSaver.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 // Copyright (C) 2013 Google Inc. All rights reserved. 1 // Copyright (C) 2013 Google Inc. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer 10 // copyright notice, this list of conditions and the following disclaimer
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 save(); 68 save();
69 } 69 }
70 70
71 void restore() 71 void restore()
72 { 72 {
73 ASSERT(m_saveAndRestore); 73 ASSERT(m_saveAndRestore);
74 m_context.restore(); 74 m_context.restore();
75 m_saveAndRestore = false; 75 m_saveAndRestore = false;
76 } 76 }
77 77
78 GraphicsContext* context() const { return &m_context; } 78 GraphicsContext& context() const { return m_context; }
79 bool saved() const { return m_saveAndRestore; } 79 bool saved() const { return m_saveAndRestore; }
80 80
81 private: 81 private:
82 GraphicsContext& m_context; 82 GraphicsContext& m_context;
83 bool m_saveAndRestore; 83 bool m_saveAndRestore;
84 }; 84 };
85 85
86 } // namespace blink 86 } // namespace blink
87 87
88 #endif // GraphicsContextStateSaver_h 88 #endif // GraphicsContextStateSaver_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp ('k') | third_party/WebKit/Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698