| Index: Source/platform/graphics/GraphicsContext.h
|
| diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h
|
| index 0178d341b7c3bf99f85c3ec1ff175482359a8572..a7a84e606a542e1f9e47d130e673c64a64189b66 100644
|
| --- a/Source/platform/graphics/GraphicsContext.h
|
| +++ b/Source/platform/graphics/GraphicsContext.h
|
| @@ -462,11 +462,14 @@ private:
|
| if (m_paintState->saveCount()) {
|
| m_paintState->decrementSaveCount();
|
| ++m_paintStateIndex;
|
| - if (m_paintStateStack.size() == m_paintStateIndex)
|
| - m_paintStateStack.append(GraphicsContextState::create());
|
| - GraphicsContextState* priorPaintState = m_paintState;
|
| - m_paintState = m_paintStateStack[m_paintStateIndex].get();
|
| - m_paintState->copy(priorPaintState);
|
| + if (m_paintStateStack.size() == m_paintStateIndex) {
|
| + m_paintStateStack.append(GraphicsContextState::createAndCopy(m_paintState));
|
| + m_paintState = m_paintStateStack[m_paintStateIndex].get();
|
| + } else {
|
| + GraphicsContextState* priorPaintState = m_paintState;
|
| + m_paintState = m_paintStateStack[m_paintStateIndex].get();
|
| + m_paintState->copy(priorPaintState);
|
| + }
|
| }
|
| }
|
|
|
|
|