chromium/gpu/command_buffer/service/query_manager.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "gpu/command_buffer/service/query_manager.h"

#include <stddef.h>
#include <stdint.h>

#include "base/atomicops.h"
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/not_fatal_until.h"
#include "base/notreached.h"
#include "base/time/time.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_fence.h"

namespace gpu {

namespace {

class CommandsIssuedQuery : public QueryManager::Query {};

CommandsIssuedQuery::CommandsIssuedQuery(QueryManager* manager,
                                         GLenum target,
                                         scoped_refptr<gpu::Buffer> buffer,
                                         QuerySync* sync)
    :{}

void CommandsIssuedQuery::Begin() {}

void CommandsIssuedQuery::Pause() {}

void CommandsIssuedQuery::Resume() {}

void CommandsIssuedQuery::End(base::subtle::Atomic32 submit_count) {}

void CommandsIssuedQuery::Reset() {}

void CommandsIssuedQuery::QueryCounter(base::subtle::Atomic32 submit_count) {}

void CommandsIssuedQuery::Process(bool did_finish) {}

void CommandsIssuedQuery::Destroy(bool /* have_context */) {}

void CommandsIssuedQuery::BeginProcessingCommands() {}

void CommandsIssuedQuery::EndProcessingCommands() {}

CommandsIssuedQuery::~CommandsIssuedQuery() = default;

class CommandsIssuedTimestampQuery : public QueryManager::Query {};

CommandsIssuedTimestampQuery::CommandsIssuedTimestampQuery(
    QueryManager* manager,
    GLenum target,
    scoped_refptr<gpu::Buffer> buffer,
    QuerySync* sync)
    :{}

void CommandsIssuedTimestampQuery::Begin() {}

void CommandsIssuedTimestampQuery::Pause() {}

void CommandsIssuedTimestampQuery::Resume() {}

void CommandsIssuedTimestampQuery::End(base::subtle::Atomic32 submit_count) {}

void CommandsIssuedTimestampQuery::QueryCounter(
    base::subtle::Atomic32 submit_count) {}

void CommandsIssuedTimestampQuery::Process(bool did_finish) {}

void CommandsIssuedTimestampQuery::Destroy(bool /* have_context */) {}

CommandsIssuedTimestampQuery::~CommandsIssuedTimestampQuery() = default;

class CommandsCompletedQuery : public QueryManager::Query {};

CommandsCompletedQuery::CommandsCompletedQuery(
    QueryManager* manager,
    GLenum target,
    scoped_refptr<gpu::Buffer> buffer,
    QuerySync* sync)
    :{}

void CommandsCompletedQuery::Begin() {}

void CommandsCompletedQuery::Pause() {}

void CommandsCompletedQuery::Resume() {}

void CommandsCompletedQuery::End(base::subtle::Atomic32 submit_count) {}

void CommandsCompletedQuery::QueryCounter(base::subtle::Atomic32 submit_count) {}

void CommandsCompletedQuery::Process(bool did_finish) {}

void CommandsCompletedQuery::Destroy(bool have_context) {}

CommandsCompletedQuery::~CommandsCompletedQuery() = default;

}  // namespace

QueryManager::QueryManager() :{}

QueryManager::~QueryManager() {}

void QueryManager::Destroy(bool have_context) {}

QueryManager::Query* QueryManager::CreateQuery(
    GLenum target,
    GLuint client_id,
    scoped_refptr<gpu::Buffer> buffer,
    QuerySync* sync) {}

void QueryManager::GenQueries(GLsizei n, const GLuint* queries) {}

bool QueryManager::IsValidQuery(GLuint id) {}

QueryManager::Query* QueryManager::GetQuery(GLuint client_id) {}

QueryManager::Query* QueryManager::GetActiveQuery(GLenum target) {}

void QueryManager::RemoveQuery(GLuint client_id) {}

void QueryManager::RemoveAllQueries() {}

void QueryManager::StartTracking(QueryManager::Query* /* query */) {}

void QueryManager::StopTracking(QueryManager::Query* /* query */) {}

GLenum QueryManager::AdjustTargetForEmulation(GLenum target) {}

void QueryManager::BeginQueryHelper(GLenum target, GLuint id) {}

void QueryManager::EndQueryHelper(GLenum target) {}

QueryManager::Query::Query(QueryManager* manager,
                           GLenum target,
                           scoped_refptr<gpu::Buffer> buffer,
                           QuerySync* sync)
    :{}

void QueryManager::Query::RunCallbacks() {}

void QueryManager::Query::AddCallback(base::OnceClosure callback) {}

QueryManager::Query::~Query() {}

void QueryManager::Query::MarkAsCompleted(uint64_t result) {}

void QueryManager::ProcessPendingQueries(bool did_finish) {}

bool QueryManager::HavePendingQueries() {}

void QueryManager::AddPendingQuery(Query* query,
                                   base::subtle::Atomic32 submit_count) {}

void QueryManager::RemovePendingQuery(Query* query) {}

void QueryManager::BeginQuery(Query* query) {}

void QueryManager::EndQuery(Query* query, base::subtle::Atomic32 submit_count) {}

void QueryManager::QueryCounter(Query* query,
                                base::subtle::Atomic32 submit_count) {}

void QueryManager::PauseQueries() {}

void QueryManager::ResumeQueries() {}

void QueryManager::BeginProcessingCommands() {}

void QueryManager::EndProcessingCommands() {}

}  // namespace gpu