Flutter Engine
The Flutter Engine
GrGLBackendSurfacePriv.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef GrGLBackendSurfacePriv_DEFINED
9#define GrGLBackendSurfacePriv_DEFINED
10
13#include "include/gpu/GrTypes.h"
16
17#include <string_view>
18
19struct GrGLTextureInfo;
20namespace skgpu { enum class Mipmapped : bool; }
21
22namespace GrBackendTextures {
23// The GrGLTextureInfo must have a valid fFormat.
25 int height,
27 const GrGLTextureInfo& glInfo,
29 std::string_view label = {});
30} // namespace GrBackendTextures
31
33public:
35
36 const GrGLBackendTextureInfo& info() const { return fGLInfo; }
37
38private:
39 void copyTo(AnyTextureData&) const override;
40 bool isProtected() const override;
41 bool equal(const GrBackendTextureData* that) const override;
42 bool isSameTexture(const GrBackendTextureData* that) const override;
43 GrBackendFormat getBackendFormat() const override;
44#if defined(SK_DEBUG)
45 GrBackendApi type() const override { return GrBackendApi::kOpenGL; }
46#endif
47
49};
50
51#endif
GrBackendApi
Definition: GrTypes.h:95
GLenum type
GrBackendTexture::AnyTextureData AnyTextureData
GrGLBackendTextureData(const GrGLTextureInfo &info, sk_sp< GrGLTextureParameters > params)
const GrGLBackendTextureInfo & info() const
const EmbeddedViewParams * params
SK_API GrBackendTexture MakeGL(int width, int height, skgpu::Mipmapped, const GrGLTextureInfo &glInfo, std::string_view label={})
Definition: GpuTools.h:21
Mipmapped
Definition: GpuTypes.h:53
int32_t height
int32_t width