chromium/gpu/command_buffer/client/gl_helper.h

// 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.

#ifndef GPU_COMMAND_BUFFER_CLIENT_GL_HELPER_H_
#define GPU_COMMAND_BUFFER_CLIENT_GL_HELPER_H_

#include <memory>

#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "gpu/command_buffer/client/gles2_interface.h"
#include "gpu/gpu_export.h"
#include "ui/gfx/geometry/size.h"

namespace gfx {
class Point;
class Rect;
class Vector2d;
class Vector2dF;
}  // namespace gfx

namespace gpu {

class ContextSupport;
class GLHelperScaling;

class ScopedGLuint {};

class ScopedBuffer : public ScopedGLuint {};

class ScopedFramebuffer : public ScopedGLuint {};

class ScopedTexture : public ScopedGLuint {};

template <GLenum Target>
class ScopedBinder {};

template <GLenum Target>
class ScopedBufferBinder : ScopedBinder<Target> {};

template <GLenum Target>
class ScopedFramebufferBinder : ScopedBinder<Target> {};

template <GLenum Target>
class ScopedTextureBinder : ScopedBinder<Target> {};

class I420Converter;
class ReadbackYUVInterface;

// Provides higher level operations on top of the gles2::GLES2Interface
// interfaces.
//
// TODO(crbug.com/41405483): DEPRECATED. Please contact the crbug owner before
// adding any new dependencies on this code.
class GPU_EXPORT GLHelper {};

// Splits an RGBA source texture's image into separate Y, U, and V planes. The U
// and V planes are half-width and half-height, according to the I420 standard.
class GPU_EXPORT I420Converter {};

// Similar to a ScalerInterface, a YUV readback pipeline will cache a scaler and
// all intermediate textures and frame buffers needed to scale, crop, letterbox
// and read back a texture from the GPU into CPU-accessible RAM. A single
// readback pipeline can handle multiple outstanding readbacks at the same time.
//
// TODO(crbug.com/41405483): DEPRECATED. This will be removed soon in favor of
// I420Converter.
class GPU_EXPORT ReadbackYUVInterface {};

}  // namespace gpu

#endif  // GPU_COMMAND_BUFFER_CLIENT_GL_HELPER_H_