2021-12-07 16:22:18 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2021 Google LLC.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SKSL_DEBUG_TRACE
|
|
|
|
#define SKSL_DEBUG_TRACE
|
|
|
|
|
2021-12-07 21:51:41 +00:00
|
|
|
#include "include/core/SkRefCnt.h"
|
|
|
|
|
2021-12-07 16:22:18 +00:00
|
|
|
class SkWStream;
|
|
|
|
|
|
|
|
namespace SkSL {
|
|
|
|
|
2021-12-07 21:51:41 +00:00
|
|
|
class DebugTrace : public SkRefCnt {
|
2021-12-07 16:22:18 +00:00
|
|
|
public:
|
|
|
|
/** Serializes a debug trace to JSON which can be parsed by our debugger. */
|
|
|
|
virtual void writeTrace(SkWStream* w) const = 0;
|
|
|
|
|
|
|
|
/** Generates a human-readable dump of the debug trace. */
|
|
|
|
virtual void dump(SkWStream* o) const = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace SkSL
|
|
|
|
|
|
|
|
#endif
|