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

Unified Diff: Source/core/platform/graphics/GraphicsContextAnnotation.cpp

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Fixed Linux compilation (hopefuly Windows too), addressing some reviewer's suggestions. Created 7 years, 5 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: Source/core/platform/graphics/GraphicsContextAnnotation.cpp
diff --git a/Source/core/platform/graphics/GraphicsContextAnnotation.cpp b/Source/core/platform/graphics/GraphicsContextAnnotation.cpp
index 0a8c387cbdf81b4a74e5f70784fb44bc192254cb..fdb056618c032efb07671710c34ff48cb0184c02 100644
--- a/Source/core/platform/graphics/GraphicsContextAnnotation.cpp
+++ b/Source/core/platform/graphics/GraphicsContextAnnotation.cpp
@@ -82,21 +82,21 @@ static const char* paintPhaseName(WebCore::PaintPhase phase)
namespace WebCore {
-GraphicsContextAnnotation::GraphicsContextAnnotation(const PaintInfo& paintInfo, const RenderObject* object)
+GraphicsContextAnnotation::GraphicsContextAnnotation(PaintInfo& paintInfo, const RenderObject* object)
: m_rendererName(0)
, m_paintPhase(0)
{
- ASSERT(paintInfo.context);
+ ASSERT(paintInfo.getContext());
ASSERT(object);
- AnnotationModeFlags mode = paintInfo.context->annotationMode();
+ AnnotationModeFlags mode = paintInfo.getContext()->annotationMode();
Element* element = object->node() && object->node()->isElementNode() ? toElement(object->node()) : 0;
if (mode & AnnotateRendererName)
m_rendererName = object->renderName();
if (mode & AnnotatePaintPhase)
- m_paintPhase = paintPhaseName(paintInfo.phase);
+ m_paintPhase = paintPhaseName(paintInfo.getPhase());
if ((mode & AnnotateElementId) && element) {
const AtomicString id = element->getIdAttribute();
@@ -142,11 +142,11 @@ void GraphicsContextAnnotation::asAnnotationList(AnnotationList &list) const
list.append(std::make_pair(AnnotationKeyElementTag, m_elementTag));
}
-void GraphicsContextAnnotator::annotate(const PaintInfo& paintInfo, const RenderObject* object)
+void GraphicsContextAnnotator::annotate(PaintInfo& paintInfo, const RenderObject* object)
{
ASSERT(!m_context);
- m_context = paintInfo.context;
+ m_context = paintInfo.getContext();
m_context->beginAnnotation(GraphicsContextAnnotation(paintInfo, object));
}

Powered by Google App Engine
This is Rietveld 408576698