OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 m_saveAndRestore = true; | 566 m_saveAndRestore = true; |
567 } | 567 } |
568 | 568 |
569 void restore() | 569 void restore() |
570 { | 570 { |
571 ASSERT(m_saveAndRestore); | 571 ASSERT(m_saveAndRestore); |
572 m_context.restore(); | 572 m_context.restore(); |
573 m_saveAndRestore = false; | 573 m_saveAndRestore = false; |
574 } | 574 } |
575 | 575 |
576 GraphicsContext* context() const { return &m_context; } | |
577 | |
578 private: | 576 private: |
579 GraphicsContext& m_context; | 577 GraphicsContext& m_context; |
580 bool m_saveAndRestore; | 578 bool m_saveAndRestore; |
581 }; | 579 }; |
582 | 580 |
583 } // namespace WebCore | 581 } // namespace WebCore |
584 | 582 |
585 #endif // GraphicsContext_h | 583 #endif // GraphicsContext_h |
586 | 584 |
OLD | NEW |