chromium/third_party/angle/src/tests/test_utils/RenderDoc.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.
//
// RenderDoc:
//   Connection to renderdoc for capturing tests through its API.
//

#include "RenderDoc.h"

#include "common/angleutils.h"
#include "common/debug.h"

RenderDoc::RenderDoc() :{}

RenderDoc::~RenderDoc()
{}

#if defined(ANGLE_PLATFORM_ANDROID) || defined(ANGLE_PLATFORM_LINUX) || \
    defined(ANGLE_PLATFORM_WINDOWS)
#    include "third_party/renderdoc/src/renderdoc_app.h"

#    if defined(ANGLE_PLATFORM_WINDOWS)
constexpr char kRenderDocModuleName[] = "renderdoc";
#    elif defined(ANGLE_PLATFORM_ANDROID)
constexpr char kRenderDocModuleName[] = "libVkLayer_GLES_RenderDoc";
#    else
constexpr char kRenderDocModuleName[] =;
#    endif

void RenderDoc::attach()
{}

void RenderDoc::startFrame()
{}

void RenderDoc::endFrame()
{}

#else  // defiend(ANGLE_PLATFORM_ANDROID) || defined(ANGLE_PLATFORM_LINUX) ||
       // defined(ANGLE_PLATFORM_WINDOWS)

// Stub out the implementation on unsupported platforms.
void RenderDoc::attach()
{
    mApi = nullptr;
}

void RenderDoc::startFrame() {}

void RenderDoc::endFrame() {}

#endif  // defiend(ANGLE_PLATFORM_ANDROID) || defined(ANGLE_PLATFORM_LINUX) ||
        // defined(ANGLE_PLATFORM_WINDOWS)