chromium/gpu/command_buffer/client/cmd_buffer_helper.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.

// This file contains the implementation of the command buffer helper class.

#include "gpu/command_buffer/client/cmd_buffer_helper.h"

#include <stdint.h>

#include <algorithm>
#include "base/logging.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
#include "base/trace_event/memory_allocator_dump.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/process_memory_dump.h"
#include "base/trace_event/trace_event.h"
#include "gpu/command_buffer/common/buffer.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "gpu/command_buffer/common/constants.h"

namespace gpu {

CommandBufferHelper::CommandBufferHelper(CommandBuffer* command_buffer)
    :{}

void CommandBufferHelper::SetAutomaticFlushes(bool enabled) {}

bool CommandBufferHelper::IsContextLost() {}

void CommandBufferHelper::CalcImmediateEntries(int waiting_count) {}

bool CommandBufferHelper::AllocateRingBuffer() {}

void CommandBufferHelper::SetGetBuffer(int32_t id,
                                       scoped_refptr<Buffer> buffer) {}

void CommandBufferHelper::FreeRingBuffer() {}

gpu::ContextResult CommandBufferHelper::Initialize(uint32_t ring_buffer_size) {}

CommandBufferHelper::~CommandBufferHelper() {}

void CommandBufferHelper::UpdateCachedState(const CommandBuffer::State& state) {}

bool CommandBufferHelper::WaitForGetOffsetInRange(int32_t start, int32_t end) {}

void CommandBufferHelper::Flush() {}

void CommandBufferHelper::FlushLazy() {}

void CommandBufferHelper::OrderingBarrier() {}

#if defined(CMD_HELPER_PERIODIC_FLUSH_CHECK)
void CommandBufferHelper::PeriodicFlushCheck() {}
#endif

// Calls Flush() and then waits until the buffer is empty. Break early if the
// error is set.
bool CommandBufferHelper::Finish() {}

// Inserts a new token into the command stream. It uses an increasing value
// scheme so that we don't lose tokens (a token has passed if the current token
// value is higher than that token). Calls Finish() if the token value wraps,
// which will be rare. If we can't allocate a command buffer, token doesn't
// increase, ensuring WaitForToken eventually returns.
int32_t CommandBufferHelper::InsertToken() {}

bool CommandBufferHelper::HasTokenPassed(int32_t token) {}

void CommandBufferHelper::RefreshCachedToken() {}

bool CommandBufferHelper::HasCachedTokenPassed(int32_t token) {}

// Waits until the current token value is greater or equal to the value passed
// in argument.
void CommandBufferHelper::WaitForToken(int32_t token) {}

// Waits for available entries, basically waiting until get >= put + count + 1.
// It actually waits for contiguous entries, so it may need to wrap the buffer
// around, adding a noops. Thus this function may change the value of put_. The
// function will return early if an error occurs, in which case the available
// space may not be available.
void CommandBufferHelper::WaitForAvailableEntries(int32_t count) {}

int32_t CommandBufferHelper::GetTotalFreeEntriesNoWaiting() const {}

bool CommandBufferHelper::OnMemoryDump(
    const base::trace_event::MemoryDumpArgs& args,
    base::trace_event::ProcessMemoryDump* pmd) {}

}  // namespace gpu