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

Unified Diff: sky/engine/platform/graphics/GraphicsContext.cpp

Issue 870393002: Remove GraphicsContext annotations. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
Index: sky/engine/platform/graphics/GraphicsContext.cpp
diff --git a/sky/engine/platform/graphics/GraphicsContext.cpp b/sky/engine/platform/graphics/GraphicsContext.cpp
index 8323246b1c8f34f194ac49adaf671edff658af27..9c1db22a57b1d52a14c61e006e2d55f7e2dcc336 100644
--- a/sky/engine/platform/graphics/GraphicsContext.cpp
+++ b/sky/engine/platform/graphics/GraphicsContext.cpp
@@ -116,9 +116,7 @@ GraphicsContext::GraphicsContext(SkCanvas* canvas, DisabledMode disableContextOr
, m_paintStateStack()
, m_paintStateIndex(0)
, m_pendingCanvasSave(false)
- , m_annotationMode(0)
#if ENABLE(ASSERT)
- , m_annotationCount(0)
, m_layerCount(0)
, m_disableDestructionChecks(false)
#endif
@@ -145,7 +143,6 @@ GraphicsContext::~GraphicsContext()
if (!m_disableDestructionChecks) {
ASSERT(!m_paintStateIndex);
ASSERT(!m_paintState->saveCount());
- ASSERT(!m_annotationCount);
ASSERT(!m_layerCount);
ASSERT(m_recordingStateStack.isEmpty());
ASSERT(m_canvasStateStack.isEmpty());
@@ -225,35 +222,6 @@ void GraphicsContext::restoreLayer()
m_trackedRegion.popCanvasLayer(this);
}
-void GraphicsContext::beginAnnotation(const AnnotationList& annotations)
-{
- if (contextDisabled())
- return;
-
- canvas()->beginCommentGroup("GraphicsContextAnnotation");
-
- AnnotationList::const_iterator end = annotations.end();
- for (AnnotationList::const_iterator it = annotations.begin(); it != end; ++it)
- canvas()->addComment(it->first, it->second.ascii().data());
-
-#if ENABLE(ASSERT)
- ++m_annotationCount;
-#endif
-}
-
-void GraphicsContext::endAnnotation()
-{
- if (contextDisabled())
- return;
-
- ASSERT(m_annotationCount > 0);
- canvas()->endCommentGroup();
-
-#if ENABLE(ASSERT)
- --m_annotationCount;
-#endif
-}
-
void GraphicsContext::setStrokePattern(PassRefPtr<Pattern> pattern)
{
if (contextDisabled())
« no previous file with comments | « sky/engine/platform/graphics/GraphicsContext.h ('k') | sky/engine/platform/graphics/GraphicsContextAnnotation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698