| 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/layout/LayoutObject.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 Lay
outObject& renderer, DisplayItem::Type displayItemType, const LayoutRect& clip) |
| 15 : RenderDrawingRecorder(context, renderer, displayItemType, pixelSnappedIntR
ect(clip)) |
| 16 { } |
| 17 |
| 14 RenderDrawingRecorder::RenderDrawingRecorder(GraphicsContext* context, const Lay
outObject& renderer, PaintPhase phase, const FloatRect& clip) | 18 RenderDrawingRecorder::RenderDrawingRecorder(GraphicsContext* context, const Lay
outObject& renderer, PaintPhase phase, const FloatRect& clip) |
| 15 : m_drawingRecorder(context, renderer.displayItemClient(), DisplayItem::pain
tPhaseToDrawingType(phase), clip) | 19 : m_drawingRecorder(context, renderer.displayItemClient(), DisplayItem::pain
tPhaseToDrawingType(phase), clip) |
| 16 #ifndef NDEBUG | 20 #ifndef NDEBUG |
| 17 , m_renderer(renderer) | 21 , m_renderer(renderer) |
| 18 #endif | 22 #endif |
| 19 { } | 23 { } |
| 20 | 24 |
| 21 RenderDrawingRecorder::RenderDrawingRecorder(GraphicsContext* context, const Lay
outObject& renderer, DisplayItem::Type displayItemType, const FloatRect& clip) | 25 RenderDrawingRecorder::RenderDrawingRecorder(GraphicsContext* context, const Lay
outObject& renderer, DisplayItem::Type displayItemType, const FloatRect& clip) |
| 22 : m_drawingRecorder(context, renderer.displayItemClient(), displayItemType,
clip) | 26 : m_drawingRecorder(context, renderer.displayItemClient(), displayItemType,
clip) |
| 23 #ifndef NDEBUG | 27 #ifndef NDEBUG |
| 24 , m_renderer(renderer) | 28 , m_renderer(renderer) |
| 25 #endif | 29 #endif |
| 26 { } | 30 { } |
| 27 | 31 |
| 28 RenderDrawingRecorder::~RenderDrawingRecorder() | 32 RenderDrawingRecorder::~RenderDrawingRecorder() |
| 29 { | 33 { |
| 30 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) | 34 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) |
| 31 return; | 35 return; |
| 32 | 36 |
| 33 #ifndef NDEBUG | 37 #ifndef NDEBUG |
| 34 m_drawingRecorder.setClientDebugString(String::format("renderer: \"%p %s\"",
&m_renderer, m_renderer.debugName().utf8().data())); | 38 m_drawingRecorder.setClientDebugString(String::format("renderer: \"%p %s\"",
&m_renderer, m_renderer.debugName().utf8().data())); |
| 35 #endif | 39 #endif |
| 36 } | 40 } |
| 37 | 41 |
| 38 } // namespace blink | 42 } // namespace blink |
| OLD | NEW |