Chromium Code Reviews| 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 #ifndef RenderDrawingRecorder_h | 5 #ifndef RenderDrawingRecorder_h |
| 6 #define RenderDrawingRecorder_h | 6 #define RenderDrawingRecorder_h |
| 7 | 7 |
| 8 #include "core/rendering/PaintPhase.h" | 8 #include "core/rendering/PaintPhase.h" |
| 9 #include "platform/geometry/FloatRect.h" | 9 #include "platform/geometry/FloatRect.h" |
| 10 #include "platform/graphics/paint/DisplayItem.h" | 10 #include "platform/graphics/paint/DisplayItem.h" |
| 11 #include "platform/graphics/paint/DrawingRecorder.h" | 11 #include "platform/graphics/paint/DrawingRecorder.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class GraphicsContext; | 15 class GraphicsContext; |
| 16 class RenderObject; | 16 class RenderObject; |
| 17 | 17 |
| 18 class RenderDrawingRecorder { | 18 class RenderDrawingRecorder : public DrawingRecorder { |
|
Xianzhu
2014/12/11 19:50:59
This is to inherit the canUseCachedDrawing method.
chrishtr
2014/12/12 00:18:08
Let's delegate instead. That pattern is already in
Xianzhu
2014/12/12 00:56:49
Done.
| |
| 19 public: | 19 public: |
| 20 explicit RenderDrawingRecorder(GraphicsContext*, const RenderObject*, PaintP hase, const FloatRect&); | 20 explicit RenderDrawingRecorder(GraphicsContext*, const RenderObject&, PaintP hase, const FloatRect&); |
| 21 | 21 |
| 22 ~RenderDrawingRecorder(); | 22 ~RenderDrawingRecorder(); |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 DrawingRecorder drawingRecorder; | |
| 26 #ifndef NDEBUG | 25 #ifndef NDEBUG |
| 27 const RenderObject* m_renderer; | 26 const RenderObject& m_renderer; |
| 28 #endif | 27 #endif |
| 29 }; | 28 }; |
| 30 | 29 |
| 31 } // namespace blink | 30 } // namespace blink |
| 32 | 31 |
| 33 #endif // RenderDrawingRecorder_h | 32 #endif // RenderDrawingRecorder_h |
| OLD | NEW |