| 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 | 455 |
| 456 // Apply deferred paint state saves | 456 // Apply deferred paint state saves |
| 457 void realizePaintSave() | 457 void realizePaintSave() |
| 458 { | 458 { |
| 459 if (contextDisabled()) | 459 if (contextDisabled()) |
| 460 return; | 460 return; |
| 461 | 461 |
| 462 if (m_paintState->saveCount()) { | 462 if (m_paintState->saveCount()) { |
| 463 m_paintState->decrementSaveCount(); | 463 m_paintState->decrementSaveCount(); |
| 464 ++m_paintStateIndex; | 464 ++m_paintStateIndex; |
| 465 if (m_paintStateStack.size() == m_paintStateIndex) { | 465 if (m_paintStateStack.size() == m_paintStateIndex) |
| 466 m_paintStateStack.append(GraphicsContextState::createAndCopy(*m_
paintState)); | 466 m_paintStateStack.append(GraphicsContextState::create()); |
| 467 m_paintState = m_paintStateStack[m_paintStateIndex].get(); | 467 GraphicsContextState* priorPaintState = m_paintState; |
| 468 } else { | 468 m_paintState = m_paintStateStack[m_paintStateIndex].get(); |
| 469 GraphicsContextState* priorPaintState = m_paintState; | 469 m_paintState->copy(priorPaintState); |
| 470 m_paintState = m_paintStateStack[m_paintStateIndex].get(); | |
| 471 m_paintState->copy(*priorPaintState); | |
| 472 } | |
| 473 } | 470 } |
| 474 } | 471 } |
| 475 | 472 |
| 476 // Apply deferred canvas state saves | 473 // Apply deferred canvas state saves |
| 477 void realizeCanvasSave() | 474 void realizeCanvasSave() |
| 478 { | 475 { |
| 479 if (!m_pendingCanvasSave || contextDisabled()) | 476 if (!m_pendingCanvasSave || contextDisabled()) |
| 480 return; | 477 return; |
| 481 | 478 |
| 482 m_canvas->save(); | 479 m_canvas->save(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 bool m_updatingControlTints : 1; | 532 bool m_updatingControlTints : 1; |
| 536 bool m_accelerated : 1; | 533 bool m_accelerated : 1; |
| 537 bool m_isCertainlyOpaque : 1; | 534 bool m_isCertainlyOpaque : 1; |
| 538 bool m_printing : 1; | 535 bool m_printing : 1; |
| 539 bool m_antialiasHairlineImages : 1; | 536 bool m_antialiasHairlineImages : 1; |
| 540 }; | 537 }; |
| 541 | 538 |
| 542 } // namespace WebCore | 539 } // namespace WebCore |
| 543 | 540 |
| 544 #endif // GraphicsContext_h | 541 #endif // GraphicsContext_h |
| OLD | NEW |