chromium/third_party/angle/util/capture/frame_capture_test_utils.cpp

//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// frame_capture_test_utils:
//   Helper functions for capture and replay of traces.
//

#include "frame_capture_test_utils.h"

#include "common/frame_capture_utils.h"
#include "common/string_utils.h"

#include <rapidjson/document.h>
#include <rapidjson/istreamwrapper.h>
#include <fstream>

namespace angle
{

namespace
{
bool LoadJSONFromFile(const std::string &fileName, rapidjson::Document *doc)
{}

// Branched from:
// https://crsrc.org/c/third_party/zlib/google/compression_utils_portable.cc;drc=9fc44ce454cc889b603900ccd14b7024ea2c284c;l=167
// Unmodified other than inlining ZlibStreamWrapperType and z_stream arg to access .msg
int GzipUncompressHelperPatched(Bytef *dest,
                                uLongf *dest_length,
                                const Bytef *source,
                                uLong source_length,
                                z_stream &stream)
{}

bool UncompressData(const std::vector<uint8_t> &compressedData,
                    std::vector<uint8_t> *uncompressedData)
{}

void SaveDebugFile(const std::string &outputDir,
                   const char *baseFileName,
                   const char *suffix,
                   const std::vector<uint8_t> data)
{}
}  // namespace

bool LoadTraceNamesFromJSON(const std::string jsonFilePath, std::vector<std::string> *namesOut)
{}

bool LoadTraceInfoFromJSON(const std::string &traceName,
                           const std::string &traceJsonPath,
                           TraceInfo *traceInfoOut)
{}

TraceLibrary::TraceLibrary(const std::string &traceName, const TraceInfo &traceInfo)
{}

uint8_t *TraceLibrary::LoadBinaryData(const char *fileName)
{}

}  // namespace angle