| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/paint/RenderDrawingRecorder.h" | 6 #include "core/paint/RenderDrawingRecorder.h" |
| 7 | 7 |
| 8 #include "core/layout/Layer.h" | 8 #include "core/layout/Layer.h" |
| 9 #include "core/rendering/RenderObject.h" | 9 #include "core/layout/LayoutObject.h" |
| 10 #include "platform/RuntimeEnabledFeatures.h" | 10 #include "platform/RuntimeEnabledFeatures.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 RenderDrawingRecorder::RenderDrawingRecorder(GraphicsContext* context, const Ren
derObject& renderer, PaintPhase phase, const FloatRect& clip) | 14 RenderDrawingRecorder::RenderDrawingRecorder(GraphicsContext* context, const Lay
outObject& renderer, PaintPhase phase, const FloatRect& clip) |
| 15 : m_drawingRecorder(context, renderer.displayItemClient(), DisplayItem::pain
tPhaseToDrawingType(phase), clip) | 15 : m_drawingRecorder(context, renderer.displayItemClient(), DisplayItem::pain
tPhaseToDrawingType(phase), clip) |
| 16 #ifndef NDEBUG | 16 #ifndef NDEBUG |
| 17 , m_renderer(renderer) | 17 , m_renderer(renderer) |
| 18 #endif | 18 #endif |
| 19 { } | 19 { } |
| 20 | 20 |
| 21 RenderDrawingRecorder::RenderDrawingRecorder(GraphicsContext* context, const Ren
derObject& renderer, DisplayItem::Type displayItemType, const FloatRect& clip) | 21 RenderDrawingRecorder::RenderDrawingRecorder(GraphicsContext* context, const Lay
outObject& renderer, DisplayItem::Type displayItemType, const FloatRect& clip) |
| 22 : m_drawingRecorder(context, renderer.displayItemClient(), displayItemType,
clip) | 22 : m_drawingRecorder(context, renderer.displayItemClient(), displayItemType,
clip) |
| 23 #ifndef NDEBUG | 23 #ifndef NDEBUG |
| 24 , m_renderer(renderer) | 24 , m_renderer(renderer) |
| 25 #endif | 25 #endif |
| 26 { } | 26 { } |
| 27 | 27 |
| 28 RenderDrawingRecorder::~RenderDrawingRecorder() | 28 RenderDrawingRecorder::~RenderDrawingRecorder() |
| 29 { | 29 { |
| 30 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) | 30 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) |
| 31 return; | 31 return; |
| 32 | 32 |
| 33 #ifndef NDEBUG | 33 #ifndef NDEBUG |
| 34 m_drawingRecorder.setClientDebugString(String::format("renderer: \"%p %s\"",
&m_renderer, m_renderer.debugName().utf8().data())); | 34 m_drawingRecorder.setClientDebugString(String::format("renderer: \"%p %s\"",
&m_renderer, m_renderer.debugName().utf8().data())); |
| 35 #endif | 35 #endif |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace blink | 38 } // namespace blink |
| OLD | NEW |