| 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 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 | 456 |
| 457 // Apply deferred paint state saves | 457 // Apply deferred paint state saves |
| 458 void realizePaintSave() | 458 void realizePaintSave() |
| 459 { | 459 { |
| 460 if (contextDisabled()) | 460 if (contextDisabled()) |
| 461 return; | 461 return; |
| 462 | 462 |
| 463 if (m_paintState->saveCount()) { | 463 if (m_paintState->saveCount()) { |
| 464 m_paintState->decrementSaveCount(); | 464 m_paintState->decrementSaveCount(); |
| 465 ++m_paintStateIndex; | 465 ++m_paintStateIndex; |
| 466 if (m_paintStateStack.size() == m_paintStateIndex) | 466 if (m_paintStateStack.size() == m_paintStateIndex) { |
| 467 m_paintStateStack.append(GraphicsContextState::create()); | 467 m_paintStateStack.append(GraphicsContextState::createAndCopy(*m_
paintState)); |
| 468 GraphicsContextState* priorPaintState = m_paintState; | 468 m_paintState = m_paintStateStack[m_paintStateIndex].get(); |
| 469 m_paintState = m_paintStateStack[m_paintStateIndex].get(); | 469 } else { |
| 470 m_paintState->copy(priorPaintState); | 470 GraphicsContextState* priorPaintState = m_paintState; |
| 471 m_paintState = m_paintStateStack[m_paintStateIndex].get(); |
| 472 m_paintState->copy(*priorPaintState); |
| 473 } |
| 471 } | 474 } |
| 472 } | 475 } |
| 473 | 476 |
| 474 // Apply deferred canvas state saves | 477 // Apply deferred canvas state saves |
| 475 void realizeCanvasSave() | 478 void realizeCanvasSave() |
| 476 { | 479 { |
| 477 if (!m_pendingCanvasSave || contextDisabled()) | 480 if (!m_pendingCanvasSave || contextDisabled()) |
| 478 return; | 481 return; |
| 479 | 482 |
| 480 m_canvas->save(); | 483 m_canvas->save(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 bool m_updatingControlTints : 1; | 537 bool m_updatingControlTints : 1; |
| 535 bool m_accelerated : 1; | 538 bool m_accelerated : 1; |
| 536 bool m_isCertainlyOpaque : 1; | 539 bool m_isCertainlyOpaque : 1; |
| 537 bool m_printing : 1; | 540 bool m_printing : 1; |
| 538 bool m_antialiasHairlineImages : 1; | 541 bool m_antialiasHairlineImages : 1; |
| 539 }; | 542 }; |
| 540 | 543 |
| 541 } // namespace WebCore | 544 } // namespace WebCore |
| 542 | 545 |
| 543 #endif // GraphicsContext_h | 546 #endif // GraphicsContext_h |
| OLD | NEW |