forked from google/skia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nothing here was SkVM-specific, except for the reference to a `SkVMDebugTrace*`. The class now targets the vector inside the debug trace, and would be safe to share with RP. Change-Id: I82ac24993fc834ef16a6844372939e2097138bb6 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/660558 Reviewed-by: John Stiles <[email protected]> Reviewed-by: Brian Osman <[email protected]> Auto-Submit: John Stiles <[email protected]> Commit-Queue: John Stiles <[email protected]>
- Loading branch information
1 parent
3d15a45
commit c42320d
Showing
6 changed files
with
58 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Use of this source code is governed by a BSD-style license that can be | ||
* found in the LICENSE file. | ||
*/ | ||
|
||
#include "src/sksl/tracing/SkSLDebugInfo.h" | ||
#include "src/sksl/tracing/SkSLTraceHook.h" | ||
|
||
namespace SkSL { | ||
|
||
std::unique_ptr<Tracer> Tracer::Make(std::vector<TraceInfo>* traceInfo) { | ||
auto hook = std::make_unique<Tracer>(); | ||
hook->fTraceInfo = traceInfo; | ||
return hook; | ||
} | ||
|
||
void Tracer::line(int lineNum) { | ||
fTraceInfo->push_back({TraceInfo::Op::kLine, /*data=*/{lineNum, 0}}); | ||
} | ||
void Tracer::var(int slot, int32_t val) { | ||
fTraceInfo->push_back({TraceInfo::Op::kVar, /*data=*/{slot, val}}); | ||
} | ||
void Tracer::enter(int fnIdx) { | ||
fTraceInfo->push_back({TraceInfo::Op::kEnter, /*data=*/{fnIdx, 0}}); | ||
} | ||
void Tracer::exit(int fnIdx) { | ||
fTraceInfo->push_back({TraceInfo::Op::kExit, /*data=*/{fnIdx, 0}}); | ||
} | ||
void Tracer::scope(int delta) { | ||
fTraceInfo->push_back({TraceInfo::Op::kScope, /*data=*/{delta, 0}}); | ||
} | ||
|
||
} // namespace SkSL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters