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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 m_context.save(); | 567 m_context.save(); |
568 m_saveAndRestore = true; | 568 m_saveAndRestore = true; |
569 } | 569 } |
570 | 570 |
571 void restore() | 571 void restore() |
572 { | 572 { |
573 ASSERT(m_saveAndRestore); | 573 ASSERT(m_saveAndRestore); |
574 m_context.restore(); | 574 m_context.restore(); |
575 m_saveAndRestore = false; | 575 m_saveAndRestore = false; |
576 } | 576 } |
577 | |
578 GraphicsContext* context() const { return &m_context; } | |
579 | 577 |
580 private: | 578 private: |
581 GraphicsContext& m_context; | 579 GraphicsContext& m_context; |
582 bool m_saveAndRestore; | 580 bool m_saveAndRestore; |
583 }; | 581 }; |
584 | 582 |
585 } // namespace WebCore | 583 } // namespace WebCore |
586 | 584 |
587 #endif // GraphicsContext_h | 585 #endif // GraphicsContext_h |
588 | 586 |
OLD | NEW |