chromium/third_party/skia/src/gpu/ganesh/gl/GrGLBuffer.cpp

/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "src/gpu/ganesh/gl/GrGLBuffer.h"

#include "include/core/SkString.h"
#include "include/core/SkTraceMemoryDump.h"
#include "include/gpu/GpuTypes.h"
#include "include/gpu/ganesh/gl/GrGLFunctions.h"
#include "include/gpu/ganesh/gl/GrGLInterface.h"
#include "include/private/base/SkMalloc.h"
#include "src/core/SkTraceEvent.h"
#include "src/gpu/ganesh/GrGpuResourcePriv.h"
#include "src/gpu/ganesh/gl/GrGLCaps.h"
#include "src/gpu/ganesh/gl/GrGLDefines.h"
#include "src/gpu/ganesh/gl/GrGLGpu.h"
#include "src/gpu/ganesh/gl/GrGLUtil.h"

#include <cstdint>
#include <cstring>
#include <string>

#define GL_CALL(X)
#define GL_CALL_RET(RET, X)

#define GL_ALLOC_CALL(gpu, call)

sk_sp<GrGLBuffer> GrGLBuffer::Make(GrGLGpu* gpu,
                                   size_t size,
                                   GrGpuBufferType intendedType,
                                   GrAccessPattern accessPattern) {}

// GL_STREAM_DRAW triggers an optimization in Chromium's GPU process where a client's vertex buffer
// objects are implemented as client-side-arrays on tile-deferred architectures.
#define DYNAMIC_DRAW_PARAM

inline static GrGLenum gr_to_gl_access_pattern(GrGpuBufferType bufferType,
                                               GrAccessPattern accessPattern,
                                               const GrGLCaps& caps) {}

GrGLBuffer::GrGLBuffer(GrGLGpu* gpu,
                       size_t size,
                       GrGpuBufferType intendedType,
                       GrAccessPattern accessPattern,
                       std::string_view label)
        :{}

inline GrGLGpu* GrGLBuffer::glGpu() const {}

inline const GrGLCaps& GrGLBuffer::glCaps() const {}

void GrGLBuffer::onRelease() {}

void GrGLBuffer::onAbandon() {}

[[nodiscard]] static inline GrGLenum invalidate_buffer(GrGLGpu* gpu,
                                                       GrGLenum target,
                                                       GrGLenum usage,
                                                       GrGLuint bufferID,
                                                       size_t bufferSize) {}

void GrGLBuffer::onMap(MapType type) {}

void GrGLBuffer::onUnmap(MapType) {}

bool GrGLBuffer::onClearToZero() {}

bool GrGLBuffer::onUpdateData(const void* src, size_t offset, size_t size, bool preserve) {}

void GrGLBuffer::onSetLabel() {}

void GrGLBuffer::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump,
                                  const SkString& dumpName) const {}