xref: /aosp_15_r20/external/skia/include/sksl/SkSLDebugTrace.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1 /*
2  * Copyright 2021 Google LLC.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SKSL_DEBUG_TRACE
9 #define SKSL_DEBUG_TRACE
10 
11 #include "include/core/SkRefCnt.h"
12 
13 class SkWStream;
14 
15 namespace SkSL {
16 
17 class DebugTrace : public SkRefCnt {
18 public:
19     /** Serializes a debug trace to JSON which can be parsed by our debugger. */
20     virtual void writeTrace(SkWStream* w) const = 0;
21 
22     /** Generates a human-readable dump of the debug trace. */
23     virtual void dump(SkWStream* o) const = 0;
24 };
25 
26 } // namespace SkSL
27 
28 #endif
29