Index: third_party/WebKit/Source/platform/graphics/LoggingCanvas.h |
diff --git a/third_party/WebKit/Source/platform/graphics/LoggingCanvas.h b/third_party/WebKit/Source/platform/graphics/LoggingCanvas.h |
index 1d2f0bceb32d4681b4f0bb73f27007e80b71d6dd..1bf9661fb3193bf531c017dd8f073ccb40af4e8c 100644 |
--- a/third_party/WebKit/Source/platform/graphics/LoggingCanvas.h |
+++ b/third_party/WebKit/Source/platform/graphics/LoggingCanvas.h |
@@ -33,13 +33,17 @@ |
#include "platform/JSONValues.h" |
#include "platform/graphics/InterceptingCanvas.h" |
+#include <memory> |
namespace blink { |
class LoggingCanvas : public InterceptingCanvasBase { |
public: |
LoggingCanvas(int width, int height); |
- PassRefPtr<JSONArray> log(); |
+ |
+ // Gives the caller ownership of the current log data, and clears the log |
+ // for future operations. |
+ std::unique_ptr<JSONArray> log(); |
void onDrawPaint(const SkPaint&) override; |
void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override; |
@@ -75,7 +79,7 @@ public: |
private: |
friend class AutoLogger; |
- RefPtr<JSONArray> m_log; |
+ std::unique_ptr<JSONArray> m_log; |
}; |
#ifndef NDEBUG |