| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |