Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: Source/platform/graphics/GraphicsContext.h

Issue 303403006: Revert of Avoid redundant initialization of GraphicsContextState. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/graphics/GraphicsContextState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.h
diff --git a/Source/platform/graphics/GraphicsContext.h b/Source/platform/graphics/GraphicsContext.h
index fd736a9a9d94f9ee6a0eeac2429cbd5b7ff670e7..0178d341b7c3bf99f85c3ec1ff175482359a8572 100644
--- a/Source/platform/graphics/GraphicsContext.h
+++ b/Source/platform/graphics/GraphicsContext.h
@@ -462,14 +462,11 @@
if (m_paintState->saveCount()) {
m_paintState->decrementSaveCount();
++m_paintStateIndex;
- 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);
- }
+ 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);
}
}
« no previous file with comments | « no previous file | Source/platform/graphics/GraphicsContextState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698